/**
 * Brookfield School of Health Sciences - Premium Navigation Stylesheet
 * Two-Tier Institutional Header, 4-Zone Mega Menu & Responsive Drawer
 * Target: branch_id = 3 (/bshs)
 */

/* ==========================================================================
   01. Header Wrapper & Sticky Shell
   ========================================================================== */
.bshs-header-wrapper {
    position: relative;
    width: 100%;
    z-index: 1000;
}

.bshs-header-wrapper.is-sticky {
    position: sticky;
    top: 0;
}

/* ==========================================================================
   02. Tier 1: Midnight Utility Bar
   ========================================================================== */
.bshs-utility-bar {
    background-color: var(--hs-navy);
    color: #CBD5E1;
    font-size: 0.75rem;
    font-weight: 500;
    height: 38px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1002;
    transition: all 0.25s ease;
}

.bshs-header-wrapper.is-scrolled .bshs-utility-bar {
    height: 0;
    opacity: 0;
    overflow: hidden;
    border-bottom: none;
}

.bshs-utility-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bshs-utility-left {
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.6875rem;
    color: #94A3B8;
}

.bshs-utility-swiss-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background-color: #D52B1E;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 900;
    border-radius: 2px;
    line-height: 1;
}

.bshs-utility-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bshs-utility-link {
    color: #CBD5E1 !important;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.bshs-utility-link:hover {
    color: var(--hs-gold) !important;
}

.bshs-utility-link.highlight {
    color: var(--hs-gold) !important;
    font-weight: 600;
}

.bshs-utility-divider {
    color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   03. Tier 2: Main Navigation Bar
   ========================================================================== */
.bshs-main-nav-bar {
    background-color: var(--hs-surface);
    height: 84px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(6, 29, 59, 0.05);
    border-bottom: 1px solid var(--hs-border-subtle);
    position: relative;
    z-index: 1001;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.bshs-header-wrapper.is-scrolled .bshs-main-nav-bar {
    height: 70px;
    box-shadow: 0 8px 30px rgba(6, 29, 59, 0.1);
}

.bshs-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Brand Logo */
.bshs-brand-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.bshs-brand-logo-img {
    height: 52px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    transition: height 0.3s ease;
}

.bshs-header-wrapper.is-scrolled .bshs-brand-logo-img {
    height: 44px;
}

@media (max-width: 576px) {
    .bshs-brand-logo-img {
        height: 40px;
        max-width: 220px;
    }
}

/* Navigation Menu Items (Desktop) */
.bshs-nav-menu-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 28px;
}

@media (min-width: 1200px) {
    .bshs-nav-menu-list {
        display: flex;
    }
}

.bshs-nav-item {
    position: relative;
}

.bshs-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hs-academic-navy) !important;
    text-decoration: none;
    padding: 28px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
}

.bshs-nav-link::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--hs-gold);
    transition: width 0.25s ease;
}

.bshs-header-wrapper.is-scrolled .bshs-nav-link {
    padding: 22px 0;
}

.bshs-header-wrapper.is-scrolled .bshs-nav-link::after {
    bottom: 14px;
}

.bshs-nav-link:hover,
.bshs-nav-item.has-dropdown:hover > .bshs-nav-link,
.bshs-nav-item.active > .bshs-nav-link {
    color: var(--hs-gold) !important;
}

.bshs-nav-link:hover::after,
.bshs-nav-item.has-dropdown:hover > .bshs-nav-link::after,
.bshs-nav-item.active > .bshs-nav-link::after {
    width: 100%;
}

.bshs-chevron-icon {
    font-size: 0.6875rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.bshs-nav-item:hover .bshs-chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
}

/* Nav Actions (CTA, Search & Mobile Toggle) */
.bshs-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.bshs-search-btn-trigger {
    background: transparent;
    border: none;
    color: var(--hs-academic-navy);
    font-size: 1.125rem;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--hs-radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bshs-search-btn-trigger:hover {
    color: var(--hs-gold);
    background-color: var(--hs-ivory);
}

.bshs-cta-btn-desktop {
    display: none;
}

@media (min-width: 992px) {
    .bshs-cta-btn-desktop {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background-color: var(--hs-gold);
        color: #FFFFFF !important;
        font-family: 'Inter', sans-serif;
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        padding: 12px 22px;
        border-radius: var(--hs-radius-sm);
        text-decoration: none;
        transition: all 0.25s ease;
        box-shadow: 0 4px 12px rgba(200, 157, 69, 0.25);
        white-space: nowrap;
    }
    .bshs-cta-btn-desktop:hover {
        background-color: var(--hs-gold-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(200, 157, 69, 0.35);
    }
}

/* Mobile Hamburger Toggle */
.bshs-mobile-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
    color: var(--hs-academic-navy);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 1200px) {
    .bshs-mobile-toggle-btn {
        display: none;
    }
}

.bshs-mobile-toggle-btn:hover {
    background-color: var(--hs-ivory);
    border-color: var(--hs-gold);
}

/* ==========================================================================
   04. Standard Dropdowns (About & Admissions)
   ========================================================================== */
.bshs-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background-color: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-md);
    box-shadow: var(--hs-shadow-lg);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1050;
}

.bshs-nav-item.has-dropdown:hover > .bshs-dropdown-menu,
.bshs-nav-item.has-dropdown.is-open > .bshs-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bshs-dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hs-text) !important;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.bshs-dropdown-link:hover {
    background-color: var(--hs-ivory);
    color: var(--hs-gold) !important;
    padding-left: 24px;
}

/* ==========================================================================
   05. Full-Width 4-Zone Mega Menu (Programmes)
   ========================================================================== */
.bshs-nav-item.has-mega-menu {
    position: static;
}

.bshs-mega-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--hs-surface);
    border-top: 1px solid var(--hs-border-subtle);
    border-bottom: 2px solid var(--hs-gold);
    box-shadow: var(--hs-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1050;
    padding: 36px 0 40px 0;
}

.bshs-nav-item.has-mega-menu:hover .bshs-mega-menu-panel,
.bshs-nav-item.has-mega-menu.is-open .bshs-mega-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bshs-mega-menu-grid {
    display: grid;
    grid-template-columns: 240px 1fr 1fr 280px;
    gap: 32px;
}

/* Zone 1: Guide & Overview */
.bshs-mega-zone-overview {
    border-right: 1px solid var(--hs-border-subtle);
    padding-right: 28px;
}

.bshs-mega-guide-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hs-gold);
    margin-bottom: 8px;
}

.bshs-mega-guide-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--hs-academic-navy);
    margin-bottom: 12px;
}

.bshs-mega-guide-desc {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--hs-text-muted);
    margin-bottom: 24px;
}

.bshs-mega-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hs-gold);
    border: 1px solid var(--hs-gold);
    padding: 10px 18px;
    border-radius: var(--hs-radius-sm);
    transition: all 0.2s ease;
}

.bshs-mega-all-btn:hover {
    background-color: var(--hs-gold);
    color: #FFFFFF !important;
}

/* Zone 2 & 3: Columns */
.bshs-mega-zone-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hs-clinical-slate);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hs-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bshs-mega-badge-tag {
    font-size: 0.625rem;
    padding: 3px 8px;
    border-radius: 3px;
    background-color: var(--hs-ivory);
    color: var(--hs-text-muted);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.bshs-mega-prog-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bshs-mega-prog-item a {
    display: block;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--hs-radius-sm);
    transition: background-color 0.2s ease;
}

.bshs-mega-prog-item a:hover {
    background-color: var(--hs-ivory);
}

.bshs-mega-prog-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hs-academic-navy);
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.bshs-mega-prog-item a:hover .bshs-mega-prog-name {
    color: var(--hs-gold);
}

.bshs-mega-prog-sub {
    font-size: 0.75rem;
    color: var(--hs-text-muted);
    line-height: 1.35;
}

/* Zone 4: Featured Card */
.bshs-mega-featured-card {
    background-color: var(--hs-ivory);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bshs-mega-featured-img-wrap {
    height: 130px;
    overflow: hidden;
    position: relative;
}

.bshs-mega-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bshs-mega-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--hs-navy);
    color: var(--hs-gold);
    padding: 4px 8px;
    border-radius: 3px;
}

.bshs-mega-featured-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bshs-mega-featured-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--hs-academic-navy);
    margin-bottom: 6px;
}

.bshs-mega-featured-text {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--hs-text-muted);
    margin-bottom: 14px;
    flex-grow: 1;
}

.bshs-mega-featured-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hs-gold);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   06. Search Overlay Modal
   ========================================================================== */
.bshs-search-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(6, 29, 59, 0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bshs-search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.bshs-search-modal-box {
    max-width: 640px;
    width: 90%;
    position: relative;
}

.bshs-search-close-btn {
    position: absolute;
    top: -48px;
    right: 0;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
}

.bshs-search-form {
    position: relative;
}

.bshs-search-input {
    width: 100%;
    background-color: #FFFFFF;
    border: 2px solid var(--hs-gold);
    border-radius: var(--hs-radius-md);
    padding: 18px 24px;
    font-size: 1.125rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bshs-search-submit-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--hs-navy);
    border: none;
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: var(--hs-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.bshs-search-submit-btn:hover {
    background-color: var(--hs-gold);
}

/* ==========================================================================
   07. Off-Canvas Mobile Drawer
   ========================================================================== */
.bshs-drawer-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(6, 29, 59, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bshs-drawer-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.bshs-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background-color: var(--hs-surface);
    box-shadow: -8px 0 32px rgba(6, 29, 59, 0.2);
    z-index: 1999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.bshs-mobile-drawer.is-active {
    transform: translateX(0);
}

.bshs-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--hs-border-subtle);
}

.bshs-drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--hs-academic-navy);
    cursor: pointer;
}

.bshs-drawer-body {
    padding: 24px;
    flex-grow: 1;
}

.bshs-drawer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bshs-drawer-item {
    border-bottom: 1px solid var(--hs-border-subtle);
}

.bshs-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hs-academic-navy) !important;
    text-decoration: none;
}

.bshs-drawer-accordion-toggle {
    background: transparent;
    border: none;
    color: var(--hs-text-muted);
    padding: 8px;
    cursor: pointer;
}

.bshs-drawer-submenu {
    list-style: none;
    padding: 0 0 12px 16px;
    margin: 0;
    display: none;
}

.bshs-drawer-item.is-expanded .bshs-drawer-submenu {
    display: block;
}

.bshs-drawer-item.is-expanded .bshs-drawer-accordion-toggle i {
    transform: rotate(180deg);
}

.bshs-drawer-submenu li a {
    display: block;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--hs-text-muted) !important;
    text-decoration: none;
}

.bshs-drawer-submenu li a:hover {
    color: var(--hs-gold) !important;
}

.bshs-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--hs-border-subtle);
    background-color: var(--hs-ivory);
}
