/* Site fixes for HTTrack mirror */

:root {
    --brand-primary: #003d53;
    --brand-accent: #b6553e;
    --brand-surface: #d5d7d7;
}

/* Ra (ر) accent behind section headings — replaces diagonal bar */
.section_shape {
    width: 8.75em !important;
    top: -0.35em !important;
}

.section_shape svg {
    width: 100%;
    height: auto;
    display: block;
}

.section_shape path {
    fill: var(--brand-accent) !important;
}

/* Cairo font for entire site */
body,
input,
select,
textarea,
button,
a,
h1, h2, h3, h4, h5, h6,
p, span, strong, li,
label, nav, footer, header {
    font-family: 'Cairo', sans-serif !important;
}

/* Homepage hero video — same full-viewport cover behavior as original */
#homeHero.home_hero {
    position: relative;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100) !important;
    min-height: 0 !important;
    overflow: hidden;
    background: #0d1b2a;
}

#homeHero.home_hero .canvas_wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    z-index: 1;
    background: #0d1b2a center / cover no-repeat;
}

#homeHero.home_hero video {
    display: block;
    min-height: 100%;
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center center;
    will-change: transform;
    pointer-events: none;
}

#homeHero.home_hero .hero_slides {
    z-index: 2 !important;
    pointer-events: none;
    position: absolute !important;
    inset: 0 !important;
}

#homeHero.home_hero .hero_slides::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.12) 45%,
        rgba(0, 0, 0, 0.38) 100%
    );
}

#homeHero.home_hero .canvas_content {
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    justify-content: center !important;
    align-items: center !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

#homeHero.home_hero .canvas_content.is-active {
    opacity: 1 !important;
    visibility: visible !important;
}

#homeHero.home_hero .canvas_content h2 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 800 !important;
    font-size: clamp(1.85rem, 5.8vw, 4.25rem) !important;
    line-height: 1.5 !important;
    max-width: 20em;
    margin: 0 auto;
    color: #fff !important;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 3px 12px rgba(0, 0, 0, 0.65),
        0 8px 32px rgba(0, 0, 0, 0.45);
    letter-spacing: 0.01em;
}

#homeHero.home_hero .canvas_content#content-3 {
    justify-content: center !important;
    padding-bottom: 0 !important;
}

#homeHero.home_hero .canvas_content#content-3 p {
    font-family: 'Cairo', sans-serif !important;
    font-size: clamp(1.35rem, 3.5vw, 2.5rem) !important;
    font-weight: 800 !important;
    margin-top: 0.75em;
    letter-spacing: 0.02em;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 3px 12px rgba(0, 0, 0, 0.65);
}

#homeHero.home_hero .hero_slide_logo {
    display: block;
    width: min(20em, 82vw);
    height: auto;
    margin: 0 auto 0.5em;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
}

/* Legacy hero rules (other pages) */
.home_hero .canvas_wrap {
    background: #0d1b2a center / cover no-repeat;
}

.home_hero video,
.home_hero:not(#homeHero) .canvas_wrap img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
    pointer-events: none;
}

/* Ensure page is visible even if main JS is slow */
#smooth-wrapper {
    visibility: visible !important;
}

/* Contact page map */
.contact_map_wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin-top: 2em;
}

.contact_map_wrap h4 {
    margin: 0;
}

.contact_map {
    position: relative;
    width: 100%;
    height: 18em;
    border-radius: 1.25em;
    overflow: hidden;
    background: #f0f0f0;
    box-shadow: 0 0.25em 1.5em rgba(0, 0, 0, 0.08);
}

.contact_map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Homepage map section (#map) */
#map .map_hero {
    position: relative;
    overflow: hidden;
}

#map .map_vector {
    opacity: 1;
    z-index: 10;
    pointer-events: none;
}

#map .map_vector path {
    fill: rgba(0, 61, 83, 0.12);
    stroke: rgba(0, 61, 83, 0.4);
    stroke-width: 0.6;
    transition: fill 0.3s ease;
}

#map .map_vector path.active {
    fill: rgba(0, 61, 83, 0.45) !important;
}

/* Brand color overrides */
.orange_bg,
.site_button.orange_bg,
.rounded_button.orange_bg {
    background: #003d53 !important;
    color: #fff !important;
}

.contact_button.orange_bg {
    background: var(--brand-accent) !important;
    color: #fff !important;
}

.orange_color,
.site_button.outline.orange_color {
    color: #003d53 !important;
    border-color: #003d53 !important;
}

.dark_green_bg,
.light_green_bg,
.map_hero.dark_green_bg {
    background: #d5d7d7 !important;
    color: #003d53 !important;
}

.dark_green_bg h1,
.dark_green_bg h2,
.dark_green_bg h3,
.dark_green_bg h4,
.dark_green_bg h5,
.dark_green_bg p,
.dark_green_bg span,
.light_green_bg h1,
.light_green_bg h2,
.light_green_bg h3,
.light_green_bg h4,
.light_green_bg h5,
.map_hero h1,
.map_hero h2,
.map_hero h5,
#map .pro_card,
#map .projects {
    color: #003d53;
}

.dark_green_bg .gray_color,
.light_green_bg .gray_color,
.map_hero .gray_color,
#projects .gray_color {
    color: rgba(0, 61, 83, 0.85) !important;
}

/* Darker text on gray brand surfaces (avoid low-contrast white) */
.dark_green_bg,
.light_green_bg,
.map_hero.dark_green_bg,
#projects,
#projects .dark_green_bg {
    color: #003d53;
}

.dark_green_bg h1,
.dark_green_bg h2,
.dark_green_bg h3,
.dark_green_bg h4,
.dark_green_bg h5,
.dark_green_bg h6,
.dark_green_bg p,
.dark_green_bg li,
.dark_green_bg .high,
.light_green_bg h1,
.light_green_bg h2,
.light_green_bg h3,
.light_green_bg h4,
.light_green_bg h5,
.light_green_bg h6,
.light_green_bg p,
.light_green_bg li,
.light_green_bg .high,
#projects h5,
#projects .pro_title,
#projects .pro_title h5 {
    color: #003d53 !important;
}

.pagination .active a,
.pagination a:hover {
    background-color: #003d53 !important;
    color: #fff !important;
}

.popup_wrap {
    background: rgba(213, 215, 215, 0.92) !important;
}

/* White text on any section with a background image + overlaid copy */
.home_hero,
.home_hero h1,
.home_hero h2,
.home_hero h3,
.home_hero h4,
.home_hero h5,
.home_hero h6,
.home_hero p,
.home_hero span,
.home_hero .high,
.home_hero .gray_color,
.canvas_content,
.canvas_content h1,
.canvas_content h2,
.canvas_content h3,
.canvas_content p,
.hero_wrap:has(> .load_bg),
.hero_wrap:has(> i.load_bg),
.hero_wrap:has(> .load_bg) h1,
.hero_wrap:has(> .load_bg) h2,
.hero_wrap:has(> .load_bg) h3,
.hero_wrap:has(> .load_bg) h4,
.hero_wrap:has(> .load_bg) h5,
.hero_wrap:has(> .load_bg) h6,
.hero_wrap:has(> .load_bg) p,
.hero_wrap:has(> .load_bg) span,
.hero_wrap:has(> .load_bg) .high,
.hero_wrap:has(> .load_bg) .gray_color,
.b_hero:has(.load_bg),
.b_hero:has(.load_bg) h1,
.b_hero:has(.load_bg) h2,
.b_hero:has(.load_bg) h3,
.b_hero:has(.load_bg) h4,
.b_hero:has(.load_bg) h5,
.b_hero:has(.load_bg) h6,
.b_hero:has(.load_bg) p,
.b_hero:has(.load_bg) span,
.b_hero:has(.load_bg) .high,
.b_hero:has(.load_bg) .gray_color,
.sus_wrap:has(.load_bg),
.sus_wrap:has(.load_bg) h1,
.sus_wrap:has(.load_bg) h2,
.sus_wrap:has(.load_bg) h3,
.sus_wrap:has(.load_bg) h4,
.sus_wrap:has(.load_bg) h5,
.sus_wrap:has(.load_bg) h6,
.sus_wrap:has(.load_bg) p,
.sus_wrap:has(.load_bg) span,
.sus_wrap:has(.load_bg) .high,
.sus_wrap:has(.load_bg) .gray_color,
.grid_col,
.grid_col_info,
.grid_col_info h1,
.grid_col_info h2,
.grid_col_info h3,
.grid_col_info h4,
.grid_col_info h5,
.grid_col_info h6,
.grid_col_info p,
.grid_col_info span,
.grid_col_info .high,
.grid_col_info .gray_color,
.project_cover_set,
.project_cover_set h1,
.project_cover_set h2,
.project_cover_set h3,
.project_cover_set h4,
.project_cover_set h5,
.project_cover_set h6,
.project_cover_set p,
.project_cover_set span,
.project_cover_set .high,
.project_cover_set .gray_color,
.n_cover:has(.load_bg) .n_cover_info,
.n_cover:has(.load_bg) .n_cover_info strong,
.n_cover:has(.load_bg) .n_cover_info span {
    color: #fff !important;
}

.home_hero .site_button.outline,
.canvas_content .site_button.outline,
.hero_wrap:has(> .load_bg) .site_button.outline,
.b_hero:has(.load_bg) .site_button.outline,
.sus_wrap:has(.load_bg) .site_button.outline,
.grid_col .site_button.outline,
.project_cover_set .site_button.outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

@media (min-width: 1201px) {
    /* Two columns: map + title on the left, project cards on the right */
    #map .map_hero {
        display: grid !important;
        direction: ltr;
        grid-template-columns: min(42em, 44vw) minmax(0, 42em);
        grid-template-rows: auto auto;
        justify-content: space-between;
        align-content: start;
        align-items: start;
        column-gap: 3em;
        row-gap: 1.5em;
        min-height: 100vh;
        padding-top: 3em;
        padding-bottom: 3em;
    }

    #map .map_vector {
        position: relative !important;
        grid-column: 1;
        grid-row: 1;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none;
        margin: 0;
    }

    #map .map_vector svg {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Title + description + button below the map on the left */
    #map .map_head_set {
        position: relative !important;
        grid-column: 1;
        grid-row: 2;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: none;
        z-index: 1;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 1.25em;
        padding-bottom: 0;
    }

    #map .map_head {
        width: 100% !important;
        max-width: none !important;
    }

    #map .map_head_set .site_button {
        align-self: flex-start;
        margin-top: 0.25em;
    }

    #map .map_projects_set {
        position: relative !important;
        grid-column: 2;
        grid-row: 1 / span 2;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100%;
        max-width: 42em;
        height: calc(100vh - 6em);
        max-height: calc(100vh - 6em);
        justify-self: end;
        align-self: center;
        overflow: hidden;
        z-index: 199;
        isolation: isolate;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #map .map_projects._eleWrap,
    #map .map_projects_set._eleWrap {
        visibility: visible !important;
    }

    #map .map_projects ._eleY,
    #map .map_projects .map_project,
    #map .map_projects .map_card {
        visibility: visible !important;
        opacity: 1 !important;
    }

    #map .map_projects {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: column !important;
        gap: 1.75em !important;
        will-change: transform;
    }

    #map .map_projects .map_project {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
        box-sizing: border-box;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    #map .map_projects .flickity-slider,
    #map .map_projects .flickity-cell,
    #map .map_project {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
    }

    #map .map_card {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        box-sizing: border-box;
        padding: 2.5em !important;
        gap: 2.5em !important;
        flex-direction: column !important;
        display: flex !important;
        flex: 0 0 auto !important;
        align-self: flex-start !important;
        overflow: hidden;
        background: #fff !important;
    }

    #map .map_card_cover {
        width: 100% !important;
        max-width: 100%;
        flex: 0 0 auto !important;
        height: 24em !important;
        min-height: 24em !important;
        max-height: 24em !important;
        overflow: hidden;
        border-radius: 0;
        position: relative;
    }

    #map .map_card_cover i,
    #map .map_card_cover .load_bg {
        width: 100% !important;
        height: 100% !important;
        display: block;
        background-size: cover !important;
        background-position: center !important;
        overflow: hidden;
    }

    #map .map_card_head {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }

    #map .map_card h3 {
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.35 !important;
        font-size: 1.55em !important;
        font-weight: 600 !important;
        height: auto !important;
    }

    #map .map_card_info {
        border-top: 1px solid rgba(22, 25, 23, 0.2);
        border-bottom: 1px solid rgba(22, 25, 23, 0.2);
        padding: 1.25em 0;
    }
}

@media (max-width: 1200px) {
    #map {
        overflow: visible;
        max-width: 100%;
    }

    #map .map_hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        width: 100%;
        max-width: 100%;
        padding: 5em 0 3em !important;
        box-sizing: border-box;
        overflow: visible;
    }

    #map .map_hero.full_page {
        height: auto !important;
        min-height: auto !important;
    }

    #map .map_hero.x_padding {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #map .map_head_set {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1em;
        padding: 0 2em 1em !important;
        z-index: 5;
        order: 1 !important;
    }

    #map .map_vector {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: min(94vw, 34em) !important;
        max-width: 34em;
        margin: 0 auto 1em;
        z-index: 2;
        order: 2 !important;
        flex-shrink: 0;
    }

    #map .map_vector svg {
        width: 100%;
        height: auto;
        display: block;
    }

    #map .map_projects_set {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 0 1.5em !important;
        margin: 0;
        box-sizing: border-box;
        overflow: visible;
        z-index: 10;
        order: 3 !important;
        flex-shrink: 0;
    }

    #map .map_projects_set {
        touch-action: pan-x pinch-zoom;
    }

    #map .map_projects,
    #map .map_projects.map-swipe-native {
        width: 100% !important;
        min-height: 0 !important;
        direction: ltr !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pinch-zoom;
        overscroll-behavior-x: contain;
        gap: 0 !important;
        height: auto !important;
        scrollbar-width: none;
    }

    #map .map_projects.map-swipe-native::-webkit-scrollbar {
        display: none;
    }

    #map .map_projects .map_project,
    #map .map_projects.map-swipe-native .map_project {
        display: block !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box;
        margin: 0 !important;
        padding: 0 !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    #map .map_projects_set,
    #map .map_projects_set .map_projects,
    #map .map_projects_set .map_project,
    #map .map_projects_set .map_card,
    #map .map_projects_set .map_card * {
        visibility: visible !important;
        opacity: 1 !important;
    }

    #map .map_projects.flickity-enabled,
    #map .map_projects.flickity-rtl,
    #map .map_projects .flickity-viewport,
    #map .map_projects .flickity-slider {
        direction: ltr !important;
    }

    #map .map_project {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #map .map_projects .flickity-viewport {
        overflow: hidden !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
    }

    #map .map_projects .flickity-cell {
        height: auto !important;
        padding: 0;
        box-sizing: border-box;
    }

    #map .map_head {
        width: 100% !important;
        max-width: 100% !important;
    }

    #map .map_card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        border-radius: 1em !important;
        flex-direction: column-reverse !important;
        display: flex !important;
        background: #fff !important;
        overflow: hidden !important;
        height: auto !important;
        min-height: 0 !important;
        touch-action: pan-x pinch-zoom;
        padding: 1.5em !important;
        gap: 1.1em !important;
    }

    html[dir="rtl"] #map .map_card,
    html[dir="rtl"] #map .map_card_head,
    html[dir="rtl"] #map .map_card_info,
    html[dir="rtl"] #map .map_card h3 {
        direction: rtl !important;
        text-align: right;
    }

    #map .map_card_cover {
        flex: unset !important;
        height: 20em !important;
        min-height: 20em !important;
        width: 100% !important;
        max-width: 100%;
        overflow: hidden;
        border-radius: 0.75em;
    }

    #map .map_card_cover i,
    #map .map_card_cover .load_bg {
        overflow: hidden;
        border-radius: inherit;
    }

    #map .map_card h3 {
        height: auto !important;
        min-height: 0 !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.4 !important;
        font-size: 1.35em !important;
    }

    #map .map_card p {
        display: none;
    }

    #map .map_projects_dots {
        display: none !important;
    }

    #map .map_projects_nav {
        display: none !important;
    }
}

/* Tablet: larger map, slider lower, two project cards visible */
@media (min-width: 601px) and (max-width: 1200px) {
    #map .map_vector {
        width: min(96vw, 44em) !important;
        max-width: 44em !important;
        transform: scale(1.18) !important;
        transform-origin: center center;
        margin-bottom: 2em !important;
    }

    #map .map_projects_set {
        margin-top: 2.5em !important;
        padding-top: 0.5em !important;
    }

    #map .map_projects,
    #map .map_projects.map-swipe-native,
    #map .map_projects.map-tablet-native {
        gap: 1em !important;
        padding: 0 1.5em 1.5em !important;
        box-sizing: border-box;
        max-width: 100%;
    }

    #map .map_projects .map_project,
    #map .map_projects.map-swipe-native .map_project,
    #map .map_projects.map-tablet-native .map_project {
        flex: 0 0 calc(50% - 0.5em) !important;
        width: calc(50% - 0.5em) !important;
        max-width: calc(50% - 0.5em) !important;
        min-width: calc(50% - 0.5em) !important;
        scroll-snap-align: start;
        box-sizing: border-box;
        overflow: hidden;
    }

    #map .map_card {
        overflow: hidden !important;
    }

    #map .map_card_cover {
        height: 16em !important;
        min-height: 16em !important;
    }

    #map .map_card h3 {
        font-size: 1.15em !important;
    }
}

@media (max-width: 600px) {
    #map .map_hero {
        padding-top: 4.5em !important;
        padding-bottom: 3em !important;
    }

    #map .map_head_set {
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
        gap: 0.85em;
        padding-bottom: 0.5em !important;
        order: 1 !important;
    }

    #map .map_vector {
        width: 96vw !important;
        max-width: none !important;
        transform: scale(1.15) !important;
        transform-origin: center center;
        margin-bottom: 0.75em;
        order: 2 !important;
    }

    #map .map_vector svg {
        width: 100%;
        height: auto;
        display: block;
    }

    #map .map_projects_set {
        padding: 0 1em 2em !important;
        margin-top: 1.5em !important;
        min-height: 0 !important;
        order: 3 !important;
    }

    #map .map_card {
        padding: 1.35em !important;
        gap: 1em !important;
        margin: 0 !important;
    }

    #map .map_card_cover {
        height: 18em !important;
        min-height: 18em !important;
        border-radius: 0.75em;
        overflow: hidden;
    }

    #map .map_card h3 {
        font-size: 1.25em !important;
        line-height: 1.45 !important;
        height: auto !important;
        overflow: visible !important;
    }

    #map .map_card_info {
        flex-wrap: wrap;
        gap: 0.4em 0.75em;
        font-size: 0.85em;
        line-height: 1.45;
        padding-top: 0.6em !important;
        padding-bottom: 0.6em !important;
    }

    #map .map_card_head {
        gap: 0.65em !important;
        width: 100% !important;
    }

    #map .map_projects_dots {
        display: none !important;
    }
}

@media (min-width: 601px) and (max-width: 1200px) {
    #map .map_head_set {
        padding-left: 3em !important;
        padding-right: 3em !important;
    }

    #map .map_projects {
        padding: 0 1.5em;
        box-sizing: border-box;
    }

    #map .map_projects .flickity-cell {
        width: calc(50% - 0.75em) !important;
        max-width: calc(50% - 0.75em) !important;
        padding: 0 0.375em;
    }
}

html[dir="rtl"] #map .map_head_set,
html[dir="rtl"] #map .map_head {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #map .map_head_set .site_button {
    align-self: flex-end;
}

/* Image loading placeholder */
.load_bg:not([style*="background-image"]),
.load_bg[style*="background-image: url()"] {
    background-color: #1a1a2e;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%) !important;
}

.load_img:not([src]),
.load_img[src=""] {
    background: #e8e8e8;
    min-height: 12em;
}

/* Map project cards - ensure images show */
.map_card .load_bg {
    min-height: 10em;
}

/* Homepage map slider: temporarily hide project location + divider lines */
#map .map_card_info {
    display: none !important;
}

/* Fix missing favicon flash */
link[rel="icon"][href*="favicon"] {
    display: none;
}

/* Newsletter / contact form offline notice */
.form_offline_notice {
    display: none;
    font-size: 0.85em;
    color: #888;
    margin-top: 0.5em;
}

form[wire\\:submit] + .form_offline_notice,
.ft_form + .form_offline_notice {
    display: block;
}

/* Responsive map */
@media (max-width: 768px) {
    .contact_map {
        height: 14em;
    }

    .info_side {
        flex: 1 1 auto !important;
        width: 100%;
    }
}

/* RTL support for Arabic contact map */
html[dir="rtl"] .contact_map_wrap {
    text-align: right;
}

/* Our Projects 3D map */
#projects {
    position: relative;
    min-height: 100vh;
}

#projects .containerWrap {
    position: relative;
    width: 100%;
    min-height: 50vh;
    z-index: 1;
}

#projects #container {
    position: relative;
    width: 100%;
    min-height: inherit;
    overflow: hidden;
}

#projects #container canvas {
    display: block !important;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    transform: scale(0.82);
}

html[dir="rtl"] #projects #container canvas {
    transform-origin: 85% 48%;
}

html[dir="ltr"] #projects #container canvas {
    transform-origin: 15% 48%;
}

@media (min-width: 1201px) {
    #projects .containerWrap {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        min-height: 100vh;
    }

    #projects .projects {
        pointer-events: none;
    }

    #projects .pro_cards,
    #projects .arrows_set {
        pointer-events: all;
    }
}

@media (max-width: 1200px) {
    #projects .containerWrap {
        min-height: 55vh;
    }

    #projects .projects .arrows_set {
        display: flex !important;
        pointer-events: all;
    }
}

/* Our Projects page: remove white fog overlay on 3D map */
#projects #container::before {
    display: none !important;
    content: none !important;
}

#projects .pro_card {
    color: #003d53 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 0.25em 1.25em rgba(0, 0, 0, 0.08);
}

#projects .pro_card.is-selected {
    background: rgba(255, 255, 255, 0.96) !important;
}

#projects .pro_card .map_card_info {
    border-color: rgba(0, 61, 83, 0.2) !important;
}

#projects .pro_card .map_card_info span,
#projects .pro_card .gray_color {
    color: rgba(0, 61, 83, 0.85) !important;
}

#projects .projects .arrows_set {
    color: #003d53 !important;
}

/* Our Projects page: native horizontal swipe on mobile/tablet */
@media (max-width: 1200px) {
    #projects .pro_cards_set,
    #projects .pro_cards {
        touch-action: pan-x pinch-zoom;
    }

    #projects .pro_cards.pro-swipe-native {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pinch-zoom;
        overscroll-behavior-x: contain;
        direction: ltr !important;
        gap: 1em !important;
        width: 100% !important;
        padding: 0 1em 1em !important;
        box-sizing: border-box;
        scrollbar-width: none;
    }

    #projects .pro_cards.pro-swipe-native::-webkit-scrollbar {
        display: none;
    }

    #projects .pro_cards.pro-swipe-native .pro_card {
        flex: 0 0 calc(100% - 2em) !important;
        width: calc(100% - 2em) !important;
        max-width: calc(100% - 2em) !important;
        min-width: calc(100% - 2em) !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        margin: 0 !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
}

/* Navbar brand icon logo */
.main_logo {
    display: block !important;
    height: 2.35em !important;
    width: 2.35em !important;
    min-width: 2.35em !important;
    flex: 0 0 2.35em !important;
    max-width: 2.35em !important;
    position: relative !important;
    z-index: 10 !important;
    background: none !important;
    background-color: transparent !important;
}

.main_logo svg {
    display: none !important;
}

.main_logo img.brand-logo-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
}

/* Careers page: hide internship cards + NHTI/youth grid sections */
.page-careers section:has(.bn_wrap),
.page-careers #nhti {
    display: none !important;
}

/* Hide careers nav dropdown only (keep other menu dropdowns) */
header nav > ul > li:has(> a[href*="careers.html"]) > svg,
header nav > ul > li:has(> a[href*="careers.html"]) .menu_sub {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* About Us: remove Executive Leaders tab/panel */
#our-leaders .tabs_nav_set {
    display: none !important;
}

/* Leaders cards: name + title on hover panel (white bar) */
#our-leaders .team_col .team_info strong,
#our-leaders .team_col .team_info p {
    color: #003d53 !important;
}

#our-leaders .team_col .team_info .gray_color.high {
    color: #5f6b73 !important;
}

#our-leaders #panel2 {
    display: none !important;
}

/* Operations sector — leaders-style image slider with hover title */
#operations .operations_sector_slider {
    gap: 3em;
    background: var(--brand-surface) !important;
}

#operations .operations_sector_intro {
    max-width: 42em;
    line-height: 1.7;
    margin-top: 0.75em;
}

#operations .operations_sector_slider .section_title h2 {
    color: var(--brand-primary) !important;
}

#operations .operations_sector_slider .team_col {
    height: 28em;
}

#operations .operations_sector_slider .section_body {
    display: flex;
    justify-content: center;
}

#operations .operations_sector_slider .tab_panel {
    width: 100%;
    max-width: 72em;
    margin-inline: auto;
}

#operations .operations_sector_slider .team_col .load_bg,
#operations .operations_sector_slider .team_col i.cover {
    background-position: center center !important;
    background-size: cover !important;
}

#operations .operations_sector_slider .team_col .team_info strong,
#operations .operations_sector_slider .team_col .team_info p {
    color: #003d53 !important;
}

#operations .operations_sector_slider .team_col .team_info .gray_color.high {
    color: #5f6b73 !important;
}

@media (max-width: 600px) {
    #operations .operations_sector_slider .team_col {
        height: 22em;
    }
}

#loader svg path {
    display: none !important;
}

#loader svg {
    background: url('images/alruwais-logo-transparent.png') center / contain no-repeat !important;
    background-color: transparent !important;
    width: 19em !important;
    height: 6.5em !important;
    max-width: 92vw;
}

#loader.is-booting svg {
    visibility: visible;
    opacity: 1;
}

#loader.is-dismissed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

#loader {
    background: #fff !important;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Media gallery */
#gallery .section_body {
    min-height: 32em;
    width: 100%;
}

#gallery .gallery_slider {
    min-height: 30em;
    width: 100%;
}

#gallery .gallery_slider.flickity-enabled {
    height: 30em;
    min-height: 30em;
}

#gallery .gallery_slider .flickity-viewport,
#gallery .gallery_slider.flickity-enabled .flickity-viewport {
    height: 30em !important;
    min-height: 30em !important;
}

#gallery .gallery_slider.flickity-enabled .flickity-slider {
    height: 30em;
}

#gallery .gallery_slide {
    height: 30em;
}

#gallery .gallery_slide img {
    display: block;
    height: 30em;
    width: auto;
    max-width: none;
    object-fit: cover;
    border-radius: 0.5em;
}

/* Fallback if Flickity has not initialized yet */
#gallery .gallery_slider:not(.flickity-enabled) {
    display: flex;
    gap: 1em;
    overflow-x: auto;
    padding-bottom: 1em;
    scroll-snap-type: x mandatory;
}

#gallery .gallery_slider:not(.flickity-enabled) .gallery_slide {
    flex: 0 0 auto;
    position: relative;
    scroll-snap-align: start;
}

/* Grid cards: navy overlay instead of orange */
.grid_col:before {
    background: rgba(0, 61, 83, 0.55) !important;
}

/* Careers page: orange → semi-transparent navy (#003d53) */
.page-careers {
    --careers-navy: rgba(0, 61, 83, 0.82);
    --careers-navy-soft: rgba(0, 61, 83, 0.55);
    --careers-navy-border: rgba(0, 61, 83, 0.72);
}

.page-careers .grid_col:before {
    background: var(--careers-navy-soft) !important;
}

.page-careers .orange_bg,
.page-careers .site_button.orange_bg,
.page-careers .rounded_button.orange_bg,
.page-careers .contact_button.orange_bg,
.page-careers .burger_wrap .orange_bg {
    background: var(--careers-navy) !important;
}

.page-careers .orange_color,
.page-careers .site_button.outline.orange_color {
    color: var(--careers-navy-border) !important;
    border-color: var(--careers-navy-border) !important;
}

.page-careers #internship-request .site_button.outline,
.page-careers #work-with-us .site_button.outline {
    color: var(--careers-navy-border) !important;
    border-color: var(--careers-navy-border) !important;
}

.page-careers .hero_wrap .site_button.outline,
.page-careers .grid_col .site_button.outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.page-careers .rounded_button.outline {
    color: var(--careers-navy-border) !important;
}

.page-careers .rounded_button.outline:after {
    background: var(--careers-navy) !important;
}

.page-careers path[fill="#F27E20"],
.page-careers path[fill="#f27e20"] {
    fill: var(--careers-navy) !important;
}

/* Value icons (orange PNGs → semi-transparent navy) */
.page-careers #internal-values .v_col img {
    filter: brightness(0) saturate(100%) invert(17%) sepia(42%) saturate(1400%) hue-rotate(157deg) brightness(0.95);
    opacity: 0.88;
}

/* Vendors page */
.page-vendors .grid_col:before {
    background: rgba(0, 61, 83, 0.68) !important;
}

.page-vendors .grid_col .full_bg {
    filter: sepia(0.35) hue-rotate(162deg) saturate(0.75) brightness(0.86);
}

.page-vendors .grid_col .site_button.outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.page-vendors #vendors-hub-header .site_button.outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.page-vendors .nhti_card h4 {
    color: #003d53 !important;
}

.page-vendors .vendor_contact_body {
    width: 100%;
}

.page-vendors .vendor_contact_card {
    gap: 1.25em;
    padding: 2.5em 2em;
    background: #fff;
    border: 1px solid rgba(0, 61, 83, 0.12);
    text-align: center;
    max-width: 42em;
    margin: 0 auto;
}

.page-vendors .vendor_contact_icon {
    width: 4.5em;
    height: 4.5em;
    border-radius: 50%;
    background: rgba(0, 61, 83, 0.08);
}

.page-vendors .vendor_contact_button {
    color: #003d53 !important;
    border-color: #003d53 !important;
}

.page-vendors .vendor_contact_button:hover {
    background: #003d53 !important;
    color: #fff !important;
}

/* Vendors portal hero – navy gradient overlay for readable text */
.page-vendors .contact_vendor_hero {
    text-align: center;
}

.page-vendors .contact_vendor_hero .hero_content_set {
    align-items: center;
    max-width: 52em;
    margin: 0 auto;
    padding-bottom: 2em;
}

.page-vendors .contact_vendor_hero .hero_content {
    text-align: center;
    align-items: center;
}

.page-vendors .contact_vendor_hero .hero_content p {
    max-width: 42em;
    line-height: 1.75;
}

.page-vendors .contact_vendor_hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 61, 83, 0.55) 0%,
        rgba(0, 61, 83, 0.78) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.page-vendors .contact_vendor_hero > .load_bg {
    z-index: 1;
}

.page-vendors .contact_vendor_hero .hero_content_set {
    z-index: 99;
}

/* Sustainability page */
.page-sustainability #sustainability-report .grid_col:before {
    background: rgba(0, 61, 83, 0.68) !important;
}

.page-sustainability #sustainability-report .grid_col .full_bg {
    filter: sepia(0.35) hue-rotate(162deg) saturate(0.75) brightness(0.86);
}

.page-sustainability #sustainability-report .grid_col .site_button.outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.page-sustainability .sus_hero_image_only {
    height: 42em;
    min-height: 22rem;
    padding-bottom: 0;
}

.page-sustainability #sustainability-strategy .sus_axes_list {
    margin: 1em 0 0;
    padding-right: 1.25em;
}

.page-sustainability #sustainability-strategy .sus_axes_list li {
    color: #b6553e !important;
    font-weight: 500;
    margin-bottom: 0.35em;
}

.page-sustainability .sus_col.active {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #003d53 !important;
}

.page-sustainability .sus_col.active .gray_color {
    color: rgba(0, 61, 83, 0.75) !important;
}

.page-sustainability .sus_col:not(.active) {
    border-color: rgba(255, 255, 255, 0.55) !important;
}

/* About Us — mission/vision image uses logo Ra (ر) inner cutout shape */
#mission-vision .m_mask {
    transform: scale(1.05);
    transform-origin: center center;
}

#mission-vision .m_mask svg path {
    fill: var(--brand-surface) !important;
}

#mission-vision .m_mask svg {
    width: 100%;
    height: auto;
    display: block;
}

#mission-vision .m_mask_cover {
    top: 0.75em;
    right: 0.75em;
    bottom: 0.75em;
    left: 0.9em;
}

#mission-vision .m_mask_cover .load_bg {
    background-position: center 32% !important;
}

@media (max-width: 600px) {
    #mission-vision .m_mask {
        transform: scale(1.95);
    }
}


/* Nav pill covers full bar including logo */
html[dir="rtl"] .header_set > i,
html[dir="ltr"] .header_set > i {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
}

/* Smoother navbar open / close animation */
body:not(.progress) .header_set > i,
body:not(.progress) .expand,
body:not(.progress) nav,
body:not(.progress) .header_set,
body:not(.progress) .lang,
body:not(.progress) .contact_button,
body:not(.progress) .contact_button strong,
body:not(.progress) .contact_button svg,
body:not(.progress) .burger_button,
body:not(.progress) .burger_button span {
    transition-property: width, min-width, max-width, max-height, height, opacity, transform, padding, gap, left, right, visibility, border-radius, background !important;
    transition-duration: 0.55s !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Compact header: logo + 3-line menu toggle (dark pill, white icons) */
header .header_set > nav,
header .header_set > .expand {
    display: none !important;
}

header .header_set {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.65em !important;
    padding: 0.4em 0.45em 0.4em 0.5em !important;
    width: max-content !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
}

header {
    z-index: 10050 !important;
}

header .header_set > i {
    border-radius: 100em !important;
    background: #003d53 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0.4em 1.2em rgba(0, 61, 83, 0.35) !important;
    pointer-events: none !important;
}

header .main_logo,
header .burger_button {
    pointer-events: auto !important;
}

header .main_logo,
header .main_logo svg,
header .main_logo img,
header .main_logo .brand-logo-img {
    filter: brightness(0) invert(1) !important;
}

header .main_logo svg path {
    fill: #fff !important;
}

header .burger_button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 2 !important;
    width: 2.75em !important;
    height: 2.75em !important;
    min-width: 2.75em !important;
    border-radius: 50% !important;
    gap: 0.32em !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    overflow: visible !important;
}

header .burger_button span {
    width: 1.15em !important;
    height: 2.5px !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform-origin: center;
    flex: 0 0 auto !important;
}

/* Ensure 3 lines */
header .burger_button span:nth-child(1),
header .burger_button span:nth-child(2),
header .burger_button span:nth-child(3) {
    display: block !important;
    background: #ffffff !important;
}

header .burger_button.is-open span:nth-child(1),
header .burger_button.active span:nth-child(1) {
    transform: translateY(0.36em) rotate(45deg) !important;
}

header .burger_button.is-open span:nth-child(2),
header .burger_button.active span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
}

header .burger_button.is-open span:nth-child(3),
header .burger_button.active span:nth-child(3) {
    transform: translateY(-0.36em) rotate(-45deg) !important;
}

header .burger_button:hover {
    transform: scale(1.06);
    background: #b6553e !important;
    border-color: #b6553e !important;
}

/* Hide legacy full-page burger overlay (replaced by side drawer) */
.burger_wrap {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (min-width: 601px) {
    .main_logo {
        height: 2.35em !important;
        width: 2.35em !important;
        min-width: 2.35em !important;
        flex: 0 0 2.35em !important;
        max-width: 2.35em !important;
    }

    header.scrolled .header_set {
        padding: 0.35em 0.4em !important;
    }
}

@media (max-width: 600px) {
    .main_logo {
        height: 2.5em !important;
        width: 2.5em !important;
        min-width: 2.5em !important;
        flex: 0 0 2.5em !important;
        max-width: 2.5em !important;
    }
}

/* ========== Side curtain menu ========== */
.side-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(0, 16, 24, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.side-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.side-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 10061;
    width: min(23em, 90vw);
    background:
        radial-gradient(ellipse 90% 45% at 100% 0%, rgba(182, 85, 62, 0.4), transparent 55%),
        linear-gradient(165deg, #0a5570 0%, #003d53 45%, #001f2b 100%);
    color: #fff;
    box-shadow: -1em 0 2.8em rgba(0, 0, 0, 0.42);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    font-family: 'Cairo', sans-serif !important;
}

html[dir="rtl"] .side-drawer {
    right: 0;
    left: auto;
    transform: translateX(105%);
    border-radius: 1.6em 0 0 1.6em;
}

html[dir="ltr"] .side-drawer {
    left: 0;
    right: auto;
    transform: translateX(-105%);
    border-radius: 0 1.6em 1.6em 0;
    box-shadow: 1em 0 2.8em rgba(0, 0, 0, 0.42);
    background:
        radial-gradient(ellipse 90% 45% at 0% 0%, rgba(182, 85, 62, 0.4), transparent 55%),
        linear-gradient(195deg, #0a5570 0%, #003d53 45%, #001f2b 100%);
}

.side-drawer.is-open {
    transform: translateX(0) !important;
}

.side-drawer::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.32em;
    background: linear-gradient(180deg, #b6553e, rgba(182, 85, 62, 0.15) 75%);
    pointer-events: none;
}

html[dir="ltr"] .side-drawer::before {
    left: auto;
    right: 0;
}

.side-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.45em 1.45em 1.15em;
    gap: 1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.12);
}

.side-drawer__brand {
    display: flex;
    align-items: center;
    gap: 0.8em;
    color: #fff !important;
    text-decoration: none !important;
}

.side-drawer__brand img {
    width: 2.55em;
    height: 2.55em;
    object-fit: contain;
    filter: brightness(0) invert(1) !important;
}

.side-drawer__brand strong {
    font-size: 1.35em !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    color: #fff !important;
}

.side-drawer__close {
    width: 2.75em;
    height: 2.75em;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.side-drawer__close:hover {
    background: #b6553e !important;
    border-color: #b6553e !important;
    transform: rotate(90deg);
}

.side-drawer__close svg {
    width: 1em;
    height: 1em;
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.side-drawer__close svg path {
    stroke: #ffffff !important;
}

.side-drawer__nav {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.15em 1.15em 1.4em;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.side-drawer__nav::-webkit-scrollbar {
    width: 5px;
}

.side-drawer__nav::-webkit-scrollbar-track {
    background: transparent;
}

.side-drawer__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.side-drawer__nav > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45em !important;
    white-space: normal !important;
    background: transparent !important;
}

.side-drawer__item {
    border-radius: 1em !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    opacity: 0;
    transform: translateY(0.8em);
    transition: opacity 0.45s ease, transform 0.45s ease, background 0.25s ease, border-color 0.25s ease;
}

.side-drawer.is-open .side-drawer__item {
    opacity: 1;
    transform: translateY(0);
}

.side-drawer.is-open .side-drawer__item:nth-child(1) { transition-delay: 0.08s; }
.side-drawer.is-open .side-drawer__item:nth-child(2) { transition-delay: 0.14s; }
.side-drawer.is-open .side-drawer__item:nth-child(3) { transition-delay: 0.2s; }
.side-drawer.is-open .side-drawer__item:nth-child(4) { transition-delay: 0.26s; }
.side-drawer.is-open .side-drawer__item:nth-child(5) { transition-delay: 0.32s; }
.side-drawer.is-open .side-drawer__item:nth-child(6) { transition-delay: 0.38s; }

.side-drawer__item:hover {
    background: rgba(255, 255, 255, 0.11) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.side-drawer__row {
    display: flex !important;
    align-items: center !important;
    gap: 0.25em;
    background: transparent !important;
}

.side-drawer__link {
    flex: 1 1 auto;
    display: block !important;
    padding: 1.1em 1.15em !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1.22em !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: transparent !important;
}

.side-drawer__link:hover {
    color: #ffffff !important;
}

.side-drawer__caret {
    flex: 0 0 2.5em;
    width: 2.5em !important;
    height: 2.5em !important;
    margin-inline-end: 0.5em;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.3s ease, border-color 0.25s ease;
}

.side-drawer__caret:hover {
    background: #b6553e !important;
    border-color: #b6553e !important;
}

.side-drawer__caret svg {
    width: 0.95em;
    height: 0.95em;
    stroke: #ffffff !important;
    color: #ffffff !important;
    transition: transform 0.3s ease;
}

.side-drawer__caret svg path {
    stroke: #ffffff !important;
}

.side-drawer__item.is-open .side-drawer__caret {
    background: #b6553e !important;
    border-color: #b6553e !important;
}

.side-drawer__item.is-open .side-drawer__caret svg {
    transform: rotate(180deg);
}

/* Override main `nav ul li ul { background:#fff }` leak */
.side-drawer nav ul li ul,
.side-drawer__sub,
.side-drawer__sub ul,
.side-drawer .side-drawer__sub,
.side-drawer .side-drawer__sub ul {
    background: rgba(0, 12, 20, 0.35) !important;
    border-radius: 0 !important;
    white-space: normal !important;
    overflow: hidden !important;
    will-change: auto !important;
}

.side-drawer__sub {
    max-height: 0;
    overflow: hidden !important;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-drawer__item.is-open .side-drawer__sub {
    max-height: 24em;
}

.side-drawer__sub ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0.35em 0 0.75em !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15em !important;
}

.side-drawer__sub a,
.side-drawer nav ul li ul a,
.side-drawer .side-drawer__sub a {
    display: block !important;
    padding: 0.75em 1.35em !important;
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    background: transparent !important;
    border-inline-start: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.side-drawer__sub a:hover,
.side-drawer nav ul li ul a:hover,
.side-drawer .side-drawer__sub a:hover {
    color: #ffffff !important;
    background: rgba(182, 85, 62, 0.28) !important;
    border-inline-start-color: #b6553e !important;
}

.side-drawer__foot {
    padding: 1.1em 1.4em 1.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.9em;
    background: rgba(0, 0, 0, 0.16);
}

.side-drawer__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.05em 1.25em;
    border-radius: 100em;
    background: #b6553e !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 1.12em !important;
    letter-spacing: 0.01em;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0.45em 1.3em rgba(182, 85, 62, 0.4);
}

.side-drawer__cta:hover {
    background: #c4634a !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.side-drawer__social {
    display: flex;
    gap: 0.65em;
    justify-content: center;
}

.side-drawer__social a {
    width: 2.55em !important;
    height: 2.55em !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.side-drawer__social a:hover {
    background: #b6553e !important;
    border-color: #b6553e !important;
    transform: translateY(-2px);
}

.side-drawer__social svg {
    width: 1em !important;
    height: 1em !important;
    fill: #ffffff !important;
    color: #ffffff !important;
}

.side-drawer__social svg path {
    fill: #ffffff !important;
}

body.side-drawer-open {
    overflow: hidden;
}

/* Text blocks used to stay hidden until the loader timeline finished. Reveal them quickly instead. */
._eleWrap.fast-in,
._mask.fast-in,
._splitWords.fast-in,
._splitLines.fast-in {
    visibility: visible !important;
    animation: fast-reveal 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* The map list is moved by scroll (GSAP translate). fast-in must not freeze transform. */
#map .map_projects.fast-in,
#map .map_projects.inview {
    animation: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes fast-reveal {
    from {
        opacity: 0;
        transform: translate3d(0, 0.4em, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Homepage contact details, visible without opening the contact page */
.header_contact {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12em;
    width: max-content;
    padding: 0.45em 0.8em;
    border-radius: 1em;
    background: rgba(0, 61, 83, 0.9);
    line-height: 1.3;
}

html[dir="rtl"] .header_contact {
    align-items: flex-start;
}

.header_contact a {
    color: #fff !important;
    font-size: 0.82em;
    font-weight: 600;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

.header_contact a:hover {
    text-decoration: underline;
}

.ft_contact {
    gap: 0.35em;
    margin-bottom: 1em;
}

.ft_contact a {
    color: #003d53;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

.ft_contact a:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .header_contact a[href^="mailto"],
    .header_contact a[href="tel:+966571000074"] {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    ._eleWrap.fast-in,
    ._mask.fast-in,
    ._splitWords.fast-in,
    ._splitLines.fast-in,
    #homeHero.home_hero .canvas_content {
        animation: none !important;
        transition: none !important;
    }
}

/* Promoted headings keep the previous h2 size. Demoted headings keep the h1 size. */
h1.page-title {
    font-size: 3.5em;
    font-weight: 400;
}

h2.display-h1 {
    font-size: 5.625em;
    font-weight: 300;
}

.article-archive {
    margin-top: 2.5em;
}

.article-archive h2 {
    font-size: 2em;
    margin-bottom: 0.8em;
}

.article-archive ul {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-archive a {
    color: #003d53;
    text-decoration: underline;
}

@media (max-width: 900px) {
    html,
    body {
        overflow-x: hidden;
    }

    #homeHero.home_hero,
    #homeHero.home_hero.full_page {
        width: 100% !important;
        max-width: 100vw !important;
        height: 100svh !important;
        height: 100dvh !important;
        min-height: 100svh !important;
        overflow: hidden !important;
    }

    #homeHero.home_hero .canvas_wrap {
        background-image: url("images/alruwais-hero-mobile-poster.webp") !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    #homeHero.home_hero .canvas_wrap,
    #homeHero.home_hero video {
        position: absolute !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        transform: none !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    #homeHero.home_hero .canvas_content h2 {
        font-size: clamp(1.45rem, 7.2vw, 2.4rem) !important;
        max-width: 12em;
        padding: 0 1.1rem;
    }
}

@media (max-width: 600px) {
    .side-drawer {
        width: min(22rem, 92vw);
        font-size: 16px !important;
    }

    .side-drawer nav,
    .side-drawer__nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        max-height: none !important;
    }

    .side-drawer__nav > ul,
    .side-drawer__item,
    .side-drawer__row,
    .side-drawer__link {
        visibility: visible !important;
    }

    .side-drawer.is-open .side-drawer__item {
        opacity: 1 !important;
    }

    .side-drawer__link {
        font-size: 1.05rem !important;
        padding: 0.95rem 1rem !important;
        color: #ffffff !important;
    }

    .side-drawer__brand strong {
        font-size: 1.15rem !important;
    }
}

