/* ===================================================== */
/* ================= HEADER / NAVBAR =================== */
/* ===================================================== */

/* ---------- TOP BAR (darker green) ---------- */
.top-bar {
    background: var(--dark-green);
    padding: 6px 0;
    color: var(--white);
    font-size: 13px;
}

.top-bar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 24px;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: opacity 0.3s ease;
}

.top-links a:hover {
    opacity: 0.8;
}

.btn-apply-now {
    background: rgba(255, 255, 255, 0.20);
    padding: 4px 18px;
    border-radius: 20px;
    font-weight: 700;
}

/* ---------- MAIN BAR ---------- */
.main-bar {
    background: #d6fcdf;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 9998;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

body.dark-mode .main-bar {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.04);
}

.main-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 70px;
}

/* ---------- LOGO ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: -0.3px;
}

body.dark-mode .logo-text .title {
    color: #7CFC98;
}

.logo-text .tagline {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

body.dark-mode .logo-text .tagline {
    color: #a0a0b0;
}

/* ---------- NAVIGATION CONTAINER ---------- */
.nav-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

body.dark-mode .nav-menu li a {
    color: #e0e0e8;
}

/* ---------- HOVER & ACTIVE STATES ---------- */
.nav-menu li a:hover {
    color: var(--primary-green);
    background: rgba(47, 168, 79, 0.06);
}

.nav-menu li a.active {
    color: var(--primary-green) !important;
    background: rgba(47, 168, 79, 0.10) !important;
    font-weight: 700;
}

body.dark-mode .nav-menu li a.active {
    color: #7CFC98 !important;
    background: rgba(124, 252, 152, 0.08) !important;
}

.nav-menu li a i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.nav-menu li:hover a i {
    transform: rotate(180deg);
}

/* ---------- THEME TOGGLE ---------- */
.bottom-area {
    display: flex;
    align-items: center;
    margin-left: 4px;
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.dark-mode .toggle-btn {
    color: #e0e0e8;
}

body.dark-mode .toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.toggle-btn .fa-sun {
    display: none;
}

body.dark-mode .toggle-btn .fa-moon {
    display: none;
}

body.dark-mode .toggle-btn .fa-sun {
    display: inline;
}

/* ===================================================== */
/* ============= HAMBURGER MENU (FIXED) =============== */
/* ===================================================== */

/* Default: hidden on large screens */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 99999;
    padding: 6px;
    margin-left: 8px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    outline: none;
}

.hamburger-menu .bar {
    width: 26px;
    height: 2.5px;
    background: var(--text-dark);
    position: relative;
    transition: 0.3s ease;
}

body.dark-mode .hamburger-menu .bar {
    background: #e0e0e8;
}

.hamburger-menu .bar::before,
.hamburger-menu .bar::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 2.5px;
    background: var(--text-dark);
    left: 0;
    transition: 0.3s ease;
}

body.dark-mode .hamburger-menu .bar::before,
body.dark-mode .hamburger-menu .bar::after {
    background: #e0e0e8;
}

.hamburger-menu .bar::before {
    top: -8px;
}

.hamburger-menu .bar::after {
    top: 8px;
}

.hamburger-menu.active .bar {
    background: transparent;
}

.hamburger-menu.active .bar::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger-menu.active .bar::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ---------- OVERLAY ---------- */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay.show {
    display: block;
    opacity: 1;
}

/* ===================================================== */
/* ================= RESPONSIVE BREAKPOINTS ============ */
/* ===================================================== */

@media (max-width: 1200px) {
    .nav-menu li a {
        padding: 8px 12px;
        font-size: 13px;
    }
    .logo-text .title {
        font-size: 16px;
    }
    .logo img {
        height: 40px;
    }
}

@media (max-width: 1100px) {
    .nav-menu li a {
        padding: 8px 10px;
        font-size: 12.5px;
    }
    .logo-text .title {
        font-size: 15px;
    }
    .logo img {
        height: 36px;
    }
}

/* ---------- TABLETS & MOBILE ---------- */
@media (max-width: 992px) {
    /* --- FORCE hamburger to be visible --- */
    .hamburger-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Override any inline styles or classes that hide it */
    .hamburger-menu[style*="display: none"],
    .hamburger-menu.hidden,
    .hamburger-menu.d-none {
        display: flex !important;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px 24px 30px;
        transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 9999;
        overflow-y: auto;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.08);
        gap: 0;
        flex: none;
    }

    body.dark-mode .nav-container {
        background: #1a1a2e;
    }

    .nav-container.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    body.dark-mode .nav-menu li {
        border-color: rgba(255, 255, 255, 0.05);
    }

    .nav-menu li a {
        padding: 14px 0;
        font-size: 16px;
        width: 100%;
        white-space: normal;
    }

    .nav-menu li a i {
        margin-left: auto;
    }

    .bottom-area {
        margin-left: 0;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        margin-top: 10px;
        justify-content: center;
    }

    body.dark-mode .bottom-area {
        border-color: rgba(255, 255, 255, 0.05);
    }

    .toggle-btn {
        font-size: 24px;
    }

    /* ---- Academics modal on mobile ---- */
    .academics-modal {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        padding: 0;
        margin-top: 6px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
    }

    .academics-modal.show-modal {
        display: block;
    }

    .academics-modal-content {
        grid-template-columns: 1fr;
        border-radius: 10px;
        min-height: auto;
        box-shadow: none;
        background: transparent;
    }

    .schools-column {
        border-right: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 16px 0;
        background: transparent;
    }

    body.dark-mode .schools-column {
        border-color: rgba(255, 255, 255, 0.05);
    }

    .departments-column {
        padding: 16px 0;
        background: transparent;
    }

    .school-item {
        padding: 10px 12px;
    }

    .school-item h5 {
        font-size: 14px;
    }

    .department-box h3 {
        font-size: 16px;
    }

    .department-box ul li a {
        font-size: 14px;
    }

    .overlay.show {
        display: block;
    }
}

/* ---------- SMALL PHONES ---------- */
@media (max-width: 576px) {
    .top-bar {
        display: none;
    }

    .main-bar-container {
        padding: 0 16px;
        min-height: 60px;
    }

    .logo img {
        height: 32px;
    }

    .logo-text .title {
        font-size: 13px;
    }

    .logo-text .tagline {
        font-size: 9px;
    }

    .logo {
        gap: 10px;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        padding: 70px 20px 30px;
    }

    .hamburger-menu {
        display: flex !important;
    }
}