/* =========================================================
   SITE HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}

/* =========================================================
   LOGO - Stays Left
   ========================================================= */

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
    transition: transform 0.2s;
}

.site-logo:hover .site-logo-mark {
    transform: scale(1.04);
}

.site-logo-text {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.site-logo-text span {
    color: #0f766e;
}

/* =========================================================
   MAIN NAVIGATION - Right Aligned
   ========================================================= */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;   /* Pushes navigation to the right */
    margin-right: 12px;  /* Creates distance from sign-in buttons */
    flex-shrink: 0;      /* Prevents navigation from shrinking */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.nav-link:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

/* =========================================================
   MEGA MENU WRAPPER
   ========================================================= */

.nav-mega-wrapper {
    position: relative;
}

.nav-chevron {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
    margin-left: 2px;
}

.nav-mega-trigger[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

/* =========================================================
   MEGA MENU
   ========================================================= */

.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 100;
}

.nav-mega-wrapper:hover .mega-menu,
.nav-mega-wrapper:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mega Menu Intro */
.mega-menu-intro {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.mega-menu-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f766e;
    background: #f0fdfa;
    padding: 2px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.mega-menu-intro h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.mega-menu-intro p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.mega-view-all {
    font-size: 14px;
    font-weight: 600;
    color: #0f766e;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.mega-view-all:hover {
    gap: 12px;
}

/* Mega Menu Grid */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-item:hover {
    background: #f8fafc;
}

.mega-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.mega-item-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.mega-item-content small {
    font-size: 12px;
    color: #94a3b8;
}

/* =========================================================
   HEADER ACTIONS - Stays Right
   ========================================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-signin {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-signin:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.header-signup {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.20);
}

.header-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.30);
}

/* =========================================================
   MOBILE MENU TOGGLE
   ========================================================= */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #0f172a;
    border-radius: 2px;
    transition: all 0.2s;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 24px;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    z-index: 999;
}

.mobile-navigation.open {
    display: flex;
}

.mobile-navigation a {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-navigation a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.mobile-navigation details {
    border-radius: 8px;
}

.mobile-navigation details summary {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-navigation details summary::-webkit-details-marker {
    display: none;
}

.mobile-navigation details summary::after {
    content: '▾';
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s;
}

.mobile-navigation details[open] summary::after {
    transform: rotate(180deg);
}

.mobile-navigation details summary:hover {
    background: #f1f5f9;
}

.mobile-navigation details a {
    padding-left: 36px;
    font-size: 14px;
    font-weight: 400;
    display: block;
}

.mobile-account-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
    .main-navigation {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions .header-signin,
    .header-actions .header-signup {
        display: none;
    }

    .header-actions {
        gap: 4px;
    }
}

@media (min-width: 1025px) {
    .mobile-navigation {
        display: none !important;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .site-logo-mark,
    .header-signup,
    .mega-view-all,
    .mega-item {
        transition: none !important;
    }

    .header-signup:hover {
        transform: none !important;
    }
}