html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-size: 16px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* =====================================================
   COLORS
====================================================== */
:root {
    --blue: #1d3557;
    --blue-dark: #14304d;
    --blue-light: #2e5f8b;
    --gold: #d4af37;
    --gold-light: #f1d67a;
    --cream: #f6f9fd;
    --cream-dark: #e8f0f8;
    --white: #ffffff;
    --text: #1f2933;
    --muted: #5d6b7c;
    --border: #d7e0ea;
    --forest: #1f7a5b;
    --forest-light: #43a67d;
}

/* =====================================================
   MAIN SCHOOL HEADER
   IMPORTANT: SAME MAX-WIDTH AS NAVBAR
====================================================== */
.main-school-header {
    width: 100%;
    background: linear-gradient(
        120deg,
        #10314f 0%,
        #1a4472 24%,
        #224f84 50%,
        #163d5c 76%,
        #0d243d 100%
    );
    position: sticky;
    top: 0;
    z-index: 9999;
    overflow: hidden;
}

/* =====================================================
   BACKGROUND DECORATION
====================================================== */
.main-school-header::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
    top: -250px;
    left: 25%;
    pointer-events: none;
}

.main-school-header::after {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(201, 162, 39, .09);
    right: -170px;
    bottom: -230px;
    pointer-events: none;
}

/* =====================================================
   HEADER CONTAINER
   SAME WIDTH AS NAVBAR
====================================================== */
.school-header-container {
    width: calc(100% - 40px);
    max-width: none;
    margin: 0 20px;
    padding: 17px 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* =====================================================
   LEFT BRAND
====================================================== */
.school-brand {
    min-height: 145px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 38px;
    
}

/* =====================================================
   LOGO
====================================================== */
.school-logo-wrapper {
    width: 112px;
    height: 112px;
    min-width: 112px;
    border-radius: 50%;
    background: #0e0030;
    border: 4px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(13, 36, 61, .22);
    position: relative;
}

.school-logo-wrapper::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid #d9bd54;
    border-radius: 50%;
}

.school-logo {
    width: 91px;
    height: 91px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

/* =====================================================
   SCHOOL NAME
====================================================== */
.school-name-box {
    min-width: 0;
}

.school-name {
    color: #ffffff;
    font-family: "Ubuntu", sans-serif;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 8px;
    white-space: nowrap;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .18);
}

/* =====================================================
   AFFILIATION
====================================================== */
.school-affiliation {
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.school-affiliation span {
    color: #f3d66d;
    font-weight: 700;
}

/* =====================================================
   ADDRESS
====================================================== */
.school-address {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    line-height: 1.45;
}

.school-address i {
    color: #f1d36b;
    margin-top: 2px;
}

/* =====================================================
   RIGHT INFORMATION
   4 COLUMNS × 2 ROWS
====================================================== */
.school-information {
    justify-items: end;
    align-items: center;
}

.cbse-badge {
    width: 120px;
    height: auto;
    display: block;
    margin-left: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
}

/* =====================================================
   INFORMATION CARD
====================================================== */
.school-info-item {
    min-width: 0;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(201, 162, 39, .45);
    border-radius: 9px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .12);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.school-info-item:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

/* =====================================================
   INFO ICON
====================================================== */
.school-info-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0d243d, #1d5f8c);
    font-size: 12px;
    box-shadow: 0 3px 8px rgba(12, 36, 61, .20);
}

/* =====================================================
   INFO TEXT
====================================================== */
.school-info-text {
    min-width: 0;
}

.school-info-text span {
    display: block;
    color: #9a7b20;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .55px;
    margin-bottom: 3px;
}

.school-info-text strong {
    display: block;
    color: #292929;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* =====================================================
   NAVBAR
   SAME MAX WIDTH
====================================================== */
.school-navbar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-bottom: 3px solid var(--forest);
    box-shadow: 0 5px 18px rgba(13, 36, 61, .10);
    position: sticky;
    top: 0;
    z-index: 10000;
}

.nav-container {
    width: 100%;
    max-width: 1550px;
    padding: 0 10px;
}

/* =====================================================
   NAV MENU
====================================================== */
.school-nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.school-nav-item {
    position: relative;
}

.school-nav-item.menu-template .school-nav-link {
    background: transparent;
    border-radius: 0;
}

.school-nav-item.menu-template .dropdown-arrow {
    display: none;
}

.school-nav-item.submenu-template .school-nav-link {
    background: transparent;
    border-radius: 0;
}

/* =====================================================
   NAV LINK
====================================================== */
.school-nav-link {
    min-height: 56px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #292929;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    transition: all .25s ease;
}

.school-nav-link > i:first-child {
    color: var(--forest);
    font-size: 11px;
}

.school-nav-link:hover {
    color: var(--blue);
    background: #f3f8ff;
}

/* =====================================================
   NAV UNDERLINE
====================================================== */
.school-nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    transition: width .25s ease;
}

.school-nav-link:hover::after {
    width: 65%;
}

.school-nav-link.active {
    color: var(--blue);
    background: #eef6ff;
}

.school-nav-link.active::after {
    width: 65%;
}

/* =====================================================
   DROPDOWN ARROW
====================================================== */
.dropdown-arrow {
    color: #777 !important;
    font-size: 8px !important;
    transition: transform .25s ease;
}

.school-nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* =====================================================
   DROPDOWN
====================================================== */
.school-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 245px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    background: #ffffff;
    border-top: 3px solid var(--blue);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .22s ease;
    z-index: 9999;
}

.school-nav-item:hover > .school-dropdown,
.school-submenu-item:hover > .school-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =====================================================
   DROPDOWN LINK
====================================================== */
.school-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333333;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid #f1f1f1;
    transition: all .2s ease;
}

.school-dropdown li:last-child a {
    border-bottom: none;
}

.school-dropdown .school-dropdown-heading {
    padding: 10px 16px 6px;
    color: #a47c16;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
    background: #fffaf0;
    border-bottom: 1px solid rgba(201, 162, 39, .18);
}

.school-dropdown li a i {
    width: 18px;
    text-align: center;
    color: var(--forest);
    font-size: 11px;
}

.school-dropdown li a:hover {
    color: var(--blue);
    background: #f3f8ff;
    padding-left: 21px;
}

.school-submenu-item {
    position: relative;
}

.school-submenu-toggle {
    justify-content: flex-start;
    font-weight: 700 !important;
    background: #fffaf0;
}

.school-submenu-toggle .submenu-arrow {
    margin-left: auto;
    width: auto;
    color: #777;
    font-size: 9px;
}

.school-submenu {
    top: -3px;
    left: 100%;
    border-top: 3px solid var(--gold);
    border-radius: 0 8px 8px 8px;
}

/* =====================================================
   ADMISSION
====================================================== */
.school-nav-item .admission-link {
    margin: 8px 3px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 6px;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--blue), var(--forest)) !important;
    box-shadow: 0 4px 10px rgba(16, 49, 79, .15);
}

.school-nav-item .admission-link > i:first-child {
    color: #ffffff !important;
}

.school-nav-item .admission-link:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--forest-light), var(--forest)) !important;
}

.school-nav-item .admission-link::after {
    display: none;
}

/* =====================================================
   MOBILE MENU BUTTON
====================================================== */
.mobile-menu-btn {
    display: none;
    width: auto;
    border: none;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--blue), var(--forest));
    color: #ffffff;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
}

.mobile-menu-btn i {
    margin-right: 8px;
}

/* =====================================================
   LARGE TABLET
====================================================== */
@media (max-width: 1350px) {
    .school-header-container {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 28px;
        padding: 15px 20px;
    }

    .school-brand {
        padding-right: 25px;
    }

    .school-name {
        font-size: 27px;
    }

    .school-logo-wrapper {
        width: 92px;
        height: 92px;
        min-width: 92px;
    }

    .school-logo {
        width: 74px;
        height: 74px;
    }

    .school-information {
        gap: 8px;
    }

    .school-info-item {
        min-height: 60px;
        padding: 7px;
    }

    .school-info-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .school-info-text strong {
        font-size: 12.5px;
    }

    .school-nav-link {
        padding: 0 6px;
        font-size: 13px;
    }

    .school-submenu {
        left: auto;
        right: 100%;
    }
}


@media (min-width: 1101px) and (max-width: 1450px) {
    .school-nav-link {
        gap: 3px;
        padding: 0 3px;
        font-size: 12px;
    }

    .school-nav-link > i:first-child {
        display: none;
    }

    .school-nav-item .admission-link {
        padding: 0 8px;
    }
}


/* =====================================================
   MOBILE HEADER - FIXED
====================================================== */
@media (max-width: 1100px) {

    /* HEADER */
    .main-school-header {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    /* HEADER CONTAINER */
    .school-header-container {
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* =================================================
       SCHOOL BRAND
    ================================================= */
    .school-brand {
        min-height: auto;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 0;
        min-width: 0;
    }

    /* =================================================
       LOGO
    ================================================= */
    .school-logo-wrapper {
        width: 62px;
        height: 62px;
        min-width: 62px;
        border-width: 3px;
    }

    .school-logo {
        width: 50px;
        height: 50px;
    }

    /* =================================================
       SCHOOL NAME AREA
    ================================================= */
    .school-name-box {
        min-width: 0;
        flex: 1;
    }

    .school-name {
        font-size: 19px;
        line-height: 1.15;
        margin-bottom: 4px;
        white-space: normal;
    }

    .school-affiliation {
        font-size: 9px;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .school-address {
        font-size: 9px;
        line-height: 1.3;
        gap: 4px;
    }

    .school-address i {
        flex-shrink: 0;
        margin-top: 1px;
    }

    /* =================================================
       CBSE BADGE
    ================================================= */
    .school-information {
        width: auto;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cbse-badge {
        width: 58px;
        height: auto;
        margin: 0;
    }

    /* =================================================
       ACCENT
    ================================================= */
    .header-accent {
        height: 3px;
    }

    /* =================================================
       MOBILE NAVBAR
    ================================================= */
    .school-navbar {
        position: sticky;
        top: 0;
        z-index: 10000;
    }

    .nav-container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    /* MENU BUTTON */
    .mobile-menu-btn {
        display: flex;
        width: 100%;
        min-height: 50px;
        padding: 0 16px;
        align-items: center;
        justify-content: flex-start;
        border: none;
        border-radius: 0;
        background: linear-gradient(
            135deg,
            var(--blue),
            var(--forest)
        );
        color: #ffffff;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    .mobile-menu-btn i {
        margin-right: 9px;
        font-size: 16px;
    }

    /* =================================================
       NAV MENU
    ================================================= */
    .school-nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 0;
        max-height: calc(100vh - 50px);
        max-height: calc(100dvh - 50px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        background: #ffffff;
    }

    .school-nav-menu.mobile-active {
        display: flex;
    }

    /* NAV ITEM */
    .school-nav-item {
        width: 100%;
        border-bottom: 1px solid #e8e8e8;
    }

    /* NAV LINK */
    .school-nav-link {
        width: 100%;
        min-height: 50px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        font-size: 14px;
        color: #292929;
    }

    .school-nav-link > i:first-child {
        width: 20px;
        text-align: center;
        font-size: 13px;
    }

    /* Remove desktop underline */
    .school-nav-link::after {
        display: none;
    }

    /* =================================================
       MOBILE DROPDOWN
    ================================================= */
    .school-dropdown {
        position: static;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f5f7fa;
        padding: 0;
        margin: 0;
    }

    .school-nav-item.dropdown-open > .school-dropdown {
        display: block;
    }

    .school-dropdown li {
        width: 100%;
    }

    .school-dropdown li a {
        width: 100%;
        min-height: 44px;
        padding: 10px 20px 10px 48px;
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 13px;
        border-bottom: 1px solid #e5e5e5;
    }

    .school-dropdown li a:hover {
        padding-left: 53px;
    }

    /* DROPDOWN ARROW */
    .dropdown-arrow {
        margin-left: auto;
        font-size: 9px !important;
    }

    /* =================================================
       SUBMENU
    ================================================= */
    .school-submenu {
        position: static;
        width: 100%;
        display: none;
        background: #eef1f4;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .school-submenu-item.dropdown-open > .school-submenu {
        display: block;
    }

    .school-submenu-toggle {
        padding-left: 48px !important;
    }

    .school-submenu .school-dropdown li a {
        padding-left: 70px;
        font-size: 12.5px;
    }

    /* =================================================
       ADMISSION
    ================================================= */
    .school-nav-item .admission-link {
        margin: 0;
        width: 100%;
        min-height: 50px;
        padding: 0 16px;
        border-radius: 0;
        justify-content: flex-start;
    }
}


/* =====================================================
   VERY SMALL MOBILE
====================================================== */
@media (max-width: 550px) {

    .school-header-container {
        padding: 10px 10px;
        gap: 6px;
    }

    .school-logo-wrapper {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }

    .school-logo {
        width: 42px;
        height: 42px;
    }

    .school-name {
        font-size: 17px;
        line-height: 1.1;
    }

    .school-affiliation {
        font-size: 8px;
        line-height: 1.25;
    }

    .school-address {
        font-size: 8px;
        line-height: 1.25;
    }

    .cbse-badge {
        width: 48px;
    }

    .mobile-menu-btn {
        min-height: 48px;
        font-size: 13px;
    }

    .school-nav-link {
        min-height: 48px;
        font-size: 13px;
    }
}


/* =====================================================
   EXTRA SMALL MOBILE
====================================================== */
@media (max-width: 380px) {

    .school-header-container {
        padding: 8px;
    }

    .school-logo-wrapper {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }

    .school-logo {
        width: 37px;
        height: 37px;
    }

    .school-name {
        font-size: 15px;
    }

    .school-affiliation {
        font-size: 7px;
    }

    .school-address {
        font-size: 7px;
    }

    .cbse-badge {
        width: 42px;
    }
}