/* =========================================================
   FR. AGNEL SCHOOL - NAVBAR
   ========================================================= */


/* =========================================================
   RESET
========================================================= */

.topbar *,
.navbar-wrapper *,
.navbar-wrapper *::before,
.navbar-wrapper *::after {
    box-sizing: border-box;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    width: 100%;
    height: 70px;

    background: #0f3d91;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 5%;

    font-family: 'Inter', sans-serif;
    font-size: 14px;

    position: relative;
    z-index: 1100;
}


/* =========================================================
   TOPBAR - LEFT
========================================================= */

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.topbar-left span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* =========================================================
   TOPBAR - RIGHT
========================================================= */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-right span {
    font-weight: 600;
}

.topbar-right a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.topbar-right a:hover {
    opacity: 0.75;
}


/* =========================================================
   NAVBAR WRAPPER - DESKTOP
========================================================= */

.navbar-wrapper {
    position: absolute;

    top: 85px;
    left: 0;

    width: 100%;

    display: flex;
    justify-content: center;

    z-index: 1000;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    width: 90%;
    max-width: 1200px;

    min-height: 74px;

    background: rgba(255, 255, 255, 0.96);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 50px;

    padding: 10px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);

    position: relative;

    z-index: 1000;

    overflow: visible;
}


/* =========================================================
   LOGO
========================================================= */

.logo-box {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-shrink: 0;
}

.logo-box img {
    width: 48px;
    height: 48px;

    object-fit: contain;

    border-radius: 50%;
}

.logo-box h2 {
    margin: 0;

    color: #0f3d91;

    font-family: 'Inter', sans-serif;

    font-size: 16px;
    font-weight: 700;

    line-height: 1.2;
}

.logo-box p {
    margin: 3px 0 0;

    color: #666666;

    font-family: 'Inter', sans-serif;

    font-size: 11px;

    line-height: 1.2;
}


/* =========================================================
   MAIN MENU
========================================================= */

.menu {
    display: flex;
    align-items: center;

    gap: 4px;

    margin-left: 20px;

    overflow: visible;
}


/* =========================================================
   NORMAL LINKS
   DROPDOWN LINKS
   HOME BUTTON
========================================================= */

.menu > a,
.menu > .dropdown > a,
.menu > form .nav-home-button {

    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 10px 9px;

    color: #333333;

    background: none;

    border: none;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    font-weight: 500;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    transition: color 0.2s ease;
}


/* =========================================================
   MENU HOVER
========================================================= */

.menu > a:hover,
.menu > .dropdown > a:hover,
.menu > form .nav-home-button:hover {

    color: #0f3d91;
}


/* =========================================================
   ACTIVE MENU ITEM
========================================================= */

.menu > a.active {

    color: #0f3d91;

    font-weight: 600;
}

.menu > a.active::after {

    content: "";

    position: absolute;

    left: 9px;
    right: 9px;

    bottom: 2px;

    height: 2px;

    background: #d6a63a;

    border-radius: 10px;
}


/* =========================================================
   HOME FORM
========================================================= */

.menu > form {

    display: inline-flex;

    align-items: center;

    margin: 0;

    padding: 0;
}


/* =========================================================
   HOME BUTTON
========================================================= */

.nav-home-button {

    appearance: none;

    -webkit-appearance: none;

    margin: 0;

    outline: none;
}

.nav-home-button:focus-visible {

    outline: 2px solid #0f3d91;

    outline-offset: 3px;

    border-radius: 4px;
}


/* =========================================================
   DROPDOWN CONTAINER
========================================================= */

.dropdown {

    position: relative;

    display: inline-flex;

    align-items: center;
}


/* =========================================================
   DROPDOWN HOVER BRIDGE
========================================================= */

.dropdown::after {

    content: "";

    position: absolute;

    top: 100%;
    left: 0;

    width: 100%;
    height: 10px;

    background: transparent;
}


/* =========================================================
   DROPDOWN MENU
========================================================= */

.dropdown-menu {

    position: absolute;

    top: calc(100% + 5px);
    left: 0;

    min-width: 205px;

    padding: 8px 0;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);

    display: flex;

    flex-direction: column;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 9999;
}


/* =========================================================
   DROPDOWN LINKS
========================================================= */

.dropdown-menu a {

    display: block;

    width: 100%;

    padding: 11px 18px;

    color: #333333;

    background: #ffffff;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    font-weight: 500;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.dropdown-menu a:hover {

    background: #f2f6ff;

    color: #0f3d91;
}


/* =========================================================
   DESKTOP DROPDOWN
========================================================= */

@media (min-width: 701px) {

    .dropdown:hover .dropdown-menu,
    .dropdown-menu:hover {

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        transform: translateY(0);
    }

}


/* =========================================================
   ACTIONS
========================================================= */

.actions {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-left: 15px;

    flex-shrink: 0;
}


/* =========================================================
   LOGIN / LOGOUT
========================================================= */

.actions .login {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 9px 15px;

    background: #0f3d91;

    color: #ffffff;

    border: none;

    border-radius: 22px;

    font-family: 'Inter', sans-serif;

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.actions .login:hover {

    background: #0b3278;

    transform: translateY(-1px);

    box-shadow:
        0 5px 15px rgba(15, 61, 145, 0.25);
}


/* =========================================================
   LOGOUT FORM
========================================================= */

.actions form {

    display: inline-flex;

    align-items: center;

    margin: 0;

    padding: 0;
}


/* =========================================================
   ADMISSIONS
========================================================= */

.actions .admission {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 9px 15px;

    background: #d6a63a;

    color: #ffffff;

    border-radius: 22px;

    font-family: 'Inter', sans-serif;

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.actions .admission:hover {

    background: #bd8d26;

    transform: translateY(-1px);

    box-shadow:
        0 5px 15px rgba(214, 166, 58, 0.25);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .navbar {

        width: 94%;

        padding: 9px 15px;
    }

    .menu {

        gap: 1px;

        margin-left: 10px;
    }

    .menu > a,
    .menu > .dropdown > a,
    .menu > form .nav-home-button {

        padding-left: 7px;

        padding-right: 7px;

        font-size: 12px;
    }

    .logo-box h2 {

        font-size: 14px;
    }

    .logo-box p {

        font-size: 10px;
    }

    .actions {

        gap: 5px;

        margin-left: 8px;
    }

    .actions .login,
    .actions .admission {

        padding: 8px 11px;

        font-size: 11px;
    }
}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 900px) {

    .topbar {

        padding: 0 3%;

        font-size: 12px;
    }

    .topbar-left {

        gap: 12px;
    }

    .topbar-right {

        gap: 10px;
    }

    .navbar {

        border-radius: 30px;
    }

    .logo-box img {

        width: 42px;

        height: 42px;
    }

    .logo-box h2 {

        font-size: 13px;
    }

    .logo-box p {

        display: none;
    }

    .menu {

        overflow: visible;
    }

    .actions .admission {

        display: none;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {


    /* =====================================================
       TOPBAR
    ===================================================== */

    .topbar {

        height: 55px;

        padding: 0 15px;
    }

    .topbar-left {

        display: none;
    }

    .topbar-right {

        width: 100%;

        justify-content: center;
    }


    /* =====================================================
       MOBILE NAVBAR POSITION
       
       IMPORTANT:
       Navbar is returned to normal document flow.
       Therefore page content starts BELOW it.
    ===================================================== */

    .navbar-wrapper {

        position: relative;

        top: auto;

        left: auto;

        width: 100%;

        margin-top: 15px;

        display: flex;

        justify-content: center;

        z-index: 1000;
    }


    /* =====================================================
       NAVBAR
    ===================================================== */

    .navbar {

        width: 94%;

        min-height: 60px;

        padding: 10px 12px;

        border-radius: 25px;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 0;

        /*
         * IMPORTANT:
         * Never use overflow:auto or overflow:hidden.
         * Navbar must grow when dropdown opens.
         */

        overflow: visible;
    }


    /* =====================================================
       LOGO
    ===================================================== */

    .logo-box {

        width: 100%;

        display: flex;

        align-items: center;

        justify-content: flex-start;
    }

    .logo-box img {

        width: 38px;

        height: 38px;
    }

    .logo-box h2 {

        font-size: 12px;
    }


    /* =====================================================
       ACTIONS
    ===================================================== */

    .actions {

        position: absolute;

        top: 10px;

        right: 12px;

        margin: 0;

        display: flex;

        align-items: center;

        gap: 6px;
    }

    .actions .login {

        min-height: 34px;

        padding: 7px 11px;

        font-size: 11px;
    }

    .actions .admission {

        display: none;
    }


    /* =====================================================
       MAIN MENU
    ===================================================== */

    .menu {

        order: 3;

        width: 100%;

        margin: 12px 0 0;

        padding-top: 12px;

        border-top: 1px solid #eeeeee;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 2px;

        /*
         * IMPORTANT:
         * Page is the scroll container.
         * Menu itself does NOT scroll.
         */

        overflow: visible;

        height: auto;

        max-height: none;
    }


    /* =====================================================
       MENU ITEMS
    ===================================================== */

    .menu > a,
    .menu > .dropdown > a,
    .menu > form .nav-home-button {

        width: 100%;

        min-height: 42px;

        padding: 10px 12px;

        display: flex;

        align-items: center;

        justify-content: flex-start;

        font-size: 13px;

        text-align: left;

        position: relative;
    }


    /* =====================================================
       HOME FORM
    ===================================================== */

    .menu > form {

        width: 100%;

        display: flex;

        margin: 0;

        padding: 0;
    }

    .menu > form .nav-home-button {

        width: 100%;
    }


    /* =====================================================
       ACTIVE UNDERLINE
    ===================================================== */

    .menu > a.active::after {

        left: 12px;

        right: auto;

        bottom: 5px;

        width: 25px;

        height: 3px;
    }


    /* =====================================================
       DROPDOWN CONTAINER
    ===================================================== */

    .dropdown {

        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        position: relative;
    }

    .dropdown > a {

        width: 100%;
    }


    /* =====================================================
       REMOVE DESKTOP HOVER BRIDGE
    ===================================================== */

    .dropdown::after {

        display: none;
    }


    /* =====================================================
       MOBILE DROPDOWN MENU
    ===================================================== */

    .dropdown-menu {

        position: static;

        width: 100%;

        min-width: 100%;

        margin: 0;

        padding: 4px 0;

        background: #f7f9fc;

        border: 1px solid #e5e7eb;

        border-radius: 10px;

        box-shadow: none;

        /*
         * CLOSED
         */

        display: none;

        opacity: 1;

        visibility: visible;

        pointer-events: none;

        transform: none;

        z-index: 2000;
    }


    /* =====================================================
       OPEN DROPDOWN
       
       Javascript adds the .open class when the dropdown is tapped
       on mobile
       
    ===================================================== */

    .dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
     
     }


    /* =====================================================
       DROPDOWN LINKS
    ===================================================== */

    .dropdown-menu a {

        width: 100%;

        min-height: 40px;

        padding: 10px 18px;

        display: flex;

        align-items: center;

        color: #333333;

        background: transparent;

        font-size: 12px;

        white-space: normal;

        text-decoration: none;
    }

    .dropdown-menu a:hover {

        background: #edf3ff;

        color: #0f3d91;
    }


    /* =====================================================
       REMOVE UNDERLINES FROM DROPDOWN ITEMS
    ===================================================== */

    .dropdown-menu a::after {

        display: none !important;
    }


    /* =====================================================
       BODY
    ===================================================== */

    body {

        overflow-x: hidden;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   iPHONE 13 MINI / SIMILAR
========================================================= */

@media (max-width: 390px) {


    /* =====================================================
       TOPBAR
    ===================================================== */

    .topbar {

        height: 52px;

        padding: 0 12px;
    }

    .topbar-right {

        gap: 12px;

        font-size: 11px;
    }


    /* =====================================================
       IMPORTANT:
       DO NOT SET TOP / LEFT HERE.

       The navbar must remain in normal document flow.
    ===================================================== */

    .navbar-wrapper {

        position: relative;

        top: auto;

        left: auto;

        margin-top: 15px;

        width: 100%;
    }


    /* =====================================================
       NAVBAR
    ===================================================== */

    .navbar {

        width: 95%;

        padding: 9px 10px;

        border-radius: 22px;
    }


    /* =====================================================
       LOGO
    ===================================================== */

    .logo-box img {

        width: 36px;

        height: 36px;
    }

    .logo-box h2 {

        font-size: 11px;
    }


    /* =====================================================
       ACTIONS
    ===================================================== */

    .actions {

        top: 9px;

        right: 10px;
    }

    .actions .login {

        min-height: 32px;

        padding: 6px 9px;

        font-size: 10px;
    }


    /* =====================================================
       MENU
    ===================================================== */

    .menu {

        margin-top: 10px;

        padding-top: 10px;
    }

    .menu > a,
    .menu > .dropdown > a,
    .menu > form .nav-home-button {

        min-height: 40px;

        padding: 9px 10px;

        font-size: 12px;
    }


    /* =====================================================
       DROPDOWN
    ===================================================== */

    .dropdown-menu a {

        min-height: 38px;

        padding: 9px 16px;

        font-size: 11px;
    }
}