/* =========================================================
   AL FIRDAWS MEDIA — UI TRIAL 07
   Focus:
   1) Fix "للنمو" in About hero
   2) Remove overlap between icon/number and service titles
   3) Preserve approved card style from Trial 06
========================================================= */

:root {
    --t7-card-bg: linear-gradient(180deg, rgba(12,18,30,0.97) 0%, rgba(9,14,24,0.99) 100%);
    --t7-card-border: rgba(255, 48, 48, 0.88);
    --t7-text-main: #ffffff;
    --t7-text-soft: rgba(233, 239, 248, 0.82);
}

/* Shared approved dark card look */
.about-ecosystem .ecosystem-step,
.services-preview .services-grid article,
.services-page .service-card,
.about-direction .direction-panel {
    position: relative !important;
    isolation: isolate;
    overflow: hidden !important;
    background: var(--t7-card-bg) !important;
    border: 1.5px solid var(--t7-card-border) !important;
    border-radius: 28px !important;
    box-shadow:
        0 0 0 1px rgba(255, 48, 48, 0.08),
        0 16px 42px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.035) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.about-ecosystem .ecosystem-step::before,
.services-preview .services-grid article::before,
.services-page .service-card::before,
.about-direction .direction-panel::before {
    content: "" !important;
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 48, 48, 0.10), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(0, 100, 255, 0.16), transparent 38%);
    pointer-events: none;
}

.about-ecosystem .ecosystem-step::after,
.services-preview .services-grid article::after,
.services-page .service-card::after {
    content: "" !important;
    position: absolute;
    top: -35%;
    left: -42%;
    width: 20%;
    height: 180%;
    z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
    transform: rotate(16deg);
    animation: trial07Shine 7.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes trial07Shine {
    0%, 76% { left: -42%; }
    100% { left: 122%; }
}

.about-ecosystem .ecosystem-step > *,
.services-preview .services-grid article > *,
.services-page .service-card > *,
.about-direction .direction-panel > * {
    position: relative;
    z-index: 2;
}

/* ---------------------------------------------------------
   ABOUT HERO
--------------------------------------------------------- */
.about-hero {
    background:
        radial-gradient(circle at 78% 16%, rgba(255, 48, 48, 0.18), transparent 28%),
        radial-gradient(circle at 20% 80%, rgba(0, 100, 255, 0.16), transparent 30%),
        linear-gradient(180deg, #070b14 0%, #08111d 60%, #060a11 100%) !important;
}

html[dir="rtl"] .about-hero-content h1 {
    line-height: 1.20 !important;
    max-width: 9.8ch;
}

html[dir="rtl"] .about-growth-word {
    display: inline !important;
    position: static !important;
    transform: none !important;
    margin-inline-start: 0.18em !important;
    white-space: nowrap !important;
    color: #ff3030 !important;
    font-family: 'Almarai', sans-serif !important;
    font-weight: 800 !important;
}

/* ---------------------------------------------------------
   ABOUT ECOSYSTEM STEPS
--------------------------------------------------------- */
.about-ecosystem {
    background: #080d14 !important;
}

.about-ecosystem .ecosystem-flow {
    gap: 18px !important;
}

.about-ecosystem .ecosystem-step {
    min-height: 126px !important;
    padding: 22px 24px !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
}

.about-ecosystem .ecosystem-step span {
    position: absolute;
    top: 18px;
    inset-inline-end: 20px;
    margin: 0 !important;
    color: #ff3b3b !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.about-ecosystem .ecosystem-step h3 {
    margin: 0 !important;
    padding-top: 18px;
    color: var(--t7-text-main) !important;
    font-size: clamp(1.3rem, 2vw, 1.6rem) !important;
    line-height: 1.25 !important;
}

html[dir="rtl"] .about-ecosystem .ecosystem-step { text-align: right !important; }
html[dir="ltr"] .about-ecosystem .ecosystem-step { text-align: left !important; }

/* ---------------------------------------------------------
   HOME SERVICES PREVIEW
--------------------------------------------------------- */
.services-preview .services-grid { gap: 22px !important; }

.services-preview .services-grid article {
    min-height: 288px !important;
    padding: 28px 24px 26px !important;
}

.services-preview .home-service-number {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px !important;
    margin-bottom: 20px !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    background: rgba(255,255,255,0.045) !important;
    border: 1px solid rgba(255, 48, 48, 0.55) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.services-preview .services-grid article h3 {
    color: #ffffff !important;
    margin: 0 0 14px !important;
    font-size: clamp(1.2rem, 2vw, 1.55rem) !important;
    line-height: 1.42 !important;
    text-wrap: balance;
}

.services-preview .services-grid article p {
    color: var(--t7-text-soft) !important;
    margin: 0 !important;
    line-height: 1.9 !important;
}

/* ---------------------------------------------------------
   SERVICES PAGE
--------------------------------------------------------- */
.services-page {
    background:
        radial-gradient(circle at top right, rgba(255, 48, 48, 0.12), transparent 26%),
        radial-gradient(circle at top left, rgba(0, 100, 255, 0.12), transparent 24%),
        linear-gradient(180deg, #070b14 0%, #08111d 100%) !important;
}

.services-page .services-grid { gap: 22px !important; }

.services-page .service-card {
    min-height: 334px !important;
    padding: 136px 26px 28px !important;
    text-align: start;
}

.services-page .service-number,
.services-page .service-icon {
    top: 22px !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    background: rgba(255,255,255,0.045) !important;
    border: 1px solid rgba(255, 48, 48, 0.55) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
    color: #ffffff !important;
}

.services-page .service-number {
    position: absolute !important;
    left: 22px !important;
    right: auto !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
}

.services-page .service-icon {
    position: absolute !important;
    right: 22px !important;
    left: auto !important;
}

.services-page .service-icon svg {
    width: 28px !important;
    height: 28px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.8 !important;
}

.services-page .service-card h3 {
    color: #ffffff !important;
    margin: 0 0 16px !important;
    font-size: clamp(1.34rem, 2vw, 1.72rem) !important;
    line-height: 1.42 !important;
    max-width: 100% !important;
    text-wrap: balance;
    min-height: 3.0em;
}

.services-page .service-card p {
    color: var(--t7-text-soft) !important;
    margin: 0 !important;
    line-height: 1.95 !important;
    font-size: 1rem !important;
}

html[dir="rtl"] .services-page .service-card {
    text-align: right !important;
}

html[dir="rtl"] .services-page .service-number {
    left: 22px !important;
    right: auto !important;
}

html[dir="rtl"] .services-page .service-icon {
    right: 22px !important;
    left: auto !important;
}

html[dir="rtl"] .services-page .service-card h3 {
    padding-inline: 86px 86px !important;
}

html[dir="ltr"] .services-page .service-card h3 {
    padding-inline: 86px 86px !important;
}

/* Direction panels keep approved look */
.about-direction .direction-panel {
    box-shadow: 0 0 0 1px rgba(255,48,48,0.08), 0 16px 42px rgba(0,0,0,0.24) !important;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 991px) {
    .about-ecosystem .ecosystem-flow {
        grid-template-columns: 1fr !important;
    }

    .about-ecosystem .ecosystem-step,
    .services-preview .services-grid article,
    .services-page .service-card {
        min-height: auto !important;
    }
}

@media (max-width: 640px) {
    .about-hero-content h1 {
        font-size: clamp(2.25rem, 8.3vw, 3.55rem) !important;
        line-height: 1.18 !important;
    }

    html[dir="rtl"] .about-hero-content h1 {
        max-width: 9.3ch;
    }

    html[dir="rtl"] .about-growth-word {
        margin-inline-start: 0.14em !important;
    }

    .about-ecosystem .ecosystem-step {
        border-radius: 24px !important;
        padding: 20px 22px !important;
    }

    .about-ecosystem .ecosystem-step span {
        top: 18px;
        inset-inline-end: 20px;
        font-size: .98rem !important;
    }

    .about-ecosystem .ecosystem-step h3 {
        padding-top: 16px;
        font-size: 1.05rem !important;
    }

    .services-preview .services-grid article {
        border-radius: 24px !important;
        padding: 24px 20px 22px !important;
    }

    .services-preview .home-service-number {
        width: 54px;
        height: 54px;
        border-radius: 17px !important;
        margin-bottom: 18px !important;
    }

    .services-preview .services-grid article h3 {
        font-size: 1.14rem !important;
        line-height: 1.45 !important;
    }

    .services-page .service-card {
        border-radius: 24px !important;
        padding: 124px 20px 22px !important;
    }

    .services-page .service-number,
    .services-page .service-icon {
        top: 18px !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 18px !important;
    }

    .services-page .service-number { left: 18px !important; }
    .services-page .service-icon { right: 18px !important; }

    .services-page .service-card h3 {
        font-size: 1.16rem !important;
        line-height: 1.42 !important;
        padding-inline: 70px 70px !important;
        min-height: 2.9em;
    }

    .services-page .service-card p,
    .services-preview .services-grid article p {
        font-size: .98rem !important;
    }
}

/* =========================================================
   AL FIRDAWS MEDIA — UI TRIAL 10
   SAFE CSS-ONLY RTL alignment fix
   Arabic numbers on the RIGHT, icons on the LEFT.
   No template changes.
========================================================= */

/* About ecosystem cards: number to the right in Arabic */
html[dir="rtl"] .about-ecosystem .ecosystem-step span {
    right: 20px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
}

/* About vision/mission ghost number to the right in Arabic */
html[dir="rtl"] .about-direction .direction-number {
    right: 24px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
}

/* Home services preview: number block aligned right in Arabic */
html[dir="rtl"] .services-preview .home-service-number {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Services page: Arabic number RIGHT, icon LEFT */
html[dir="rtl"] .services-page .service-number {
    right: 22px !important;
    left: auto !important;
}

html[dir="rtl"] .services-page .service-icon {
    left: 22px !important;
    right: auto !important;
}

/* Keep titles clear of both top boxes */
html[dir="rtl"] .services-page .service-card h3 {
    padding-right: 76px !important;
    padding-left: 76px !important;
    text-align: center !important;
}

/* Arabic service body stays clean and balanced */
html[dir="rtl"] .services-page .service-card p {
    text-align: right !important;
}

@media (max-width: 640px) {
    html[dir="rtl"] .about-ecosystem .ecosystem-step span {
        right: 18px !important;
        left: auto !important;
    }

    html[dir="rtl"] .about-direction .direction-number {
        right: 18px !important;
        left: auto !important;
    }

    html[dir="rtl"] .services-page .service-number {
        right: 18px !important;
        left: auto !important;
    }

    html[dir="rtl"] .services-page .service-icon {
        left: 18px !important;
        right: auto !important;
    }

    html[dir="rtl"] .services-page .service-card h3 {
        padding-right: 62px !important;
        padding-left: 62px !important;
    }
}

/* =========================================================
   AL FIRDAWS MEDIA — UI TRIAL 12
   ABOUT PAGE VISUAL REFINEMENT
   - Arabic hero title locked to two lines
   - One red tone (#ff3030) for all red accents
   - Vision/Mission numbers become LEFT visual badges, not ghost text
   - No content wording changes
========================================================= */

:root {
    --af-red-final: #ff3030;
    --af-red-border: rgba(255, 48, 48, 0.72);
    --af-red-soft: rgba(255, 48, 48, 0.14);
}

/* ---------------------------------------------------------
   ABOUT HERO — EXACTLY TWO ARABIC LINES
--------------------------------------------------------- */
html[dir="rtl"] .about-hero-content h1.about-hero-title-ar {
    max-width: 100% !important;
    margin: 0 0 26px !important;
    font-family: "Almarai", "IBM Plex Sans Arabic", sans-serif !important;
    font-size: clamp(2.15rem, 6.9vw, 4.2rem) !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
}

html[dir="rtl"] .about-hero-title-ar .about-title-line {
    display: block !important;
    white-space: nowrap !important;
}

html[dir="rtl"] .about-hero-title-ar .about-title-line + .about-title-line {
    margin-top: 0.12em !important;
}

html[dir="rtl"] .about-hero-title-ar .about-growth-word {
    display: inline !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 0 0 .08em !important;
    color: var(--af-red-final) !important;
    white-space: nowrap !important;
    font: inherit !important;
}

/* ---------------------------------------------------------
   UNIFY ALL ABOUT RED ACCENTS
--------------------------------------------------------- */
html[dir="rtl"] .about-page .about-label,
html[dir="rtl"] .about-page .section-label,
html[dir="rtl"] .about-page .ecosystem-step span,
html[dir="rtl"] .about-page .strength-index,
html[dir="rtl"] .about-page .process-step span {
    color: var(--af-red-final) !important;
}

html[dir="rtl"] .about-page .ecosystem-step,
html[dir="rtl"] .about-page .direction-panel {
    border-color: var(--af-red-border) !important;
}

/* ---------------------------------------------------------
   VISION / MISSION — NUMBER BADGE LEFT, LABEL RIGHT
--------------------------------------------------------- */
html[dir="rtl"] .about-direction .direction-panel {
    position: relative !important;
    padding: 118px 30px 34px !important;
    min-height: 400px !important;
}

html[dir="rtl"] .about-direction .direction-number {
    position: absolute !important;
    top: 28px !important;
    left: 28px !important;
    right: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    width: 72px !important;
    height: 72px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 22px !important;
    border: 1px solid var(--af-red-border) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 10px 24px rgba(0,0,0,0.18) !important;
    color: rgba(255,255,255,0.92) !important;
    font-family: "IBM Plex Sans", Arial, sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .02em !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    z-index: 4 !important;
}

html[dir="rtl"] .about-direction .direction-panel > .section-label {
    position: absolute !important;
    top: 43px !important;
    right: 30px !important;
    left: auto !important;
    margin: 0 !important;
    color: var(--af-red-final) !important;
    font-family: "Almarai", "IBM Plex Sans Arabic", sans-serif !important;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    z-index: 4 !important;
}

html[dir="rtl"] .about-direction .direction-panel h2 {
    margin-top: 0 !important;
    color: #fff !important;
    font-family: "Almarai", "IBM Plex Sans Arabic", sans-serif !important;
    font-size: clamp(1.55rem, 4.4vw, 2.55rem) !important;
    line-height: 1.42 !important;
    text-wrap: balance !important;
}

html[dir="rtl"] .about-direction .direction-panel p {
    color: rgba(233,239,248,0.78) !important;
    line-height: 1.9 !important;
}

/* Remove the old ghost-number effect entirely in RTL */
html[dir="rtl"] .about-direction .direction-number::before,
html[dir="rtl"] .about-direction .direction-number::after {
    content: none !important;
}

/* ---------------------------------------------------------
   ECOSYSTEM / PROCESS — SAME RED, CLEAN NUMBERS
--------------------------------------------------------- */
html[dir="rtl"] .about-ecosystem .ecosystem-step span {
    color: var(--af-red-final) !important;
}

html[dir="rtl"] .about-process .process-step span {
    border-color: rgba(255,48,48,0.52) !important;
    color: var(--af-red-final) !important;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */
@media (max-width: 640px) {
    html[dir="rtl"] .about-hero-content h1.about-hero-title-ar {
        font-size: clamp(1.95rem, 8.1vw, 2.55rem) !important;
        line-height: 1.14 !important;
    }

    html[dir="rtl"] .about-direction .direction-panel {
        padding: 102px 22px 26px !important;
        min-height: auto !important;
    }

    html[dir="rtl"] .about-direction .direction-number {
        top: 22px !important;
        left: 22px !important;
        width: 62px !important;
        height: 62px !important;
        border-radius: 19px !important;
        font-size: 1rem !important;
    }

    html[dir="rtl"] .about-direction .direction-panel > .section-label {
        top: 37px !important;
        right: 22px !important;
        font-size: 1rem !important;
    }

    html[dir="rtl"] .about-direction .direction-panel h2 {
        font-size: 1.32rem !important;
        line-height: 1.5 !important;
    }
}

/* =========================================================
   AL FIRDAWS MEDIA — UI TRIAL 13
   - English Growth uses the same approved red
   - Vision/Mission LTR numbers become real badges (not ghost text)
   - Strength cards use one consistent background, including Data-Driven
========================================================= */

/* ENGLISH HERO — color Growth only */
html[dir="ltr"] .about-hero-title-en .about-growth-word-en {
    color: var(--af-red-final, #ff3030) !important;
    font: inherit !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

/* STRENGTHS — make all four cards visually identical in base background */
.about-strengths .strength-item,
.about-strengths .strength-item:nth-child(1),
.about-strengths .strength-item:nth-child(2),
.about-strengths .strength-item:nth-child(3),
.about-strengths .strength-item:nth-child(4) {
    background: linear-gradient(180deg, rgba(12,18,30,0.97) 0%, rgba(9,14,24,0.99) 100%) !important;
    border-top-color: var(--af-red-final, #ff3030) !important;
    box-shadow:
        0 0 0 1px rgba(255,48,48,0.05),
        0 14px 34px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.025) !important;
}

.about-strengths .strength-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,48,48,0.055), transparent 32%),
        radial-gradient(circle at 100% 100%, rgba(0,100,255,0.08), transparent 36%);
    pointer-events: none;
}

.about-strengths .strength-item > * {
    position: relative;
    z-index: 2;
}

/* ENGLISH VISION / MISSION — label LEFT, number badge RIGHT */
html[dir="ltr"] .about-direction .direction-panel {
    position: relative !important;
    padding: 118px 30px 34px !important;
    min-height: 400px !important;
}

html[dir="ltr"] .about-direction .direction-number {
    position: absolute !important;
    top: 28px !important;
    right: 28px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    width: 72px !important;
    height: 72px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 22px !important;
    border: 1px solid var(--af-red-border, rgba(255,48,48,0.72)) !important;
    background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 10px 24px rgba(0,0,0,0.18) !important;
    color: rgba(255,255,255,0.92) !important;
    font-family: "IBM Plex Sans", Arial, sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .02em !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    z-index: 4 !important;
}

html[dir="ltr"] .about-direction .direction-panel > .section-label {
    position: absolute !important;
    top: 43px !important;
    left: 30px !important;
    right: auto !important;
    margin: 0 !important;
    color: var(--af-red-final, #ff3030) !important;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    z-index: 4 !important;
}

html[dir="ltr"] .about-direction .direction-panel h2 {
    margin-top: 0 !important;
}

@media (max-width: 640px) {
    html[dir="ltr"] .about-direction .direction-panel {
        padding: 102px 22px 26px !important;
        min-height: auto !important;
    }

    html[dir="ltr"] .about-direction .direction-number {
        top: 22px !important;
        right: 22px !important;
        width: 62px !important;
        height: 62px !important;
        border-radius: 19px !important;
        font-size: 1rem !important;
    }

    html[dir="ltr"] .about-direction .direction-panel > .section-label {
        top: 37px !important;
        left: 22px !important;
        font-size: 1rem !important;
    }
}


/* =========================================================
   AL FIRDAWS MEDIA — UI TRIAL 14
   Final About-section background continuity fix
   - Normalize section 4 background behind card 04
   - Smooth transition into How We Work section
========================================================= */

.about-strengths {
    position: relative !important;
    isolation: isolate;
    background:
        radial-gradient(circle at 14% 18%, rgba(255, 48, 48, 0.06), transparent 30%),
        radial-gradient(circle at 86% 78%, rgba(0, 100, 255, 0.08), transparent 34%),
        linear-gradient(180deg, #08111c 0%, #07101a 68%, #060b12 100%) !important;
}

.about-strengths::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    background: linear-gradient(180deg, rgba(6, 11, 18, 0) 0%, #060b12 100%);
    pointer-events: none;
    z-index: 0;
}

.about-strengths .container {
    position: relative;
    z-index: 1;
}

.about-process {
    position: relative !important;
    background: linear-gradient(180deg, #060b12 0%, #060b12 100%) !important;
}

/* =========================================================
   ENGLISH ABOUT SECTION LABELS — MATCH "Growth" RED
   Scope: About page, English only
========================================================= */
html[dir="ltr"] .about-page .about-label,
html[dir="ltr"] .about-page .section-label {
    color: var(--af-red-final, #ff3030) !important;
}

/* =========================================================
   ENGLISH ABOUT LABELS — MATCH VISION / MISSION TYPOGRAPHY
   Same red, size, weight and line-height. Position unchanged.
========================================================= */
html[dir="ltr"] .about-page .about-label,
html[dir="ltr"] .about-page .section-label {
    color: var(--af-red-final, #ff3030) !important;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

@media (max-width: 640px) {
    html[dir="ltr"] .about-page .about-label,
    html[dir="ltr"] .about-page .section-label {
        font-size: 1rem !important;
    }
}
