/* ==========================================================================
   HEADER NAVIGATION ENGINE (CALIBRI & SEGOE SCRIPT THEME)
   ========================================================================== */

#main-header {
    width: 100%;
    background-color: #002166; /* Deep blue color matched from screenshot */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    position: sticky;
    top: 0;
    left: 0;
    z-index: 2000;
    box-sizing: border-box;
}

.nav-container {
    width: 100%;
    max-width: 1240px; /* Slight increase to fit all text items comfortably */
    margin: 0 auto;
    padding: 0 20px;
    height: 70px; /* Reducer height menu bar */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* --- Brand Identity / Logo Structure --- */
.logo-box {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 14px;
    height: 100%;
}

.school-logo {
    height: 80px; /* Adjusted to fit beautifully inside the 70px header without cutting off */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-text h1 {
    font-family: 'Calibri', sans-serif; /* CHANGED: Entire title set to Calibri */
    font-size: 1.4rem; /* Balanced size for clean layout */
    font-weight: 700;
    color: #ffffff; 
    margin: 0;
    line-height: 0.85;
}

.logo-text .tagline {
    font-family: 'Play Sans', 'Plus Jakarta Sans', 'Calibri','cursive' sans-serif; /* CHANGED: Set to Play Sans with premium fallbacks */
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85); 
    letter-spacing: 0.2px;
    text-transform: none;
    display: inline-block;
    margin-top: 1px;
}

/* --- Main Desktop Navigation Links --- */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    height: 100%;
}

.nav-links > li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-links > li > a {
    font-family: 'Calibri', sans-serif; /* CHANGED: Menu links switched to Calibri */
    font-size: 1.05rem; /* Calibri reads slightly smaller, increased font size for scale */
    font-weight: 700;
    color: #ffffff; 
    text-decoration: none;
    padding: 8px 14px; 
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links > li > a:hover {
    color: #e5b833; /* Golden yellow shade matched from the screenshot action item */
    background-color: rgba(255, 255, 255, 0.08); 
}

.nav-links .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.7); 
}

/* --- Action Button (Fee Payment / Contact) --- */
.nav-links .contact-btn {
    background-color: #e5b833; /* Clean golden yellow background match */
    color: #002166 !important; /* Deep contrast blue text inside the button */
    padding: 8px 18px;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-links .contact-btn:hover {
    background-color: #ffffff;
    color: #002166 !important;
    transform: none;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* --- Dropdown Submenus --- */
.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:hover > a .arrow {
    transform: rotate(180deg);
    color: #e5b833;
}

.submenu {
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #002166; 
    min-width: 240px;
    border-radius: 0 0 8px 8px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    list-style: none;
    padding: 6px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.submenu li a {
    font-family: 'Calibri', sans-serif; /* CHANGED: Dropdown links set to Calibri */
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9); 
    text-decoration: none;
    padding: 10px 14px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.submenu li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e5b833; 
    padding-left: 18px;
}

/* --- Responsive Hamburger Trigger --- */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 2100;
}

.hamburger div {
    width: 24px;
    height: 2px;
    background-color: #ffffff; 
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS (MOBILE AND TABLET VIEWPORTS)
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .nav-container {
        height: 60px; 
    }

    .hamburger {
        display: flex;
    }

    .school-logo {
        height: 65px; 
    }

    /* Transform Main Menu into a Mobile Tray Drawer */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 300px;
        background-color: #002166; 
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 90px 24px 40px 24px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .nav-links > li {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links > li > a {
        width: 100%;
        padding: 14px 8px;
        justify-content: space-between;
    }

    .nav-links .contact-btn {
        margin-top: 20px;
        justify-content: center;
        width: 100%;
    }

    /* Convert Mobile Dropdowns into Accordion-style Sheets */
    .submenu {
        position: relative;
        top: 0;
        width: 100%;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: rgba(0, 0, 0, 0.15); 
        display: none; 
        padding: 4px 0;
    }

    .dropdown:hover .submenu {
        display: block;
    }

    .submenu li a {
        padding: 10px 20px;
    }

    /* Hamburger Animation Transform Effects */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 5px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -5px);
    }
}

@media screen and (max-width: 580px) {
    .logo-text h1 {
        font-size: 1.1rem;
    }
    .logo-text .tagline {
        font-size: 0.5rem;
    }
    .school-logo {
        height: 55px; 
    }
}