
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =========================================
   MAHFOOZ ACADEMY
   HEADER & NAVIGATION
   MAROON + WHITE + GOLD THEME
========================================= */

:root {
    --maroon: #6d1021;
    --maroon-dark: #520b18;
    --maroon-light: #faf0f2;
    --gold: #d4af37;
    --white: #ffffff;
    --text: #222222;
    --muted: #777777;
    --border: #eeeeee;
}

/* =========================================
   GLOBAL RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    padding-top: 85px;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

body.menu-open {
    overflow: hidden;
}

/* =========================================
   CONTAINER
========================================= */

.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
}

/* =========================================
   TOP BAR
========================================= */

.top-bar {
    background: var(--maroon);
    color: #fff;
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.school-tagline {
    font-size: 14px;
}

/* =========================================
   HEADER
========================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;

    background: rgba(255, 255, 255, 0.98);

    z-index: 99999;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    transition: box-shadow 0.3s ease;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 85px;
}

/* =========================================
   LOGO
========================================= */

.logo {
    display: flex;
    align-items: center;

    text-decoration: none;

    min-width: 0;
}

.logo img {
    width: 65px;
    height: 65px;

    object-fit: contain;

    margin-right: 12px;
}

.logo-text {
    min-width: 0;
}

.logo-text h2 {
    color: var(--maroon);

    font-size: 24px;
    font-weight: 700;

    line-height: 1.3;
}

.logo-text span {
    display: block;

    color: var(--muted);

    font-size: 13px;
    font-weight: 500;

    margin-top: 2px;
}

/* =========================================
   DESKTOP NAVIGATION
========================================= */

.navbar {
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;

    list-style: none;

    gap: 30px;
}

.nav-menu li {
    list-style: none;
}

.nav-menu a {
    position: relative;

    display: inline-flex;
    align-items: center;

    color: var(--text);

    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    white-space: nowrap;

    padding: 10px 0;

    transition:
        color 0.3s ease,
        background 0.3s ease;
}

.nav-menu a:hover {
    color: var(--maroon);
}

/* Desktop Active Link */

.nav-menu a.active {
    color: var(--maroon);

    font-weight: 700;
}

.nav-menu a.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 3px;

    border-radius: 10px;

    background: var(--maroon);
}

/* =========================================
   APPLY BUTTON
========================================= */

.apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--maroon);
    color: #fff;

    text-decoration: none;

    padding: 12px 22px;

    border-radius: 50px;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.apply-btn:hover {
    background: var(--maroon-dark);

    color: #fff;

    transform: translateY(-2px);
}

/* =========================================
   MENU BUTTON
========================================= */

.menu-btn {
    display: none;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(109, 16, 33, 0.16);

    border-radius: 10px;

    background: #fff;

    color: var(--maroon);

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.menu-btn:hover {
    background: var(--maroon);
    color: #fff;
}

.menu-btn:focus-visible,
.close-btn:focus-visible,
.nav-menu a:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.65);
    outline-offset: 3px;
}

/* =========================================
   OVERLAY
========================================= */

.overlay {
    position: fixed;

    inset: 0;

    background: rgba(27, 6, 12, 0.55);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;

    z-index: 9998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   MOBILE NAV HEADER
========================================= */

.mobile-nav-header {
    display: none;
}

/* =========================================
   RESPONSIVE NAVIGATION
========================================= */

@media (max-width: 1100px) {

    .nav-menu {
        gap: 18px;
    }

    .nav-menu a {
        font-size: 13px;
    }

    .apply-btn {
        padding: 11px 16px;
        font-size: 12px;
    }

}

/* =========================================
   MOBILE MENU
========================================= */

@media (max-width: 992px) {

    /* Hide Apply Button */

    .apply-btn {
        display: none;
    }

    /* Show Menu Button */

    .menu-btn {
        display: flex;
    }

    /* =====================================
       MOBILE DRAWER
    ===================================== */

    .navbar {
        position: fixed;

        top: 0;
        right: 0;

        width: min(340px, 88vw);
        height: 100dvh;

        background: #fff;

        transform: translateX(100%);

        visibility: hidden;

        transition:
            transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.38s ease;

        z-index: 99999;

        overflow-y: auto;
        overflow-x: hidden;

        box-shadow: -8px 0 35px rgba(0, 0, 0, 0.15);

        overscroll-behavior: contain;
    }

    .navbar.active {
        transform: translateX(0);

        visibility: visible;
    }

    /* =====================================
       MOBILE NAV HEADER
    ===================================== */

    .mobile-nav-header {
        display: flex;

        align-items: center;
        justify-content: space-between;

        min-height: 82px;

        padding: 18px 22px;

        background: linear-gradient(
            135deg,
            var(--maroon),
            #831d32
        );

        border-bottom: 3px solid var(--gold);
    }

    .mobile-nav-header h3 {
        color: #fff;

        font-size: 19px;
        font-weight: 700;

        line-height: 1.3;
        letter-spacing: 0.3px;
    }

    .mobile-nav-header h3::after {
        content: "MAHFOOZ ACADEMY";

        display: block;

        margin-top: 5px;

        color: rgba(255, 255, 255, 0.72);

        font-size: 8px;
        font-weight: 500;

        letter-spacing: 1.2px;
    }

    /* =====================================
       CLOSE BUTTON
    ===================================== */

    .close-btn {
        display: flex;

        align-items: center;
        justify-content: center;

        flex-shrink: 0;

        width: 36px;
        height: 36px;

        border: 1px solid rgba(255, 255, 255, 0.4);

        border-radius: 50%;

        background: rgba(255, 255, 255, 0.1);

        color: #fff;

        font-size: 18px;

        cursor: pointer;

        transition:
            background 0.3s ease,
            color 0.3s ease,
            transform 0.3s ease;
    }

    .close-btn:hover {
        background: #fff;
        color: var(--maroon);

        transform: rotate(90deg);
    }

    /* =====================================
       MOBILE NAV MENU
    ===================================== */

    .nav-menu {
        display: flex;

        flex-direction: column;
        align-items: stretch;

        gap: 5px;

        list-style: none;

        padding: 22px 16px 30px;

        margin: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: flex;

        align-items: center;

        position: relative;

        width: 100%;
        min-height: 46px;

        padding: 12px 15px;

        border-radius: 9px;

        color: #303030;

        font-size: 14px;
        font-weight: 500;

        text-decoration: none;

        white-space: normal;

        transition:
            background 0.25s ease,
            color 0.25s ease,
            padding-left 0.25s ease;
    }

    /* Gold Indicator */

    .nav-menu a::before {
        content: "";

        display: block;

        flex-shrink: 0;

        width: 0;
        height: 20px;

        margin-right: 0;

        border-radius: 4px;

        background: var(--gold);

        transition:
            width 0.25s ease,
            margin-right 0.25s ease;
    }

    /* Remove Desktop Underline */

    .nav-menu a::after {
        display: none;
    }

    /* Hover */

    .nav-menu a:hover {
        background: var(--maroon-light);

        color: var(--maroon);

        padding-left: 18px;
    }

    .nav-menu a:hover::before {
        width: 3px;
        margin-right: 10px;
    }

    /* =====================================
       ACTIVE LINK
    ===================================== */

    .nav-menu a.active {
        background: linear-gradient(
            100deg,
            var(--maroon),
            #831d32
        );

        color: #fff;

        font-weight: 600;

        padding-left: 15px;

        box-shadow: 0 4px 12px
            rgba(109, 16, 33, 0.14);
    }

    .nav-menu a.active::before {
        width: 3px;

        margin-right: 10px;

        background: var(--gold);
    }

    .nav-menu a.active:hover {
        background: linear-gradient(
            100deg,
            var(--maroon),
            #831d32
        );

        color: #fff;

        padding-left: 15px;
    }

    /* =====================================
       DRAWER FOOTER
    ===================================== */

    .navbar::after {
        content: "MAHFOOZ ACADEMY • INTER COLLEGE";

        display: block;

        margin: 5px 22px 24px;

        padding-top: 18px;

        border-top: 1px solid #eeeeee;

        color: #999999;

        font-size: 9px;
        font-weight: 600;

        letter-spacing: 0.8px;

        text-align: center;
    }

}

/* =========================================
   TABLET / MOBILE HEADER
========================================= */

@media (max-width: 768px) {

    body {
        padding-top: 75px;
    }

    .nav-wrapper {
        min-height: 75px;
    }

    .logo img {
        width: 50px;
        height: 50px;

        margin-right: 9px;
    }

    .logo-text h2 {
        font-size: 17px;
        line-height: 1.3;
    }

    .logo-text span {
        font-size: 10px;
    }

    .menu-btn {
        width: 42px;
        height: 42px;

        font-size: 24px;
    }

}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .container {
        width: 92%;
    }

    .navbar {
        width: min(320px, 88vw);
    }

    .mobile-nav-header {
        padding: 18px;
    }

    .nav-menu {
        padding: 20px 13px 28px;
    }

    .nav-menu a {
        min-height: 44px;

        font-size: 13.5px;
    }

    .logo {
        max-width: 80%;
    }

    .logo-text h2 {
        font-size: 14px;
    }

    .logo-text span {
        font-size: 9px;
    }

}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}