/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --text-muted: #444444;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --max-width: 1200px;
    --section-gap: 3.5rem;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. TYPOGRAPHY & LAYOUT
   ========================================= */
h1, h2, h3, h4 { color: #000000; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

a { color: var(--accent-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-gap) 0; }

/* =========================================
   3. BUTTONS
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; font-size: 1.1rem; font-weight: 600;
    border-radius: var(--radius); cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none; text-decoration: none;
}
.btn-primary { background-color: var(--accent-color); color: #ffffff; box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4); color: #ffffff; }
.btn-secondary { background-color: transparent; color: var(--text-color); border: 2px solid var(--text-color); }
.btn-secondary:hover { background-color: var(--text-color); color: #ffffff; transform: translateY(-2px); }

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
header {
    border-bottom: 1px solid var(--border-color); position: sticky; top: 0;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    z-index: 1000; padding: 1rem 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: #000; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a { color: var(--text-color); font-weight: 500; font-size: 1rem; }
.nav-links a:hover { color: var(--accent-color); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #000; }

/* =========================================
   5. DROPDOWN MEGA-MENU
   ========================================= */
.dropdown { position: relative; }
.dropdown-toggle {
    display: flex; align-items: center; gap: 0.35rem; cursor: pointer;
    background: none; border: none; font: inherit; color: var(--text-color);
    font-weight: 500; font-size: 1rem; padding: 0; transition: color 0.2s ease;
}
.dropdown-toggle:hover { color: var(--accent-color); }
.dropdown-arrow { font-size: 0.7rem; transition: transform 0.3s ease; }
.dropdown:hover .dropdown-arrow, .dropdown.active .dropdown-arrow { transform: rotate(180deg); }

.mega-menu {
    position: absolute; top: calc(100% + 1rem); left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff; border: 1px solid var(--border-color);
    border-radius: 12px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    padding: 2rem; min-width: 800px; opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.dropdown::before { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 1rem; display: none; }
.dropdown:hover::before, .dropdown.active::before { display: block; }
.dropdown:hover .mega-menu, .dropdown.active .mega-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.mega-menu-column h4 {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--accent-color); margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color); font-weight: 700;
}
.mega-menu-column ul { list-style: none; }
.mega-menu-column li { margin-bottom: 0.5rem; }
.mega-menu-column a {
    display: block; padding: 0.5rem 0.75rem; color: var(--text-color);
    font-size: 0.95rem; font-weight: 500; border-radius: 6px; transition: all 0.2s ease;
}
.mega-menu-column a:hover { background: #eff6ff; color: var(--accent-color); transform: translateX(4px); }

.mega-menu-footer {
    grid-column: 1 / -1; margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.mega-menu-footer p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.mega-menu-footer a { font-weight: 600; font-size: 0.9rem; }

/* =========================================
   6. PAGE SECTIONS (Hero, Features, Research, etc.)
   ========================================= */
.hero { text-align: center; padding: 4rem 0 3rem; }
.hero h1 { margin-bottom: 1.5rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.hero p.subtitle { font-size: 1.25rem; max-width: 700px; margin: 0 auto 2rem; color: var(--text-muted); }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.trust-statement { font-size: 0.9rem; color: #666; font-style: italic; max-width: 600px; margin: 0 auto; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 2rem; transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent-color); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }

.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.research-card { border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; transition: all 0.3s ease; display: flex; flex-direction: column; }
.research-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.research-tag { display: inline-block; background: #f3f4f6; color: #374151; font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; margin-bottom: 1rem; width: fit-content; }
.research-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.research-card p { font-size: 1rem; flex-grow: 1; }
.read-more { font-weight: 600; margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.5rem; }

.assessment-cta { background-color: #f8fafc; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); text-align: center; }
.assessment-cta h2 { margin-bottom: 1rem; }
.assessment-cta p { max-width: 600px; margin: 0 auto 2rem; font-size: 1.2rem; }

.resources-box { background: #000; color: #fff; border-radius: var(--radius); padding: 3rem 2rem; text-align: center; }
.resources-box h2, .resources-box p { color: #fff; }
.resources-box p { opacity: 0.9; margin-bottom: 2rem; }

.newsletter-form { display: flex; gap: 1rem; max-width: 500px; margin: 1.5rem auto 0; flex-wrap: wrap; }
.newsletter-form input { flex: 1; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 1rem; min-width: 250px; }
.newsletter-form input:focus { outline: 2px solid var(--accent-color); border-color: transparent; }

/* =========================================
   7. FOOTER
   ========================================= */
footer { border-top: 1px solid var(--border-color); padding: 3rem 0; margin-top: 2rem; font-size: 0.95rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; color: #000; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-color); }
.affiliate-disclosure { border-top: 1px solid var(--border-color); padding-top: 1.5rem; font-size: 0.85rem; text-align: center; color: #666; }

/* =========================================
   8. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 1.5rem;
        border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow);
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; }
    
    /* Mobile Mega Menu */
    .mega-menu {
        position: static; transform: none; min-width: 100%;
        grid-template-columns: 1fr; padding: 0 1rem; box-shadow: none;
        border: none; border-top: 1px solid var(--border-color);
        margin-top: 0.5rem; max-height: 0; overflow: hidden;
        opacity: 1; visibility: visible; transition: max-height 0.4s ease, padding 0.4s ease;
    }
    .dropdown.active .mega-menu { max-height: 1500px; padding: 1rem; }
    .dropdown::before { display: none !important; }
    .mega-menu-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}