/* مطابق لـ firstmover: الحجم والمسافات والشكل */
:root {
    --universal-header-height: 145px;
    --header-inner-h: 65px;
    --header-radius: 12px;
    /* خلفية الهيدر العامة بيضاء — اللون #d4d4d4 فقط لشريط الناف بار (.header-nav-wrap) */
    --header-bg: #ffffff;
    --header-logo-bg: #ffffff;
    --header-nav-bg: #d4d4d4;
    --header-border: #e0e0e0;
    --header-nav-border: #bdbdbd;
    --header-line-color: rgba(0, 0, 0, 0.28);
    --header-divider-h: 22px;
    --mobile-canvas-bg: #2a2a2a;
}
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--header-bg, #d4d4d4);
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}
.site-header.header-hidden {
    transform: translateY(-100%);
}
.header-spacer {
    height: var(--universal-header-height);

}
.header-inner {
    max-width: 1200px;

    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-inner-h);
}
.site-header[dir="ltr"] .header-desktop,
.site-header[dir="ltr"] .header-inner {
    direction: ltr;
}
.site-header[dir="ltr"] .header-nav-wrap {
    direction: ltr;
}
.site-header[dir="ltr"] .header-mobile-row {
    direction: ltr;
}
.site-header[dir="ltr"] .header-logo-box {
    order: 0;
}
.header-logo-box {
    flex-shrink: 0;
    height: var(--header-inner-h);
    min-height: var(--header-inner-h);
    max-height: var(--header-inner-h);
    padding: 3px 8px;
    min-width: 150px;
    max-width: min(42vw, 280px);
    box-sizing: border-box;
    background: var(--header-logo-bg, #d4d4d4);
    border: 1px solid var(--header-border, #bdbdbd);
    border-radius: var(--header-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--header-logo-color, #1a1a1a);
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
    position: relative;
   
}
.header-logo-img {
    display: block;
    max-height: calc(var(--header-inner-h) - 4px);
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}
.header-logo-img--brand {
    max-height: calc(var(--header-inner-h) - 4px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.header-nav-wrap {
    flex: 1 1 0;
    min-width: 0;
    height: var(--header-inner-h);
    background: var(--header-nav-bg, #d4d4d4);
    border: 1px solid var(--header-border, #bdbdbd);
    border-radius: var(--header-radius);
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 0;
}
.swap-link {
    display: flex;
    align-items: center;
    position: relative;
}
.header-nav-wrap .swap-link:not(:first-child)::before {
    content: '';
    display: block;
    width: 1px;
    height: var(--header-divider-h);
    background: var(--header-line-color);
    flex-shrink: 0;
    margin-inline: clamp(6px, 1vw, 12px);
}
.header-nav-link {
    color: var(--header-link-color, #333);
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 10px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.header-nav-link:hover,
.header-nav-link.active { color: #14BF8A; background: transparent; }
@media (max-width: 768px) {
    .header-nav-wrap .swap-link:not(:first-child)::before { display: none; }
}
.header-utility {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-lang-btn {
    height: var(--header-inner-h);
    padding: 0 20px;
    line-height: var(--header-inner-h);
    background: var(--header-nav-bg, #d4d4d4);
    border: 1px solid var(--header-border, #bdbdbd);
    border-radius: var(--header-radius);
    color: var(--header-link-color, #333);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}
.header-circle-btn {
    width: var(--header-inner-h);
    height: var(--header-inner-h);
    min-width: var(--header-inner-h);
    min-height: var(--header-inner-h);
    border-radius: 50%;
    background: var(--header-logo-bg, #d4d4d4);
    border: 1px solid var(--header-circle-border, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--header-link-color, #333);
    padding: 0;
}
.header-circle-btn svg { display: block; }
.light-btn { display: none !important; }
html.theme-dark .dark-btn { display: none !important; }
html.theme-dark .light-btn { display: flex !important; }

.header-mobile-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    min-height: var(--header-inner-h);
}
.open-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--header-link-color, #333);
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-logo-mobile.header-logo-box {
    max-width: min(58vw, 260px);
    flex: 1 1 auto;
    min-width: 0;
    margin-inline-start: 8px;
}
.header-logo-mobile .header-logo-img {
    max-height: calc(var(--header-inner-h) - 4px);
}

/* كانفس الجوال - نفس firstmover */
.mobile-canvas {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 12;
    opacity: 0;
    top: -165px !important;
    transition: opacity 0.1s ease, top 0.2s ease;
    pointer-events: none;
    background: var(--mobile-canvas-bg, #2a2a2a);
}
.mobile-canvas.is-open {
    top: 65px !important;
    opacity: 1;
    pointer-events: auto;
}
.mobile-canvas-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-canvas-link {
    color: #fff;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 0;
}
.mobile-canvas-link:hover { color: #14BF8A; }
.mobile-canvas-utility {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.mobile-canvas-utility .header-lang-btn { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: #fff; }
.mobile-canvas-utility .header-circle-btn { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); color: #fff; }
.mobile-canvas-contact { font-weight: 600; }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9;
    height: 150vh;
}
.mobile-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.mobile-overlay.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ثيم ليلي متناسق مع كامل الموقع */
html.theme-dark {
    --header-bg: rgba(10, 16, 20, 0.78);
    --header-logo-bg: rgba(17, 27, 33, 0.9);
    --header-logo-color: #e7eff3;
    --header-nav-bg: rgba(17, 27, 33, 0.9);
    --header-link-color: #d9e5eb;
    --header-circle-border: #38515e;
    --header-border: #24333b;
    --header-line-color: rgba(255, 255, 255, 0.22);
    --mobile-canvas-bg: #0f1a20;
}
html.theme-dark .header-lang-btn:hover,
html.theme-dark .header-circle-btn:hover { color: #14BF8A; border-color: #14BF8A; }

@media (min-width: 1025px) and (max-width: 1350px) {
    .site-header { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 991px) {
    .header-desktop { display: none !important; }
    .header-mobile-row { display: flex; }
    .site-header { padding: 16px 20px; }
    .header-spacer { height: 82px; }
}
@media (min-width: 992px) {
    .header-mobile-row { display: none !important; }
    .mobile-canvas { display: none !important; }
    .mobile-overlay { display: none !important; }
}

/* الرئيسية: فيديو الهيرو يبدأ من أعلى الصفحة خلف الهيدر — بدون شريط أبيض */
body.home-fm-page body.home-fm-page .header-spacer {
body.home-fm-page     height: 0 !important;
body.home-fm-page }
body.home-fm-page body.home-fm-page .site-header {
body.home-fm-page     background: transparent !important;
body.home-fm-page     box-shadow: none;
body.home-fm-page }
body.home-fm-page body.home-fm-page .cube-fm-animate-section:first-of-type {
body.home-fm-page     margin-top: 0;
body.home-fm-page     padding-top: 0;
body.home-fm-page }

/* كل الصفحات (عدا الرئيسية): الهيدر فوق التدرج + بدون spacer */
body:not(.home-fm-page) .site-header {
    background: transparent !important;
}
body:not(.home-fm-page) .header-spacer {
    height: 0 !important;
}
body:not(.home-fm-page) {
    background-image: var(--page-bg-gradient) !important;
}

/* توزيع هيرو الصفحات الداخلية:
   EN: النص يسار + الصورة يمين
   AR: النص يمين + الصورة يسار */
body:not(.home-fm-page) [dir="ltr"] .contact-wix-page .contact-wix-hero .row > .col-lg-7 {
    order: 1;
    text-align: left;
}
body:not(.home-fm-page) [dir="ltr"] .contact-wix-page .contact-wix-hero .row > .col-lg-5 {
    order: 2;
    text-align: right;
}
body:not(.home-fm-page) [dir="rtl"] .contact-wix-page .contact-wix-hero .row > .col-lg-7 {
    order: 2;
    text-align: right;
}
body:not(.home-fm-page) [dir="rtl"] .contact-wix-page .contact-wix-hero .row > .col-lg-5 {
    order: 1;
    text-align: left;
}
body:not(.home-fm-page) [dir="ltr"] .contact-wix-page .contact-wix-hero .contact-wix-eyebrow,
body:not(.home-fm-page) [dir="ltr"] .contact-wix-page .contact-wix-hero h1,
body:not(.home-fm-page) [dir="ltr"] .contact-wix-page .contact-wix-hero p {
    text-align: left;
}
body:not(.home-fm-page) [dir="rtl"] .contact-wix-page .contact-wix-hero .contact-wix-eyebrow,
body:not(.home-fm-page) [dir="rtl"] .contact-wix-page .contact-wix-hero h1,
body:not(.home-fm-page) [dir="rtl"] .contact-wix-page .contact-wix-hero p {
    text-align: right;
}

/* توحيد الاستايل على نمط request لجميع الصفحات غير الرئيسية */
body:not(.home-fm-page) .contact-wix-page,
body:not(.home-fm-page) .request-wix-page,
body:not(.home-fm-page) .projects-wix-page,
body:not(.home-fm-page) .about-wix-page,
body:not(.home-fm-page) .services-wix,
body:not(.home-fm-page) .project-detail-wix {
    background: transparent !important;
    color: var(--page-text) !important;
}

body:not(.home-fm-page) .contact-wix-page .contact-wix-hero-bg,
body:not(.home-fm-page) .request-wix-page .request-wix-hero-bg,
body:not(.home-fm-page) .projects-wix-page .contact-wix-hero-bg,
body:not(.home-fm-page) .about-wix-page .contact-wix-hero-bg,
body:not(.home-fm-page) .services-wix .contact-wix-hero-bg {
    background:
        radial-gradient(circle at 18% 30%, rgba(20, 191, 138, 0.16), transparent 36%),
        radial-gradient(circle at 84% 70%, rgba(20, 191, 138, 0.11), transparent 40%),
        var(--page-bg-soft) !important;
}
html.theme-dark .contact-wix-page .contact-wix-hero-bg,
html.theme-dark .request-wix-page .request-wix-hero-bg,
html.theme-dark .projects-wix-page .contact-wix-hero-bg,
html.theme-dark .about-wix-page .contact-wix-hero-bg,
html.theme-dark .services-wix .contact-wix-hero-bg {
    background:
        radial-gradient(circle at 18% 30%, rgba(20, 191, 138, 0.2), transparent 38%),
        radial-gradient(circle at 84% 70%, rgba(20, 191, 138, 0.14), transparent 42%),
        #10181c !important;
}

body:not(.home-fm-page) .contact-wix-page h1, .contact-wix-page h2, .contact-wix-page h3, .contact-wix-page h4,
body:not(.home-fm-page) .request-wix-page h1, .request-wix-page h2, .request-wix-page h3, .request-wix-page h4,
body:not(.home-fm-page) .project-detail-wix h1, .project-detail-wix h2, .project-detail-wix h3, .project-detail-wix h4 {
    color: var(--page-text) !important;
}
body:not(.home-fm-page) .contact-wix-page p, .request-wix-page p, .project-detail-wix p,
body:not(.home-fm-page) .contact-wix-page .text-muted, .request-wix-page .text-muted, .project-detail-wix .text-muted {
    color: var(--page-text-muted) !important;
}

body:not(.home-fm-page) .contact-wix-page .contact-wix-form-wrap,
body:not(.home-fm-page) .contact-wix-page .about-adj-card,
body:not(.home-fm-page) .contact-wix-page .svc-wix-row,
body:not(.home-fm-page) .contact-wix-page .proj-fm-card-wrap,
body:not(.home-fm-page) .contact-wix-page .proj-fm-filter-wrap,
body:not(.home-fm-page) .request-wix-page .request-wix-gallery,
body:not(.home-fm-page) .request-wix-page .request-wix-card,
body:not(.home-fm-page) .request-wix-page .request-wix-form-wrap,
body:not(.home-fm-page) .project-detail-wix .proj-detail-meta-card,
body:not(.home-fm-page) .project-detail-wix .proj-detail-content {
    background: var(--page-card-bg) !important;
    border-color: var(--page-border) !important;
    color: var(--page-text) !important;
    box-shadow: var(--page-shadow) !important;
}

body:not(.home-fm-page) .contact-wix-page .form-control,
body:not(.home-fm-page) .contact-wix-page .form-select,
body:not(.home-fm-page) .request-wix-page .form-control,
body:not(.home-fm-page) .request-wix-page .form-select,
body:not(.home-fm-page) .project-detail-wix .form-control,
body:not(.home-fm-page) .project-detail-wix .form-select {
    background: var(--page-bg-soft) !important;
    color: var(--page-text) !important;
    border-color: var(--page-border) !important;
}
html.theme-dark .contact-wix-page .form-control::placeholder,
html.theme-dark .request-wix-page .form-control::placeholder {
    color: #9db0ba !important;
}

body:not(.home-fm-page) .contact-wix-page .contact-wix-hero-btn,
body:not(.home-fm-page) .contact-wix-page .contact-wix-submit,
body:not(.home-fm-page) .contact-wix-page .svc-wix-pill,
body:not(.home-fm-page) .request-wix-page .request-wix-hero-btn,
body:not(.home-fm-page) .request-wix-page .request-wix-submit,
body:not(.home-fm-page) .request-wix-page .jobs-cv-pill-inner,
body:not(.home-fm-page) .btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
body:not(.home-fm-page) .contact-wix-page .contact-wix-hero-btn:hover,
body:not(.home-fm-page) .contact-wix-page .contact-wix-submit:hover,
body:not(.home-fm-page) .request-wix-page .request-wix-hero-btn:hover,
body:not(.home-fm-page) .request-wix-page .request-wix-submit:hover,
body:not(.home-fm-page) .btn-primary:hover {
    background: var(--accent-strong) !important;
    border-color: var(--accent-strong) !important;
}

/* نفس نمط contact لباقي الصفحات: نصوص أوضح + نزول الكروت الأساسية */
html.theme-dark .contact-wix-page .contact-wix-eyebrow,
html.theme-dark .contact-wix-page h1,
html.theme-dark .contact-wix-page h2,
html.theme-dark .contact-wix-page h3,
html.theme-dark .contact-wix-page h4,
html.theme-dark .request-wix-page .request-wix-eyebrow,
html.theme-dark .request-wix-page h1,
html.theme-dark .request-wix-page h2,
html.theme-dark .request-wix-page h3,
html.theme-dark .request-wix-page h4,
html.theme-dark .project-detail-wix h1,
html.theme-dark .project-detail-wix h2,
html.theme-dark .project-detail-wix h3 {
    color: #f7fcff !important;
}
html.theme-dark .contact-wix-page p,
html.theme-dark .contact-wix-page li,
html.theme-dark .contact-wix-page small,
html.theme-dark .request-wix-page p,
html.theme-dark .request-wix-page li,
html.theme-dark .request-wix-page small,
html.theme-dark .project-detail-wix p,
html.theme-dark .project-detail-wix li,
html.theme-dark .project-detail-wix small,
html.theme-dark .projects-wix-page p,
html.theme-dark .projects-wix-page li,
html.theme-dark .about-wix-page p,
html.theme-dark .about-wix-page li,
html.theme-dark .services-wix p,
html.theme-dark .services-wix li {
    color: #deedf4 !important;
    opacity: 1 !important;
}
html.theme-dark .contact-wix-page .form-control,
html.theme-dark .contact-wix-page textarea,
html.theme-dark .request-wix-page .form-control,
html.theme-dark .request-wix-page textarea,
html.theme-dark .project-detail-wix .form-control,
html.theme-dark .project-detail-wix textarea {
    color: #f2fbff !important;
}
html.theme-dark .contact-wix-page .form-control::placeholder,
html.theme-dark .contact-wix-page textarea::placeholder,
html.theme-dark .request-wix-page .form-control::placeholder,
html.theme-dark .request-wix-page textarea::placeholder {
    color: #bcd0da !important;
    opacity: 1 !important;
}

body:not(.home-fm-page) .contact-wix-page .contact-wix-form-wrap,
body:not(.home-fm-page) .request-wix-page .request-wix-form-wrap,
body:not(.home-fm-page) .projects-wix-page .proj-fm-card-wrap,
body:not(.home-fm-page) .services-wix .contact-wix-form-wrap {
    margin-top: 85px !important;
}
@media (max-width: 991.98px) {
body:not(.home-fm-page) .contact-wix-page .contact-wix-form-wrap,
body:not(.home-fm-page) .request-wix-page .request-wix-form-wrap,
body:not(.home-fm-page) .projects-wix-page .proj-fm-card-wrap,
body:not(.home-fm-page) .services-wix .contact-wix-form-wrap {
        margin-top: 42px !important;
    }
}