/* =========================================================
   about.css — About Page ONLY
   Uses tokens from layout.css
   ========================================================= */

.about-page {
    padding: 24px 0 54px;
}

/* HERO */
.about-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* soft inner glow + noise to avoid banding lines */
.about-hero::before {
    content: "";
    position: absolute;
    inset: -80px;
    background:
        radial-gradient(
            900px 420px at 10% 10%,
            rgba(39, 114, 69, 0.16),
            transparent 70%
        ),
        radial-gradient(
            820px 420px at 90% 12%,
            rgba(180, 142, 99, 0.13),
            transparent 72%
        );
    pointer-events: none;
}
.about-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.about-hero > * {
    position: relative;
    z-index: 1;
}

.about-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(180, 142, 99, 0.1);
    border: 1px solid rgba(180, 142, 99, 0.22);
    color: rgba(15, 23, 42, 0.78);
    font-weight: 800;
    font-size: 0.92rem;
}

.about-title {
    margin: 14px 0 0;
    font-weight: 1000;
    color: var(--brand-green-2);
    letter-spacing: 0.2px;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.12;
}

.about-desc {
    margin: 10px 0 0;
    color: rgba(15, 23, 42, 0.74);
    font-size: 1.02rem;
    line-height: 1.8;
    max-width: 70ch;
}

.about-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* STATS */
.about-stats {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.about-stat {
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.7);
}

.about-stat .n {
    font-weight: 1000;
    color: var(--brand-green-2);
    font-size: 1.05rem;
}
.about-stat .t {
    margin-top: 4px;
    color: rgba(15, 23, 42, 0.68);
    font-size: 0.92rem;
    font-weight: 700;
}

/* MEDIA */
.about-hero-media {
    display: grid;
    gap: 12px;
}

.about-media-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(180, 142, 99, 0.22);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.about-media-frame.big {
    border-color: rgba(39, 114, 69, 0.2);
}

.about-hero-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.about-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.about-mini-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.7);
}

/* ===== Features (Premium cards) ===== */
.about-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.about-feature {
    padding: 18px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.78);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

/* glow خفيف داخل البطاقة */
.about-feature::before {
    content: "";
    position: absolute;
    inset: -70px;
    background:
        radial-gradient(
            520px 260px at 18% 15%,
            rgba(39, 114, 69, 0.12),
            transparent 70%
        ),
        radial-gradient(
            520px 260px at 88% 18%,
            rgba(180, 142, 99, 0.1),
            transparent 72%
        );
    pointer-events: none;
    z-index: 0;
}

/* خط “ذهبي” رفيع أعلى البطاقة */
.about-feature::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 12px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(39, 114, 69, 0),
        rgba(39, 114, 69, 0.55),
        rgba(180, 142, 99, 0.55),
        rgba(180, 142, 99, 0)
    );
    opacity: 0.55;
    z-index: 0;
    pointer-events: none;
}

.about-feature > * {
    position: relative;
    z-index: 1;
}

.about-feature:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 142, 99, 0.22);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

/* Icon */
.icon-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(39, 114, 69, 0.1);
    border: 1px solid rgba(39, 114, 69, 0.18);
    box-shadow: 0 16px 30px rgba(39, 114, 69, 0.1);

    font-size: 22px;
}

/* Title / text */
.about-feature h3 {
    margin: 12px 0 6px;
    font-weight: 1000;
    color: var(--brand-green-2);
    font-size: 1.08rem;
    letter-spacing: 0.15px;
}

.about-feature p {
    margin: 0;
    color: rgba(15, 23, 42, 0.7);
    line-height: 1.75;
    font-weight: 650;
}

/* bottom accent line */
.feature-line {
    margin-top: 14px;
    height: 1px;
    background: rgba(15, 23, 42, 0.06);
}

/* RTL تحسين بسيط */
[dir="rtl"] .icon-wrap {
    justify-content: flex-start; /* الأيقونة تبقى مرتبة */
}

/* Responsive */
@media (max-width: 991px) {
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   about.css — About Page (Fix overlay + footer issue)
   يعتمد على متغيرات layout.css
   ========================================================= */

.about-section {
    padding: 18px 0 40px;
}

.about-split.cardx {
    padding: 16px;
    overflow: hidden; /* مهم عشان أي عناصر مطلعة ما تغطي الفوتر */
}

/* تخطيط النص + الصورة */
.about-split {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 16px;
    align-items: stretch;
}

.about-split-text {
    padding: 10px;
}

.about-h {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: var(--brand-green-2);
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.about-sub {
    margin: 10px 0 0;
    color: rgba(15, 23, 42, 0.72);
    line-height: 1.75;
    max-width: 70ch;
}

.about-list {
    margin: 14px 0 0;
    padding-inline-start: 18px;
    line-height: 1.95;
    color: rgba(15, 23, 42, 0.78);
}

/* اقتباس / CTA */
.about-cta {
    margin-top: 16px;
}

.about-cta-box {
    border-radius: 14px;
    padding: 14px 14px;
    background: linear-gradient(
        180deg,
        rgba(39, 114, 69, 0.06),
        rgba(180, 142, 99, 0.07)
    );
    border: 1px solid rgba(180, 142, 99, 0.22);
}

.about-cta-box .q {
    font-weight: 900;
    color: var(--brand-green-2);
    line-height: 1.55;
}

.about-cta-box .ref {
    margin-top: 6px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.62);
}

/* ===== الجزء المهم: الصورة + overlay ===== */
.about-split-media {
    display: flex;
    align-items: stretch;
}

/* لازم تكون relative عشان overlay يثبت داخل الصورة وليس على الصفحة */
.about-media-frame {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(180, 142, 99, 0.2);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
    isolation: isolate; /* يمنع مشاكل طبقات z-index */
    /* min-height: 420px; */
}

/* لو عندك نسخة كبيرة */
.about-media-frame.big {
    min-height: 520px;
}

.about-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

/* طبقة ظل خفيفة تحت لتكون الكتابة واضحة بدون ما “تقطع” التصميم */
.about-media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 55%,
        rgba(0, 0, 0, 0.28) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* overlay نفسه */
.about-overlay {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;

    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(180, 142, 99, 0.28);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.about-overlay .tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(39, 114, 69, 0.1);
    border: 1px solid rgba(39, 114, 69, 0.18);
    font-weight: 900;
    color: var(--brand-green-2);
    font-size: 0.85rem;
}

.about-overlay .txt {
    margin-top: 8px;
    color: rgba(15, 23, 42, 0.74);
    font-weight: 700;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 991px) {
    .about-split {
        grid-template-columns: 1fr;
    }
    .about-media-frame.big {
        min-height: 360px;
    }
}

/* QUOTE */
.about-cta {
    margin-top: 14px;
}
.about-cta-box {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(180, 142, 99, 0.22);
    background: rgba(180, 142, 99, 0.08);
}
.about-cta-box .q {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.84);
    line-height: 1.7;
}
.about-cta-box .ref {
    margin-top: 6px;
    color: rgba(15, 23, 42, 0.62);
    font-weight: 800;
    font-size: 0.92rem;
}

/* FINAL CTA */
.about-final {
    margin-top: 18px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.about-final-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 991px) {
    .about-hero {
        grid-template-columns: 1fr;
    }
    .about-hero-img {
        height: 260px;
    }
    .about-mini-grid img {
        height: 90px;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
    .about-features {
        grid-template-columns: 1fr;
    }
    .about-split {
        grid-template-columns: 1fr;
    }
    .about-cover {
        height: 320px;
    }
}
/* =========================================================
   Image Zoom Modal (About page)
   ========================================================= */

.no-scroll {
    overflow: hidden;
}

.js-zoomable {
    cursor: zoom-in;
    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        box-shadow 0.2s ease;
}

.js-zoomable:hover {
    transform: translateY(-2px);
    filter: brightness(1.02);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

/* Modal wrapper */
.imgzoom {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

.imgzoom.is-open {
    display: block;
}

/* Backdrop */
.imgzoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px) saturate(1.08);
    animation: zoomFade 0.18s ease both;
}
/* =========================================================
   Image Zoom Modal — under navbar + responsive safe
   Assumes navbar z-index is 999999 !important
   ========================================================= */

/* Modal wrapper */
.imgzoom {
    position: fixed;
    inset: 0;
    /* ✅ أقل من navbar */
    z-index: 900000 !important;
    display: none;

    /* ✅ ارتفاع تقريبي للناف بار (عدله إذا نافك أعلى) */
    --nav-h: 86px;
}

@media (max-width: 768px) {
    .imgzoom {
        --nav-h: 74px;
    }
}

.imgzoom.is-open {
    display: block;
}

/* Backdrop */
.imgzoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(10px) saturate(1.08);
    animation: zoomFade 0.18s ease both;
}

/* ✅ Dialog: يظهر تحت الناف بار وبمقاسات آمنة */
.imgzoom-dialog {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--nav-h) + 14px);

    width: min(980px, calc(100vw - 28px));
    max-height: calc(100vh - var(--nav-h) - 28px);
    overflow: auto;

    border-radius: 18px;

    background:
        radial-gradient(
            900px 280px at 12% 0%,
            rgba(39, 114, 69, 0.16),
            transparent 58%
        ),
        radial-gradient(
            700px 240px at 90% 18%,
            rgba(180, 142, 99, 0.16),
            transparent 62%
        ),
        rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(180, 142, 99, 0.22);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    animation: zoomPop 0.18s ease both;

    /* smooth scroll inside */
    scrollbar-gutter: stable;
}

/* Close button */
.imgzoom-close {
    position: sticky;
    top: 10px;
    margin-inline-start: auto; /* pushes to end */
    margin-top: 10px;
    margin-right: 10px;

    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.86);
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.72);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition:
        transform 0.12s ease,
        filter 0.12s ease,
        box-shadow 0.2s ease;
    z-index: 2;
}

.imgzoom-close:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

/* Figure */
.imgzoom-figure {
    margin: 0;
    padding: 14px;
    padding-top: 6px; /* لأن زر الإغلاق صار sticky */
}

/* ✅ Image: لا تتجاوز ارتفاع النافذة */
.imgzoom-figure img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--nav-h) - 170px);
    object-fit: contain;

    display: block;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    background: #fff;
}

/* Caption */
.imgzoom-cap {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(39, 114, 69, 0.06);
    border: 1px solid rgba(39, 114, 69, 0.14);
    color: rgba(15, 23, 42, 0.72);
    font-weight: 850;
    font-size: 0.95rem;
}

/* RTL close position */
html[dir="rtl"] .imgzoom-close {
    margin-right: 0;
    margin-left: 10px;
}

/* Animations */
@keyframes zoomFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomPop {
    from {
        transform: translateX(-50%) translateY(10px) scale(0.985);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }
}

/* =========================================================
   DARK MODE
   ========================================================= */
[data-theme="dark"] .about-kicker {
    color: rgba(226, 232, 240, 0.78);
}
[data-theme="dark"] .about-desc {
    color: rgba(226, 232, 240, 0.72);
}
[data-theme="dark"] .about-stat {
    background: rgba(26, 32, 48, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .about-stat .t {
    color: rgba(226, 232, 240, 0.68);
}
[data-theme="dark"] .about-media-frame {
    background: rgba(26, 32, 48, 0.7);
}
[data-theme="dark"] .about-mini-grid img {
    background: rgba(26, 32, 48, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .about-feature {
    background: rgba(26, 32, 48, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .about-feature p {
    color: rgba(226, 232, 240, 0.7);
}
[data-theme="dark"] .feature-line {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .about-sub {
    color: rgba(226, 232, 240, 0.72);
}
[data-theme="dark"] .about-list {
    color: rgba(226, 232, 240, 0.78);
}
[data-theme="dark"] .about-cta-box .ref {
    color: rgba(226, 232, 240, 0.6);
}
[data-theme="dark"] .about-cta-box .q {
    color: rgba(226, 232, 240, 0.84);
}
[data-theme="dark"] .about-overlay {
    background: rgba(15, 20, 32, 0.9);
}
[data-theme="dark"] .about-overlay .txt {
    color: rgba(226, 232, 240, 0.74);
}
[data-theme="dark"] .imgzoom-dialog {
    background: rgba(15, 20, 32, 0.96);
}
[data-theme="dark"] .imgzoom-close {
    background: rgba(26, 32, 48, 0.86);
    color: rgba(226, 232, 240, 0.72);
}
[data-theme="dark"] .imgzoom-figure img {
    background: var(--card);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .imgzoom-cap {
    background: rgba(52, 160, 92, 0.08);
    border-color: rgba(52, 160, 92, 0.14);
    color: rgba(226, 232, 240, 0.72);
}
