/* ============================================================================
   SITE HEADER / NAVIGATION STYLESHEET
   Shared by includes/header.php (full document skeleton) and
   includes/site-nav.php (nav-only include used by pages that own their
   <head>). Extracted from the former inline <style> block in header.php.
   Color values mirror the constants defined in includes/config.php.
   ============================================================================ */

:root {
    --primary-color: #03466e;      /* COLOR_PRIMARY */
    --secondary-color: #ffc369;    /* COLOR_SECONDARY */
    --light-neutral: #E8E8E0;      /* COLOR_LIGHT_NEUTRAL */
    --background-color: #F8F8F0;   /* COLOR_BACKGROUND */
    --header-bg: #003176;
}

/* ============================================================================
   1. HEADER BAR
   ============================================================================ */
.site-header {
    background-color: var(--header-bg);
    border-bottom: 2px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(0, 20, 50, 0.25);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 74px;
}

.header-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo {
    height: 52px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.header-logo-wrap:hover .header-logo {
    opacity: 0.95;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ============================================================================
   2. NAVIGATION LINKS
   ============================================================================ */
.header-nav {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.header-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 13px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-nav .nav-link:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

.header-nav .nav-link.active {
    color: var(--secondary-color);
}

.nav-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.25s ease;
    opacity: 0.8;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
    color: var(--secondary-color);
}

/* ============================================================================
   3. CTA + STAFF LOGIN BUTTONS
   ============================================================================ */
.consultation-btn {
    background-color: var(--secondary-color) !important;
    color: #003176 !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    margin-left: 6px;
    box-shadow: 0 2px 8px rgba(255, 195, 105, 0.35);
    transition: all 0.25s ease !important;
}

.consultation-btn:hover {
    background-color: #ffd68a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 195, 105, 0.5);
    color: #002255 !important;
}

.staff-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 195, 105, 0.75);
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.staff-login-btn i {
    color: var(--secondary-color);
    font-size: 13px;
    transition: color 0.25s ease;
}

.staff-login-btn:hover {
    background: var(--secondary-color);
    color: #003176 !important;
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 195, 105, 0.4);
}

.staff-login-btn:hover i {
    color: #003176;
}

/* ============================================================================
   4. MOBILE MENU BUTTON + OFFCANVAS DRAWER
   ============================================================================ */
.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.offcanvas {
    background-color: #ffffff !important;
    z-index: 1060 !important;
}

.offcanvas-header {
    background-color: #003176;
    color: #ffffff;
    border-bottom: 2px solid var(--secondary-color);
    padding: 1rem 1.25rem;
}

.offcanvas-body {
    padding: 1.25rem;
    background-color: #ffffff !important;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    color: #003176 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: #f0f5fa;
    color: #002255 !important;
}

.mobile-arrow {
    font-size: 12px;
    color: #003176;
    transition: transform 0.25s ease, color 0.25s ease;
}

.mobile-dropdown-toggle[aria-expanded="true"] .mobile-arrow {
    transform: rotate(180deg);
    color: #d97706;
}

.mobile-sub-menu {
    display: none;
    background-color: #f8fafc !important;
    border-radius: 8px;
    padding: 8px;
    margin: 4px 0 8px 0;
    border-left: 3px solid var(--secondary-color) !important;
    transition: all 0.2s ease-in-out;
}

.mobile-sub-menu.is-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-sub-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #334155 !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 13.5px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.mobile-sub-link:hover,
.mobile-sub-link:focus {
    color: #003176 !important;
    background-color: #e2e8f0;
    font-weight: 600;
    padding-left: 16px;
}

/* ============================================================================
   5. MEGA MENU (desktop hover dropdowns)
   ============================================================================ */
.mega-menu {
    position: fixed;
    top: 74px;
    left: 0;
    width: 100vw;
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid #003176;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    display: flex;
    padding: 30px 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.mega-menu-description {
    flex: 0 0 28%;
    padding-right: 30px;
    border-right: 1px solid #e9ecef;
}

.mega-menu-description h3 {
    color: #003176;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.mega-menu-description p {
    color: #6c757d;
    font-size: 13.5px;
    line-height: 1.6;
}

.mega-menu-links {
    flex: 0 0 72%;
    display: grid;
    /* Adaptive: fits however many link columns a mega menu provides (3, 4, ...) */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    padding-left: 30px;
}

.mega-menu-column h4 {
    color: #003176;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--secondary-color);
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column li {
    margin-bottom: 8px;
}

.mega-menu-column a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.2s ease;
    display: inline-block;
}

.mega-menu-column a:hover {
    color: #003176;
    padding-left: 6px;
    font-weight: 600;
}

/* ============================================================================
   6. STICKY FOOTER LAYOUT
   body is a flex column; <main> (opened by site-nav.php) grows to fill the
   viewport so includes/footer.php always sits at the true bottom of the page,
   even when the content is shorter than one screen. Requires <main> to be a
   DIRECT child of <body> — do not wrap it in extra divs.
   ============================================================================ */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.content-area,
main {
    flex: 1 0 auto;
}

/* ============================================================================
   7. MISC / UTILITIES
   ============================================================================ */
.skip-to-content {
    position: absolute;
    left: -9999px;
}

.skip-to-content:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
}

/* Fix Tailwind CSS conflict with Bootstrap collapse */
.collapse.show,
.offcanvas .collapse.show,
.offcanvas-body .collapse.show,
.mobile-sub-menu.show {
    display: block !important;
    visibility: visible !important;
}

.collapsing,
.offcanvas .collapsing,
.offcanvas-body .collapsing,
.mobile-sub-menu.collapsing {
    visibility: visible !important;
}

/* ============================================================================
   8. RESPONSIVE BREAKPOINTS
   ============================================================================ */
@media (max-width: 1200px) {
    .header-nav .nav-link {
        padding: 8px 10px;
        font-size: 12.5px;
    }
    .header-container {
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .header-nav {
        display: none;
    }
    .mobile-menu-button {
        display: flex;
    }
    .header-container {
        height: 66px;
    }
    .header-logo {
        height: 44px;
        max-width: 175px;
    }
    .mega-menu {
        top: 66px;
    }
}

@media (max-width: 576px) {
    .header-container {
        height: 60px;
        padding: 0 0.75rem;
    }
    .header-logo {
        height: 38px;
        max-width: 145px;
    }
    .staff-login-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .mega-menu {
        top: 60px;
    }
}
