/* ==========================================================================
   Home "image with content block" (#about): sunset photo card
   dark / light / mobile / Arabic. Navbar, hero, fonts and texts untouched.
   The existing red hover of the card (site-overrides.css) is kept.
   ========================================================================== */

#about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/c4e93b945c968e2b6833f002-home-3.avif");
    --ab-ink: #1b1f26;
    --ab-sub: #2b3038;
    --ab-card: rgba(255, 255, 255, .94);
    --ab-card-line: rgba(27, 31, 38, .08);
    --ab-divider: rgba(27, 31, 38, .14);
    --ab-red: var(--site-red, #e53935);
    padding: 3.4rem 3.4rem 2.6rem;
    border-radius: 28px;
    color: var(--ab-ink);
}

[data-theme="dark"] #about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/c4e93b945c968e2b6833f002-home-3.avif");
    --ab-ink: #ffffff;
    --ab-sub: rgba(255, 255, 255, .9);
    --ab-card: rgba(38, 42, 48, .78);
    --ab-card-line: rgba(255, 255, 255, .16);
    --ab-divider: rgba(255, 255, 255, .16);
    background: transparent;
    border-color: #2a2f37;
}

/* ---------- Photo (replaces the old stock image) ---------- */
#about .about-card.about-card-photo .about-card-bg {
    inset: 0 0 0 auto;
    width: 62%;
    opacity: 1;
    background: var(--ab-photo) 85% 30% / cover no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
    mask-image: linear-gradient(to right, transparent 0, #000 38%);
}

/* ---------- Text ---------- */
#about .about-card.about-card-photo .company-glass-card {
    max-width: none;
}

#about .about-card.about-card-photo .company-glass-card>p.text-uppercase {
    color: var(--ab-red);
    font-weight: 700;
    letter-spacing: .5em;
    font-size: .85rem;
}

html[dir="rtl"] #about .about-card.about-card-photo .company-glass-card>p.text-uppercase {
    letter-spacing: 0;
    font-size: 1.05rem;
}

#about .about-card.about-card-photo .title-style {
    max-width: 560px;
    color: var(--ab-ink);
    line-height: 1.15;
}

#about .about-card.about-card-photo .about-rule {
    display: block;
    width: 14rem;
    max-width: 100%;
    height: 2px;
    margin: 1.4rem 0 1.3rem;
    background: var(--ab-red);
}

#about .about-card.about-card-photo .about-text {
    max-width: 600px;
    margin: 0 0 1.8rem;
    line-height: 1.75;
    color: var(--ab-sub);
}

#about .about-card.about-card-photo .about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-bottom: 2.4rem;
}

#about .about-card.about-card-photo .about-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin: 0;
}

html[dir="rtl"] #about .about-card.about-card-photo .about-actions .fa-arrow-right {
    transform: scaleX(-1);
}

/* ---------- Feature bar ---------- */
#about .about-card.about-card-photo ul.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 1.2rem 0;
    list-style: none;
    border: 1px solid var(--ab-card-line);
    border-radius: 18px;
    background: var(--ab-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .14);
}

#about .about-card.about-card-photo ul.about-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: .4rem 1.6rem;
    color: var(--ab-ink);
    font-weight: 600;
}

#about .about-card.about-card-photo ul.about-features li+li {
    border-inline-start: 1px solid var(--ab-divider);
}

#about .about-card.about-card-photo .about-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ab-red);
    color: #fff;
    font-size: 1.3rem;
    transition: box-shadow .25s ease;
}

#about .about-card.about-card-photo .about-icon i {
    margin: 0;
    color: #fff;
}

#about .about-card.about-card-photo .about-feature-text {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
    line-height: 1.4;
}

#about .about-card.about-card-photo .about-feature-line {
    display: block;
    width: 34px;
    height: 2px;
    background: var(--ab-red);
    transition: width .3s ease;
}

#about .about-card.about-card-photo ul.about-features li:hover .about-icon {
    box-shadow: 0 0 0 6px rgba(229, 57, 53, .25);
}

#about .about-card.about-card-photo ul.about-features li:hover .about-feature-line {
    width: 64px;
}

/* ---------- Arabic (RTL): use the Arabic photo in light and dark mode ---------- */
html[dir="rtl"] #about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/a64e135a8caf8adf810c9e9b-home-4.avif");
}

/* keep the original Arabic dark-mode photo */
html[dir="rtl"][data-theme="dark"] #about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/a64e135a8caf8adf810c9e9b-home-4.avif");
}

/* ---------- Arabic (RTL): photo on the left, flipped compared to English ---------- */
html[dir="rtl"] #about .about-card.about-card-photo .about-card-bg {
    inset: 0 auto 0 0;
    background-position: 20% 30%;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 38%);
    mask-image: linear-gradient(to left, transparent 0, #000 38%);
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
    #about .about-card.about-card-photo {
        padding: 2.2rem 1.8rem 1.8rem;
    }

    #about .about-card.about-card-photo ul.about-features {
        grid-template-columns: 1fr;
        padding: .5rem 1.3rem;
    }

    #about .about-card.about-card-photo ul.about-features li {
        padding: 1rem 0;
    }

    #about .about-card.about-card-photo ul.about-features li+li {
        border-inline-start: 0;
        border-top: 1px solid var(--ab-divider);
    }
}

/* ---------- Mobile: photo behind the text, stacked features ---------- */
@media (max-width: 767px) {
    #about .about-card.about-card-photo {
        padding: 1.6rem 1.3rem 1.3rem !important;
        border-radius: 20px !important;
    }

    #about .about-card.about-card-photo .about-card-bg,
    html[dir="rtl"] #about .about-card.about-card-photo .about-card-bg {
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: auto !important;
        background-size: cover !important;
        background-position: center !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        opacity: 1 !important;
    }

    #about .about-card.about-card-photo .title-style::before,
    #about .about-card.about-card-photo .title-style::after {
        display: none !important;
    }

    #about .about-card.about-card-photo .about-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
    }

    html[dir="rtl"] #about .about-card.about-card-photo .about-actions,
    html[lang="ar"] #about .about-card.about-card-photo .about-actions {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        max-width: none;
        margin-inline-start: 0;
        margin-inline-end: 0;
    }

    #about .about-card.about-card-photo .about-actions .btn {
        justify-content: center;
    }

    html[dir="rtl"] #about .about-card.about-card-photo .about-actions .btn,
    html[lang="ar"] #about .about-card.about-card-photo .about-actions .btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: auto;
        min-width: 168px;
        max-width: none;
        height: 46px;
        padding: 10px 20px;
        border-radius: 3px;
        white-space: nowrap;
        margin: 0 0 0 auto;
        align-self: flex-start;
    }
}


/* ==========================================================================
   DARK MODE: photo fade like the reference (field-dark1).
   The dark photos already carry the soft fade into near-black on the text
   side, so the old hard-edged mask is removed and the photo covers the card.
   Light mode is untouched.
   ========================================================================== */
[data-theme="dark"] #about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/c4e93b945c968e2b6833f002-home-3.avif");
    background: transparent;
    border-color: #1f1f22;
}

html[dir="rtl"][data-theme="dark"] #about .about-card.about-card-photo {
    --ab-photo: url("https://user46471.na.imgto.link/public/20261019/a64e135a8caf8adf810c9e9b-home-4.avif");
}

[data-theme="dark"] #about .about-card.about-card-photo .about-card-bg,
html[dir="rtl"][data-theme="dark"] #about .about-card.about-card-photo .about-card-bg {
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    background: var(--ab-photo) center / cover no-repeat;
    -webkit-mask-image: none;
    mask-image: none;
}

[data-theme="dark"] #about .about-card.about-card-photo .about-card-bg::after {
    content: none;
    display: none;
}

/* ---------- Dark, mobile: photo on top, fading down into black ---------- */
@media (max-width: 767px) {

    [data-theme="dark"] #about .about-card.about-card-photo .about-card-bg,
    html[dir="rtl"][data-theme="dark"] #about .about-card.about-card-photo .about-card-bg {
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: auto !important;
        background-size: cover !important;
        background-position: center !important;
        opacity: 1 !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    [data-theme="dark"] #about .about-card.about-card-photo .about-card-bg::after {
        content: none;
        display: none;
    }

    [data-theme="dark"] #about .about-card.about-card-photo .company-glass-card::before {
        content: none;
        display: none;
    }
}


/* ==========================================================================
   LIGHT MODE, mobile: same organization as dark mode.
   Photo on top, fading down into the white card; text and features below.
   Desktop light mode is untouched.
   ========================================================================== */
@media (max-width: 767px) {

    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-card-bg,
    html[dir="rtl"]:not([data-theme="dark"]) #about .about-card.about-card-photo .about-card-bg {
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: auto !important;
        background-size: cover !important;
        background-position: center !important;
        opacity: 1 !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-card-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(to top, rgba(255, 255, 255, .88) 0, rgba(255, 255, 255, 0) 42%),
            linear-gradient(to bottom, rgba(255, 255, 255, .32) 0, rgba(255, 255, 255, 0) 24%);
    }

    html:not([data-theme="dark"]) #about .about-card.about-card-photo .company-glass-card::before {
        content: none;
        display: none;
    }
}

/* ---------- Text layout: clean, evenly balanced lines (English + Arabic) ---------- */
#about .about-card.about-card-photo .title-style {
    text-wrap: balance;
    letter-spacing: 0;
    word-spacing: normal;
}

#about .about-card.about-card-photo .about-text {
    margin: 0 0 1rem;
    text-align: start;
    text-justify: auto;
    text-wrap: pretty;
    letter-spacing: 0;
    word-spacing: normal;
    hyphens: manual;
}

#about .about-card.about-card-photo .about-text.about-text-2 {
    margin-bottom: 1.8rem;
}

html[dir="rtl"] #about .about-card.about-card-photo .title-style,
html[lang="ar"] #about .about-card.about-card-photo .title-style {
    max-width: 36.5rem;
    margin: 0;
    font-size: clamp(1.7rem, 2.15vw, 2.15rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: 0;
    word-spacing: normal;
    text-align: right;
    text-wrap: wrap;
}

html[dir="rtl"] #about .about-card.about-card-photo .title-style .i18n-line,
html[lang="ar"] #about .about-card.about-card-photo .title-style .i18n-line {
    display: block;
}

html[dir="rtl"] #about .about-card.about-card-photo .about-rule,
html[lang="ar"] #about .about-card.about-card-photo .about-rule {
    width: 14rem;
    max-width: 100%;
    height: 2px;
    margin: .72rem 0 .85rem;
}

html[dir="rtl"] #about .about-card.about-card-photo .about-text,
html[lang="ar"] #about .about-card.about-card-photo .about-text {
    max-width: 36.5rem;
    margin: 0;
    font-size: clamp(.82rem, .95vw, .95rem);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    word-spacing: normal;
    text-align: right;
    text-align-last: right;
    text-justify: auto;
    text-wrap: wrap;
}

html[dir="rtl"] #about .about-card.about-card-photo .about-text.about-text-2,
html[lang="ar"] #about .about-card.about-card-photo .about-text.about-text-2 {
    margin: .55rem 0 1.6rem;
}

html[dir="rtl"] #about .about-card.about-card-photo .about-text .i18n-line,
html[lang="ar"] #about .about-card.about-card-photo .about-text .i18n-line {
    display: block;
}

@media (min-width: 992px) {
    html[dir="rtl"] #about .about-card.about-card-photo .title-style .i18n-line,
    html[lang="ar"] #about .about-card.about-card-photo .title-style .i18n-line,
    html[dir="rtl"] #about .about-card.about-card-photo .about-text .i18n-line,
    html[lang="ar"] #about .about-card.about-card-photo .about-text .i18n-line {
        white-space: nowrap;
    }
}

@media (max-width: 991px) {
    #about .about-card.about-card-photo .about-rule {
        width: 10rem;
    }

    html[dir="rtl"] #about .about-card.about-card-photo .title-style,
    html[lang="ar"] #about .about-card.about-card-photo .title-style {
        max-width: 100%;
        font-size: clamp(1.45rem, 6.2vw, 1.85rem);
        line-height: 1.32;
    }

    html[dir="rtl"] #about .about-card.about-card-photo .about-rule,
    html[lang="ar"] #about .about-card.about-card-photo .about-rule {
        width: 10rem;
    }

    html[dir="rtl"] #about .about-card.about-card-photo .about-text,
    html[lang="ar"] #about .about-card.about-card-photo .about-text {
        max-width: 100%;
        font-size: clamp(.86rem, 3.5vw, .95rem);
        line-height: 1.6;
    }
}


/* ==========================================================================
   LIGHT MODE + MOBILE ONLY (English and Arabic): text over the photo becomes white.
   A dark scrim replaces the white fade so the white text stays readable.
   Dark mode and desktop are untouched.
   ========================================================================== */
@media (max-width: 767px) {

    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-card-bg::after {
        background:
            linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, .6) 60%, rgba(0, 0, 0, .7) 100%);
    }

    /* every text in the card (title, paragraphs, feature items) becomes white;
       the feature bar gets a dark glass background so its white text stays readable */
    html:not([data-theme="dark"]) #about .about-card.about-card-photo {
        --ab-ink: #ffffff;
        --ab-sub: rgba(255, 255, 255, .94);
        --ab-card: rgba(18, 22, 28, .72);
        --ab-card-line: rgba(255, 255, 255, .18);
        --ab-divider: rgba(255, 255, 255, .22);
        color: #fff;
    }

    html:not([data-theme="dark"]) #about .about-card.about-card-photo ul.about-features li,
    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-feature-text,
    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-feature-text span {
        color: #fff !important;
    }

    html:not([data-theme="dark"]) #about .about-card.about-card-photo .title-style,
    html:not([data-theme="dark"]) #about .about-card.about-card-photo .about-text {
        color: #fff !important;
        text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    }
}
