:root {
    /* Premium SaaS Palette */
    --bg-main: #F6F8FB;
    --card-bg: #FFFFFF;
    --border-color: #E7ECF3;
    
    --primary: #5B5BD6; 
    --primary-hover: #4B4BC7;
    --success: #16A34A; 
    --warning-bg: #FEF2F2;
    --warning-text: #DC2626;
    
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    
    /* Breakdown Bar Colors */
    --color-takehome: #16A34A;
    --color-taxes: #EF4444;
    --color-expenses: #F59E0B;
    --color-admin: #64748B;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { background-color: var(--bg-main); color: var(--text-primary); font-family: var(--font-family); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Icons Setup */
.material-symbols-outlined { vertical-align: middle; }
.icon-sm { font-size: 1.1rem; }
.icon-info { font-size: 1.2rem; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; }
.icon-info:hover { color: var(--primary); }

/* Header */
.site-header { background-color: var(--card-bg); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 4.5rem; }
.logo { font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary); text-decoration: none; }
.logo:hover { color: var(--primary); }
.logo-icon { color: var(--primary); font-size: 1.8rem; }
.main-nav a { color: var(--text-secondary); text-decoration: none; margin-left: 2rem; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.main-nav a:hover { color: var(--primary); }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); }

/* Hero & Badge */
.hero { text-align: center; padding: 4rem 0 2rem; }
.update-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: #E0E7FF; color: var(--primary); padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; line-height: 1.1; }
.hero p { color: var(--text-secondary); font-size: 1.25rem; max-width: 700px; margin: 0 auto 2rem; }

/* Animated Trust Marquee */
.trust-bar { margin-top: 2rem; overflow: hidden; color: var(--text-secondary); font-size: 0.9rem; }
.trust-bar > span { display: block; margin-bottom: 1rem; }
.marquee-container { width: 100%; overflow: hidden; position: relative; white-space: nowrap; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: inline-block; animation: scroll 30s linear infinite; }
.marquee-content .tag { display: inline-block; background: var(--card-bg); border: 1px solid var(--border-color); padding: 0.4rem 1.2rem; border-radius: 20px; margin: 0 0.5rem; font-weight: 500; color: var(--text-primary); box-shadow: var(--shadow-sm); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Layout Grid */
.bento-container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; margin-bottom: 4rem; align-items: start; }
.bento-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 2.5rem; box-shadow: var(--shadow-sm); }
.input-column { display: flex; flex-direction: column; gap: 1.5rem; }
.input-card h2 { font-size: 1.4rem; margin-bottom: 2rem; }

/* Tooltips (Custom SaaS) */
.custom-tooltip { position: relative; display: inline-flex; align-items: center; margin-left: 0.5rem; }
.tooltip-text { visibility: hidden; opacity: 0; width: 220px; background-color: #1E293B; color: #fff; text-align: center; border-radius: 6px; padding: 0.75rem; position: absolute; z-index: 10; bottom: 125%; left: 50%; transform: translateX(-50%); font-size: 0.8rem; font-weight: 400; line-height: 1.4; transition: opacity 0.2s, visibility 0.2s; box-shadow: var(--shadow-md); pointer-events: none; }
.tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #1E293B transparent transparent transparent; }
.custom-tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* Inputs & Custom Select */
.input-group { margin-bottom: 1.75rem; }
.input-group label { display: flex; align-items: center; font-weight: 600; margin-bottom: 0.75rem; font-size: 0.95rem; }
.sync-inputs { display: flex; gap: 1rem; align-items: center; }

/* Styled Select with SVG background arrow */
.custom-select { appearance: none; -webkit-appearance: none; width: 100px; padding: 0.6rem 2rem 0.6rem 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; background-color: var(--bg-main); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2364748B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1em; cursor: pointer; color: var(--text-primary); font-family: inherit; }
.custom-select:focus { outline: none; border-color: var(--primary); }

input[type="range"] { flex: 1; accent-color: var(--primary); cursor: pointer; height: 6px; border-radius: 3px; background: var(--border-color); outline: none; }
input[type="number"] { width: 110px; padding: 0.6rem; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; text-align: right; transition: border 0.2s; font-family: inherit; }
input[type="number"]:focus { border-color: var(--primary); outline: none; }
.divider { height: 1px; background: var(--border-color); margin: 2rem 0; }

/* Sticky Dashboard */
.sticky-dashboard { position: sticky; top: 100px; box-shadow: var(--shadow-md); border-top: 4px solid var(--primary); }
.sticky-dashboard h3 { font-size: 1rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.primary-output { display: flex; align-items: baseline; margin-bottom: 1.5rem; }
.huge-symbol, .huge-number { font-size: 4rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; }
.unit { font-size: 1.2rem; color: var(--text-secondary); margin-left: 0.5rem; font-weight: 500; }

/* Result Narrative Text (AI Style) */
.result-narrative { background: #F8FAFC; border-left: 3px solid var(--primary); padding: 1rem; font-size: 0.9rem; color: var(--text-secondary); border-radius: 0 8px 8px 0; margin-bottom: 2rem; line-height: 1.5; }
.result-narrative strong { color: var(--text-primary); }

/* Dynamic blocks & Warnings */
.dynamic-insight { margin-top: 1.5rem; background: #F0FDF4; border-color: #BBF7D0; }
.dynamic-insight h3 { color: var(--success); font-size: 1rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.dynamic-insight h3 .material-symbols-outlined { font-size: 1.2rem; }
.warning-block { background: var(--warning-bg); color: var(--warning-text); padding: 1rem; border-radius: 8px; font-size: 0.9rem; margin-bottom: 1.5rem; display: none; align-items: flex-start; gap: 0.5rem; }
.warning-block:not(.hidden) { display: flex; }

/* Rate Breakdown */
.rate-breakdown { margin-bottom: 2rem; background: var(--bg-main); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color); }
.rate-breakdown h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; font-weight: 600; }
.breakdown-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 1rem; }
.segment { height: 100%; transition: width 0.3s ease; }
.segment.takehome { background-color: var(--color-takehome); }
.segment.taxes { background-color: var(--color-taxes); }
.segment.expenses { background-color: var(--color-expenses); }
.segment.admin { background-color: var(--color-admin); }

.breakdown-legend { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; font-size: 0.85rem; font-weight: 500; }
.breakdown-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.5rem; }
.dot.takehome { background: var(--color-takehome); }
.dot.taxes { background: var(--color-taxes); }
.dot.expenses { background: var(--color-expenses); }
.dot.admin { background: var(--color-admin); }

/* Secondary Outputs */
.secondary-outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.output-item h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.3rem; font-weight: 500; }
.output-item span { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }

/* Buttons */
.action-buttons { display: flex; gap: 1rem; }
.btn-primary { flex: 2; display: flex; justify-content: center; align-items: center; gap: 0.5rem; background: var(--primary); color: #fff; border: none; padding: 1rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-size: 0.95rem; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { flex: 1; display: flex; justify-content: center; align-items: center; gap: 0.5rem; background: var(--bg-main); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-size: 0.95rem; }
.btn-secondary:hover { background: #E2E8F0; }

/* Monetization Banner (Direct Download) */
.highlight-card { background: linear-gradient(135deg, #1E293B, #0F172A); color: #fff; display: flex; align-items: center; justify-content: space-between; border: none; }
.highlight-card h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.highlight-card p { color: #94A3B8; max-width: 500px; }
.btn-upsell { display: flex; align-items: center; gap: 0.5rem; background: var(--success); color: #fff; text-decoration: none; padding: 1rem 2rem; border-radius: 8px; font-weight: 600; transition: transform 0.2s, box-shadow 0.2s; }
.btn-upsell:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3); }

/* Reality Check Table */
.content-section { margin: 4rem auto; max-width: 800px; }
.content-section h2 { font-size: 2rem; margin-bottom: 1rem; }
.table-responsive { overflow-x: auto; margin-top: 2rem; }
.market-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.market-table th, .market-table td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.market-table th { background: var(--bg-main); font-weight: 600; color: var(--text-secondary); }

/* Ads & Layouts */
.article-content h2 { margin-top: 3rem; margin-bottom: 1rem; }
.ad-slot { height: 90px; background: var(--card-bg); border: 1px dashed var(--text-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 0.85rem; margin: 3rem auto; border-radius: 8px; }

/* Footer */
.site-footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 3rem 0; margin-top: 5rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--text-secondary); }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.back-link { color: var(--primary); text-decoration: none; font-weight: 500; }

/* Animation Utils */
.number-animate { transition: color 0.2s; }


/* ==========================================================================
   MOBILE RESPONSIVE RULES
   ========================================================================== */
@media (max-width: 900px) {
    /* Header Adjustments */
    .main-nav { display: none; }
    .mobile-menu-toggle { display: block; }
    .header-inner { padding: 0 0.5rem; }

    /* Hero Text Adjustments */
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; padding: 0 1rem; }

    /* Grid breaks to single column */
    .bento-container { grid-template-columns: 1fr; gap: 1.5rem; }
    
    /* Input Adjustments */
    .bento-card { padding: 1.5rem; }
    .sync-inputs { flex-wrap: wrap; gap: 0.75rem; }
    input[type="range"] { flex: 1 1 100%; margin-bottom: 0.5rem; } /* Sliders full width */
    .custom-select, input[type="number"] { flex: 1 1 45%; } /* Dropdown and number side-by-side */

    /* Dashboard Adjustments */
    .sticky-dashboard { 
        position: relative; 
        top: 0; 
        box-shadow: var(--shadow-sm); 
        margin-top: 1rem;
    }
    
    .huge-number { font-size: 3rem; }
    .primary-output { justify-content: center; margin-bottom: 1rem; }
    .sticky-dashboard h3 { text-align: center; }
    
    /* Rate Breakdown */
    .breakdown-legend { grid-template-columns: 1fr; gap: 0.5rem; }

    /* Action Buttons */
    .action-buttons { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; padding: 1.2rem; }

    /* Highlight Banner */
    .highlight-card { flex-direction: column; text-align: center; gap: 1.5rem; padding: 2rem 1.5rem; }
    .btn-upsell { justify-content: center; width: 100%; }

    /* Tables */
    .market-table th, .market-table td { padding: 0.75rem 1rem; font-size: 0.85rem; }
}


/* =========================================
   PROFESSIONAL PDF EXPORT MAGIC (PRINT CSS)
   ========================================= */
@media print {
    /* Hide EVERYTHING by default */
    body * { visibility: hidden; }
    .no-print { display: none !important; }
    
    /* Reveal ONLY the Calculator area */
    #calculator, #calculator * { visibility: visible; }
    
    /* Re-position the calculator to fit cleanly on A4 paper */
    #calculator {
        position: absolute; left: 0; top: 0; width: 100%; margin: 0; padding: 0; display: block;
    }

    /* Adjust cards for print */
    .bento-card {
        border: 1px solid #ccc; box-shadow: none; margin-bottom: 20px; page-break-inside: avoid;
    }
    
    .rate-breakdown { background: #fff; border: 1px solid #ccc; }
    .dynamic-insight { border: 1px solid #000; }
    
    /* Show an artificial header just for the PDF */
    #calculator::before {
        content: "NovusTools | Freelance Finance Report";
        display: block; font-size: 24px; font-weight: bold; text-align: center; margin-bottom: 30px; border-bottom: 2px solid #000; padding-bottom: 10px; visibility: visible;
    }
}
/* =========================================
   FAQ ACCORDION & MOBILE MENU FIXES
   ========================================= */

/* Hamburger Menu Button */
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 5px; z-index: 1001; }
.hamburger .mobile-menu-btn { width: 25px; height: 3px; background-color: var(--text-primary); border-radius: 3px; transition: 0.3s; }

/* Premium FAQ Accordion */
.accordion details { 
    background: var(--card-bg); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    margin-bottom: 1rem; 
    overflow: hidden; 
    transition: box-shadow 0.3s ease; 
}
.accordion details:hover { box-shadow: var(--shadow-sm); }
.accordion summary { 
    padding: 1.25rem 1.5rem; 
    font-weight: 600; 
    font-size: 1.05rem; 
    cursor: pointer; 
    list-style: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: var(--text-primary); 
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { 
    content: '\e5cf'; /* <--- ERRE (lefelé nyíl) */
    font-family: 'Material Symbols Outlined'; 
    font-size: 1.5rem; 
    color: var(--primary); 
    transition: transform 0.3s; 
}
.accordion details[open] summary::after { transform: rotate(180deg); }
.accordion .faq-content { 
    padding: 0 1.5rem 1.5rem; 
    color: var(--text-secondary); 
    font-size: 0.95rem; 
    line-height: 1.6; 
    border-top: 1px solid transparent; 
}
.accordion details[open] .faq-content { 
    border-top-color: var(--border-color); 
    padding-top: 1rem; 
}

/* Mobile Nav Logic */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .main-nav {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--card-bg); flex-direction: column; align-items: flex-start;
        padding: 80px 30px 30px; box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        transition: right 0.3s ease; z-index: 1000; display: flex;
    }
    .main-nav.active { right: 0; }
    .main-nav a { font-size: 1.2rem; padding: 15px 0; border-bottom: 1px solid var(--border-color); width: 100%; margin: 0; }
}