/* =========================================================
   CONVERTERFOX PREMIUM THEME
   Loaded last on every page; one shared design system.
   ========================================================= */
:root {
    --cf-ink: #0b1026;
    --cf-text: #334155;
    --cf-muted: #64748b;
    --cf-line: #e6e8f2;
    --cf-bg: #f7f8fd;
    --cf-surface: #ffffff;
    --cf-indigo: #4f46e5;
    --cf-violet: #7c3aed;
    --cf-pink: #db2777;
    --cf-cyan: #0891b2;
    --cf-emerald: #059669;
    --cf-amber: #d97706;
    --cf-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #db2777 100%);
    --cf-grad-soft: linear-gradient(135deg, rgba(79,70,229,.10), rgba(124,58,237,.08) 55%, rgba(219,39,119,.08));
    --cf-radius: 18px;
    --cf-shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.04);
    --cf-shadow: 0 10px 30px -12px rgba(30,27,75,.18), 0 2px 6px rgba(15,23,42,.04);
    --cf-shadow-lg: 0 24px 50px -20px rgba(79,70,229,.35), 0 8px 18px -10px rgba(15,23,42,.12);
    --cf-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --cf-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Base ---------- */
html body {
    font-family: var(--cf-font);
    color: var(--cf-text);
    background: var(--cf-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body h1, body h2, body h3, body h4 { font-family: var(--cf-display); color: var(--cf-ink); letter-spacing: -0.02em; }
body h1 { font-weight: 800; line-height: 1.12; }
body h2 { font-weight: 750; line-height: 1.22; }
body h3 { font-weight: 700; }
body a { color: var(--cf-indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
body a:hover { color: var(--cf-violet); }
::selection { background: rgba(124,58,237,.18); }
body :focus-visible { outline: 3px solid rgba(124,58,237,.35); outline-offset: 2px; border-radius: 8px; }

/* ---------- Header ---------- */
body .site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
body .site-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--cf-grad); opacity: .85;
}
body .site-header > .container, body .site-header .header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
    min-height: 68px; padding-top: 8px; padding-bottom: 8px;
}
body .site-header .main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0; }
body .site-header .logo { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; }
@media (max-width: 760px) {
    body .site-header { position: relative; }
    body .site-header > .container, body .site-header .header-inner { justify-content: center; min-height: 0; }
    body .site-header .main-nav { justify-content: center; }
    body .main-nav a, body .nav-dropdown-toggle { font-size: 14px; padding: 6px 10px; }
}
body .site-header .logo, body .logo { font-family: var(--cf-display); font-weight: 800; letter-spacing: -0.02em; color: var(--cf-ink); text-decoration: none; }
body .site-header .logo > span:last-child {
    background: var(--cf-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
body .main-nav a, body .nav-dropdown-toggle {
    font-family: var(--cf-font); font-weight: 600; font-size: 15px; color: #1e293b;
    padding: 8px 12px; border-radius: 999px; text-decoration: none; transition: background .2s, color .2s;
}
body .main-nav > a:hover, body .nav-dropdown-toggle:hover, body .nav-dropdown.open .nav-dropdown-toggle {
    background: rgba(79,70,229,.08); color: var(--cf-indigo);
}
body .nav-dropdown-toggle { background: transparent; border: 0; cursor: pointer; }
body .nav-dropdown-menu {
    border: 1px solid var(--cf-line) !important; border-radius: 16px !important;
    box-shadow: var(--cf-shadow-lg) !important; padding: 8px !important; width: 230px !important;
}
body .nav-dropdown-menu a { border-radius: 10px !important; font-weight: 600 !important; color: #1e293b !important; }
body .nav-dropdown-menu a:hover { background: var(--cf-grad-soft) !important; color: var(--cf-indigo) !important; }

/* ---------- Heroes (tool, category and blog pages) ---------- */
body .hero, body .hero-section {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(79,70,229,.16), transparent 60%),
        radial-gradient(700px 380px at 92% 0%, rgba(219,39,119,.13), transparent 60%),
        radial-gradient(600px 300px at 50% 120%, rgba(8,145,178,.10), transparent 60%),
        linear-gradient(180deg, #f8f8ff 0%, var(--cf-bg) 100%);
    padding-top: 64px; padding-bottom: 56px;
}
body .hero h1, body .hero-section h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: 14px; }
body .hero-text, body .hero p.hero-text, body .hero-section > .container > p {
    color: #475569; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.7; max-width: 760px; margin-left: auto; margin-right: auto;
}
body .eyebrow, body .section-label, body .cf-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255,255,255,.75); border: 1px solid rgba(124,58,237,.22);
    color: var(--cf-violet); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
    box-shadow: var(--cf-shadow-sm);
}

/* ---------- Buttons ---------- */
body .button, body .btn, body .cf-btn, body .cta-button, body .cfx-actions .button, body button.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--cf-font); font-weight: 700; font-size: 15px; line-height: 1;
    padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
    text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
body .button, body .button-primary, body .btn, body .cf-btn, body .cta-button, body a.button:not(.button-secondary) {
    background: var(--cf-grad); color: #fff !important; box-shadow: 0 10px 22px -10px rgba(124,58,237,.65);
}
body .button:hover, body .btn:hover, body .cf-btn:hover, body .cta-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(124,58,237,.75); color: #fff !important; }
body .button-secondary, body .cfx-actions .button-secondary, body label.button-secondary {
    background: #fff !important; color: var(--cf-indigo) !important; border: 1px solid rgba(79,70,229,.28) !important; box-shadow: var(--cf-shadow-sm) !important;
}
body .button-secondary:hover { background: #f5f3ff !important; border-color: rgba(124,58,237,.45) !important; transform: translateY(-1px); }

/* ---------- Tool workspace ---------- */
body .tool-section { padding: 8px 0 24px; }
body .tool-section .tool-card, body .cf-tool-box, body .cf-ai-box, body .cf-box, body .tool-page .tool-wrap > .tool-card {
    background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: 24px;
    box-shadow: var(--cf-shadow); padding: clamp(18px, 3vw, 32px); position: relative;
}
body .tool-section .tool-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 24px 24px 0 0; background: var(--cf-grad);
}
body .tool-intro h2 { font-size: 1.35rem; margin-bottom: 6px; }
body .tool-intro p { color: var(--cf-muted); }
body .cfx input[type=text], body .cfx input[type=number], body .cfx input[type=date], body .cfx input[type=datetime-local],
body .cfx select, body .cfx textarea, body .cfx-calc input, body .cf-tool-box input, body .cf-tool-box textarea, body .cf-tool-box select {
    border: 1px solid #d9dcea; border-radius: 12px; background: #fbfbfe; transition: border-color .15s, box-shadow .15s, background .15s;
}
body .cfx input:focus, body .cfx select:focus, body .cfx textarea:focus, body .cfx-calc input:focus {
    outline: none; border-color: var(--cf-violet); background: #fff; box-shadow: 0 0 0 4px rgba(124,58,237,.14);
}
body .cfx label { color: #1e293b; }
body .cfx-out { background: linear-gradient(180deg, #fbfaff, #f6f7fd); border: 1px solid #e8e6f8; border-radius: 16px; }
body .cfx-big { background: var(--cf-grad); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
body .cfx-stat { border: 1px solid #ece9fb; border-radius: 14px; box-shadow: var(--cf-shadow-sm); }
body .cfx-stat b { color: var(--cf-indigo); font-family: var(--cf-display); }
body .cfx-tabs button { border-color: #dcdcf0; font-weight: 600; }
body .cfx-tabs button[aria-pressed=true] { background: var(--cf-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(124,58,237,.7); }
body .cfx-calc .cfx-line { border-color: #ece9fb; border-radius: 14px; background: #fbfbff; }
body .cfx-calc .cfx-line output { color: var(--cf-violet); }
body .file-picker-label, body .upload-label, body .cf-drop {
    border-radius: 16px !important; border: 2px dashed rgba(124,58,237,.35) !important; background: #faf9ff !important;
}

/* ---------- Cards & grids ---------- */
body .tool-grid, body .tools-grid, body .related-grid, body .cf-popular-grid, body .cf-tool-grid, body .cf-feature-grid, body .more-tools-grid { gap: 18px; }
body a.tool-card, body .tools-grid .tool-card, body .tool-grid .tool-card, body .tool-card-link, body .cf-popular-card, body .cf-tool-card, body .more-tool-card, body .cf-feature-card {
    background: var(--cf-surface) !important; border: 1px solid var(--cf-line) !important; border-radius: var(--cf-radius) !important;
    box-shadow: var(--cf-shadow-sm) !important; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
    text-decoration: none; color: var(--cf-text);
}
body a.tool-card:hover, body .tools-grid .tool-card:hover, body .tool-grid .tool-card:hover, body .tool-card-link:hover, body .cf-popular-card:hover, body .cf-tool-card:hover, body .more-tool-card:hover {
    transform: translateY(-3px); box-shadow: var(--cf-shadow-lg) !important; border-color: rgba(124,58,237,.35) !important;
}
body .tool-card h2, body .tool-card h3, body .tool-card-link h3, body .cf-popular-card h3, body .more-tool-card h3 { color: var(--cf-ink); }
body .tool-card p, body .tool-card-link p, body .more-tool-card p { color: var(--cf-muted); }
body .card-link, body .cf-view-all, body .cf-tool-arrow { color: var(--cf-violet) !important; font-weight: 700; }

/* Colourful icon chips, cycling through the palette */
body .tool-icon, body .cf-tool-icon, body .cf-feature-icon, body .cf-category-icon, body .cf-menu-icon, body .step-number {
    background: rgba(79,70,229,.10) !important; color: var(--cf-indigo) !important; border-radius: 14px !important;
}
body :nth-child(5n+2) > .tool-icon, body :nth-child(5n+2) > .cf-tool-icon, body :nth-child(5n+2) > .cf-feature-icon { background: rgba(219,39,119,.10) !important; color: var(--cf-pink) !important; }
body :nth-child(5n+3) > .tool-icon, body :nth-child(5n+3) > .cf-tool-icon, body :nth-child(5n+3) > .cf-feature-icon { background: rgba(8,145,178,.11) !important; color: var(--cf-cyan) !important; }
body :nth-child(5n+4) > .tool-icon, body :nth-child(5n+4) > .cf-tool-icon, body :nth-child(5n+4) > .cf-feature-icon { background: rgba(5,150,105,.11) !important; color: var(--cf-emerald) !important; }
body :nth-child(5n+5) > .tool-icon, body :nth-child(5n+5) > .cf-tool-icon, body :nth-child(5n+5) > .cf-feature-icon { background: rgba(217,119,6,.12) !important; color: var(--cf-amber) !important; }

/* ---------- Homepage sections ---------- */
body .cf-zamzar-hero {
    background:
        radial-gradient(800px 420px at 8% 0%, rgba(236,72,153,.38), transparent 60%),
        radial-gradient(900px 480px at 100% 10%, rgba(6,182,212,.30), transparent 60%),
        linear-gradient(135deg, #1e1b4b 0%, #3730a3 38%, #6d28d9 70%, #9d174d 100%) !important;
}
body .cf-zamzar-hero h1 { color: #fff; }
body .cf-zamzar-hero h1 span {
    background: linear-gradient(90deg, #fde68a, #f9a8d4 55%, #a5f3fc) !important;
    -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important;
}
body .cf-zamzar-hero .cf-workspace-primary {
    background: linear-gradient(135deg, #f472b6, #fb923c) !important; color: #fff !important; border: 0 !important;
    box-shadow: 0 14px 30px -12px rgba(244,114,182,.75) !important; font-weight: 800 !important;
}
body .cf-zamzar-hero .cf-workspace-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
body .cf-zamzar-hero .cf-workspace-secondary { color: #4338ca !important; font-weight: 700 !important; }
body .cf-converter-workspace { border-radius: 24px !important; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55) !important; }
body .cf-popular-section { background: var(--cf-bg) !important; }
body .cf-popular-card { position: relative; overflow: hidden; }
body .cf-popular-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--cf-grad); opacity: 0; transition: opacity .2s; }
body .cf-popular-card:hover::before { opacity: 1; }
body .cf-popular-card > span:first-child {
    width: 48px !important; height: 48px !important; display: grid !important; place-items: center; border-radius: 14px !important;
    background: rgba(79,70,229,.10) !important; font-size: 22px;
}
body .cf-popular-card:nth-child(5n+2) > span:first-child { background: rgba(219,39,119,.10) !important; }
body .cf-popular-card:nth-child(5n+3) > span:first-child { background: rgba(8,145,178,.11) !important; }
body .cf-popular-card:nth-child(5n+4) > span:first-child { background: rgba(5,150,105,.11) !important; }
body .cf-popular-card:nth-child(5n+5) > span:first-child { background: rgba(217,119,6,.12) !important; }
body .cf-popular-card strong { font-family: var(--cf-display); color: var(--cf-ink); }
body .cf-popular-card b { color: var(--cf-violet) !important; }
body .cf-why-section { background: linear-gradient(180deg, #ffffff, #f4f3ff) !important; }
body .cf-tool-category { background: #fff !important; border: 1px solid var(--cf-line) !important; border-radius: 24px !important; box-shadow: var(--cf-shadow-sm) !important; }
body .cf-section-heading h2, body .section-heading h2, body .cf-directory-heading h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
body .steps-section, body .tools-section { background: transparent; }

/* ---------- Article content ---------- */
body .content-section { background: transparent; }
body .content-narrow, body .blog-article { font-size: 17px; line-height: 1.8; color: #334155; }
body .content-section h2, body .blog-article h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-top: 2.2em; padding-top: 6px; position: relative;
}
body .content-section h2::before, body .blog-article h2::before {
    content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--cf-grad); margin-bottom: 12px;
}
body .content-section h3 { font-size: 1.15rem; margin-top: 1.6em; }
body .content-section ol li::marker, body .content-section ul li::marker { color: var(--cf-violet); font-weight: 700; }
body .content-section code, body .blog-article code { background: #f1effd; color: #5b21b6; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
body .content-section pre { background: #0f1029 !important; color: #e0e7ff; border-radius: 14px !important; box-shadow: var(--cf-shadow); }
body .content-section pre code { background: none; color: inherit; padding: 0; }
body .cfx-table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--cf-line); border-radius: 14px; overflow: hidden; background: #fff; }
body .cfx-table th, body .cfx-table td { border: 0; border-bottom: 1px solid var(--cf-line); }
body .cfx-table tr:last-child td, body .cfx-table tr:last-child th { border-bottom: 0; }
body .cfx-table thead th { background: var(--cf-grad-soft); color: var(--cf-ink); font-weight: 700; }
body .cfx-table tbody tr:nth-child(even) td { background: #fbfbfe; }
body .blog-box, body .cta-box, body .blog-toc { border-radius: 18px !important; border: 1px solid #ebe8fb !important; background: linear-gradient(180deg, #fff, #faf9ff) !important; }

/* ---------- FAQ ---------- */
body .faq-section details {
    background: #fff; border: 1px solid var(--cf-line); border-radius: 16px; padding: 0; margin: 0 0 12px;
    box-shadow: var(--cf-shadow-sm); overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
body .faq-section details[open] { border-color: rgba(124,58,237,.35); box-shadow: var(--cf-shadow); }
body .faq-section summary {
    list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-family: var(--cf-display); font-weight: 700; color: var(--cf-ink); position: relative;
}
body .faq-section summary::-webkit-details-marker { display: none; }
body .faq-section summary::after {
    content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--cf-grad-soft); color: var(--cf-violet); font-weight: 800; font-size: 18px; line-height: 1;
}
body .faq-section details[open] summary::after { content: "−"; }
body .faq-section details p { padding: 0 20px 18px; margin: 0; color: #475569; }

/* ---------- Related tools ---------- */
body .related-tools { background: linear-gradient(180deg, transparent, #f1f0ff); padding: 48px 0 64px; }
body .related-tools h2 { text-align: center; }

/* ---------- Footer ---------- */
body .site-footer {
    position: relative; color: #c7d2fe;
    background: radial-gradient(700px 300px at 15% 0%, rgba(124,58,237,.35), transparent 60%),
                radial-gradient(600px 300px at 90% 100%, rgba(219,39,119,.22), transparent 60%),
                #0b1026 !important;
    border-top: 0;
}
body .site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cf-grad); }
body .site-footer h3, body .site-footer .logo { color: #fff; }
body .site-footer p, body .footer-bottom { color: #a5b4fc; }
body .site-footer a { color: #e0e7ff; text-decoration: none; }
body .site-footer a:hover { color: #fff; text-decoration: underline; }
body .footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
body .site-footer .logo-icon { background: var(--cf-grad); color: #fff; border-radius: 10px; }

/* ---------- Ads blend in ---------- */
body .cf-ad::before { color: #a0a7c0; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
    body .hero, body .hero-section { padding-top: 40px; padding-bottom: 36px; }
    body .tool-section .tool-card { border-radius: 20px; }
    body .content-narrow { font-size: 16px; }
    body .button, body .btn, body .cf-btn { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    body * { transition: none !important; }
}
