/* public/css/site/about-overview.css */

/* ========= About: Hero (Plain) ========= */
.about-hero {
    position: relative;
    color: #fff;
    display: flex;
    align-items: center;
    isolation: isolate;
    overflow: clip;
    padding-block: clamp(28px, 8vh, 72px);
}

.about-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    filter: contrast(0.92) brightness(0.9);
    z-index: -2;
}

.about-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.45) 0%,
            rgba(0, 0, 0, 0.65) 80%
        ),
        radial-gradient(
            1000px 480px at 50% -10%,
            rgba(0, 0, 0, 0.25),
            transparent 60%
        );
    z-index: -1;
}

.about-hero--plain {
    background: #000;
    color: #fff;
    padding-block: clamp(32px, 12vh, 92px);
}

.about-hero--plain::after {
    display: none;
}

.about-hero--plain .about-hero__bg,
.about-hero--plain .about-hero__fx {
    display: none !important;
}

.about-hero--plain .about-hero__center {
    text-align: center;
    max-width: 900px;
    margin-inline: auto;
}

.about-hero__headline {
    margin: 6px 0 6px;
    font-weight: 900;
    line-height: 1.12;
    font-size: clamp(30px, 6.8vw, 56px);
    letter-spacing: 0.1px;
}

.about-hero--plain .about-hero__headline {
    color: #fff;
}

.about-hero__line {
    display: block;
}

.about-hero__line--soft {
    opacity: 0.95;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-hero__divider {
    height: 2px;
    width: clamp(90px, 10vw, 140px);
    margin: 12px auto 12px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0.9;
}

.about-hero__lead {
    margin: 8px auto 12px;
    max-width: 66ch;
    font-size: clamp(15px, 2.2vw, 18px);
    font-weight: 800;
    color: #cfdae2;
}

@keyframes aboutFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.about-hero--plain .about-hero__headline,
.about-hero--plain .about-hero__divider,
.about-hero--plain .about-hero__lead {
    animation: aboutFadeUp 0.6s var(--reveal-ease, ease-out) both;
}

.about-hero--plain .about-hero__headline {
    animation-delay: 0.05s;
}

.about-hero--plain .about-hero__divider {
    animation-delay: 0.12s;
}

.about-hero--plain .about-hero__lead {
    animation-delay: 0.18s;
}

@media (max-width: 640px) {
    .about-hero--plain {
        padding-block: clamp(26px, 10vh, 64px);
    }
    .about-hero__lead {
        font-size: clamp(14px, 2.6vw, 16px);
    }
}

/* ========= Generic Section Layout ========= */

.section {
    padding-block: clamp(32px, 12vh, 92px);
}

.section__title {
    margin: 0;
    font-weight: 700;
    color: var(--black);
    font-size: clamp(20px, 4.4vw, 32px);
    letter-spacing: 0.2px;
}

.section__subtitle {
    margin: 6px 0 0;
    color: var(--muted);
}

/* ========= About Intro ========= */

.about-intro__head {
    margin-bottom: clamp(14px, 3vh, 22px);
}

.about-intro__head .section__title {
    letter-spacing: 0.15px;
}

.about-intro__head .section__subtitle {
    font-size: clamp(13px, 1.8vw, 14px);
    opacity: 0.95;
}

.about-intro__head--in-panel {
    margin: 0 0 10px;
}

.about-intro__head--in-panel .section__title {
    letter-spacing: 0.15px;
}

.about-intro__head--in-panel .section__subtitle {
    opacity: 0.95;
}

.about-intro__body p {
    margin: 0 0 10px;
    line-height: 1.75;
    color: var(--muted);
    font-weight: 700;
}

/* ========= Intro Photo (aside) ========= */

.intro-photo {
    position: relative;
    border-radius: 16px;
    overflow: clip;
    isolation: isolate;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease,
        border-color 0.22s ease;
    margin: 0 0 10px;
}

.intro-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    -webkit-mask: linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.45;
    pointer-events: none;
}

.intro-photo__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: saturate(1.02) contrast(1.02);
    transform: scale(1.002);
}

.intro-photo--monochrome .intro-photo__img {
    filter: grayscale(25%) contrast(1.05) saturate(0.9);
}

.intro-photo__cap {
    position: absolute;
    inset-inline: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(3px);
}

.intro-photo:hover,
.intro-photo:focus-within {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

/* ========= About Intro: Split Layout (Realty Overview) ========= */
.about-intro--split .about-intro__grid {
    direction: ltr;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "stats text";
    gap: clamp(14px, 3vw, 22px);
    align-items: start;
}

.about-intro__aside {
    grid-area: stats;
    direction: rtl;
    position: sticky;
    top: calc(var(--nav-h, 62px) + 16px);
    display: grid;
    gap: 10px;
    align-self: start;
}

.about-intro__panel {
    grid-area: text;
    direction: rtl;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: radial-gradient(
            900px 300px at 80% -10%,
            rgba(201, 165, 82, 0.12),
            transparent 60%
        ),
        linear-gradient(
            180deg,
            rgba(201, 165, 82, 0.06),
            rgba(201, 165, 82, 0.02)
        );
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    padding: clamp(14px, 2.6vw, 20px);
}

.about-intro__panel p {
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--muted);
}

.about-intro__panel--plain {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    grid-area: text;
    direction: rtl;
}

.about-intro__panel--plain *:hover {
    box-shadow: none;
}

.about-intro__panel--plain p {
    color: inherit;
    font-weight: inherit;
}

.about-intro__title {
    position: relative;
    padding-bottom: 6px;
}

/* ========= About Intro: Formal Stats (used in overview) ========= */

.about-intro__stats--formal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.mini-stat--formal {
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 12px;
    padding: 12px;
    box-shadow: none;
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "icon value"
        "icon label";
    align-items: center;
    gap: 8px 10px;
    transition: none;
}

.mini-stat--formal .mini-stat__icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--accent-ink);
    margin: 0;
}

.mini-stat--formal .mini-stat__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.4;
}

.mini-stat--formal .mini-stat__value {
    grid-area: value;
    line-height: 1;
    font-size: clamp(18px, 3.4vw, 20px);
    font-weight: 700;
    color: var(--black);
}

.mini-stat--formal .mini-stat__label {
    grid-area: label;
    margin-top: 2px;
    font-weight: 800;
    color: var(--muted);
    font-size: 13px;
}

.mini-stat--formal.mini-stat--compact {
    padding: 10px;
    grid-template-columns: 36px 1fr;
}

.mini-stat--formal.mini-stat--compact .mini-stat__icon {
    width: 36px;
    height: 36px;
    border-radius: 7px;
}

.mini-stat--formal.mini-stat--compact .mini-stat__value {
    font-size: clamp(20px, 3vw, 22px);
}

.mini-stat--formal.mini-stat--compact .mini-stat__label {
    font-size: 12px;
}

@media (max-width: 640px) {
    .about-intro__stats--formal {
        grid-template-columns: 1fr;
    }
}

/* ========= About Story – Full-bleed Image + Overlay Panel ========= */

.about-story {
    position: relative;
    isolation: isolate;
    padding-block: clamp(32px, 10vh, 80px);
    background: var(--section-background-color);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.about-story > .container {
    max-width: 100vw;
    width: 100vw;
    margin-inline: 0;
    padding-inline: 0;
}

.about-story__full {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 0;
}

.about-story__image {
    width: 75%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #000;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
}

.about-story__image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.08);
    transition: transform 0.5s ease, filter 0.3s ease;
}

.about-story__image:hover img,
.about-story__image:focus-within img {
    transform: scale(1.08);
    filter: saturate(1.1) contrast(1.1);
}

.about-story__panel {
    position: absolute;
    right: clamp(4%, 8vw, 10%);
    left: auto;
    top: 40%;
    transform: translateY(-50%);
    width: min(50vw, 720px);
    background: #050505;
    color: #fff;
    border-radius: 0;
    padding: clamp(18px, 4vw, 38px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    direction: inherit;
    text-align: start;
}

.about-story--reverse .about-story__panel {
    left: clamp(4%, 8vw, 10%);
    right: auto;
    text-align: start;
    direction: inherit;
}

.about-story__panel p {
    margin: 0;
    line-height: 1.9;
    font-weight: 700;
    color: #f5f5f5;
    letter-spacing: 0.1px;
    margin-inline: 0;
}

.about-story--reverse .about-story__full {
    justify-content: flex-end;
}

.about-story--reverse .about-story__image {
    margin-inline-start: auto;
}

/* ===== Responsive ===== */

@media (max-width: 980px) {
    .about-story__full {
        width: 100%;
        margin-left: 0;
        padding-inline: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .about-story__image {
        width: 100%;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    }

    .about-story__panel {
        position: static;
        width: 100%;
        max-width: none;
        margin-top: 14px;
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
    }
}

@media (max-width: 640px) {
    .about-story {
        padding-block: clamp(26px, 9vh, 56px);
    }

    .about-story__panel {
        padding: 16px 14px;
    }

    .about-story__panel p {
        font-size: 14px;
        line-height: 1.9;
    }
}

/* ========= Vision & Mission (VM) ========= */

.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.vm-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: var(--white);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.vm-grid--balanced {
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.vm-card--formal {
    border: 1.5px solid var(--line);
    background: var(--white);
    border-radius: 16px;
    padding: 14px;
    box-shadow: none;
    display: grid;
    gap: 10px;
    grid-template-rows: auto auto 1fr;
    position: relative;
    overflow: hidden;
    background: var(--section-background-color);
}

.vm-card--formal .vm-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.vm-card--formal .vm-card__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #efe5c6;
    background: linear-gradient(
        180deg,
        rgba(201, 165, 82, 0.14),
        rgba(201, 165, 82, 0.06)
    );
    color: var(--accent-ink);
    flex: 0 0 auto;
}

.vm-card--formal .vm-card__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.6;
}

.vm-card--formal .vm-card__title {
    margin: 0;
    font-weight: 900;
    color: var(--black);
}

.vm-card--formal .vm-card__text {
    margin: 0;
    font-weight: 500;
    color: var(--muted);
}

.about-vm--realty .about-vm__head .section__title {
    letter-spacing: 0.1px;
}

/* ========= About VM – Realty Background ========= */

.about-vm--realty {
    position: relative;
    isolation: isolate;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    /* background: var(--section-background-color); */
}

.about-vm--realty::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.12;
    background-image: radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.06) 1px,
            transparent 1px
        ),
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.04) 1px,
            transparent 1px
        );
    background-size: 20px 20px, 40px 40px;
    mix-blend-mode: multiply;
}

.about-vm--realty.section {
    padding-block: clamp(32px, 8vh, 72px);
}

.about-vm--realty > .container {
    position: relative;
    z-index: 0;
}

.about-vm--realty .section__subtitle {
    color: var(--muted);
    opacity: 0.95;
}

@media (max-width: 640px) {
    .about-vm--realty::before {
        opacity: 0.09;
        background-size: 18px 18px, 36px 36px;
    }
}

/* ========= Responsive – Shared ========= */

@media (max-width: 1080px) {
    .about-intro--split .about-intro__grid {
        grid-template-columns: 1fr 1.25fr;
    }
}

@media (max-width: 980px) {
    .about-intro--split .about-intro__grid {
        direction: rtl;
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "stats";
        gap: clamp(14px, 3vw, 22px);
        align-items: start;
    }

    .about-intro__aside {
        position: static;
    }

    .intro-photo__img {
        aspect-ratio: 4 / 5;
    }

    .vm-grid--balanced {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .about-hero {
        padding-block: clamp(24px, 8vh, 56px);
    }

    .values-grid--auto {
        grid-template-columns: 1fr;
    }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .mini-stat--formal {
        transition: none !important;
    }
    *[data-anim] {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================================
   FIX: about-story layout must NOT flip with RTL/LTR
   Only text direction/alignment flips.
========================================================= */

/* 1) Lock the layout direction for flex so images don't move */
.about-story__full {
    direction: rtl; /* يثبت flex-start على اليمين دائماً */
}

/* 2) Remove logical margin that may push the image */
.about-story--reverse .about-story__image {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
}

/* 3) Fix panel position physically (Arabic design):
      - normal: panel on LEFT
      - reverse: panel on RIGHT
*/
.about-story__panel {
    left: clamp(4%, 8vw, 10%) !important;
    right: auto !important;
    text-align: start; /* يتغير مع اتجاه النص */
}

.about-story--reverse .about-story__panel {
    right: clamp(4%, 8vw, 10%) !important;
    left: auto !important;
    text-align: start;
}

/* 4) Only text direction & alignment flips with page dir */
html[dir="rtl"] .about-story__panel {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .about-story__panel {
    direction: ltr;
    text-align: left;
}

/* Ensure paragraphs follow panel alignment */
.about-story__panel p {
    text-align: inherit;
}

/* =========================================================
   FIX: about-intro flips when language is English (LTR)
========================================================= */

html[dir="rtl"] .about-intro--split .about-intro__grid {
    direction: ltr;
    grid-template-areas: "stats text";
}

html[dir="ltr"] .about-intro--split .about-intro__grid {
    direction: ltr;
    grid-template-areas: "text stats";
}

html[dir="rtl"] .about-intro__panel,
html[dir="rtl"] .about-intro__panel--plain {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .about-intro__panel,
html[dir="ltr"] .about-intro__panel--plain {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] .about-intro__aside {
    direction: ltr;
}
html[dir="rtl"] .about-intro__aside {
    direction: rtl;
}
