/* ================= GOOGLE FONT ================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&display=swap');


/* ================= GLOBAL RESET & BASE ================= */
:root {
    --bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --green: #16a34a;
    --green-dark: #15803d;
    --blue-select: #60a5fa;
    --card-border: #e6eefb;
    --glass: rgba(20, 20, 20, 0.02);
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
}

/* ================= HEADER ================= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== BRAND ===== */
.brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #111;
}

.brand-ai {
    font-size: 22px;
    font-weight: 600;
    color: #1f8f5f;
}

/* ===== NAV ===== */
.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.header-nav a:hover {
    color: #1f8f5f;
}

/* ===== CTA ===== */
.primary-btn {
    padding: 9px 18px;
    border-radius: 8px;
    background: #1f8f5f;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
}

.primary-btn:hover {
    background: #18704a;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }

    .header-nav {
        width: 100%;
        justify-content: space-between;
    }
}


/* ================= HERO SECTION ================= */
.hero {
    background: linear-gradient(135deg, #e8f8f0 0%, #ffffff 70%);
    padding: 80px 20px 30px;
}

.hero-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

/* LEFT */
.hero-content {
    max-width: 520px;
    animation: fadeSlideLeft 0.9s ease forwards;
}

.hero-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero-title span {
    color: #1f8f5f;
}

.hero-subtitle {
    font-size: 17px;
    color: #444;
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-cta {
    background: #1f8f5f;
    color: #fff;
    border: none;
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-cta:hover {
    background: #18704a;
    transform: translateY(-2px);
}

/* RIGHT */
.hero-visual {
    position: relative;
    width: 420px;
    height: 480px;
    animation: fadeSlideRight 1s ease forwards;
}

.resume-card {
    position: absolute;
    width: 260px;
    /* object-fit: fill; */
    border: 1px solid rgb(199, 199, 199);
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
    animation: float 6s ease-in-out infinite;
}

/* Individual positioning */
.card-1 {
    top: 100px;
    left: -46px;
    z-index: 3;
    height: 17em;
}

.card-2 {
    top: -42px;
    right: -69px;
    z-index: 2;
    animation-delay: 0.5s;
}

.card-3 {
    bottom: 38px;
    left: 225px;
    z-index: 1;
    animation-delay: 1s;
}

/* ANIMATIONS */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-visual {
        width: 100%;
        height: 360px;
    }

    .resume-card {
        width: 220px;
    }

    .card-3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 34px;
    }

    .hero-subtitle {
        font-size: 15px;
    }
}

/* Hero end */

/* ========== SECTIONS (container) ========== */
.section-card {
    max-width: var(--max-width);
    margin: 26px auto;
    padding: 18px;
}

.section-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.section-head .muted {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

/* ================= TEMPLATE SECTION ================= */

.templates-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-top: 8px;
    margin-bottom: 40px;
}

.template-description {
    margin-top: 0px;
}

.template-short {
    margin: 0;
    font-weight: 450;
    margin: 2px 0px;
}

/* ================= GRID ================= */

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ================= CARD ================= */

.template-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Selected card */
.template-card.selected {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

/* ================= IMAGE ================= */

.template-image {
    height: 220px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-image img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}


/* ================= CONTENT ================= */

.template-content {
    padding: 16px 18px 20px;
}

.template-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.template-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .template-image {
        height: 180px;
    }
}


/* inputs */
/* ================= BUILDER ================= */

.builder-section {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 16px;
}

.form-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.form-header h2 {
    font-size: 26px;
    margin-bottom: 6px;
}

.form-header p {
    color: #555;
    font-size: 14px;
}

/* ===== FORM LAYOUT ===== */

.error {
    color: #d93025;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

.form-group {
    margin-top: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1f8f5f;
    box-shadow: 0 0 0 3px rgba(31, 143, 95, 0.15);
}

/* ===== GRID ===== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* ===== BUTTONS ===== */

.btn-outline {
    margin-top: 10px;
    background: transparent;
    border: 1px dashed #bbb;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-outline:hover {
    background: #f3fdf8;
    border-color: #1f8f5f;
}

.btn-primary-large {
    width: 100%;
    padding: 14px;
    margin-top: 32px;
    font-size: 16px;
    border-radius: 12px;
    border: none;
    background: #1f8f5f;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-large:hover {
    background: #18704a;
}

/* ===== DIVIDER ===== */

.form-divider {
    margin-top: 32px;
    font-size: 13px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Delete Button */
.block-header {
    display: flex;
    justify-content: flex-end;
}

.delete-block-btn {
    background: transparent;
    border: none;
    color: #c0392b;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.delete-block-btn:hover {
    transform: scale(1.1);
}

/* ================= PREVIEW ================= */

.preview-section {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 16px;
}

.preview-canvas {
    background: #ffffff;
    padding: 24px;
    min-height: 300px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.preview-action {
    margin-top: 20px;
    text-align: center;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px;
    }
}

/* ================= ATS ================= */

.hidden {
    display: none;
}

/* ===== ATS INPUT ===== */

.ats-input {
    max-width: 900px;
    margin: 60px auto 20px;
    padding: 24px;
    border-radius: 14px;
    background: #f4fbf7;
    border: 1px solid #d6efe3;
}

.ats-input h3 {
    margin-bottom: 16px;
    font-size: 20px;
}

.ats-input-row {
    display: flex;
    gap: 12px;
}

.ats-input-row input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cfe5dc;
    font-size: 15px;
}

.ats-input-row button {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: #1f8f5f;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.ats-input-row button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ats-error {
    margin-top: 12px;
    color: #c0392b;
    font-size: 14px;
}

/* ===== ATS CARD ===== */

.ats-wrapper {
    max-width: 900px;
    margin: 40px auto;
}

.ats-card {
    padding: 36px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f3faf7);
    border: 1px solid #d6efe3;
    box-shadow: 0 25px 60px rgba(31, 143, 95, 0.12);
}

.ats-header h2 {
    font-size: 26px;
}

.ats-header p {
    color: #5f6f68;
    font-size: 14px;
    margin-top: 4px;
}

.ats-score {
    margin: 30px 0;
    font-size: 48px;
    font-weight: 700;
    color: #1f8f5f;
}

.ats-score small {
    font-size: 16px;
    color: #5f6f68;
}

.ats-suggestions h3 {
    margin-bottom: 16px;
}

.suggestion {
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #e6eee9;
    margin-bottom: 12px;
}

.suggestion h4 {
    margin-bottom: 6px;
    font-size: 15px;
    color: #1f8f5f;
}

.suggestion p {
    font-size: 14px;
    color: #444;
}

/* muted */
.muted {
    color: var(--muted);
    font-size: 13px;
}

/* PDF safety */
section {
    page-break-inside: avoid;
    break-inside: avoid;
}

h2,
h3 {
    page-break-after: avoid;
    break-after: avoid;
}

/* ================= FOOTER ================= */

.footer {
    background: #eaf6f0;
    /* soft light green */
    padding: 48px 20px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.footer-tagline {
    font-size: 14px;
    color: #2f6f52;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 13px;
    color: #555;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .footer {
        padding: 36px 16px;
    }

    .footer-brand {
        font-size: 20px;
    }
}

/* Responsive */

/* Global */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .section-card,
    .builder-section,
    .preview-section,
    .ats-wrapper {
        margin: 50px auto;
    }
}

/* Header */
@media (max-width: 600px) {
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .primary-btn {
        width: 100%;
        text-align: center;
    }
}

/* Hero Section */
@media (max-width: 768px) {
    .hero {
        padding: 60px 16px 20px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-visual {
        height: 260px;
    }

    .resume-card {
        width: 180px;
    }

    .card-1 {
        left: 0;
        top: 60px;
    }

    .card-2 {
        right: 0;
        top: 0;
    }

    .card-3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-visual {
        display: none;
        /* Decorative → remove on phones */
    }
}

/* Templates */
@media (max-width: 600px) {
    .template-grid {
        grid-template-columns: 1fr;
    }

    .template-card {
        max-width: 420px;
        margin: auto;
    }

    .template-content h3 {
        font-size: 17px;
    }
}

/* Form */
@media (max-width: 600px) {
    .form-card {
        padding: 22px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .btn-primary-large {
        font-size: 15px;
    }
}

/* ATS Input */
@media (max-width: 600px) {
    .ats-input-row {
        flex-direction: column;
    }

    .ats-input-row button {
        width: 100%;
    }
}

/* ATS Card */
@media (max-width: 600px) {
    .ats-card {
        padding: 24px;
    }

    .ats-score {
        font-size: 36px;
    }

    .ats-header h2 {
        font-size: 22px;
    }
}

/* Footer */
@media (max-width: 600px) {
    .ats-card {
        padding: 24px;
    }

    .ats-score {
        font-size: 36px;
    }

    .ats-header h2 {
        font-size: 22px;
    }
}