/* File: /styles/header.css */

/* =========================================
   1. DESKTOP BASE STYLES (Navy Theme)
   ========================================= */
#main-header {
    background-color: #020617; /* Deep navy */
    border-bottom: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 4px 20px rgba(15,23,42,0.9);
    padding: 12px 60px;
    position: relative; /* needed for absolute children */
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
#main-header .logo {
    flex-shrink: 0;
    margin-right: 20px;
}

#main-header .logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Nav Container */
#main-header nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Desktop nav UL */
#main-header .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

#main-header .nav-links li {
    margin: 0 14px;
}

/* ===== DESKTOP LINK STYLES (HIGH CONTRAST) ===== */
header#main-header nav ul.nav-links li a {
    color: #f9fafb !important;     /* bright white, forced */
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    opacity: 1 !important;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    text-shadow: none;             /* crisp text */
}

header#main-header nav ul.nav-links li a:hover,
header#main-header nav ul.nav-links li a.active {
    color: #0ea5e9 !important;
    background-color: rgba(15,23,42,0.95);
    box-shadow: 0 0 0 1px rgba(148,163,184,0.9);
}

/* Hide Hamburger on Desktop */
#hamburger-btn {
    display: none;
}

/* Profile Icon on Desktop: Absolute so it stays fully inside the header */
.profile-icon-container {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.profile-icon-container .profile-icon {
    color: #f9fafb;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

/* Desktop Buttons (guest) */
.nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

/* ===== LOGIN BUTTON (needs to be clearly visible) ===== */
.nav-btn-login {
    color: #ffffff !important;                   /* bright white idle text */
    background: rgba(15,23,42,0.4);
    border: 1px solid rgba(255,255,255,0.45);
    padding: 8px 22px;
    border-radius: 999px;
    font-weight: 600;
    backdrop-filter: blur(3px);
    transition: all 0.25s ease;
    opacity: 1 !important;                      /* prevent any dimming */
    filter: none !important;
    mix-blend-mode: normal !important;
}

/* Hover state */
.nav-btn-login:hover {
    color: #38bdf8 !important;                  /* blue text */
    border-color: rgba(255,255,255,0.75);
    background: rgba(15,23,42,0.75);
    box-shadow: 0 0 0 1px rgba(148,163,184,0.5);
}

/* Get Started button */
.nav-btn-start {
    background: #0ea5e9;
    color: #0b1120;
    border: none;
    box-shadow: 0 0 0 1px rgba(56,189,248,0.7),
                0 8px 18px rgba(15,23,42,0.8);
}

.nav-btn-start:hover {
    background: #38bdf8;
    color: #0b1120;
}


/* =========================================
   2. MOBILE STYLES (Max-Width 992px)
   ========================================= */
@media (max-width: 992px) {
    #main-header {
        padding: 15px 20px;
        justify-content: flex-start; /* Logo stays left */
        height: 70px;                /* Consistent height */
    }

    /* Hamburger Icon - right side */
    #hamburger-btn {
        display: block;
        cursor: pointer;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 1px solid rgba(248,250,252,0.3);
        border-radius: 8px;
        z-index: 1200;

        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        padding: 8px;
    }

    #hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #ffffff;
        border-radius: 2px;
        margin-bottom: 5px;
        transition: 0.3s;
    }

    #hamburger-btn span:last-child {
        margin-bottom: 0;
    }

    /* Mobile Menu Container (dropdown) */
    #main-header nav #mobile-nav {
        display: none !important;
        position: absolute;
        top: 80px;           /* below header */
        right: 20px;
        left: auto;

        width: max-content;
        min-width: 220px;
        max-width: 85vw;

        background-color: #ffffff;
        flex-direction: column;
        padding: 10px 0;

        box-shadow: 0 10px 40px rgba(0,0,0,0.25);
        border-radius: 18px;
        z-index: 1100;
        border: 1px solid rgba(148,163,184,0.25);
    }

    #main-header nav #mobile-nav.active {
        display: flex !important;
    }

    #main-header nav #mobile-nav li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        margin: 0;
    }

    #main-header nav #mobile-nav li:last-child {
        border-bottom: none;
    }

    /* Mobile link styles – crisp, no blur */
    #main-header nav #mobile-nav li a {
        color: #0f172a !important;
        display: block;
        padding: 12px 24px;
        font-size: 1rem;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;

        background: transparent;
        border-radius: 0;
        box-shadow: none;
        text-shadow: none;
    }

    #main-header nav #mobile-nav li a:hover,
    #main-header nav #mobile-nav li a.active {
        background-color: #eff6ff;
        color: #0ea5e9 !important;
        box-shadow: inset 0 0 0 1px rgba(148,163,184,0.6);
        border-radius: 999px;
        margin: 4px 10px;
    }

    /* Nav container positioning on mobile */
    #main-header nav {
        position: static;
        flex: 0;
    }

    /* Hide profile icon on mobile so it never collides with hamburger */
    .profile-icon-container {
        display: none !important;
    }

    .d-lg-none {
        display: block !important;
    }

    .d-lg-block {
        display: none !important;
    }
}

/* =========================================
   3. FINAL OVERRIDES (safety net)
   ========================================= */

/* If anything still tries to dim Log In, override it here */
#main-header a.nav-btn-login,
#main-header .nav-btn.nav-btn-login {
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}
/* =========================================
   4. PROFILE DROPDOWN ARROW
   ========================================= */

/* Bright, visible chevron next to profile icon on desktop */
#main-header .profile-icon-container .dropdown-toggle::after {
    border-top-color: #ffffff !important;   /* arrow color */
    opacity: 1 !important;                  /* no dimming */
    filter: none !important;
    margin-left: 0.35rem;
}
