
/* ==========================================
   GOOGLE FONT
========================================== */

@import url('https://fonts.googleapis.com/css2?family=Teachers:wght@400;500;600;700;800&display=swap');


/* ==========================================
   GLOBAL HEADER VARIABLES
========================================== */

:root {
    --primary: #073b68;
    --primary-dark: #052c50;
    --accent: #207c45;
    --accent-light: #84be95;

    --white: #ffffff;
    --text: #1d2440;
    --muted: #5d6680;

    --header-height: 115px;
    --sticky-height: 90px;

    --container: 1600px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}


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

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;   /* fallback for older browsers */
    overflow-x: clip;     /* stops sideways scroll without breaking fixed/sticky */
}

body {
    margin: 0;
}

body.menu-locked {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}


/* ==========================================
   MAIN HEADER
========================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    height: auto;
    min-height: var(--header-height);

    z-index: 999;

    background: #ffffff;
    border-bottom: 1px solid rgba(220, 225, 235, .6);

    box-shadow: 0 4px 25px rgba(20, 30, 80, .06);

    transition:
        min-height .35s var(--ease),
        background .35s var(--ease),
        box-shadow .35s var(--ease);
}


/* STICKY HEADER */

.main-header.scrolled,
.main-header.menu-open {
    min-height: var(--sticky-height);

    background: rgba(255, 255, 255, .96);

    box-shadow: 0 6px 30px rgba(20, 30, 80, .08);
}


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

.navbar {
    width: 93%;
    max-width: var(--container);

    min-height: var(--header-height);
    height: auto;

    margin: 0 auto;
    padding: 10px 20px;

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

    gap: 20px;

    transition: min-height .35s var(--ease);
}

.main-header.scrolled .navbar,
.main-header.menu-open .navbar {
    min-height: var(--sticky-height);
}


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

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

    flex-shrink: 0;
    max-width: 30%;

    line-height: 0;
}

.logo img {
    display: block;

    width: 310px;
    max-width: 100%;

    height: auto;
    max-height: 95px;

    object-fit: contain;

    transition:
        width .35s var(--ease),
        max-height .35s var(--ease);
}


/* LOGO ON SCROLL */

.main-header.scrolled .logo img,
.main-header.menu-open .logo img {
    width: 250px;
    max-height: 75px;
}


/* ==========================================
   NAVIGATION LINKS
========================================== */

.nav-links {
    display: flex;
    align-items: center;

    height: 100%;

    gap: 22px;
    flex-shrink: 1;

    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;

    display: flex;
    align-items: center;
}

.nav-item > a {
    font-family: "Teachers", sans-serif;

    position: relative;

    display: flex;
    align-items: center;

    height: 100%;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: .4px;

    white-space: nowrap;

    transition: color .3s var(--ease);
}


/* UNDERLINE */

.nav-item > a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 20px;

    width: 100%;
    height: 2px;

    background: var(--accent);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform .3s var(--ease);
}

.nav-item > a:hover::after,
.nav-item > a.active::after {
    transform: scaleX(1);
}

.nav-item > a:hover,
.nav-item > a.active {
    color: var(--primary);
}


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

.arrow-icon {
    width: 7px;
    height: 7px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg);
    margin-top: -4px;

    transition: transform .3s var(--ease);
}

.dropdown.open .arrow-icon {
    transform: rotate(225deg);
}

.dropdown-menu {
    position: absolute;

    top: 100%;
    left: -20px;

    min-width: 250px;

    padding: 10px 0;
    margin: 0;

    background: #ffffff;

    border-radius: 8px;
    border-top: 3px solid var(--accent);

    list-style: none;

    opacity: 0;
    visibility: hidden;

    transform: translateY(12px);

    box-shadow: 0 18px 45px rgba(20, 30, 80, .16);

    transition: all .3s var(--ease);
}

.dropdown-menu li a {
    font-family: "Teachers", sans-serif;

    display: block;

    padding: 11px 22px;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    transition: all .25s var(--ease);
}

.dropdown-menu li a:hover {
    background: #f2f5fb;
    color: var(--primary);
    padding-left: 28px;
}

@media (min-width: 992px) {

    .dropdown:hover > .dropdown-menu,
    .dropdown:focus-within > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}


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

.header-actions {
    display: flex;
    align-items: center;

    gap: 12px;
    flex-shrink: 0;
}


/* SCHEDULE BUTTON */

.schedule-btn {
    font-family: "Teachers", sans-serif;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 13px 20px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 600;

    white-space: nowrap;

    border-radius: 50px;

    background: var(--primary);
    border: 1px solid var(--primary);

    transition: all .3s var(--ease);
}

.schedule-btn span {
    font-size: 16px;
    line-height: 1;

    transition: transform .3s var(--ease);
}

.schedule-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.schedule-btn:hover span {
    transform: translate(2px, -2px);
}


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

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 0 8px;

    border: none;
    background: transparent;

    cursor: pointer;

    color: var(--primary);
}

.menu-toggle span {
    display: block;

    width: 26px;
    height: 2px;

    margin: 6px 0;

    background: currentColor;

    border-radius: 2px;

    transition:
        transform .3s var(--ease),
        opacity .3s var(--ease);
}


/* HAMBURGER TO CROSS */

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* MOBILE CTA HIDDEN ON DESKTOP */

.nav-cta {
    display: none;
}


/* ==========================================
   LAPTOP
========================================== */

@media (max-width: 1400px) and (min-width: 992px) {

    .navbar {
        width: 96%;
        padding: 10px 12px;
        gap: 12px;
    }

    .logo {
        max-width: 25%;
    }

    .logo img {
        width: 260px;
    }

    .main-header.scrolled .logo img {
        width: 220px;
    }

    .nav-links {
        gap: 13px;
    }

    .nav-item > a {
        font-size: 12px;
        letter-spacing: 0;
    }

    .schedule-btn {
        padding: 11px 14px;
        font-size: 12px;
    }
}


/* ==========================================
   SMALL LAPTOP
========================================== */

@media (max-width: 1150px) and (min-width: 992px) {

    .navbar {
        gap: 8px;
    }

    .logo img {
        width: 200px;
    }

    .main-header.scrolled .logo img {
        width: 180px;
    }

    .nav-links {
        gap: 9px;
    }

    .nav-item > a {
        font-size: 11px;
    }

    .schedule-btn {
        padding: 10px 11px;
        font-size: 11px;
    }
}


/* ==========================================
   TABLET & MOBILE
========================================== */

@media (max-width: 991px) {

    :root {
        --header-height: 86px;
        --sticky-height: 76px;
    }

    .navbar {
        width: 100%;

        min-height: var(--header-height);

        padding: 8px 22px;
        gap: 15px;
    }

    .main-header.scrolled .navbar,
    .main-header.menu-open .navbar {
        min-height: var(--sticky-height);
    }

    .logo {
        max-width: 75%;
    }

    .logo img,
    .main-header.scrolled .logo img,
    .main-header.menu-open .logo img {
        width: 220px;
        max-height: 70px;
    }

    .menu-toggle {
        display: block;
        flex-shrink: 0;
    }

    /* MOBILE NAVIGATION PANEL */

    .nav-links {
        position: fixed;

        top: var(--sticky-height);
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        width: 100%;
        height: auto;

        max-height: calc(100vh - var(--sticky-height));
        max-height: calc(100dvh - var(--sticky-height));

        overflow-y: auto;

        gap: 0;

        padding: 8px 22px 28px;

        background: #ffffff;

        border-top: 1px solid #e7eaf3;

        box-shadow: 0 20px 40px rgba(20, 30, 80, .12);

        opacity: 0;
        visibility: hidden;

        transform: translateY(-10px);

        transition:
            opacity .3s var(--ease),
            transform .3s var(--ease),
            visibility .3s;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item {
        display: block;
        border-bottom: 1px solid #eceff6;
    }

    .nav-item > a {
        display: flex;
        align-items: center;
        justify-content: space-between;

        height: auto;

        padding: 15px 0;

        font-size: 13px;
        color: var(--text);
    }

    .nav-item > a::after {
        display: none;
    }

    .nav-item > a.active {
        color: var(--primary);
    }

    /* MOBILE DROPDOWN */

    .dropdown-menu {
        position: static;

        display: none;

        min-width: 100%;

        padding: 0 0 12px;

        opacity: 1;
        visibility: visible;

        transform: none;

        background: transparent;

        border: 0;
        border-left: 2px solid var(--accent);

        border-radius: 0;
        box-shadow: none;

        margin-left: 2px;
    }

    .dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 10px 16px;

        font-size: 13px;
        color: var(--muted);
    }

    /* MOBILE CTA */

    .nav-cta {
        display: block;

        border-bottom: 0;
        margin-top: 20px;
    }

    .nav-cta .btn {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;

        padding: 15px 20px;

        background: var(--primary);
        color: #ffffff;

        border-radius: 50px;

        font-size: 14px;
        text-transform: none;
    }

    .nav-cta .btn:hover {
        background: var(--accent);
    }

    .header-actions .schedule-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
}


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

@media (max-width: 575px) {

    :root {
        --header-height: 76px;
        --sticky-height: 68px;
    }

    .navbar {
        padding: 7px 18px;
        gap: 10px;
    }

    .logo {
        max-width: calc(100% - 60px);
    }

    .logo img,
    .main-header.scrolled .logo img,
    .main-header.menu-open .logo img {
        width: 185px;
        max-height: 62px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions .schedule-btn {
        display: none;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .nav-links {
        padding-left: 18px;
        padding-right: 18px;
    }
}


/* ==========================================
   EXTRA SMALL MOBILE
========================================== */

@media (max-width: 360px) {

    .navbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo img,
    .main-header.scrolled .logo img,
    .main-header.menu-open .logo img {
        width: 155px;
        max-height: 55px;
    }
}


/* ==========================================
   ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
