/* ============================================================
   ZION BIBLE COLLEGE
   PREMIUM RESPONSIVE HEADER
   ============================================================ */


/* ============================================================
   GLOBAL HEADER
   ============================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 5000;

    width: 100%;

    background: #102a43;

    border-bottom: 1px solid rgba(246, 201, 107, 0.28);

    box-shadow:
        0 6px 22px rgba(5, 18, 31, 0.24);
}


/* ============================================================
   HEADER CONTAINER
   ============================================================ */

.header-container {
    width: min(1200px, calc(100% - 32px));

    min-height: 78px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}


/* ============================================================
   LOGO
   ============================================================ */

.logo {
    display: inline-flex;

    align-items: center;

    gap: 12px;

    min-width: 0;

    color: #ffffff;

    text-decoration: none;

    flex-shrink: 0;
}


.logo img {
    width: 52px;

    height: 52px;

    object-fit: contain;

    flex: 0 0 auto;
}


.logo-text {
    min-width: 0;
}


.logo-text h2 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(1rem, 2vw, 1.25rem);

    line-height: 1.2;

    font-weight: 800;
}


.logo-text span {
    display: block;

    margin-top: 3px;

    color: rgba(255,255,255,.72);

    font-size: .72rem;

    line-height: 1.3;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
    margin-left: auto;
}


.navbar > ul {
    display: flex;

    align-items: center;

    gap: 4px;

    margin: 0;

    padding: 0;

    list-style: none;
}


.navbar li {
    position: relative;

    list-style: none;
}


/* ============================================================
   NORMAL NAV LINKS
   ============================================================ */

.navbar > ul > li > a {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 44px;

    padding: 10px 13px;

    color: rgba(255,255,255,.92);

    text-decoration: none;

    font-size: .9rem;

    font-weight: 600;

    border-radius: 7px;

    transition:
        color .2s ease,
        background .2s ease;
}


/* ============================================================
   HOVER / ACTIVE
   ============================================================ */

.navbar > ul > li:not(.admission-item) > a:hover,

.navbar > ul > li.active > a,

.dropdown.active > .dropdown-trigger > .dropdown-main-link {
    color: #f6c96b;

    background: rgba(255,255,255,.08);
}


/* ============================================================
   DROPDOWN TRIGGER
   ============================================================ */

/*
   THIS IS THE MAIN FIX.

   The trigger is only as wide as:
   Academics + arrow

   It will NOT stretch across the navbar.
*/

.dropdown-trigger {
    position: relative;

    display: inline-flex;

    align-items: center;

    justify-content: flex-start;

    width: auto;

    min-width: 0;

    max-width: max-content;

    height: 44px;

    margin: 0;

    padding: 0;

    white-space: nowrap;
}


/* ============================================================
   DROPDOWN MAIN LINK
   ============================================================ */

.dropdown-main-link {
    display: inline-flex !important;

    align-items: center;

    justify-content: flex-start;

    width: auto !important;

    min-width: 0 !important;

    height: 44px;

    padding: 10px 3px 10px 13px !important;

    margin: 0;

    color: rgba(255,255,255,.92);

    text-decoration: none;

    font-size: .9rem;

    font-weight: 600;

    border-radius: 7px 0 0 7px;

    white-space: nowrap;

    flex: 0 0 auto;

    transition:
        color .2s ease,
        background .2s ease;
}


/* ============================================================
   DROPDOWN ARROW BUTTON
   ============================================================ */

.dropdown-caret {
    appearance: none;

    -webkit-appearance: none;

    position: static;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 20px;

    min-width: 20px;

    max-width: 20px;

    height: 44px;

    margin: 0;

    padding: 0;

    border: 0;

    outline: none;

    background: transparent;

    color: rgba(255,255,255,.72);

    cursor: pointer;

    flex: 0 0 20px;

    border-radius: 0 7px 7px 0;

    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease;
}


.dropdown-caret i {
    display: block;

    margin: 0;

    padding: 0;

    font-size: 10px;

    line-height: 1;
}


/* ============================================================
   DROPDOWN HOVER
   ============================================================ */

.dropdown-trigger:hover .dropdown-main-link,

.dropdown-trigger:hover .dropdown-caret {
    color: #f6c96b;

    background: rgba(255,255,255,.08);
}


/* ============================================================
   DROPDOWN MENU
   ============================================================ */

.dropdown-menu {
    position: absolute;

    top: calc(100% + 2px);

    left: 0;

    z-index: 6000;

    display: block;

    width: max-content;

    min-width: 200px;

    margin: 0;

    padding: 8px;

    list-style: none;

    background: #102a43;

    border: 1px solid rgba(246,201,107,.24);

    border-radius: 10px;

    box-shadow:
        0 16px 40px rgba(15,23,42,.24);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform: translateY(-6px);

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}


/* ============================================================
   DESKTOP OPEN
   ============================================================ */

.dropdown:hover > .dropdown-menu,

.dropdown:focus-within > .dropdown-menu {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform: translateY(0);
}


/* ============================================================
   DROPDOWN ITEMS
   ============================================================ */

.dropdown-menu li {
    width: 100%;
}


.dropdown-menu li a {
    display: flex;

    align-items: center;

    gap: 10px;

    width: 100%;

    min-height: 40px;

    padding: 9px 12px;

    color: rgba(255,255,255,.9);

    text-decoration: none;

    font-size: .88rem;

    font-weight: 500;

    border-radius: 7px;

    transition:
        color .2s ease,
        background .2s ease;
}


.dropdown-menu li a i {
    width: 18px;

    text-align: center;

    color: #f6c96b;

    font-size: .85rem;
}


.dropdown-menu li a:hover {
    color: #f6c96b;

    background: rgba(255,255,255,.08);
}


/* ============================================================
   APPLY NOW BUTTON
   ============================================================ */

.admission-item {
    margin-left: 4px;
}


.btn-header {
    display: inline-flex !important;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 44px;

    margin-left: 0;

    padding: 10px 16px !important;

    background: #1a365d;

    color: #ffffff !important;

    text-decoration: none;

    font-size: .88rem;

    font-weight: 700;

    border-radius: 7px;

    box-shadow:
        0 8px 18px rgba(26,54,93,.18);

    transition:
        background .2s ease,
        transform .2s ease;
}


.btn-header:hover {
    background: #17385f;

    transform: translateY(-1px);
}


.btn-header i {
    font-size: .85rem;
}


/* ============================================================
   MOBILE MENU BUTTON
   ============================================================ */

.menu-toggle {
    display: none;

    align-items: center;

    justify-content: center;

    width: 44px;

    height: 44px;

    padding: 0;

    border: 1px solid rgba(255,255,255,.22);

    border-radius: 8px;

    background: rgba(255,255,255,.08);

    color: #f6c96b;

    cursor: pointer;

    font-size: 1.1rem;
}


/* ============================================================
   MOBILE BACKDROP
   ============================================================ */

.mobile-menu-backdrop {
    position: fixed;

    inset: 0;

    z-index: 4500;

    display: none;

    background: rgba(15,23,42,.48);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}


body.menu-open .mobile-menu-backdrop {
    opacity: 1;

    visibility: visible;
}


/* ============================================================
   TABLET / MOBILE
   ============================================================ */

@media (max-width: 900px) {

    /* --------------------------------------------------------
       HEADER
       -------------------------------------------------------- */

    .header-container {
        min-height: 70px;
    }


    /* --------------------------------------------------------
       MOBILE BUTTON
       -------------------------------------------------------- */

    .menu-toggle {
        display: inline-flex;
    }


    /* --------------------------------------------------------
       NAVIGATION PANEL
       -------------------------------------------------------- */

    .navbar {
        position: fixed;

        top: 70px;

        right: 0;

        width: min(340px, 92vw);

        height: calc(100dvh - 70px);

        margin: 0;

        padding: 18px;

        overflow-y: auto;

        background: #102a43;

        border-left: 1px solid rgba(246,201,107,.24);

        box-shadow:
            -18px 0 40px rgba(15,23,42,.20);

        transform: translateX(105%);

        transition:
            transform .25s ease;

        z-index: 5001;
    }


    .navbar.active {
        transform: translateX(0);
    }


    /* --------------------------------------------------------
       MOBILE LIST
       -------------------------------------------------------- */

    .navbar > ul {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 5px;

        width: 100%;
    }


    /* --------------------------------------------------------
       MOBILE NORMAL LINKS
       -------------------------------------------------------- */

    .navbar > ul > li > a {
        display: flex;

        align-items: center;

        justify-content: flex-start;

        width: 100%;

        min-height: 44px;
    }


    /* --------------------------------------------------------
       MOBILE DROPDOWN TRIGGER

       Here the arrow stays beside the text.
    */

    .dropdown-trigger {
        display: inline-flex !important;

        align-items: center;

        width: max-content !important;

        max-width: 100%;

        height: 44px;

        margin: 0;

        padding: 0;
    }


    .dropdown-main-link {
        width: auto !important;

        min-width: 0 !important;

        height: 44px;

        padding: 10px 3px 10px 13px !important;

        flex: 0 0 auto !important;
    }


    .dropdown-caret {
        display: inline-flex !important;

        width: 24px;

        min-width: 24px;

        max-width: 24px;

        height: 44px;

        flex: 0 0 24px;

        margin: 0;

        padding: 0;
    }


    .dropdown-caret i {
        font-size: 11px;
    }


    /* --------------------------------------------------------
       MOBILE DROPDOWN MENU
    */

    .dropdown-menu {
        position: static;

        display: none;

        width: 100%;

        min-width: 0;

        margin: 2px 0 6px;

        padding: 4px 0 4px 12px;

        background: transparent;

        border: 0;

        border-radius: 0;

        box-shadow: none;

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        transform: none;
    }


    .dropdown.open > .dropdown-menu {
        display: block;
    }


    /* --------------------------------------------------------
       MOBILE ARROW ROTATION
    */

    .dropdown.open .dropdown-caret {
        transform: rotate(180deg);
    }


    /* --------------------------------------------------------
       MOBILE SUBMENU
    */

    .dropdown-menu li a {
        min-height: 40px;

        padding: 9px 12px;
    }


    /* --------------------------------------------------------
       ADMISSION
    */

    .admission-item {
        margin-top: 8px;

        margin-left: 0;
    }


    .btn-header {
        width: 100%;

        justify-content: center !important;
    }


    /* --------------------------------------------------------
       BACKDROP
    */

    .mobile-menu-backdrop {
        display: block;
    }


    body.menu-open {
        overflow: hidden;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .header-container {
        width: calc(100% - 24px);

        min-height: 70px;
    }


    .logo {
        gap: 9px;
    }


    .logo img {
        width: 44px;

        height: 44px;
    }


    .logo-text span {
        display: none;
    }


    .navbar {
        top: 70px;

        height: calc(100dvh - 70px);
    }
}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 360px) {

    .header-container {
        width: calc(100% - 18px);
    }


    .logo {
        gap: 7px;
    }


    .logo img {
        width: 40px;

        height: 40px;
    }


    .logo-text h2 {
        font-size: .95rem;
    }


    .menu-toggle {
        width: 40px;

        height: 40px;
    }
}


/* ============================================================
   FINAL OVERRIDE
   ============================================================ */

/*
   This prevents other site CSS files from stretching
   the dropdown trigger or separating the arrow.
*/

.header .dropdown-trigger {
    width: max-content !important;

    max-width: max-content !important;

    min-width: 0 !important;
}


.header .dropdown-main-link {
    width: auto !important;

    min-width: 0 !important;

    flex: 0 0 auto !important;
}


.header .dropdown-caret {
    position: static !important;

    margin: 0 !important;

    padding: 0 !important;

    flex-shrink: 0 !important;
}