* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
}

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

.custom-header {
    width: 100%;
    height: 70px;
    position: relative;
    background: #082F56;
}

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

.header-logo-area {
    width: 240px;
    height: 125px;
    background: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(
        0 0,
        100% 0,
        100% 78%,
        50% 100%,
        0 78%
    );
}

.header-logo-area .logo {
    width: 100%;
    height: 78%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.header-logo-area img {
    width: 190px;
    height: auto;
    display: block;
}

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

.header-menu-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 140px; /* widened to match new .header-lang-area width */
    height: 70px;
    padding-left: 250px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* hamburger — hidden on desktop */
.mobile-menu-toggle {
    display: none;
}

.navigation_menu {
    display: flex;
    align-items: center;
    height: 100%;
}

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

.navbar_nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.navbar_nav .menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar_nav .nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0 22px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .25s, border-bottom-color .25s;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.navbar_nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-bottom-color: #92AED8;
}

.navbar_nav .menu-item.active > .nav-link {
    border-bottom-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   PROGRAMS DROPDOWN ARROW
========================================= */

.menu-item-has-children {
    position: relative;
}

.programs-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.programs-link::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid #92AED8;
    border-bottom: 1.8px solid #92AED8;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform .25s, margin-top .25s;
    flex-shrink: 0;
}

.menu-item-has-children:hover .programs-link::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* =========================================
   DROPDOWN MENU
========================================= */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #082F56;
    border-top: 2px solid #92AED8;
    padding: 8px 0;
    display: none;
    z-index: 999;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.menu-item-has-children:hover .dropdown-menu {
    display: block !important;
}

.dropdown-menu li {
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown-menu .nav-link {
    height: auto !important;
    padding: 11px 20px !important;
    font-size: 10px !important;
    letter-spacing: 1px !important;
    border-bottom: none !important;
    border-left: 3px solid transparent !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left-color: #92AED8 !important;
    border-bottom-color: transparent !important;
}

.dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* =========================================
   LANGUAGE AREA (EN / AR + SEARCH)
========================================= */

.header-lang-area {
    width: 140px;
    height: 70px;
    background: #92AED8;
    position: absolute;
    top: -1px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #082F56;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    transition: opacity .25s;
}

.lang-switch:hover {
    opacity: .75;
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: #082F56;
}

.lang-search {
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
}

/* highlight whichever language is currently active */
.lang-switch.is-active {
    text-decoration: underline;
    opacity: 1;
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 991px) {

    .custom-header {
        height: 70px;
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        overflow: visible;
    }

    .header-logo-area {
        position: relative;
        width: 220px;
        height: 100px;
        clip-path: polygon(
            0 0,
            100% 0,
            100% 78%,
            50% 100%,
            0 78%
        );
        background: #ffffff;
        flex-shrink: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-logo-area .logo {
        height: 78%;
    }

    .header-logo-area img {
        width: 155px;
    }

    .header-menu-area {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        flex: 1;
        height: 70px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 8px;
        z-index: 10;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        transition: transform .3s, opacity .3s;
    }

    .header-lang-area {
        display: none;
    }

    /* language pill shown next to the hamburger on mobile instead */
    .mobile-lang-switch {
        display: flex;
        align-items: center;
        margin-right: 14px;
    }

    .mobile-lang-switch a {
        color: #ffffff;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        letter-spacing: 1px;
        padding: 6px 12px;
        border: 1px solid rgba(255, 255, 255, .4);
        border-radius: 4px;
        white-space: nowrap;
    }

    .navigation_menu {
        display: none;
        height: auto;
    }

    .navigation_menu.open {
        display: block;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #082F56;
        z-index: 100;
        border-top: 2px solid #92AED8;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        padding: 8px 0;
        overflow-y: auto;
        width: 100vw;
    }

    .navigation_menu.open .navbar_nav {
        flex-direction: column;
        width: 100%;
        height: auto;
        gap: 0;
    }

    .navigation_menu.open .menu-item {
        width: 100%;
        height: auto;
        display: block;
        position: relative;
    }

    .navigation_menu.open .nav-link {
        height: 56px;
        padding: 0 32px;
        font-size: 13px;
        letter-spacing: 1.5px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
    }

    /* PROGRAMS dropdown on mobile — hidden by default, shows below */
    .navigation_menu.open .dropdown-menu {
        position: static !important;
        display: none;
        width: 100%;
        background: #0a3a6b;
        border-top: none;
        border-left: 3px solid #92AED8;
        margin: 0;
        padding: 4px 0;
        box-shadow: none;
    }

    /* show dropdown only when parent has .open class */
    .navigation_menu.open .menu-item-has-children.open .dropdown-menu {
        display: block;
    }

    .navigation_menu.open .dropdown-menu .nav-link {
        padding: 0 32px 0 48px;
        font-size: 11.5px;
        height: 50px;
        letter-spacing: 1px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .programs-link::after {
        display: inline-block;
    }
}

/* =========================================
   RTL (Arabic) ADJUSTMENTS
========================================= */
html[dir="rtl"] .header-logo-area {
    left: auto;
    right: 0;
}

html[dir="rtl"] .header-menu-area {
    left: 140px;
    right: 0;
    padding-left: 0;
    padding-right: 250px;
}

html[dir="rtl"] .header-lang-area {
    right: auto;
    left: 0;
}

html[dir="rtl"] .navbar_nav .nav-link,
html[dir="rtl"] .dropdown-menu .nav-link {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

@media (max-width: 991px) {
    html[dir="rtl"] .header-logo-area {
        right: auto;
        left: auto;
    }
    html[dir="rtl"] .header-menu-area {
        left: auto;
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* =========================================
   SEARCH POPUP OVERLAY
========================================= */

/* force hide search popup until opened */
.search-popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(8, 47, 86, 0.85) !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    backdrop-filter: blur(4px) !important;
}

.search-popup-overlay.open {
    display: flex !important;
}

.search-popup-box {
    width: 100%;
    max-width: 680px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 40px 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #082F56;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity .2s;
    line-height: 1;
}

.search-popup-close:hover {
    opacity: 1;
}

.search-popup-label {
    color: #082F56;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.search-popup-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #082F56;
    padding-bottom: 12px;
}

.search-popup-icon {
    font-size: 52px;
    color: #082F56;
    line-height: 1;
    opacity: 0.6;
    flex-shrink: 0;
}

.search-popup-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 22px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #082F56;
    background: transparent;
}

.search-popup-input-wrap input::placeholder {
    color: #92AED8;
}

/* results */
.search-popup-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 360px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    text-decoration: none;
    border-radius: 10px;
    transition: background .2s;
}

.search-result-item:hover {
    background: #F6F8FE;
}

.search-result-tag {
    color: #92AED8;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-result-title {
    color: #082F56;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.search-result-desc {
    color: #6b7280;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.4;
}

.search-no-results {
    color: #92AED8;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    padding: 30px 0;
}

/* mobile */
@media (max-width: 576px) {
    .search-popup-box {
        padding: 30px 20px 20px;
    }

    .search-popup-input-wrap input {
        font-size: 18px;
    }
}



/* =========================================
   HEADER — RTL OVERRIDES
========================================= */

html[dir="rtl"] .header-logo-area {
    left: auto;
    right: 0;
    clip-path: polygon(
        0 0,
        100% 0,
        100% 78%,
        50% 100%,
        0 78%
    );
}

html[dir="rtl"] .header-menu-area {
    left: 140px;
    right: 0;
    padding-left: 0;
    padding-right: 250px;
}

html[dir="rtl"] .header-lang-area {
    right: auto;
    left: 0;
}

html[dir="rtl"] .navbar_nav,
html[dir="rtl"] .dropdown-menu {
    direction: rtl;
}

html[dir="rtl"] .navbar_nav .nav-link,
html[dir="rtl"] .dropdown-menu .nav-link {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .dropdown-menu .nav-link {
    border-left: none !important;
    border-right: 3px solid transparent !important;
}

html[dir="rtl"] .dropdown-menu .nav-link:hover {
    border-left-color: transparent !important;
    border-right-color: #92AED8 !important;
}

html[dir="rtl"] .programs-link::after {
    transform: rotate(135deg);
}

html[dir="rtl"] .menu-item-has-children:hover .programs-link::after {
    transform: rotate(-45deg);
}

@media (max-width: 991px) {
    html[dir="rtl"] .header-menu-area {
        left: auto;
        right: auto;
        padding-left: 20px;
        padding-right: 20px;
    }

    html[dir="rtl"] .mobile-lang-switch {
        margin-right: 0;
        margin-left: 14px;
    }

    html[dir="rtl"] .navigation_menu.open .dropdown-menu {
        border-left: none;
        border-right: 3px solid #92AED8;
    }

    html[dir="rtl"] .navigation_menu.open .dropdown-menu .nav-link {
        padding: 0 48px 0 32px;
    }
}

/* =========================================
   FOOTER — RTL OVERRIDES
   Note: written generically since footer.css wasn't provided.
   If your footer uses a CSS grid or flexbox with directional
   properties (margin-left, float, etc. instead of logical
   properties), send footer.css and these can be made exact.
========================================= */

html[dir="rtl"] .custom-footer,
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .footer-col,
html[dir="rtl"] .footer-links,
html[dir="rtl"] .footer-heading {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .footer-links li {
    padding-right: 0;
    padding-left: 0;
}

html[dir="rtl"] .footer-bottom-inner {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-social {
    flex-direction: row-reverse;
}