/* ==========================================================
   موقع «الحسين بن محمد بن الحسين للاستشارات القانونية والمحاماة والتوثيق»
   مبني على دليل الهوية البصرية: بني غامق / بني فاتح / بيج / رمادي فاتح / أسود
   الألوان والخطوط وشكل الحواف تُحقن من لوحة التحكم (هوية الموقع) في :root داخل الصفحة،
   والقيم هنا احتياطية فقط.
   ========================================================== */

:root {
    --ink: #432F24;          /* بني غامق */
    --ink-soft: #573E30;
    --brass: #A68162;        /* بني فاتح (اللون المميّز) */
    --brass-dark: #85654A;
    --ivory: #E6E1E2;        /* رمادي فاتح */
    --paper: #ffffff;
    --text: #100F0D;         /* أسود الهوية */
    --muted: #6A5A4F;
    --line: #D5BBAC;         /* بيج */

    --font-body: 'The Year of the Camel', 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
    --font-head: 'The Year of the Camel', 'Noto Naskh Arabic', 'Amiri', serif;

    --container: 1200px;
    --radius: 0px;
    --header-h: 68px;

    /* مشتقات من ألوان الهوية */
    --deep: #2a1d15;
    --deep: color-mix(in srgb, var(--ink) 58%, #000);
    --hair: color-mix(in srgb, var(--line) 55%, transparent);
    --shadow: 0 24px 48px -28px rgba(42, 29, 21, .55);
}

/* ---------- أساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--brass); color: #fff; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, 900px); margin-inline: auto; }

.icon {
    width: 1.25em;
    height: 1.25em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ==========================================================
   عناصر الهوية: الإطار ذو الزوايا + زخرفة المثلثات
   ========================================================== */

/* إطار الزوايا: يُرسم فوق أي عنصر يحمل الصنف frame */
.frame { position: relative; }
.frame::after {
    --c: var(--fr-c, var(--line));
    --t: var(--fr-t, 3px);
    --lh: var(--fr-lh, 34px);
    --lv: var(--fr-lv, 34px);
    content: '';
    position: absolute;
    inset: var(--fr-in, 12px);
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(var(--c), var(--c)) top left    / var(--lh) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) top left    / var(--t) var(--lv) no-repeat,
        linear-gradient(var(--c), var(--c)) top right   / var(--lh) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) top right   / var(--t) var(--lv) no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / var(--lh) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--lv) no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / var(--lh) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--lv) no-repeat;
}
/* إطار كبير للصور: أضلاع طويلة وأيقونة الميزان في منتصف الحافة العليا */
.frame-lg { --fr-in: 14px; --fr-t: 4px; --fr-lh: 38%; --fr-lv: 30%; --fr-c: rgba(255, 255, 255, .92); }
.frame-lg::before {
    content: '';
    position: absolute;
    top: calc(var(--fr-in, 14px) - 13px);
    inset-inline: 0;
    z-index: 4;
    height: 28px;
    margin-inline: auto;
    background: url('../img/icon-light.svg') center / contain no-repeat;
    pointer-events: none;
}

/* حزام الزخرفة (مثلثات الهوية): يمتد على عرض القسم */
.pattern-band {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    height: 96px;
    background: url('../img/pattern-band-dark.svg') repeat-x center bottom / 60px 96px;
    pointer-events: none;
}
.pattern-band-flip {
    top: 0;
    bottom: auto;
    transform: scaleY(-1);
    height: 72px;
    background-size: 45px 72px;
}

/* زخرفة صغيرة: مثلث واحد */
.orn {
    display: inline-block;
    width: 26px;
    height: 14px;
    background: url('../img/ornament.svg') center / contain no-repeat;
}

/* ---------- الأزرار ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 50px;
    padding: .8rem 1.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: .01em;
    transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.btn:active { transform: translateY(1px); }
.btn-brass { background: var(--brass); color: #100F0D; }
.btn-brass:hover { background: var(--brass-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--brass-dark); }
.btn-outline { border-color: rgba(213, 187, 172, .6); color: #fff; }
.btn-outline:hover { background: var(--line); border-color: var(--line); color: var(--ink); }
.btn-whatsapp { background: #2c7a4d; color: #fff; }
.btn-whatsapp:hover { background: #236340; }
.btn-block { width: 100%; }

/* ---------- الشريط العلوي (سطح المكتب فقط) ---------- */
.topbar {
    display: none;
    background: var(--deep);
    color: #d9cbc1;
    font-size: .8125rem;
    letter-spacing: .01em;
}
.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1.5rem;
    padding-block: .6rem;
}
.topbar-item { display: inline-flex; align-items: center; gap: .5rem; }
a.topbar-item:hover { color: #fff; }
.topbar .icon { color: var(--brass); }

/* ---------- الهيدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--hair);
    transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(42, 29, 21, .45); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-h);
}

.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo { display: block; height: 40px; max-width: 220px; width: auto; object-fit: contain; }

.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-cta { display: none; min-height: 44px; padding: .5rem 1.4rem; font-size: .95rem; }

.nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* قائمة الجوال: لوحة تحت الهيدر */
.nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    bottom: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem calc(60px + env(safe-area-inset-bottom) + 1.5rem);
    overflow-y: auto;
    background: var(--ink);
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.nav.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
}
.nav a:not(.btn) {
    padding: 1.05rem .25rem;
    border-bottom: 1px solid rgba(213, 187, 172, .18);
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}
.nav a:not(.btn).active { color: var(--line); }
.nav-call { margin-top: 1.5rem; }

/* ==========================================================
   القسم الرئيسي
   ========================================================== */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 90% at 85% 10%, var(--ink-soft) 0%, transparent 60%),
        var(--ink);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, var(--ink) 8%, color-mix(in srgb, var(--ink) 55%, transparent) 60%, color-mix(in srgb, var(--ink) 80%, transparent) 100%);
}
.hero-watermark {
    position: absolute;
    z-index: -1;
    inset-inline-start: -6%;
    top: 50%;
    height: 128%;
    width: auto;
    max-width: none;
    transform: translateY(-50%);
    opacity: .05;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 2.75rem;
    padding-top: clamp(3rem, 8vw, 6.5rem);
    padding-bottom: calc(clamp(3rem, 8vw, 6.5rem) + 70px);
}
.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.1rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--line);
}
.hero-tagline::before { content: ''; width: 26px; height: 14px; background: url('../img/ornament.svg') center / contain no-repeat; }

.hero-title {
    margin-bottom: 1.25rem;
    font-family: var(--font-head);
    font-size: clamp(2.3rem, 6.6vw, 4.3rem);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -.005em;
    text-wrap: balance;
}
.hero-subtitle {
    max-width: 36rem;
    margin-bottom: 2.1rem;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.95;
    color: #e3d5cb;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-actions .btn { flex: 1 1 200px; }

.hero-card {
    --fr-in: 10px;
    --fr-c: var(--brass);
    padding: 1.9rem 1.75rem 1.75rem;
    border: 1px solid rgba(213, 187, 172, .22);
    background: rgba(16, 15, 13, .28);
    backdrop-filter: blur(6px);
}
.hero-card-title {
    margin-bottom: .6rem;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--line);
}
.info-row {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding-block: .85rem;
    border-bottom: 1px solid rgba(213, 187, 172, .16);
}
.info-row .icon { margin-top: .3rem; color: var(--brass); }
.info-label { display: block; font-size: .8rem; line-height: 1.6; color: #c4b3a7; }
.info-value { display: block; font-weight: 600; }
.hero-card .btn { margin-top: 1.4rem; }

/* ---------- شريط الأرقام ---------- */
.stats { background: var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 1.75rem 1rem; text-align: center; border-inline-start: 1px solid rgba(67, 47, 36, .18); }
.stat:nth-child(2n + 1) { border-inline-start: 0; }
.stat:nth-child(n + 3) { border-top: 1px solid rgba(67, 47, 36, .18); }
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; border-inline-start: 0; }
.stat-number {
    display: block;
    font-family: var(--font-head);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
}
.stat-label { font-size: .95rem; font-weight: 600; color: var(--ink-soft); }

/* ---------- الأقسام العامة ---------- */
.section { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.section-alt { background: var(--ivory); }
.section-dark { background: var(--ink); color: #fff; }

.section-head { max-width: 44rem; margin-bottom: clamp(2.25rem, 5vw, 3.75rem); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .6rem;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--brass-dark);
}
.eyebrow::before { content: ''; width: 26px; height: 14px; background: url('../img/ornament.svg') center / contain no-repeat; }
.section-dark .eyebrow { color: var(--line); }

.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 4.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.45;
    color: var(--ink);
    text-wrap: balance;
}
.section-dark .section-title { color: #fff; }
.section-lead { margin-top: .9rem; color: #d9cbc1; }

/* ---------- مجالات الممارسة ---------- */
.services-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brass);
    background: var(--paper);
    transition: border-color .3s, transform .3s, box-shadow .3s;
}
.service-card::after {
    content: '';
    position: absolute;
    inset-inline-end: -14px;
    bottom: -8px;
    width: 92px;
    height: 50px;
    background: url('../img/ornament.svg') center / contain no-repeat;
    opacity: .16;
    transition: opacity .3s, transform .3s;
}
.service-card:hover { border-color: var(--ink); border-top-color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card:hover::after { opacity: .32; transform: translateY(-4px); }
.service-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.service-card:hover .service-media img { transform: scale(1.05); }
.service-body { position: relative; z-index: 1; padding: 1.6rem 1.7rem 2rem; }
.service-num {
    display: block;
    margin-bottom: .35rem;
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--line);
    transition: color .3s;
}
.service-card:hover .service-num { color: var(--brass); }
.service-title { margin-bottom: .5rem; font-size: 1.3rem; font-weight: 800; line-height: 1.5; color: var(--ink); }
.service-text { font-size: 1rem; color: var(--muted); }

/* ---------- لماذا نحن ---------- */
.section-why { padding-top: clamp(7rem, 12vw, 10rem); overflow: hidden; }
.section-why::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 72px;
    background: url('../img/pattern-band-dark.svg') repeat-x center bottom / 45px 72px;
    transform: scaleY(-1);
}
.features-grid { display: grid; gap: 0; grid-template-columns: 1fr; }
.feature { padding-block: 2rem; border-top: 1px solid rgba(213, 187, 172, .18); }
.feature:first-child { border-top: 0; }
.feature-icon {
    --fr-in: 0px;
    --fr-t: 2px;
    --fr-lh: 16px;
    --fr-lv: 16px;
    --fr-c: var(--brass);
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 1.25rem;
    color: var(--line);
}
.feature-icon .icon { width: 28px; height: 28px; }
.feature-title { margin-bottom: .5rem; font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.feature-text { color: #d9cbc1; font-size: 1rem; }

/* ---------- من نحن ---------- */
.about-grid { display: grid; gap: 3.5rem; align-items: center; }
.about-media { margin: 0 0 1.75rem; }
.about-media img,
.about-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3.4;
    object-fit: cover;
    background: var(--ink);
}
.about-placeholder {
    background:
        url('../img/icon-light.svg') center / 38% no-repeat,
        radial-gradient(90% 90% at 70% 20%, var(--ink-soft), var(--ink));
}
.about-badge {
    position: absolute;
    z-index: 5;
    inset-inline-start: 1.25rem;
    bottom: -1.75rem;
    padding: .9rem 1.5rem;
    border-inline-start: 4px solid var(--brass);
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
}
.about-badge strong {
    display: block;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--line);
}
.about-badge span { font-size: .9rem; }
.about-text { margin-bottom: 2rem; color: var(--muted); line-height: 2.1; font-size: 1.075rem; }

/* ---------- فريق المحامين ---------- */
.team-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 350px)); } }
.team-card { overflow: hidden; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.team-photo {
    --fr-in: 12px;
    --fr-t: 3px;
    --fr-lh: 38px;
    --fr-lv: 38%;
    --fr-c: rgba(255, 255, 255, .85);
    aspect-ratio: 4 / 4.6;
    overflow: hidden;
    background: radial-gradient(90% 80% at 50% 0%, var(--brass), var(--ink-soft) 70%);
}
.team-photo > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.team-photo .placeholder { display: grid; place-items: center; height: 100%; }
.team-photo .placeholder img { width: 36%; height: auto; opacity: .55; }
.team-body { padding: 1.4rem 1.6rem 1.9rem; border-top: 3px solid var(--brass); }
.team-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; line-height: 1.5; color: #fff; }
.team-position { font-size: .95rem; font-weight: 700; color: var(--line); }
.team-specialty { margin-bottom: .7rem; font-size: .9rem; color: #c4b3a7; }
.team-bio { font-size: .95rem; color: #e0d3ca; }

/* ---------- معرض الشهادات ---------- */
.filters {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.75rem;
    padding-bottom: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
    flex: 0 0 auto;
    padding: .55rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
    transition: background-color .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--brass); }
.filter-btn.active { border-color: var(--ink); background: var(--ink); color: #fff; }

.gallery-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.gallery-item {
    --fr-in: 10px;
    --fr-t: 3px;
    --fr-lh: 26px;
    --fr-lv: 26px;
    --fr-c: #fff;
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    background: var(--line);
    cursor: zoom-in;
}
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: color-mix(in srgb, var(--ink) 55%, transparent);
    opacity: 0;
    transition: opacity .3s;
}
.gallery-item::after { opacity: 0; transform: scale(1.06); transition: opacity .3s, transform .3s; }
.gallery-item:hover::before, .gallery-item:focus-visible::before { opacity: 1; }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; transform: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item.hidden-item { display: none; }

.empty-box {
    padding: 3rem 1rem;
    border: 1px dashed var(--line);
    text-align: center;
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--deep) 94%, transparent);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(213, 187, 172, .5);
    background: transparent;
    color: #fff;
}
.lightbox-close:hover { background: var(--line); color: var(--ink); }

/* ---------- الفيديو ---------- */
.video-wrap {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    border-bottom: 4px solid var(--brass);
    box-shadow: var(--shadow);
}
.video-wrap video { width: 100%; height: 100%; object-fit: contain; }
.section-sub { margin-top: .75rem; color: var(--muted); }

/* ---------- المقال ---------- */
.prose { max-width: 46rem; margin-inline: auto; }
.prose .section-title { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); position: relative; }
.prose .section-title::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: -7px;
    width: 26px;
    height: 14px;
    background: var(--paper) url('../img/ornament.svg') center / contain no-repeat;
    padding-inline: 8px;
    box-sizing: content-box;
}
.prose-body { margin-top: 1.75rem; color: var(--muted); font-size: 1.1rem; line-height: 2.15; }
.prose .btn { margin-top: 2.25rem; }

/* ---------- الأسئلة الشائعة ---------- */
.faq-grid { display: grid; gap: 2.25rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
    transition: color .2s;
}
.faq-item summary:hover { color: var(--brass-dark); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .icon {
    width: 2rem;
    height: 2rem;
    padding: .45rem;
    border: 1px solid var(--line);
    color: var(--brass-dark);
    transition: transform .25s, background-color .25s, color .25s;
}
.faq-item[open] .icon { transform: rotate(45deg); background: var(--ink); border-color: var(--ink); color: #fff; }
.faq-answer { padding-bottom: 1.4rem; color: var(--muted); }

/* ---------- آراء العملاء ---------- */
.testimonials-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.testimonial {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.1rem 1.9rem 1.7rem;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brass);
    background: var(--paper);
}
.quote-mark {
    position: absolute;
    top: .35rem;
    inset-inline-end: 1.4rem;
    font-family: var(--font-head);
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--line);
    opacity: .7;
    pointer-events: none;
}
.stars { display: flex; gap: .15rem; margin-bottom: 1rem; color: var(--brass); }
.stars .icon { width: 1.1rem; height: 1.1rem; }
.stars .off { color: var(--line); }
.testimonial-text { position: relative; flex: 1; margin-bottom: 1.5rem; color: var(--text); font-size: 1.05rem; }
.testimonial-author { display: flex; align-items: center; gap: .85rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: var(--ink);
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--line);
}
.author-name { font-weight: 800; line-height: 1.4; color: var(--ink); }
.author-title { font-size: .875rem; color: var(--muted); }

/* ---------- التواصل ---------- */
#contact { overflow: hidden; isolation: isolate; }
#contact::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('../img/pattern-soft-dark.svg') repeat center / 70px auto;
    opacity: .05;
}
.contact-grid { display: grid; gap: 3rem; }
.contact-list { margin-block: 1.75rem; }
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-block: 1rem;
    border-bottom: 1px solid rgba(213, 187, 172, .18);
}
.contact-list .icon { margin-top: .3rem; color: var(--brass); }
.contact-list .info-label { color: #c4b3a7; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.contact-actions .btn { flex: 1 1 160px; }

.form-card {
    --fr-in: 10px;
    --fr-c: var(--brass);
    padding: 2rem 1.6rem;
    background: var(--paper);
    color: var(--text);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.form-card > * { position: relative; z-index: 1; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: .4rem; font-size: .95rem; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--brass-dark);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 28%, transparent);
}
.field .ltr { direction: ltr; text-align: right; }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 1rem; font-size: .85rem; text-align: center; color: var(--muted); }

.alert { padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; }
.alert-success { background: #eaf3ec; border: 1px solid #b6d3bf; color: #1d5a39; }
.alert-error { margin-bottom: 1rem; background: #fbeeee; border: 1px solid #ecc4c4; color: #8a2222; }

/* ---------- الفوتر ---------- */
.site-footer { position: relative; padding-top: calc(72px + 3.25rem); background: var(--deep); color: #d2c2b8; font-size: .975rem; }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
.footer-logo { width: 190px; height: auto; margin-bottom: 1.25rem; }
.footer-title { margin-bottom: 1rem; font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; color: #fff; }
.footer-links li + li, .footer-contact li + li { margin-top: .6rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--line); }
.footer-contact li { display: flex; align-items: flex-start; gap: .65rem; }
.footer-contact .icon { margin-top: .4rem; color: var(--brass); }
.footer-license { margin-top: .85rem; font-size: .875rem; color: #a89689; }
.footer-bottom { padding-block: 1.35rem; border-top: 1px solid rgba(213, 187, 172, .16); font-size: .875rem; text-align: center; color: #a89689; }

/* ---------- أزرار ثابتة ---------- */
.mobile-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(213, 187, 172, .2);
    background: var(--ink);
}
.mobile-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .6rem .25rem;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}
.mobile-bar a.primary { background: var(--brass); color: #100F0D; }
.mobile-bar .icon { width: 1.35rem; height: 1.35rem; }

.wa-float {
    position: fixed;
    inset-inline-end: 1.5rem;
    bottom: 1.5rem;
    z-index: 60;
    display: none;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2c7a4d;
    color: #fff;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
    transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float .icon { width: 26px; height: 26px; }

/* ---------- ظهور تدريجي عند التمرير ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.visible { opacity: 1; transform: none; }
.js-reveal .reveal.reveal-instant { transition: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
    .service-card, .service-media img, .gallery-item img, .gallery-item::before, .gallery-item::after { transition: none; }
}

/* ==========================================================
   الجوال فقط
   ========================================================== */
@media (max-width: 899px) {
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .hero-watermark { height: 80%; inset-inline-start: -30%; top: 38%; }
    .pattern-band { height: 74px; background-size: 46px 74px; }
    .hero-inner { padding-bottom: calc(clamp(3rem, 8vw, 6.5rem) + 54px); }
    .section-why { padding-top: 6rem; }
    .section-why::before { height: 58px; background-size: 36px 58px; }
    .pattern-band-flip { height: 58px; background-size: 36px 58px; }
    .site-footer { padding-top: calc(58px + 3rem); }
}

/* ==========================================================
   شاشات أكبر
   ========================================================== */
@media (min-width: 640px) {
    .services-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .form-card { padding: 2.5rem 2.25rem; }
}

@media (min-width: 900px) {
    :root { --header-h: 84px; }

    .topbar { display: block; }
    .mobile-bar { display: none; }
    .wa-float { display: grid; }

    /* الضبابية الزجاجية للهيدر على سطح المكتب فقط: على الجوال تجعل قائمة fixed تتحجّم بحجم الهيدر */
    @supports (backdrop-filter: blur(10px)) {
        .site-header { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(12px); }
    }

    .brand-logo { height: 54px; max-width: 280px; }
    .header-cta { display: inline-flex; }
    .nav-toggle, .nav-call { display: none; }

    .nav {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        padding: 0;
        overflow: visible;
        background: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }
    .nav a:not(.btn) {
        position: relative;
        padding: .3rem 0;
        border-bottom: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
        transition: color .2s;
    }
    .nav a:not(.btn)::after {
        content: '';
        position: absolute;
        inset-inline: 0;
        bottom: -4px;
        height: 2px;
        background: var(--brass);
        transform: scaleX(0);
        transition: transform .25s;
    }
    .nav a:not(.btn):hover,
    .nav a:not(.btn).active { color: var(--brass-dark); }
    .nav a:not(.btn):hover::after,
    .nav a:not(.btn).active::after { transform: scaleX(1); }
    .header-inner { gap: 2.5rem; }

    .hero-inner { grid-template-columns: 1.45fr .8fr; align-items: center; gap: 4.5rem; }
    .hero-actions .btn { flex: 0 0 auto; }

    .stats-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .stat:nth-child(n) { border-top: 0; border-inline-start: 1px solid rgba(67, 47, 36, .18); }
    .stat:first-child { border-inline-start: 0; }
    .stat:last-child:nth-child(odd) { grid-column: auto; border-inline-start: 1px solid rgba(67, 47, 36, .18); }

    .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
    .testimonials-grid { grid-template-columns: repeat(3, 1fr); }

    .features-grid { grid-template-columns: repeat(3, 1fr); gap: 3.5rem; }
    .feature, .feature:first-child { padding-block: 0; border-top: 0; }

    .about-grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }

    .faq-grid { grid-template-columns: .8fr 1.2fr; gap: 5rem; }
    .faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; margin-bottom: 0; }

    .contact-grid { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }

    .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 4rem; }
}
