/* ============================================
   HEADER + NAV + FOOTER — Single source of truth
   All public pages load this file
   ============================================ */

/* === HEADER === */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0 24px; background: transparent; border-bottom: 1px solid transparent; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.site-header.scrolled { background: #ffffff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.header-accent { display: none; }

/* === NAV CONTAINER === */
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }

/* === LOGO === */
.logo { color: #ffffff; font-weight: 700; text-decoration: none; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; transition: color 0.3s; flex-shrink: 0; }
.logo::before { content: ''; display: inline-block; width: 28px; height: 28px; background: #2563eb; border-radius: 6px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E") center/60% no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E") center/60% no-repeat; flex-shrink: 0; }
.site-header.scrolled .logo { color: #1a1a2e; }
.logo-beta { display: inline-block; background: rgba(37,99,235,0.2); color: #93b4f5; font-size: 0.55rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; text-transform: uppercase; vertical-align: middle; margin-left: 2px; border: 1px solid rgba(37,99,235,0.3); transition: all 0.3s; }
.site-header.scrolled .logo-beta { background: rgba(37,99,235,0.1); color: #2563eb; border-color: rgba(37,99,235,0.2); }

/* === NAV MENU === */
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; align-items: center; }
.nav-menu > li > a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.88rem; font-weight: 500; padding: 8px 14px; border-radius: 6px; transition: color 0.2s; display: block; white-space: nowrap; }
.nav-menu > li > a:hover { color: #ffffff; }
.site-header.scrolled .nav-menu > li > a { color: #4a4a6a; }
.site-header.scrolled .nav-menu > li > a:hover { color: #2563eb; }

/* === NAV ACTIONS === */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.88rem; font-weight: 500; padding: 8px 14px; transition: color 0.2s; }
.nav-login:hover { color: #ffffff; }
.site-header.scrolled .nav-login { color: #4a4a6a; }
.site-header.scrolled .nav-login:hover { color: #2563eb; }
.nav-cta { background: #2563eb; color: #ffffff; text-decoration: none; font-size: 0.88rem; font-weight: 600; padding: 8px 20px; border-radius: 8px; border: 2px solid #2563eb; transition: background 0.2s; white-space: nowrap; }
.nav-cta:hover { background: #1d4ed8; }
.nav-mega-trigger { display: inline-flex !important; align-items: center; gap: 4px; }
.nav-chevron { width: 8px; height: 8px; opacity: 0.5; transition: transform 0.2s, opacity 0.2s; flex-shrink: 0; }
.nav-has-mega:hover .nav-chevron { transform: rotate(180deg); opacity: 0.8; }

/* === MEGA MENU === */
.nav-has-mega { position: relative; }

/* Outer wrapper: invisible, just for positioning + hover bridge */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-40%);
    width: 820px;
    padding-top: 12px;
    z-index: 200;
}
.nav-has-mega:hover > .mega-menu { display: block; }

/* Inner panel: the visible white box */
.mega-inner {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
}
.mega-inner > .mega-col { padding: 24px 20px; }
.mega-inner > .mega-bottom { grid-column: 1 / -1; }

/* Columns */
.mega-col h5 { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: #b0b0ba; margin: 0 0 12px; padding: 0 10px; }

/* Items */
.mega-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; transition: background 0.15s; }
.mega-item:hover { background: #f8f9fb; }
.mega-item div { flex: 1; }
.mega-item strong { color: #1a1a2e; font-size: 0.86rem; font-weight: 600; display: block; margin-bottom: 2px; }
.mega-item span { color: #8a8a9a; font-size: 0.76rem; display: block; line-height: 1.4; }

/* Icons — centered in background box */
.mega-icon {
    width: 36px; height: 36px; min-width: 36px; min-height: 36px;
    background: rgba(37,99,235,0.06); border-radius: 10px;
    flex-shrink: 0;
    display: grid; place-items: center;
    margin-top: 3px;
}
.mega-item:hover .mega-icon { background: rgba(37,99,235,0.12); }
.mega-icon svg {
    width: 18px !important; height: 18px !important;
    stroke: #2563eb; fill: none; stroke-width: 2;
    overflow: visible;
}

/* Featured column */
.mega-col.mega-featured { border-left: 1px solid #f0f0f5; }
.mega-blog-card { display: flex; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; margin-bottom: 4px; transition: background 0.15s; }
.mega-blog-card:hover { background: #f8f9fb; }
.mega-blog-img { width: 60px; height: 44px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.mega-blog-img img { width: 100%; height: 100%; object-fit: cover; }
.mega-blog-text { flex: 1; }
.mega-blog-text strong { color: #1a1a2e; font-size: 0.76rem; font-weight: 600; display: block; line-height: 1.3; margin-bottom: 2px; }
.mega-blog-text span { color: #2563eb; font-size: 0.7rem; font-weight: 500; }

/* Bottom bar — spans full width, clipped by parent overflow:hidden */
.mega-bottom { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: #f8f9fb; border-top: 1px solid #ebebf0; }
.mega-bottom span { color: #8a8a9a; font-size: 0.84rem; }
.mega-bottom a, .mega-bottom .btn, .mega-bottom .btn-primary { background: #2563eb; color: #ffffff !important; text-decoration: none; font-size: 0.82rem; font-weight: 600; padding: 7px 16px; border-radius: 7px; transition: background 0.15s; display: inline-block; }
.mega-bottom a:hover { background: #1d4ed8; }

/* === LANGUAGE DROPDOWN === */
.lang-dropdown { position: relative; }
.lang-dropdown-btn { display: flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.85); padding: 6px 10px; border-radius: 6px; transition: color 0.2s; }
.site-header.scrolled .lang-dropdown-btn { color: #4a4a6a; }
.lang-flag { font-size: 1rem; }
.lang-chevron { font-size: 0.6rem; }
.lang-dropdown-menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); padding: 6px; min-width: 170px; z-index: 200; }
.lang-dropdown.open .lang-dropdown-menu { display: block; }
.lang-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 0.82rem; color: #4a4a6a; text-decoration: none; cursor: pointer; transition: background 0.15s; }
.lang-dropdown-item:hover { background: #f8f9fb; }
.lang-domain { color: #8a8a9a; font-size: 0.72rem; margin-left: auto; }

/* === MOBILE MENU === */
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; width: 36px; height: 36px; padding: 6px; flex-direction: column; justify-content: center; gap: 5px; }
.mobile-menu-toggle span { display: block; height: 2px; background: white; border-radius: 1px; transition: all 0.3s; }
.site-header.scrolled .mobile-menu-toggle span { background: #1a1a2e; }
.mobile-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.mobile-nav-overlay.active { display: block; }
.mobile-nav { position: fixed; top: 0; right: -100%; width: 85%; max-width: 400px; height: 100vh; background: #ffffff; z-index: 100; transition: right 0.3s ease; overflow-y: auto; padding: 20px; }
.mobile-nav.open { right: 0; }
.mobile-nav-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mobile-nav-header .logo { color: #1a1a2e; }
.mobile-nav-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #8a8a9a; padding: 4px; }
.mobile-nav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.mobile-nav-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px; background: #f8f9fb; border-radius: 10px; text-decoration: none; text-align: center; transition: background 0.15s; }
.mobile-nav-card:hover { background: #e5e7eb; }
.mnc-icon { width: 24px; height: 24px; color: #2563eb; }
.mnc-icon svg { width: 24px; height: 24px; }
.mobile-nav-card strong { color: #1a1a2e; font-size: 0.85rem; }
.mobile-nav-card span { color: #8a8a9a; font-size: 0.72rem; }
.mobile-nav-actions { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav-actions .nav-cta { display: block; text-align: center; }
.mobile-nav-actions .nav-login { display: block; text-align: center; color: #4a4a6a; }

/* === FOOTER === */
.site-footer { background: #0f172a; color: #94a3b8; padding: 60px 0 30px; }
.site-footer h4 { color: #ffffff; font-size: 0.95rem; margin: 0 0 16px; }
.site-footer p { color: #94a3b8; font-size: 0.85rem; line-height: 1.6; }
.site-footer a { color: #94a3b8; text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.site-footer a:hover { color: #3b82f6; }
.footer-grid { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-bottom { max-width: 1100px; margin: 30px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; font-size: 0.82rem; color: #64748b; }
.footer-attribution { color: #64748b; }
.footer-attribution a { color: #3b82f6; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .nav-actions { display: none; }
    .mobile-menu-toggle { display: flex; }
    .site-header { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; }
}
