/* ═══════════════════════════════════════
   NAVBAR STYLES – Health Center, UoP 2026
   Import this file on every page:
   <link rel="stylesheet" href="navbar.css">
═══════════════════════════════════════ */

/* ── Main header shell ── */
header {
    background: linear-gradient(135deg, rgba(100,20,0,0.97) 0%, rgba(139,37,0,0.97) 60%, rgba(160,45,0,0.97) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(90,21,0,0.45);
    border-bottom: 1px solid rgba(255,215,0,0.15);
}

/* ── Main nav row ── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Logo ── */
.logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: white;
    text-decoration: none;
}
.logo a {
    display: flex;
    align-items: center;
}
.logo img {
    height: 68px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    transition: transform 0.3s;
}
.logo:hover img {
    transform: scale(1.05);
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-text .logo-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFD700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.logo-text .logo-sub {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.72);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.logo-divider {
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, transparent, rgba(255,215,0,0.5), transparent);
    margin: 0 0.2rem;
}

/* ── Nav links ── */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin-left: auto;
}
.nav-links > li > a {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    position: relative;
    white-space: nowrap;
}
.nav-links > li > a:hover {
    background: rgba(255,215,0,0.15);
    color: #FFD700;
    box-shadow: 0 0 14px rgba(255,215,0,0.18);
}
.nav-links > li > a.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #5a1500;
    font-weight: 700;
    box-shadow: 0 3px 14px rgba(255,165,0,0.45);
}
.nav-links > li > a.active:hover {
    box-shadow: 0 4px 20px rgba(255,165,0,0.6);
    background: linear-gradient(135deg, #ffe033 0%, #FFB200 100%);
}

/* ── Dropdown ── */
.dropdown {
    position: relative;
}
.dropdown-arrow {
    font-size: 0.65rem;
    transition: transform 0.3s;
    margin-left: 2px;
    opacity: 0.8;
}
.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    min-width: 230px;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(90,21,0,0.2), 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(139,37,0,0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    padding: 0.5rem 0;
    z-index: 200;
}
/* arrow pointer */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.06));
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.72rem 1.3rem;
    color: #3a3a3a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    border-left: 3px solid transparent;
}
.dropdown-menu a:hover {
    background: linear-gradient(90deg, #fff5e6 0%, #fff9f0 100%);
    color: #8B2500;
    padding-left: 1.6rem;
    border-left-color: #FFD700;
}
.dropdown-menu a::after {
    display: none;
}

/* ── Hamburger ── */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(255,215,0,0.25);
    transition: background 0.2s;
}
.menu-toggle:hover {
    background: rgba(255,215,0,0.12);
}
.menu-toggle span {
    width: 22px;
    height: 2.5px;
    background: #FFD700;
    transition: all 0.3s;
    border-radius: 3px;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        padding: 0.7rem 5%;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 72px;
        flex-direction: column;
        background: linear-gradient(160deg, #5a1500 0%, #8B2500 100%);
        width: 100%;
        text-align: left;
        transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
        box-shadow: 0 12px 40px rgba(0,0,0,0.3);
        padding: 1rem 0 2rem;
        gap: 0;
        z-index: 999;
        align-items: stretch;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        padding: 0;
        border-bottom: 1px solid rgba(255,215,0,0.08);
    }
    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links > li > a {
        color: rgba(255,255,255,0.9);
        font-weight: 600;
        display: flex;
        align-items: center;
        padding: 0.9rem 1.8rem;
        border-radius: 0;
        background: none;
        box-shadow: none;
        font-size: 0.95rem;
        gap: 10px;
    }
    .nav-links > li > a.active {
        background: rgba(255,215,0,0.15);
        color: #FFD700;
        border-left: 3px solid #FFD700;
    }
    .nav-links > li > a:hover {
        background: rgba(255,215,0,0.1);
        color: #FFD700;
        box-shadow: none;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none !important;
        left: auto;
        margin-top: 0;
        box-shadow: none;
        border-radius: 0;
        border: none;
        background: rgba(0,0,0,0.2);
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s;
        padding: 0;
    }
    .dropdown-menu::before { display: none; }
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
    }
    .dropdown-menu a {
        padding: 0.75rem 2.5rem;
        color: rgba(255,255,255,0.8);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        border-left: none;
        font-size: 0.85rem;
    }
    .dropdown-menu a:hover {
        background: rgba(255,215,0,0.12);
        color: #FFD700;
        padding-left: 3rem;
        border-left: none;
    }
    .dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .logo img {
        height: 54px;
    }
    .logo-text .logo-title { font-size: 1rem; }
    .logo-divider { display: none; }
}
