/* Site chrome: pin Elementor header location so it stays on every page */
.elementor-location-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1220;
    background: var(--warm-ivory);
}

.elementor-location-header > .elementor-container,
.elementor-location-header > .e-con,
.elementor-location-header .e-con-inner,
.elementor-location-header .elementor-widget,
.elementor-location-header .elementor-widget-container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.elementor-location-header .e-con,
.elementor-location-header .elementor-container {
    gap: 0 !important;
    row-gap: 0 !important;
}

/* HEADER */
.header {
    background-color: rgba(242, 240, 235, 0.96);
    backdrop-filter: blur(15px);
    position: relative;
    top: auto !important;
    z-index: 1000;
    border-bottom: 1px solid rgba(39, 57, 90, 0.08);
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--deep-blue);
    white-space: nowrap;
}

.header-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 22px;
    list-style: none;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: 0;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    flex-shrink: 0;
    line-height: 1.2;
}

.header-contact a {
    color: var(--deep-blue);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.header-contact a:hover {
    color: var(--sage-green-deep);
}

.header-contact__phone {
    font-variant-numeric: tabular-nums;
}

.header-contact--bar {
    display: none;
}

.header-contact--nav {
    padding-left: 20px;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(39, 57, 90, 0.16);
    flex-shrink: 0;
}

.header-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-blue);
    background: rgba(174, 199, 178, 0.28);
    transition: var(--transition);
    line-height: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.header-socials a:hover {
    background: var(--sage-green);
    color: var(--deep-blue);
}

.header-socials a svg,
.header-socials a i {
    width: 14px !important;
    height: 14px !important;
    font-size: 14px !important;
    line-height: 1;
    display: block;
    color: inherit;
    fill: currentColor !important;
    pointer-events: none;
}

.header-socials a svg path {
    fill: currentColor !important;
}

/* Optical size: FA brands use different viewBoxes */
.header-socials a .e-fab-facebook-f {
    width: 12px !important;
    height: 14px !important;
}

.header-socials a .e-fab-x-twitter {
    width: 13px !important;
    height: 13px !important;
}

.header-socials a .e-fab-youtube {
    width: 16px !important;
    height: 12px !important;
}

.header-socials a .e-fab-tiktok {
    width: 13px !important;
    height: 14px !important;
}

.header-btn-wrapper {
    margin-left: 8px;
}

.nav-links li a {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 15px;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li.current-menu-item a,
.nav-links li.current_page_item a {
    color: var(--deep-blue);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sage-green-deep);
    transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li.current-menu-item a::after,
.nav-links li.current_page_item a::after {
    width: 100%;
}

.header-nav-overlay {
    display: none;
}

.header-mobile-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 10px;
    box-shadow: none !important;
    outline: none !important;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--deep-blue);
    position: absolute;
    left: 10px;
    transition: all 0.3s ease-in-out;
}

.hamburger-line:nth-child(1) { top: 14px; }
.hamburger-line:nth-child(2) { top: 21px; }
.hamburger-line:nth-child(3) { top: 28px; }

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

@media (max-width: 1400px) {
    .header-contact--nav .header-contact__email {
        display: none;
    }
}

@media (max-width: 1280px) {
    .logo {
        font-size: 24px;
    }
    .nav-links {
        gap: 14px;
    }
    .nav-links li a {
        font-size: 14px;
    }
    .header-socials {
        margin-left: 14px;
        padding-left: 14px;
        gap: 6px;
    }
    .header-socials a {
        width: 30px;
        height: 30px;
    }
    .header-contact--nav {
        padding-left: 12px;
    }
    .header-contact a {
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    .nav-links {
        gap: 10px;
    }
    .header-socials a {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 992px) {
    .header {
        position: relative;
        top: auto !important;
        z-index: 1220;
    }

    .header .container {
        flex-direction: column;
        height: auto;
        padding: 10px 16px;
        align-items: stretch;
    }

    .header-mobile-wrapper {
        width: 100%;
        position: relative;
        z-index: 1230;
        gap: 12px;
        justify-content: space-between;
    }

    .header-mobile-wrapper .mobile-menu-toggle {
        margin-left: auto;
    }

    .header-contact--bar {
        display: flex;
        margin-left: auto;
        padding-right: 4px;
        align-items: flex-end;
    }

    .header-contact--bar .header-contact__email {
        display: none;
    }

    .header-contact--nav {
        margin: 16px 0 0;
        padding: 0;
        align-items: flex-start;
        gap: 6px;
        order: 2;
    }

    .header-contact--nav .header-contact__email {
        display: inline;
    }

    .header-contact a {
        font-size: 15px;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1235;
    }

    .header-nav-overlay {
        display: block;
        position: fixed;
        top: var(--dt-chrome-h, 110px);
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(39, 57, 90, 0.46);
        z-index: 1200;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: none;
    }

    .header-nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .header-nav {
        display: flex;
        position: fixed;
        top: var(--dt-chrome-h, 110px);
        right: 0;
        width: min(320px, 82vw);
        height: calc(100vh - var(--dt-chrome-h, 110px));
        height: calc(100dvh - var(--dt-chrome-h, 110px));
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--warm-ivory);
        padding: 16px 24px 32px;
        border-top: 1px solid rgba(39, 57, 90, 0.08);
        box-shadow: -18px 0 40px rgba(39, 57, 90, 0.18);
        z-index: 1210;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.35s;
    }

    .header-nav.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        margin: 0;
        width: 100%;
        order: 1;
    }

    .nav-links li a {
        display: block;
        padding: 14px 5px;
        border-bottom: 1px solid rgba(39, 57, 90, 0.08);
        font-weight: 600;
        color: var(--text-dark);
        transition: var(--transition);
    }

    .nav-links li a:hover {
        color: var(--deep-blue);
        padding-left: 10px;
    }

    .nav-links li a::after {
        display: none;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .header-socials {
        margin: 20px 0 0;
        padding-left: 0;
        border-left: none;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
        order: 3;
    }

    .header-socials a {
        width: 40px;
        height: 40px;
    }

    .header-btn-wrapper {
        order: 4;
    }

    .header-btn {
        display: none;
        width: 100%;
        margin-top: 16px;
        justify-content: center;
    }

    .header-btn.active,
    .header-nav.active .header-btn {
        display: inline-flex;
    }
}

/* SUBMENUS (e.g. "For Parents") */
.header-nav .nav-links > li {
    position: relative;
}

.header-nav .nav-links .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Astra's own arrow markup inside the link is not used; the theme draws its own. */
.header-nav .nav-links .dropdown-menu-toggle {
    display: none;
}

.header-nav .nav-links .menu-item-has-children > a {
    cursor: pointer;
}

@media (min-width: 993px) {
    .header-nav .nav-links .sub-menu {
        position: absolute;
        top: 100%;
        left: -18px;
        min-width: 230px;
        padding: 10px 0;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 14px 40px rgba(39, 57, 90, 0.14);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: all 0.2s ease;
        z-index: 999;
    }

    .header-nav .nav-links li:hover > .sub-menu,
    .header-nav .nav-links li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .header-nav .nav-links .sub-menu li a {
        display: block;
        padding: 9px 20px;
        font-size: 14px;
    }

    .header-nav .nav-links .sub-menu li a::after {
        display: none;
    }

    .header-nav .nav-links > li.menu-item-has-children > a {
        padding-right: 14px;
    }

    .header-nav .nav-links > li.menu-item-has-children > a::before {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: translateY(-70%) rotate(45deg);
    }
}

@media (max-width: 992px) {
    /* Collapsible: the parent row toggles its items (header script adds .submenu-open). */
    .header-nav .nav-links .menu-item-has-children > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .header-nav .nav-links .menu-item-has-children > a::before {
        content: "";
        order: 2;
        width: 8px;
        height: 8px;
        margin-right: 6px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
        transition: transform 0.25s ease;
    }

    .header-nav .nav-links .submenu-open > a::before {
        transform: translateY(2px) rotate(-135deg);
    }

    .header-nav .nav-links .sub-menu {
        display: none;
        padding: 0 0 6px 14px;
        border-bottom: 1px solid rgba(39, 57, 90, 0.08);
    }

    .header-nav .nav-links .submenu-open > .sub-menu {
        display: block;
    }

    .header-nav .nav-links .submenu-open > a {
        border-bottom-color: transparent;
    }

    .header-nav .nav-links .sub-menu li a {
        padding: 11px 5px;
        font-weight: 500;
        font-size: 15px;
        border-bottom: 0;
    }

    /* Social icons: always one row, shrinking slightly on narrow phones. */
    .header-nav .header-socials {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        max-width: 300px;
    }

    .header-nav .header-socials a {
        flex: 1 1 0;
        width: auto;
        max-width: 40px;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

html.dt-menu-open,
body.dt-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.dt-menu-open .top-banner {
    z-index: 1225;
}
