:root {
    --logo-width: 140px;
}

@media (max-width: 576px) {
    .header-container {
        max-width: 540px !important;
    }
}



/* Ensure the header sits above other content on the page */
/* z-index 1035 keeps the whole header subtree (nav + dropdown fly-outs) above
   Bootstrap .sticky-top (1020, used by the course-detail sidebar) and .fixed-top
   (1030), while staying below the site modals (2000+) so they still overlay it. */
.header {
    position: relative !important;
    z-index: 1035 !important;
    border: none !important;
}


.lets_talk {
    border-left: 1.5px solid #f3f4f6 !important;
    border-right: 1.5px solid #f3f4f6 !important;
    border-bottom: 0 !important;
    border-top: 0 !important;
}

.primary-header-border {
    border-bottom: 1.5px solid #f3f4f6 !important;
}


/* ==========================================
   3. Sticky Header Scroll-State Override
   ========================================== */
/* Hide cloned header by default */
.sticky-header-clone {
    display: none !important;
}

/* Ensure primary-header doesn't apply weird fixed styles from app.min.css when scrolled */
.primary-header.fixed-header {
    position: relative !important;
    top: 0 !important;
    z-index: 1035 !important;
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    /* Explicitly keep it transparent and borderless on desktop to match its normal state */
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: none !important;
}

/* ==== search input box ======  */
/* Premium Interactive Search Input Box */
.search-container {
    position: relative !important;
    width: 22% !important;
    min-width: 220px !important;
    flex-grow: 1 !important;
    transition: all 0.3s ease !important;
}

/* Gradient border container with rounded corners */
.search-input-wrapper {
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #eaeef5, #eaeef5) border-box !important;
    border: 1.5px solid transparent !important;
    /* same width as focus — prevents black-border flash on blur */
    border-radius: 999px !important;
    padding: 4px 6px 4px 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    align-items: center !important;
}

/* Linear Gradient Border effect only on Focus (input clicked) */
.search-container:focus-within .search-input-wrapper {
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(130deg, #4ab4ff, #a964ff, #ff646b) border-box !important;
    border: 1.5px solid transparent !important;
    box-shadow: 0 4px 12px rgba(6, 108, 203, 0.1) !important;
}

/* Left search icon styling */
.search-icon {
    font-size: 1.25rem !important;
    color: #9ca3af !important;
    margin-right: 8px !important;
    transition: color 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.search-container:focus-within .search-icon {
    color: #066ccb !important;
}

/* Search input field */
header .search-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 0.82rem !important;
    color: #1f2937 !important;
    width: 100% !important;
    padding: 4px 0 !important;
}

header .search-input::placeholder {
    color: #9ca3af !important;
}

.search-submit-btn {
    border: none !important;
    outline: none !important;
    background: #066ccb !important;
    box-shadow: -1px 0px 10px rgb(93 170 242 / 76%);
    /* Beautiful gradient matching screenshot! */
    color: #ffffff !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    /* Physically prevents compression */
    min-height: 34px !important;
    /* Physically prevents compression */
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    /* Completely eliminates flex layout squeeze! */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;

    /* Initial Hidden Position - Starts exactly where the search icon is on the far left */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-190px) !important;
    margin-right: -34px !important;
    transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
}


/* Animate from the left search icon all the way to its final right-side position ONLY when the input is clicked (focused) */
.sticky-header-clone .search-container:focus-within .search-submit-btn,
.search-container:focus-within .search-submit-btn {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    /* Reaches its final right position */
    margin-right: 0 !important;
    /* Pull smoothly into normal flex view */
}

.search-submit-btn:hover {
    transform: scale(1.08) !important;
}

.search-submit-btn i {
    font-size: 1rem !important;
}

/* Popover dropdown container */
/* Popover dropdown container - sits right below and aligns exactly with the search container */
.search-popover-dropdown {
    position: absolute !important;
    top: calc(100%) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    /* Matches search container width exactly! */
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #f3f4f6 !important;
    padding: 16px 0 0 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    z-index: 10000 !important;
}

/* Trigger visibility only when JS adds the .is-active class (i.e. when there are results) */
.search-popover-dropdown.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.popover-section-title {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0 18px 10px 18px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.popover-courses-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.popover-course-item {
    border-bottom: 1px solid #f9fafb !important;
}

.popover-course-item:last-child {
    border-bottom: none !important;
}

.popover-course-link {
    display: flex !important;
    align-items: center !important;
    padding: 12px 18px !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
}

.popover-course-link:hover {
    background-color: #f9fafb !important;
}

/* Brand icon boxes matching the screenshot colors */
.course-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 12px !important;
    font-size: 1.25rem !important;
}

/* Info texts */
.course-info {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
}

.course-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    transition: color 0.2s ease !important;
}

.popover-course-link:hover .course-title,
.popover-item--active .course-title {
    color: #066ccb !important;
}

/* Keyboard-active item highlight (mirrors hover state) */
.popover-item--active {
    background-color: #f0f7ff !important;
    border-radius: 10px !important;
}

.course-level {
    font-size: 0.78rem !important;
    color: #6b7280 !important;
    margin-top: 2px !important;
}

/* Popover footer styling */
.popover-footer {
    padding: 12px 18px !important;
    background-color: #f9fafb !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    text-align: center !important;
    border-top: 1px solid #f3f4f6 !important;
}

.view-all-link {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #066ccb !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.2s ease !important;
}

.view-all-link:hover {
    color: #084279 !important;
}


/* ==========================================
   1. Desktop Layout & Interactive Styles (min-width: 992px)
   ========================================== */
@media (min-width: 992px) {

    /* Keep desktop normal header wrapper fully transparent and borderless */
    .header:not(.fixed-header) {
        background: transparent !important;
    }


    /* Make the parent container relative so header-inner positions itself perfectly to it */
    .header .container {
        position: relative !important;
    }



    /* Float the normal header capsule absolutely relative to its container */
    .header:not(.fixed-header) .header-inner {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
        width: 99% !important;
        margin: 0 auto;
    }

    /* Redesign header-inner as a premium capsule container for both normal and sticky states */
    .header-inner {
        background-color: #ffffff !important;
        border: 1.5px solid #eaeef5 !important;
        border-radius: 999px !important;
        padding: 8px 10px 8px 10px !important;
        box-shadow: 0 10px 30px rgb(16 92 166 / 21%), 0 2px 8px rgb(16 92 166 / 8%) !important;
        margin-top: 18px !important;
        margin-bottom: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Hide the logo inside the capsule to avoid vertical double-logo stacking and keep it clean */
    .header-inner .logo {
        max-width: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        margin-right: 0 !important;
        transition: all 0.3s ease !important;
    }

    /* Stretch right block to take full container space in capsule mode */
    .header-inner .header-right {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header-inner .header-menu {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
    }

    .header-inner .header-menu>div {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 6px !important;
    }

    /* Nav menu items spacing and positions */
    .nav-menu {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-grow: 0 !important;
        gap: 0 !important;
        /* Equal gap between all navigation items! */
        margin: 0 !important;
    }

    .nav-menu__item {
        position: relative !important;
    }

    /* Pill-shaped menu link design */
    .nav-menu__link {
        display: inline-flex !important;
        align-items: center !important;
        padding: 6px 10px !important;
        font-size: 0.84rem !important;
        gap: 4px !important;
        border-radius: 999px !important;
        font-weight: 500 !important;
        color: #4b5563 !important;
        /* Cool dark-grey neutral */
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-decoration: none !important;
    }

    .nav-menu__link i {
        font-size: 1rem !important;
        transition: color 0.25s ease !important;
    }

    /* Active Tab State: Soft blue background and rich brand blue text */
    .nav-menu__item.activePage .nav-menu__link {
        background-color: #eff6ff !important;
        color: #066ccb !important;
        font-weight: 600 !important;
    }

    .nav-menu__item.activePage .nav-menu__link i {
        color: #066ccb !important;
    }

    /* Hover Tab State: Match active design smoothly */
    .nav-menu__item:not(.activePage):hover .nav-menu__link {
        background-color: #eff6ff !important;
        color: #066ccb !important;
    }

    .nav-menu__item:not(.activePage):hover .nav-menu__link i {
        color: #066ccb !important;
    }

    /* Has-submenu caret positioning and background boundary */
    .nav-menu__item.has-submenu .nav-menu__link {
        padding-right: 24px !important;

    }

    .nav-menu__item.has-submenu .nav-menu__link::before {
        right: 8px !important;
        font-size: 0.8rem !important;
        color: #4b5563 !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Change caret color on hover/active to match text */
    .nav-menu__item.has-submenu:hover .nav-menu__link::before,
    .nav-menu__item.has-submenu.activePage .nav-menu__link::before,
    .nav-menu__item.has-submenu.active .nav-menu__link::before {
        color: #066ccb !important;
    }


    /* Active & Hover horizontal top indicator line sitting on the capsule border */
    .nav-menu__item::before {
        content: '' !important;
        position: absolute !important;
        top: -10px !important;
        /* Sits perfectly on top border */
        left: 50% !important;
        transform: translateX(-50%) scaleX(0) !important;
        width: 95% !important;
        height: 3.5px !important;
        background-color: #066ccb !important;
        border-radius: 0 0 4px 4px !important;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 10 !important;
    }

    .nav-menu__item.activePage::before,
    .nav-menu__item:hover::before {
        transform: translateX(-50%) scaleX(1) !important;
    }


    /* Top bar hover links */
    .top-bar-link {
        color: #4b5563 !important;
        font-weight: 500;
        transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        text-decoration: none;
    }

    .top-bar-link:hover {
        color: #066ccb !important;
    }

    /* Top bar social icons hover states */
    .top-bar-social-link {
        color: #4b5563 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: #f3f4f6;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .top-bar-social-link:hover {
        color: #ffffff !important;
        background-color: #066ccb !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(6, 108, 203, 0.2);
    }

    /* Hide top bar in the cloned header */
    .sticky-header-clone .top-bar {
        display: none !important;
    }

    /* Show the cloned header wrapper */
    .sticky-header-clone.fixed-header {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1035 !important;
        animation: slideDownSmooth 0.35s ease-out forwards !important;

        /* Reset any inherited containing block styles */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Remove container max-width for sticky header so it spans full screen */
    .sticky-header-clone.fixed-header .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }


    /* Keep centered capsule layout for sticky header */
    .sticky-header-clone.fixed-header .header-inner {
        position: relative !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 2px solid transparent !important;
        border-bottom-color: #f3f4f6 !important;
        border-radius: 0 !important;
        box-shadow: 0 12px 35px rgba(16, 92, 166, 0.1), 0 2px 10px rgba(16, 92, 166, 0.05) !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        transition: none !important;

        padding: 10px !important;
    }

    .sticky-header-clone.fixed-header .search-popover-dropdown {
        left: auto !important;
        min-width: 300px !important;
    }

    .sticky-header-clone.fixed-header .nav-menu__item::before {
        top: -15px !important;
    }

    .sticky-header-clone.fixed-header .header-inner .logo {
        max-width: 200px !important;
        opacity: 1 !important;
    }

    .sticky-header-clone.fixed-header .header-inner .logo img {
        max-height: 23px !important;

        width: auto !important;
    }

    .sticky-header-clone.fixed-header .header-inner .header-content-wrapper {
        flex-grow: 0 !important;
    }

    .sticky-header-clone.fixed-header .header-inner .header-right {
        width: auto !important;
        flex-grow: 1 !important;
    }

    .sticky-header-clone.fixed-header .header-inner .header-menu {
        width: 100% !important;
    }

    .sticky-header-clone.fixed-header .header-inner .header-menu>div {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .sticky-header-clone.fixed-header .search-container {
        width: 10% !important;
        min-width: 100px !important;
        flex-grow: 1 !important;
    }

}

@media (min-width:1200px) and (max-width:1299px) {
    .header:not(.fixed-header) .search-container {
        flex-grow: 0 !important;
    }

    .header:not(.fixed-header) .nav-menu {
        gap: calc(var(--spacing) * 6) !important;
        justify-content: normal !important;
        flex-grow: 1 !important;
    }

}

@media (min-width:1300px) {
    .header:not(.fixed-header) .header-inner {
        width: 95% !important;
    }

    .sticky-header-clone.fixed-header .search-container {
        width: 20% !important;
    }

    .sticky-header-clone.fixed-header .header-inner .logo img {
        max-height: 35px !important;
    }

    .nav-menu {
        gap: 24px !important;
        justify-content: space-between !important;
        flex-grow: 1 !important;
    }

    .nav-menu__link {
        gap: 8px !important;
        padding: 8px 16px !important;
        font-size: 1rem !important;
    }

    .nav-menu__link i {
        font-size: 1.15rem !important;
    }

    /* Adjust caretaker right padding */
    .nav-menu__item.has-submenu .nav-menu__link {
        padding-right: 32px !important;

    }

    .nav-menu__item.has-submenu .nav-menu__link::before {
        right: 14px !important;
        font-size: 0.95rem !important;
    }

    /* Keep search container slightly narrower to free up vital space for nav links! */
    .search-container {
        width: 25% !important;
        min-width: 250px !important;
        flex-shrink: 0 !important;
    }



    .header-inner .header-menu>div {
        gap: 24px !important;

    }

    .search-container {
        width: 20% !important;
        min-width: 300px !important;
        flex-grow: 0 !important;

    }

    .nav-menu {
        gap: 0px !important;
    }

    .nav-menu__link {
        padding: 8px 14px !important;
        font-size: 0.92rem !important;
        gap: 6px !important;
    }

    .nav-menu__link i {
        font-size: 1.1rem !important;
    }

    /* Adjust caretaker right padding */
    .nav-menu__item.has-submenu .nav-menu__link {
        padding-right: 30px !important;
    }

    .nav-menu__item.has-submenu .nav-menu__link::before {
        right: 12px !important;
        font-size: 0.9rem !important;
    }

    header .search-input {
        font-size: 0.88rem !important;
    }

    .header-inner .header-menu>div {
        gap: 6px !important;
    }
}

/* Distributed layout override for large 1600px+ monitors to fill space beautifully */
@media (min-width: 1550px) {
    .sticky-header-clone.fixed-header .search-container {
        max-width: 300px !important;
    }

    .top-bar-link {
        font-size: 1.07rem !important;
    }

    .sticky-header-clone.fixed-header .header-inner .logo img {
        max-height: 60px !important;
    }

    .sticky-header-clone.fixed-header .header-inner {
        padding: 15px 50px !important;
        gap: 20px !important;
    }

    .nav-menu__link,
    header .search-input {
        font-size: 1.07rem !important;
    }

    .header:not(.fixed-header) .header-inner {
        width: 95% !important;
    }

    .header-inner .header-right {
        justify-content: space-between !important;
    }

    .header-inner .header-menu {
        width: 100% !important;
    }

    .header-inner .header-menu>div {
        justify-content: space-between !important;
        width: 100% !important;
    }

    .nav-menu {
        justify-content: space-between !important;
    }

    .sticky-header-clone .nav-menu {
        gap: 14px !important;
        justify-content: center !important;
        /* Spaced out beautifully on massive screens */
    }

    .sticky-header-clone.fixed-header .nav-menu__item::before {
        top: -19px !important;
    }
}

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

    /* Submit button: collapsed — zero size, sitting AT the icon (shifted left) */
    .sticky-header-clone .search-container .search-submit-btn {
        /* Instantly hide/show — no fade delay */
        opacity: 0 !important;
        visibility: hidden !important;
        color: #ffffff !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        /* Physically prevents compression */
        min-height: 34px !important;
        /* Physically prevents compression */
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        /* Completely eliminates flex layout squeeze! */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        /* Parked at the icon position (to the left of where it will land) */
        transform: translateX(-110px) !important;
        /* Width/height expand instantly; only translateX animates (with delay) */
        transition:
            width 0s,
            height 0s,
            min-width 0s,
            min-height 0s,
            opacity 0s,
            visibility 0s,
            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0s !important;
        order: 3 !important;
    }


}

/* ==========================================
   2. Mobile Responsive Layout (max-width: 991px)
   ========================================== */
@media (max-width: 991px) {

    /* Hide top bar on mobile completely */
    .header .top-bar {
        display: none !important;
    }

    .header {
        padding-block: 12px !important;
        background-color: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-inner {
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header-inner .logo {
        display: block !important;
    }

    .header-inner .logo img {
        width: var(--logo-width) !important;
    }

    /* Mobile Menu Items Icons and Spacing */
    .nav-menu--mobile .nav-menu__link {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        font-weight: 500 !important;
        color: #4b5563 !important;
        transition: all 0.2s ease !important;
    }

    .nav-menu--mobile .nav-menu__link i {
        font-size: 1.25rem !important;
        color: #066ccb !important;
        transition: transform 0.2s ease !important;
    }

    .nav-menu--mobile .nav-menu__item.activePage>.nav-menu__link {
        color: #066ccb !important;
        font-weight: 600 !important;
    }

    .nav-menu--mobile .nav-submenu__link {
        padding-left: 36px !important;
        /* Indent sub-links for hierarchical clarity! */
        font-size: 0.95rem !important;
    }

    /* Sticky mobile header */
    .header {
        min-height: 60px;
    }

    /* Prevents jump on mobile */
    .primary-header.fixed-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background: #ffffff !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06) !important;
        border-bottom: none !important;
        animation: slideDownSmooth 0.35s ease-out forwards !important;
    }

    /* ── Mobile collapsible search ─────────────────────────────────────────── */
    /* The header-right is static so the absolute search can align with the header-inner container instead */
    .header-inner .header-right {
        position: static !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Collapsed state: show only a circular icon button */
    .search-container.lg\:hidden {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 42px !important;
        min-width: 0 !important;
        overflow: visible !important;
        flex-grow: 0 !important;
        transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 100 !important;
    }

    /* Expanded state: grows leftward from the right edge */
    .search-container.lg\:hidden.is-expanded {
        width: min(280px, calc(100vw - 170px)) !important;
    }

    /* The wrapper pill */
    header .search-container.lg\:hidden .search-input-wrapper {
        width: 100% !important;
        padding: 0px !important;
        justify-content: center !important;
        transition: padding 0.4s ease, background 0.3s ease, border-color 0.3s ease !important;
        overflow: hidden !important;
        border-radius: 999px !important;
    }

    /* Expanded wrapper: show left padding for icon + text balance */
    .search-container.lg\:hidden.is-expanded .search-input-wrapper {
        padding: 0 6px 0 6px !important;
        justify-content: flex-start !important;
        background: linear-gradient(#ffffff, #ffffff) padding-box,
            linear-gradient(130deg, #4ab4ff, #a964ff, #ff646b) border-box !important;
        border: 1.5px solid transparent !important;
        box-shadow: 0 4px 12px rgba(6, 108, 203, 0.12) !important;
    }

    /* Search icon: layout only — no forced background or color, inherits naturally */
    .search-container.lg\:hidden .search-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        margin-right: 0 !important;
        border: none !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        order: 2 !important;
        font-size: 1.25rem !important;
        transition: transform 0.2s ease !important;
        z-index: 2 !important;
    }

    .search-container.lg\:hidden .search-icon:hover {
        transform: scale(1.08) !important;
    }

    /* Expanded: icon reorders to left, add gap before input */
    .search-container.lg\:hidden.is-expanded .search-icon {
        order: 0 !important;
        margin-right: 6px !important;
    }

    /* Input: hidden in collapsed state */
    .search-container.lg\:hidden .search-input {
        width: 0 !important;
        min-width: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        padding: 0 !important;
        transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
        order: 1 !important;
    }

    /* Input: fully visible in expanded state */
    .search-container.lg\:hidden.is-expanded .search-input {
        width: 100% !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 4px 0 !important;
    }

    /* Submit button: collapsed — zero size, sitting AT the icon (shifted left) */
    .search-container.lg\:hidden .search-submit-btn {
        /* Instantly hide/show — no fade delay */
        opacity: 0 !important;
        visibility: hidden !important;
        /* Zero footprint so it doesn't affect layout */
        width: 0 !important;
        min-width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        margin-right: 0 !important;
        /* Parked at the icon position (to the left of where it will land) */
        transform: translateX(-120px) !important;
        /* Width/height expand instantly; only translateX animates (with delay) */
        transition:
            width 0s,
            height 0s,
            min-width 0s,
            min-height 0s,
            opacity 0s,
            visibility 0s,
            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0s !important;
        order: 3 !important;
    }

    /* Submit button: expanded — appears after width animation finishes (0.38s delay) */
    .search-container.lg\:hidden.is-expanded .search-submit-btn {
        opacity: 1 !important;
        visibility: visible !important;
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        margin-right: 0 !important;
        /* Slides in from the left (icon side) to its final position */
        transform: translateX(0) !important;
        transition:
            width 0s,
            height 0s,
            min-width 0s,
            min-height 0s,
            opacity 0s 0.38s,
            visibility 0s 0.38s,
            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.38s !important;
    }

    /* Popover: anchor to right edge of the container */
    .search-container.lg\:hidden .search-popover-dropdown {
        left: auto !important;
        right: 0 !important;
        min-width: min(280px, calc(100vw - 130px)) !important;
        top: calc(100% + 8px) !important;
    }
}


@keyframes slideDownSmooth {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}

/* ==========================================
   4. Mobile Slide-out Menu Drawer Contacts Card
   ========================================== */
.mobile-menu__contacts {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.mobile-menu__contacts-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-menu__contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #4b5563;
    font-size: 0.95rem;
}

.mobile-menu__contact-item i {
    font-size: 1.3rem;
    color: #066ccb;
}

.mobile-menu__contact-item a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-menu__contact-item a:hover {
    color: #066ccb;
}

.mobile-menu__socials {
    display: flex;
    gap: 14px;
    margin-top: 25px;
}

.mobile-menu__socials-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 1.3rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu__socials-link:hover {
    background-color: #066ccb !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(6, 108, 203, 0.15);
}

/* Custom styles for search input and fallback images */
.search-course-icon-box {
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.search-course-icon-box .course-item__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 8px !important;
}

.search-course-icon-box .course-img-fallback {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    padding: 6px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    align-items: center !important;
    justify-content: center !important;
}

.search-course-icon-box .course-img-fallback img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* Multi-level side-by-side dropdown submenu styling */
@media (min-width: 992px) {

    /* Ensure the parent item has relative position so the child submenu aligns with it */
    .nav-submenu__item.has-submenu-parent {
        position: relative !important;
    }

    /* Allow dropdown menus to show overflowing content (flyouts) on desktop */
    .nav-submenu {
        overflow: visible !important;
        z-index: auto !important;
        /* Removes local stacking context so children can slide from behind */
    }

    /* Shift stacking context to top-level menu items so dropdowns still overlay the page */
    .nav-menu__item.has-submenu {
        position: relative !important;
        z-index: 99 !important;
    }

    /* By default, hide the child submenu and position it to the right of the parent item */
    .nav-submenu__item.has-submenu-parent .nav-submenu-child {
        position: absolute !important;
        top: 0 !important;
        left: calc(100% + 10px) !important;
        /* Flyout to the right */
        margin-left: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateX(-32px) !important;
        /* Slide out from behind the main dropdown */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: -1 !important;
        /* Layered below the main dropdown */
        display: block !important;
        box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    }

    /* Show the child submenu when hovering over the parent item */
    .nav-submenu__item.has-submenu-parent:hover>.nav-submenu-child {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }
}

@media (max-width: 576px) {
    .search-container.lg\:hidden.is-expanded {
        width: 101% !important;
    }
}

/* Mobile nested submenu styles */
.has-submenu-nested .ph-caret-down {
    transition: transform 0.3s ease !important;
}

.nav-submenu-nested-list {
    margin-top: 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
    background-color: transparent !important;
    /* Mobile nested container transparent */
}

/* Mobile nested course links (indented to look nested) */
.nav-submenu-nested-list .nav-submenu__link {
    padding-left: 54px !important;
    /* Hierarchical indentation */
}

/* Desktop-only nested submenu styling */
@media (min-width: 992px) {

    /* Desktop Flyout submenu container background set to white */
    .nav-submenu-child {
        background-color: #ffffff !important;
    }
}

/* Active page highlighting for nested submenu items (Desktop & Mobile) */
.nav-submenu-child .nav-submenu__item.activePage>.nav-submenu__link,
.nav-submenu-nested-list .nav-submenu__item.activePage>.nav-submenu__link {
    color: #066ccb !important;
}

/* When a nested child is active, highlight the parent category in blue */
/* The direct child was an <a> until the nav triggers became <button> for accessibility;
   matching both keeps this working either way. */
.has-submenu-parent:has(.activePage)>a,
.has-submenu-parent:has(.activePage)>button,
.has-submenu-nested:has(.activePage)>a,
.has-submenu-nested:has(.activePage)>button {
    color: #066ccb !important;
}

/* Override theme descendant selector to only color the direct link in blue, not all nested descendant links */
.nav-submenu__item.activePage>.nav-submenu__link {
    color: #066ccb !important;
}

/* Reset nested submenu links that are not active back to default color */
.nav-submenu__item.activePage .nav-submenu__item:not(.activePage)>.nav-submenu__link {
    color: #222e48 !important;
}