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

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

.about-hero--plain {
    color: #fff;
    padding-block: clamp(32px, 28vh, 292px);
    background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.65) 80%
        ),
        url("../../images/about/about-his3.jpg");
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
}

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

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

.about-hero__center {
    width: 100%;
    max-width: 780px;
    margin-inline: auto;
    text-align: center;
}

.about-hero__headline {
    margin: 6px 0 4px;
    font-weight: 900;
    line-height: 1.2;
    font-size: clamp(26px, 4.4vw, 40px);
    letter-spacing: 0.05px;
}

.about-hero__line {
    display: block;
}

.about-hero__line--soft {
    margin-top: 6px;
    opacity: 0.95;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.82em;
    font-weight: 800;
    padding-bottom: 6px;
}

@media (max-width: 640px) {
    .about-hero--plain {
        padding-block: clamp(26px, 10vh, 64px);
    }

    .about-hero__headline {
        font-size: clamp(22px, 6vw, 32px);
    }
}

/* Hero animation */
@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 {
    animation: aboutFadeUp 0.6s var(--reveal-ease, ease-out) both;
}

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

@media (max-width: 640px) {
    .about-hero--plain {
        padding-block: clamp(26px, 10vh, 64px);
    }
}

/* ===== Shared section layout (intro, timeline, CTA) ===== */
.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);
}

/* History intro */
.history-intro .history-head {
    text-align: start;
}

/* شبكة النص + الصورة */
.history-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

/* منطقة النص */
.history-intro__content {
    max-width: 620px;
}

/* منطقة الصورة */
.history-intro__media {
    margin: 0;
}

.history-intro__image-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
    background: #000;
}

.history-intro__image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    object-position: center;
    transform: scale(1.02);
    transition: transform 0.5s ease-out;
}

/* لمسة بسيطة عند الهوفر على الديسكتوب */
@media (hover: hover) and (pointer: fine) {
    .history-intro__image-wrap:hover .history-intro__image {
        transform: scale(1.05);
    }
}

/* استجابة للجوال */
@media (max-width: 880px) {
    .history-intro__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .history-intro__media {
        order: -1;
    }
}

/* ===== History full-width banner ===== */
.history-banner {
    padding-block: clamp(28px, 7vh, 60px);
}

.history-banner--fade {
    padding-top: clamp(20px, 6vh, 40px);
    padding-bottom: 0;
}

.history-banner__frame {
    position: relative;
    width: 100vw;
    height: clamp(320px, 70vh, 620px);
    margin-inline: auto;
    overflow: hidden;
    isolation: isolate;
}

.history-banner--fade .history-banner__frame::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 120px;
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        rgba(255, 255, 255, 0.9) 40%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.history-banner__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
}

.timeline--realty {
    background: var(--section-background-color);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.timeline__head {
    text-align: start;
}

.timeline__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.7fr);
    gap: 28px;
    align-items: flex-start;
}

.timeline__summary {
    border-radius: 18px;
    padding: 18px 18px 20px;
    background: var(--white);
    border: 1px solid rgba(201, 165, 82, 0.22);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.04);
}

.timeline__summary .section__title {
    margin-bottom: 4px;
    font-size: clamp(18px, 3vw, 28px);
}

.timeline__summary .section__subtitle {
    margin-top: 4px;
    margin-bottom: 10px;
}

.timeline__meta {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.timeline__meta li {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-ink);
    opacity: 0.9;
}

.timeline__track {
    position: relative;
}

.tl-list {
    margin: 0;
    margin-top: 4px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
    position: relative;
}

.tl-list--single {
    /* فقط اسم توضيحي إن احتجنا تخصيص لاحق */
}

.tl-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    align-items: flex-start;
    position: relative;
}

.tl-item:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 56px;
    top: 36px;
    bottom: -12px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    opacity: 0.22;
}

.tl-item__year {
    display: grid;
    place-items: center;
    height: 68px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    font-weight: 900;
    color: var(--black);
    position: relative;
    z-index: 1;
}

.tl-item__year span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: linear-gradient(
        180deg,
        rgba(201, 165, 82, 0.15),
        rgba(201, 165, 82, 0.03)
    );
    color: var(--accent-ink);
    font-weight: 900;
    font-size: 13px;
}

.tl-item__card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.tl-item__era {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    opacity: 0.95;
}

.tl-item__title {
    margin: 0 0 4px;
    font-weight: 900;
    color: var(--black);
    font-size: 15px;
}

.tl-item__text {
    margin: 0;
    font-weight: 700;
    color: var(--muted);
    font-size: 13px;
}

.tl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    list-style: none;
}

.tl-badges li {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: 11px;
    background: var(--card);
}

/* Timeline responsive */
@media (max-width: 980px) {
    .timeline__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .timeline__summary {
        order: -1;
    }

    .tl-item {
        grid-template-columns: 100px 1fr;
    }
}

@media (max-width: 640px) {
    .tl-item {
        grid-template-columns: 1fr;
    }

    .tl-item:not(:last-child)::after {
        inset-inline-start: 18px;
        top: 32px;
        bottom: -8px;
    }

    .tl-item__year {
        justify-self: flex-start;
        height: auto;
        padding: 8px 10px;
    }
}

/* ===== History stats (أرقام تحكي قصة النجاح) ===== */
.history-stats {
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    background: radial-gradient(
            850px 380px at 80% -10%,
            rgba(201, 165, 82, 0.06),
            transparent 60%
        ),
        #ffffff;
}

.history-stats__head {
    text-align: start;
    margin-bottom: 18px;
}

.history-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.history-stat {
    position: relative;
    border-radius: 18px;
    padding: 16px 16px 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.history-stat::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0.9;
}

.history-stat__value {
    font-size: clamp(26px, 3.4vw, 30px);
    font-weight: 900;
    color: var(--accent-ink);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.history-stat__unit {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
}

.history-stat__label {
    margin: 6px 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: var(--black);
}

.history-stat__note {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

@media (max-width: 992px) {
    .history-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .history-stat {
        padding: 14px 14px 16px;
    }
}
@media (max-width: 500px) {
    .history-stats__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== CTA (bottom) ===== */
.history-cta {
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    background: #fff;
}

.history-cta__wrap {
    position: relative;
    border-radius: 22px;
    padding: 20px 20px 22px;
    background: radial-gradient(
            900px 420px at 85% -10%,
            rgba(201, 165, 82, 0.12),
            transparent 60%
        ),
        linear-gradient(135deg, #0f1720, #172632);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: #f9fafb;
    overflow: hidden;
}

.history-cta__wrap::before {
    content: "";
    position: absolute;
    inset-inline-end: -80px;
    top: -40px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    border: 1px solid rgba(201, 165, 82, 0.4);
    opacity: 0.3;
}

.history-cta__text {
    position: relative;
    text-align: start;
    max-width: 520px;
    z-index: 1;
}

.history-cta__eyebrow {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.8);
}

.history-cta__title {
    /* color: #ffffff; */
    color: var(--accent);
}

.history-cta__subtitle {
    margin-top: 6px;
    max-width: 480px;
    color: rgba(241, 245, 249, 0.78);
    font-weight: 600;
    font-size: 14px;
}

.history-cta__actions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    z-index: 1;
}

.history-cta__primary,
.history-cta__secondary {
    min-width: 190px;
}

.history-cta__note {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(241, 245, 249, 0.75);
}

/* CTA responsive */
@media (max-width: 768px) {
    .history-cta__wrap {
        padding: 18px 16px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .history-cta__text {
        max-width: 100%;
    }

    .history-cta__actions {
        width: 100%;
    }

    .history-cta__primary,
    .history-cta__secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
