/* Top Contact Bar */
.top-bar {
    background: #042159;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container123 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Main Header */
.main-header {
    background: #0c2963;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.school-info {
    color: #fff;
}

.school-name-bn {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.school-name-en {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 3px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.school-details {
    font-size: 13px;
    opacity: 0.7;
    font-family: Arial, Helvetica, sans-serif;
}

/* Search */
.search-box {
    position: relative;
}

.search-input {
    padding: 7px 15px 7px 40px;
    border: 1px solid #ffffff85;
    border-radius: 5px;
    width: 250px;
    background: #ffffff14;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.search-input::placeholder,
.mobile-search-input::placeholder {
    color: #ffffffba;
}

.search-box svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #ffffffba;
    width: 17px;
}

/* Navigation */
.nav-container {
    background: #092a6d;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* <-- position:relative added */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 14px 10px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all .25s ease;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 20px;
}

/* Show arrow only if submenu exists */
/* .nav-item:has(.dropdown)>.nav-link::after{
    content: " ▾";
    font-size: 19px;
    opacity: 0.85;
} */

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all .2s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    /* border-bottom: 1px solid #f0f0f0; */
    transition: all .15s ease;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.dropdown a:hover {
    background: #f8f9fa;
    color: #0c2963;
    padding-left: 25px;
}

.dropdown a:last-child {
    border-bottom: none;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    background: transparent;
}

/* Responsive */
@media (max-width: 768px) {

    .top-bar,
    .school-details {
        display: none;
    }

    /* hide top bar & EIN on mobile */
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        position: relative;
    }

    .search-input {
        width: 100%;
        max-width: 320px;
    }

    .mobile-toggle {
        display: block;
        z-index: 1002;
    }

    /* mobile menu becomes stacked and hidden by default */
    .nav-menu {
        /* display: none; */
        flex-direction: column;
        /* position: absolute; */
        top: 100%;
        left: 0;
        right: 0;
        /* background: #0c2963; */
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* dropdowns disabled hover on mobile — shown when parent has .dropdown-active */
    .dropdown {
        position: static;
        display: none;
        background: rgba(255, 255, 255, 0.03);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-radius: 0;
    }

    .nav-item.dropdown-active .dropdown {
        display: block;
    }

    .dropdown a {
        color: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 10px 40px;
    }

    .dropdown a:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        padding-left: 45px;
    }
}

@media (max-width: 480px) {
    .school-name-bn {
        font-size: 18px;
    }

    .school-name-en {
        font-size: 12px;
    }

    .search-input {
        font-size: 12px;
        padding: 8px 12px 8px 35px;
    }
}

/* hide top search on mobile, show mobile search on navbar */
.mobile-left {
    display: none;
    align-items: center;
    gap: 10px;
}

.mobile-search-box {
    position: relative;
}

.mobile-search-input {
    padding: 4px 10px 4px 30px;
    border-radius: 5px;
    border: 1px solid #ffffff82;
    background: #ffffff14;
    font-size: 13px;
    width: 150px;
}

.mobile-search-box svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #ffffffc9;
    width: 14px;
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    /* hide original search */
    .mobile-left {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    /* show mobile search + toggle */
}

.nav-link:hover {
    color: #FFC107;
}



/* _________________________________________________________________ */



/* Base navigation styles */
.nav-item {
    position: relative;
    display: inline-block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    /* padding: 10px 15px; */
    text-decoration: none;
    /* color: #333; */
    transition: all 0.3s ease;
}

/* .nav-link:hover {
        color: #0c2963;
    } */

.dropdown-arrow {
    font-size: 19px;
    transition: transform 0.3s ease;
}

.sub-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* Main dropdown container */
.nav-item .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

/* Show dropdown on hover */
.nav-item:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown items */
.dropdown-item {
    position: relative;
    display: block;
}

.dropdown-item {
    border-bottom: 1px solid #f8f5f5;
}

.dropdown-item:last-child {
    border-bottom: 1px solid #f8f5f500;
}

.dropdown-item>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    /* border-bottom: 1px solid #f0f0f0; */
    transition: all 0.3s ease;
}

.dropdown-item>a:hover {
    background: #f8f9fa;
    color: #0c2963;
    padding-left: 25px;
}

.dropdown-item:last-child>a {
    border-bottom: none;
}

/* Sub-sub menu positioning */
.dropdown-item.has-sub>.dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e0e0e0;
    margin-left: 5px;
}

/* Show sub-sub menu on hover */
.dropdown-item.has-sub:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Prevent flickering - add hover delay */
.dropdown-item.has-sub {
    transition: background-color 0.1s ease;
}

/* Sub-sub menu links */
.dropdown-item.has-sub>.dropdown .dropdown-item>a {
    padding: 10px 18px;
    font-size: 13px;
}

.dropdown-item.has-sub>.dropdown .dropdown-item>a:hover {
    background: #f8f9fa;
    color: #0c2963;
    padding-left: 23px;
}

/* Prevent menu from disappearing when moving between parent and child */
.dropdown-item.has-sub::after {
    content: '';
    position: absolute;
    top: 0;
    right: -5px;
    width: 5px;
    height: 100%;
    background: transparent;
    z-index: 999;
}

/* Mobile styles */
@media (max-width: 768px) {
    .nav-item .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0;
        display: none;
    }

    .nav-item.dropdown-active .dropdown {
        display: block;
    }

    .dropdown-item.has-sub>.dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.03);
        margin-left: 0;
        display: none;
    }

    .dropdown-item.has-sub.dropdown-active>.dropdown {
        display: block;
    }

    .dropdown-item>a {
        color: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .dropdown-item.has-sub>.dropdown .dropdown-item>a {
        padding: 5px 20px;
        color: rgb(0 0 0);
    }

    .dropdown-item>a:hover,
    .dropdown-item.has-sub>.dropdown .dropdown-item>a:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
    }

    .sub-arrow {
        transform: rotate(90deg);
    }

    .dropdown-item.has-sub.dropdown-active .sub-arrow {
        transform: rotate(-90deg);
    }
}

/* Ensure proper stacking context */
.nav-item {
    z-index: auto;
}

.nav-item:hover {
    z-index: 1002;
}

.mobile-search-box form,
.search-box form {
    margin: 0;
}

@media (max-width: 768px) {
    .dropdown-item {
        border-bottom: 1px solid #f8f5f500;
    }
}