/* ==========================================
   CovoPDF — Main Stylesheet
   ========================================== */

/* --- CSS Variables --- */
:root {
    --primary-900: #0F172A;
    --primary-800: #1E293B;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748B;
    --primary-400: #94A3B8;
    --primary-300: #CBD5E1;
    --primary-200: #E2E8F0;
    --primary-100: #F1F5F9;
    --primary-50:  #F8FAFC;
    
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --blue-500: #3B82F6;
    --blue-400: #60A5FA;
    --blue-100: #DBEAFE;
    --blue-50:  #EFF6FF;
    
    --teal-600: #0891B2;
    --teal-500: #06B6D4;
    --teal-400: #22D3EE;
    --teal-100: #CFFAFE;
    
    --green-500: #22C55E;
    --green-100: #DCFCE7;
    --red-500: #EF4444;
    --red-100: #FEE2E2;
    --amber-500: #F59E0B;
    
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
    --shadow-glow: 0 0 40px rgba(59,130,246,.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--primary-800);
    background: var(--primary-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==========================================
   HEADER & NAV
   ========================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--primary-200);
    transition: var(--transition);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo-img { height: 48px; width: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 40px; height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37,99,235,.30);
    flex-shrink: 0;
    display: block;
}
.logo-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--primary-900);
    line-height: 1;
}
.logo-name .accent {
    background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Footer logo on dark background */
.site-footer .footer-logo-brand { margin-bottom: 16px; }
.site-footer .logo-name { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--primary-600);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover { color: var(--blue-600); background: var(--blue-50); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--primary-200);
    padding: 8px;
    z-index: 200;
}
/* mobile/touch: open on click (.open toggled in app.js) */
.nav-dropdown.open .nav-dropdown-menu { display: block; }
/* desktop only (real mouse + wide screen): also open on hover */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown-menu:hover { display: block; }
}
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: .88rem;
    color: var(--primary-700);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-dropdown-menu a:hover { background: var(--blue-50); color: var(--blue-600); }
.nav-dropdown-menu a.active { color: var(--blue-600); font-weight: 600; }
.lang-menu { min-width: 160px; max-height: 300px; overflow-y: auto; }

/* Mobile toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--primary-700); border-radius: 2px; transition: var(--transition); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--primary-200);
        flex-direction: column;
        align-items: stretch;        /* full-width items */
        text-align: left;
        padding: 12px 16px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
    }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-btn {
        width: 100%;
        justify-content: space-between;  /* caret pushed to the right */
    }
    .lang-btn { justify-content: flex-start; }  /* keep globe + label together */
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        min-width: 0;
        padding: 0 0 4px 12px;
        margin-left: 8px;
        border-left: 2px solid var(--primary-200);
    }
    .lang-menu { max-height: none; }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59,130,246,.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-full);
    font-size: .82rem;
    font-weight: 600;
    color: var(--blue-600);
    margin-bottom: 24px;
    animation: fadeInDown .6s ease;
}
.hero-badge svg { flex-shrink: 0; }
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-900);
    margin-bottom: 20px;
    animation: fadeInUp .6s ease .1s both;
}
.hero h1 .accent {
    background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem;
    color: var(--primary-500);
    max-width: 560px;
    margin: 0 auto 36px;
    animation: fadeInUp .6s ease .2s both;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
    transition: all .3s ease;
    animation: fadeInUp .6s ease .3s both;
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,.45);
}

/* ==========================================
   TOOLS GRID
   ========================================== */
.tools-section { padding: 80px 0; }
.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--primary-900);
    margin-bottom: 12px;
}
.section-header p {
    font-size: 1.05rem;
    color: var(--primary-500);
    max-width: 500px;
    margin: 0 auto;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.tool-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-200);
    transition: all .3s ease;
    overflow: hidden;
}
.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-500), var(--teal-500));
    opacity: 0;
    transition: var(--transition);
}
.tool-card:hover {
    border-color: var(--blue-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.tool-card:hover::after { opacity: 1; }
.tool-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
}
.tool-icon.pdf-word { background: var(--blue-100); color: var(--blue-600); }
.tool-icon.img-pdf { background: var(--green-100); color: var(--green-500); }
.tool-icon.word-pdf { background: var(--teal-100); color: var(--teal-600); }
.tool-icon.pdf-img { background: #FEF3C7; color: var(--amber-500); }
.tool-icon.pdf-merge { background: #F3E8FF; color: #9333EA; }
.tool-icon.pdf-compress { background: var(--red-100); color: var(--red-500); }
.tool-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 4px;
}
.tool-info p {
    font-size: .88rem;
    color: var(--primary-500);
    line-height: 1.5;
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.features-section {
    padding: 80px 0;
    background: var(--white);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 32px;
}
.feature-card {
    text-align: center;
    padding: 32px 24px;
}
.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-50), var(--teal-100));
    border-radius: var(--radius-lg);
    font-size: 1.6rem;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 8px;
}
.feature-card p {
    font-size: .9rem;
    color: var(--primary-500);
}

/* ==========================================
   HOW IT WORKS
   ========================================== */
.how-section { padding: 80px 0; }
.how-steps {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.how-step {
    text-align: center;
    max-width: 240px;
    position: relative;
}
.how-step-number {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.how-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-900);
}
.how-step p { font-size: .9rem; color: var(--primary-500); }

/* ==========================================
   CTA SECTION
   ========================================== */
.cta-section {
    padding: 80px 0;
    text-align: center;
}
.cta-box {
    padding: 64px 40px;
    background: linear-gradient(135deg, var(--primary-900) 0%, #1a365d 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,.2), transparent 70%);
}
.cta-box h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    position: relative;
}
.cta-box p {
    color: var(--primary-400);
    font-size: 1.05rem;
    margin-bottom: 32px;
    position: relative;
}
.cta-box .hero-cta { position: relative; }

/* ==========================================
   UPLOAD / TOOL PAGE
   ========================================== */
.tool-page { padding: 60px 0 80px; }
.tool-page-header {
    text-align: center;
    margin-bottom: 40px;
}
.tool-page-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--primary-900);
    margin-bottom: 10px;
}
.tool-page-header p {
    font-size: 1.05rem;
    color: var(--primary-500);
}

/* Upload Zone */
.upload-zone {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--white);
    border: 2px dashed var(--primary-300);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
}
.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--blue-400);
    background: var(--blue-50);
    box-shadow: var(--shadow-glow);
}
.upload-zone.dragover { transform: scale(1.02); }
.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-100), var(--teal-100));
    border-radius: 50%;
    color: var(--blue-600);
}
.upload-icon svg { width: 36px; height: 36px; }
.upload-zone h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 8px;
}
.upload-zone .or {
    color: var(--primary-400);
    font-size: .9rem;
    margin-bottom: 16px;
}
.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--white);
    background: var(--blue-600);
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.upload-btn:hover { background: var(--blue-700); }
.upload-meta {
    margin-top: 20px;
    font-size: .82rem;
    color: var(--primary-400);
}
input[type="file"] { display: none; }

/* File list (multi-file merge) */
.file-list {
    list-style: none;
    max-width: 680px;
    margin: 20px auto 0;
    padding: 0;
}
.file-list li {
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-size: .9rem;
    color: var(--primary-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-list .file-list-heading {
    background: transparent;
    border: none;
    font-weight: 700;
    color: var(--primary-700);
    padding-left: 4px;
}

/* Processing State */
.processing-state {
    display: none;
    max-width: 680px;
    margin: 0 auto;
    padding: 80px 40px;
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--primary-200);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.processing-state.active { display: block; }
.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--primary-200);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}
.processing-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 8px;
}
.processing-state p {
    color: var(--primary-500);
    font-size: .95rem;
}
.progress-bar {
    width: 100%;
    max-width: 320px;
    height: 6px;
    background: var(--primary-200);
    border-radius: var(--radius-full);
    margin: 24px auto 0;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--teal-500));
    border-radius: var(--radius-full);
    width: 0;
    animation: progressIndeterminate 2s ease-in-out infinite;
}

/* Result State */
.result-state {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--green-100);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-100);
    border-radius: 50%;
    color: var(--green-500);
}
.result-icon svg { width: 40px; height: 40px; }
.result-state h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-900);
    margin-bottom: 8px;
}
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-500), #16A34A);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(34,197,94,.35);
    transition: all .3s ease;
    margin: 24px 0;
}
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34,197,94,.45);
}
.result-expires {
    font-size: .88rem;
    color: var(--primary-400);
    margin-bottom: 24px;
}
.result-expires strong { color: var(--red-500); }
.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.result-actions a {
    font-size: .9rem;
    font-weight: 600;
    color: var(--blue-600);
    transition: var(--transition);
}
.result-actions a:hover { color: var(--blue-700); text-decoration: underline; }

/* Error State */
.error-state {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--white);
    border: 1px solid var(--red-100);
    border-radius: var(--radius-xl);
    text-align: center;
}
.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red-100);
    border-radius: 50%;
    color: var(--red-500);
    font-size: 1.8rem;
}

/* ==========================================
   AD SLOTS
   ========================================== */
.ad-slot {
    max-width: 728px;
    margin: 32px auto;
    min-height: 90px;
    background: var(--primary-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: var(--primary-400);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--primary-900);
    color: var(--primary-400);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer-logo { height: 46px; width: auto; margin-bottom: 0; }
.footer-brand p { font-size: .88rem; line-height: 1.6; }
.footer-col h4 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.footer-col a {
    display: block;
    font-size: .88rem;
    padding: 4px 0;
    color: var(--primary-400);
    transition: var(--transition);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--primary-700);
    font-size: .82rem;
    text-align: center;
}

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

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes progressIndeterminate {
    0% { width: 0; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0; margin-left: 100%; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all .6s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 640px) {
    .hero { padding: 60px 0 50px; }
    .tools-grid { grid-template-columns: 1fr; }
    .how-steps { flex-direction: column; align-items: center; }
    .upload-zone { padding: 40px 24px; }
    .cta-box { padding: 48px 24px; }
}

/* ==========================================
   LEGAL & CONTACT PAGES
   ========================================== */
.legal-content {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.75;
    color: var(--primary-600);
}
.legal-content h2 {
    margin: 32px 0 12px;
    font-size: 1.25rem;
    color: var(--primary-800);
}
.legal-content p { margin-bottom: 12px; }

.contact-box {
    max-width: 620px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 40px;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; }
.contact-form label span {
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary-700);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--primary-800);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    background: var(--white);
}
.contact-form textarea { resize: vertical; }
.contact-form .download-btn { align-self: flex-start; border: none; cursor: pointer; }
.contact-or-email {
    margin-top: 24px;
    text-align: center;
    font-size: .9rem;
    color: var(--primary-500);
}
.contact-or-email a { color: var(--blue-600); font-weight: 600; }
.contact-error {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FEF2F2;
    color: #B91C1C;
    border-radius: var(--radius-md);
    font-size: .9rem;
}
.contact-success { text-align: center; }
.contact-success p { margin-top: 12px; color: var(--primary-700); font-size: 1.05rem; }

@media (max-width: 768px) {
    .contact-box { padding: 28px 20px; }
}

/* ==========================================
   AUTH (login button, Google sign-in)
   ========================================== */
.nav-login-btn {
    background: var(--blue-600);
    color: #fff !important;
    font-weight: 600;
    padding: 9px 20px;
}
.nav-login-btn:hover { background: var(--blue-700); color: #fff !important; }

.auth-box {
    max-width: 440px;
    margin: 40px auto;
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 44px 40px;
    text-align: center;
}
.auth-box h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-sub { color: var(--primary-500); margin-bottom: 28px; }
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-700);
    background: var(--white);
    border: 1.5px solid var(--primary-300);
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.google-btn:hover { background: var(--primary-50); border-color: var(--primary-400); box-shadow: var(--shadow-sm); }
.google-btn-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}
.auth-error {
    background: var(--red-100);
    color: #B91C1C;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: .9rem;
    margin-bottom: 20px;
}
.auth-note {
    margin-top: 16px;
    font-size: .82rem;
    color: var(--amber-500);
}
.auth-back { margin-top: 24px; }
.auth-back a { color: var(--primary-500); font-size: .9rem; }
.auth-back a:hover { color: var(--blue-600); }

/* ==========================================
   COOKIE CONSENT BANNER
   ========================================== */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--primary-900);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease;
}
/* respect the [hidden] attribute (author display:flex would otherwise keep it
   in the layout, invisibly blocking clicks on the footer below) */
.cookie-banner[hidden] { display: none; }
.cookie-banner.show { opacity: 1; transform: translateY(0); }
.cookie-banner p { font-size: .88rem; line-height: 1.5; margin: 0; }
.cookie-banner a { color: var(--blue-400); font-weight: 600; text-decoration: underline; }
.cookie-accept {
    flex-shrink: 0;
    padding: 10px 22px;
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--blue-600);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.cookie-accept:hover { background: var(--blue-500); }
@media (max-width: 560px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-accept { width: 100%; }
}

/* ==========================================
   USAGE BAR (tool pages)
   ========================================== */
.usage-bar {
    background: var(--blue-50);
    border-bottom: 1px solid var(--blue-100);
    padding: 10px 0;
    font-size: .9rem;
}
.usage-bar .container { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.usage-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--blue-700);
}
.usage-pill.unlimited { color: var(--teal-600); border-color: var(--teal-100); background: var(--teal-100); }
.usage-cta { color: var(--blue-600); font-weight: 600; text-decoration: underline; }
.usage-cta:hover { color: var(--blue-700); }

/* ==========================================
   ACCOUNT PAGE
   ========================================== */
.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.account-card {
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.account-card-label { font-size: .8rem; color: var(--primary-500); text-transform: uppercase; letter-spacing: .03em; }
.account-card-value { font-size: 1.05rem; font-weight: 700; color: var(--primary-800); word-break: break-word; }
.account-card-value.account-unlimited { color: var(--teal-600); }

.account-history h2 { font-size: 1.3rem; margin-bottom: 18px; }
.history-table-wrap {
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.history-table { width: 100%; border-collapse: collapse; }
.history-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--primary-500);
    background: var(--primary-50);
    border-bottom: 1px solid var(--primary-200);
    white-space: nowrap;
}
.history-table td { padding: 14px 18px; font-size: .9rem; border-bottom: 1px solid var(--primary-100); }
.history-table tr:last-child td { border-bottom: none; }
.history-table .muted { color: var(--primary-500); }
.history-dl {
    display: inline-block;
    padding: 7px 16px;
    background: var(--blue-600);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}
.history-dl:hover { background: var(--blue-700); }
.history-status { font-size: .82rem; font-weight: 600; }
.history-status.failed { color: var(--red-500); }
.history-status.expired { color: var(--primary-400); }
.account-empty { color: var(--primary-500); }

/* ==========================================
   TOOL OPTION (e.g. watermark text)
   ========================================== */
.tool-option {
    max-width: 680px;
    margin: 0 auto 16px;
    text-align: center;
}
.tool-option label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: 8px;
}
.tool-option input[type="text"] {
    width: 100%;
    max-width: 360px;
    padding: 12px 16px;
    font-size: .95rem;
    font-family: inherit;
    text-align: center;
    color: var(--primary-800);
    background: var(--white);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.tool-option input[type="text"]:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); }

/* ==========================================
   TOOL CATEGORIES (homepage + nav mega-menu)
   ========================================== */
.tools-cat-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-800);
    margin: 40px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-100);
}
.tools-cat-title:first-of-type { margin-top: 8px; }

/* Nav mega-menu */
.nav-dropdown-menu.mega {
    min-width: 520px;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    padding: 18px;
}
/* mega menus stay hidden until opened — click on touch, hover on desktop */
.nav-dropdown.open > .nav-dropdown-menu.mega { display: grid; }
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .nav-dropdown:hover > .nav-dropdown-menu.mega,
    .nav-dropdown-menu.mega:hover { display: grid; }
}
.mega-group { display: flex; flex-direction: column; }
.mega-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--primary-400);
    padding: 8px 16px 4px;
}

@media (max-width: 768px) {
    .nav-dropdown-menu.mega { min-width: 0; padding: 0 0 4px 12px; }
    .nav-dropdown.open > .nav-dropdown-menu.mega { display: block; }
    .mega-title { padding-left: 4px; }
}

/* ==========================================
   MEGA-MENU LINKS WITH ICONS (LightPDF style)
   ========================================== */
.nav-dropdown-menu .mega-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    color: var(--primary-700);
    transition: var(--transition);
}
.nav-dropdown-menu .mega-link:hover { background: var(--blue-50); color: var(--blue-600); }
.mega-ico {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.mega-ico svg { width: 17px; height: 17px; }
/* reuse the tool-icon gradient palette for the small icons */
.mega-ico.pdf-word   { background: linear-gradient(135deg,#FEE2E2,#FECACA); color:#DC2626; }
.mega-ico.img-pdf    { background: linear-gradient(135deg,#DCFCE7,#BBF7D0); color:#16A34A; }
.mega-ico.word-pdf   { background: linear-gradient(135deg,#DBEAFE,#BFDBFE); color:#2563EB; }
.mega-ico.pdf-img    { background: linear-gradient(135deg,#FEF3C7,#FDE68A); color:#D97706; }
.mega-ico.pdf-merge  { background: linear-gradient(135deg,#EDE9FE,#DDD6FE); color:#7C3AED; }
.mega-ico.pdf-compress { background: linear-gradient(135deg,#FEE2E2,#FECACA); color:#DC2626; }

@media (max-width: 768px) {
    .mega-link { padding: 10px 14px; }
}

/* ==========================================
   BLOG
   ========================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 8px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-200, #BFDBFE); }
.blog-card-icon {
    font-size: 2.6rem;
    padding: 28px;
    background: linear-gradient(135deg, var(--blue-50), var(--teal-100));
    text-align: center;
}
.blog-card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-date { font-size: .78rem; color: var(--primary-400); }
.blog-card-body h3 { font-size: 1.15rem; color: var(--primary-800); line-height: 1.35; }
.blog-card-body p { font-size: .92rem; color: var(--primary-500); flex: 1; }
.blog-card-more { font-size: .88rem; font-weight: 700; color: var(--blue-600); }

/* Article */
.article { max-width: 760px; margin: 0 auto; }
.article-back { display: inline-block; color: var(--primary-500); font-size: .9rem; margin-bottom: 24px; }
.article-back:hover { color: var(--blue-600); }
.article-head { text-align: center; margin-bottom: 36px; }
.article-icon { font-size: 3.2rem; }
.article-date { display: block; font-size: .82rem; color: var(--primary-400); margin: 8px 0; }
.article-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--primary-900); line-height: 1.2; }
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--primary-700); }
.article-body h2 { font-size: 1.4rem; color: var(--primary-900); margin: 36px 0 14px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--primary-900); }

/* ==========================================
   FAQ (accordion)
   ========================================== */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
    background: var(--white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--primary-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--blue-600);
    transition: var(--transition);
    flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--blue-600); }
.faq-answer {
    padding: 0 22px 20px;
    color: var(--primary-600);
    line-height: 1.7;
    font-size: .96rem;
}

/* ==========================================
   MOBILE NAV — visual refinements
   ========================================== */
@media (max-width: 768px) {
    .nav-links { padding: 8px 16px 16px; }
    /* subtle separators between top-level items */
    .nav-links > .nav-link,
    .nav-links > .nav-dropdown > .nav-dropdown-btn {
        border-bottom: 1px solid var(--primary-100);
        border-radius: 0;
        padding: 15px 12px;
        font-size: .98rem;
    }
    .nav-links > .nav-dropdown:last-of-type > .nav-dropdown-btn { border-bottom: none; }
    /* tool items inside an open category */
    .nav-dropdown-menu .mega-link { padding: 11px 12px; font-size: .92rem; }
    .mega-group { padding-bottom: 6px; }
    /* login button full-width, spaced from the list */
    .nav-login-btn {
        margin-top: 14px;
        justify-content: center;
        border-radius: var(--radius-full);
        padding: 13px 20px;
    }
    /* language switcher row */
    .nav-links > .nav-dropdown.nav-lang > .nav-dropdown-btn { border-bottom: 1px solid var(--primary-100); }
}

/* ==========================================
   MOBILE — compact homepage sections
   ========================================== */
@media (max-width: 768px) {
    .tools-section,
    .features-section,
    .how-section,
    .cta-section { padding: 48px 0; }
    .hero { padding: 64px 0 48px; }
    .section-header { margin-bottom: 28px; }
}
@media (max-width: 600px) {
    /* features: 2 compact columns instead of 1 tall column */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .feature-card {
        padding: 20px 12px;
        background: var(--white);
        border: 1px solid var(--primary-100);
        border-radius: var(--radius-lg);
    }
    .feature-icon {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }
    .feature-card h3 { font-size: .95rem; margin-bottom: 6px; }
    .feature-card p { font-size: .8rem; line-height: 1.45; }
}

/* ==========================================
   MOBILE — prevent long words from overflowing
   ========================================== */
@media (max-width: 600px) {
    .hero h1 { font-size: clamp(1.8rem, 7.5vw, 2.4rem); }
    .hero p { font-size: 1.02rem; }
    .hero h1,
    .hero p,
    .section-header h2,
    .tool-page-header h1,
    .tool-page-header p,
    .article-head h1,
    .cta-box h2,
    .blog-card-body h3 {
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
}

/* ==========================================
   MOBILE — compact tools grid
   ========================================== */
@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .tool-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 18px 12px;
    }
    .tool-icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
    .tool-info h3 { font-size: .9rem; margin-bottom: 0; line-height: 1.25; }
    /* hide the description on phones for a clean, compact tool picker */
    .tool-info p { display: none; }
    .tools-cat-title { font-size: 1.05rem; margin: 28px 0 12px; }
}

/* ==========================================
   AUTH FORMS (login / register)
   ========================================== */
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-bottom: 18px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label span { font-size: .85rem; font-weight: 600; color: var(--primary-700); }
.auth-form input {
    width: 100%;
    padding: 12px 14px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--primary-800);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-md);
    background: var(--primary-50);
    transition: var(--transition);
}
.auth-form input:focus { outline: none; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px var(--blue-50); }
.auth-submit {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--blue-600);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.auth-submit:hover { background: var(--blue-700); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--primary-400); font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--primary-200); }
.auth-switch { margin-top: 20px; font-size: .9rem; color: var(--primary-500); }
.auth-switch a { color: var(--blue-600); font-weight: 600; }
