/* ==========================================================================
   اصباغ وديكورات الشرقية — نظام التصميم الرئيسي
   طابع: كحلي + ذهبي + نحاسي + كريمي (مستوحى من مشروع عوازل أسطح بالأحساء)
   ========================================================================== */

/* ---------- 1. المتغيرات (Design Tokens) ---------- */
:root {
  /* الكحلي الملكي — مستوحى من مشروع عوازل أسطح بالأحساء */
  --navy: #0d2436;
  --navy-deep: #081a29;
  --navy-soft: #17364d;

  /* خلفيات الصفحة الكحلية */
  --bg: #081a29;
  --bg-soft: #0d2436;
  --bg-elev: #17364d;

  /* الأسطح الكحلية (الهيدر/الفوتر/البطاقات/الأشرطة الداكنة) */
  --surface: #0d2436;
  --surface-2: #17364d;
  --line: rgba(200, 168, 107, 0.34);
  --line-strong: rgba(200, 168, 107, 0.58);

  /* نصوص العناصر الكحلية */
  --text: #fffbf0;
  --text-soft: #d7cbb8;
  --muted: #9fb2c0;

  /* لمسات الألوان */
  --violet: #d6bc8a;
  --fuchsia: #c07a4a;
  --pink: #d6bc8a;
  --amber: #c8a86b;
  --cyan: #2f7a80;

  --g-main: linear-gradient(135deg, #e6cd93 0%, #c8a86b 58%, #c07a4a 100%);
  --g-main-soft: linear-gradient(135deg, #d6bc8a 0%, #c8a86b 55%, #c07a4a 100%);
  --g-cool: linear-gradient(135deg, #1e4665 0%, #17364d 100%);
  --g-warm: linear-gradient(135deg, #d6bc8a 0%, #c07a4a 100%);
  --g-text: linear-gradient(100deg, #eadfcb 0%, #c8a86b 50%, #c07a4a 100%);

  /* الظلال */
  --sh-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --sh-md: 0 12px 30px rgba(0, 0, 0, 0.38);
  --sh-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --glow: 0 10px 30px -10px rgba(200, 168, 107, 0.45);

  /* القياسات */
  --container: 1220px;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 30px;
  --header-h: 76px;

  /* الخطوط */
  --font-head: "Cairo", "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", "Cairo", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. إعادة الضبط ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.85;
  color: var(--text-soft);
  background: var(--bg);
  overflow-x: hidden;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body > svg[hidden] { display: none; }

/* خلفية متدرجة ثابتة عامة */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(200, 168, 107, 0.16), transparent 62%),
    radial-gradient(800px 560px at 8% 8%, rgba(47, 122, 128, 0.12), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(192, 122, 74, 0.12), transparent 62%);
  pointer-events: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 1.5rem + 3.2vw, 3.9rem); font-weight: 900; line-height: 1.2; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem); }
h4 { font-size: 1.08rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fuchsia); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(192, 122, 74, 0.35); color: #fff; }

/* ---------- 3. أدوات عامة ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.grad-text {
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--g-main);
}
.eyebrow span { background: var(--g-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.section-head { max-width: 780px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 0.9rem; }

.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--text-soft); }

/* ---------- 4. الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.97rem;
  padding: 0.82rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-grad {
  background-image: var(--g-main);
  background-size: 180% 180%;
  color: var(--navy);
  box-shadow: var(--glow);
}
.btn-grad:hover { background-position: 100% 50%; box-shadow: 0 16px 46px -10px rgba(200, 168, 107, 0.65); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(192, 122, 74, 0.55); }

.btn-line {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-line:hover { border-color: var(--fuchsia); color: var(--violet); }

.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* رابط نصي بسهم */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  transition: gap 0.25s var(--ease);
}
.link-arrow svg { width: 1.1em; height: 1.1em; transition: transform 0.25s var(--ease); }
.link-arrow span { background: var(--g-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.link-arrow:hover svg { transform: translateX(-5px); }

/* ---------- 5. الهيدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  margin-block-start: 0;
  z-index: 100;
  background: rgba(13, 36, 54, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(13, 36, 54, 0.97);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 13px;
  background-image: var(--g-main);
  display: grid;
  place-items: center;
  box-shadow: var(--glow);
  flex: none;
}
.brand-mark svg { width: 24px; height: 24px; color: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-text small { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; }

.nav { margin-inline-start: auto; }
.nav ul { display: flex; align-items: center; gap: 0.15rem; }
.nav a {
  display: block;
  padding: 0.5rem 0.72rem;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--violet); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.72rem;
  bottom: 0.18rem;
  height: 2px;
  border-radius: 2px;
  background: var(--g-main);
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.header-actions .btn { padding: 0.62rem 1.15rem; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 19px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 19px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* قائمة الجوال */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(13, 36, 54, 0.99);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.mobile-nav.is-open {
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-nav ul { padding: 0.7rem clamp(1rem, 4vw, 2rem) 1.4rem; }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-soft);
}
.mobile-nav a[aria-current="page"] { color: var(--violet); }
.mobile-nav a svg { width: 1em; height: 1em; opacity: 0.5; }
.mobile-nav .m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.1rem; }

/* ---------- 6. الهيرو ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -30%;
  height: 120%;
  background-image:
    linear-gradient(rgba(255, 251, 240, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 251, 240, 0.04) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  animation: float 16s ease-in-out infinite;
}
.hero-blob.b1 { width: 380px; height: 380px; background: var(--amber); top: -90px; inset-inline-start: -80px; }
.hero-blob.b2 { width: 320px; height: 320px; background: var(--cyan); top: 40px; inset-inline-end: -70px; animation-delay: -5s; }
.hero-blob.b3 { width: 300px; height: 300px; background: var(--fuchsia); bottom: -120px; inset-inline-start: 42%; animation-delay: -9s; opacity: 0.16; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -26px, 0) scale(1.06); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: 1.2rem; }
.hero .lead { max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.93rem;
  color: var(--text-soft);
}
.hero-points svg { width: 1.15em; height: 1.15em; color: var(--amber); flex: none; }

/* بطاقة الهيرو البصرية */
.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
  position: relative;
  background: var(--bg-elev);
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--g-main);
  opacity: 0.06;
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
}
.hero-photo img { width: 100%; aspect-ratio: 4 / 3.1; object-fit: cover; }
.hero-photo--collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.7rem;
  aspect-ratio: 4 / 3.1;
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
}
.hero-photo--collage figure {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--sh-md);
}
.hero-photo--collage figure:first-child { grid-row: span 2; }
.hero-photo--collage img { height: 100%; aspect-ratio: auto; }
.hero-photo--collage figcaption {
  position: absolute;
  inset-inline: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 26, 41, 0.88);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.hero-badge {
  position: absolute;
  bottom: -22px;
  inset-inline-start: -18px;
  background: rgba(13, 36, 54, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--sh-md);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
}
.hero-badge .dot {
  width: 40px; height: 40px;
  border-radius: 12px;
  background-image: var(--g-cool);
  display: grid;
  place-items: center;
  flex: none;
}
.hero-badge .dot svg { width: 21px; height: 21px; color: #fff; }
.hero-badge b { display: block; font-family: var(--font-head); color: var(--text); font-size: 0.95rem; }
.hero-badge small { color: var(--muted); font-size: 0.76rem; }

/* ---------- 7. شريط الأرقام ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.stat {
  background: var(--surface-2);
  padding: 1.5rem 1.2rem;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  font-weight: 900;
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span { font-size: 0.85rem; color: var(--muted); }

/* شريط الثقة (بدون أرقام) */
.stats--trust .stat { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.stats--trust .stat svg { width: 26px; height: 26px; color: var(--fuchsia); margin-bottom: 0.15rem; }
.stats--trust .stat b {
  font-size: 1.02rem;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
}
.stats--trust .stat span { font-size: 0.85rem; color: var(--muted); line-height: 1.7; max-width: 30ch; }

/* ---------- 8. شبكة الخدمات ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1.3rem;
}

.svc-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s, box-shadow 0.35s;
  display: flex;
  flex-direction: column;
}
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--g-main);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.svc-card:hover { transform: translateY(-7px); background: var(--surface-2); box-shadow: var(--sh-md); }
.svc-card:hover::before { opacity: 1; }

.svc-ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  transition: background 0.35s;
}
.svc-ico svg { width: 27px; height: 27px; color: var(--violet); transition: color 0.35s; }
.svc-card:hover .svc-ico { background-image: var(--g-main); border-color: transparent; }
.svc-card:hover .svc-ico svg { color: var(--navy); }
.svc-card h3 { margin-bottom: 0.6rem; }
.svc-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.3rem; }
.svc-card .link-arrow { margin-top: auto; }

/* ---------- 9. أقسام الخدمات التفصيلية ---------- */
.svc-block { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); }

/* تبديل ترتيب الصورة والنص في الأقسام المتناوبة */
.svc-block--alt .svc-block-media { order: 1; }

.svc-block-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.svc-block-inner--text-only { grid-template-columns: minmax(0, 1fr); }
.svc-block-media { position: relative; }
.svc-collage {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.8rem;
  aspect-ratio: 1 / 1;
}
.svc-collage img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.svc-collage img:first-child { grid-row: span 2; }
.svc-collage--single img:first-child { grid-column: span 2; grid-row: span 2; }

.svc-block-body h2 { margin-bottom: 1rem; }
.svc-block-body > p { color: var(--muted); margin-bottom: 1.4rem; }

.svc-list { display: grid; gap: 0.75rem; margin-bottom: 1.6rem; }
.svc-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.97rem;
  color: var(--text-soft);
}
.svc-list svg {
  width: 1.2em; height: 1.2em;
  flex: none;
  margin-top: 0.35em;
  color: var(--amber);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  font-size: 0.88rem;
  font-family: var(--font-head);
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.chip:hover { border-color: rgba(192, 122, 74, 0.5); color: var(--violet); background: var(--surface-2); }

.svc-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; }

/* ---------- 10. المميزات ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.why {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.why:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.why-ico {
  width: 50px; height: 50px;
  border-radius: 14px;
  background-image: var(--g-main);
  display: grid;
  place-items: center;
  margin-bottom: 1.05rem;
}
.why-ico svg { width: 24px; height: 24px; color: var(--navy); }
.why:nth-child(2) .why-ico { background-image: var(--g-warm); }
.why:nth-child(3) .why-ico { background-image: var(--g-main); }
.why:nth-child(4) .why-ico { background-image: linear-gradient(135deg, #d6bc8a, #c07a4a); }
.why h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.why p { color: var(--muted); font-size: 0.94rem; }

/* ---------- 11. المعرض ---------- */
.gal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.gal-filters button {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.gal-filters button:hover { color: var(--violet); border-color: var(--line-strong); }
.gal-filters button.is-active {
  background-image: var(--g-main);
  color: var(--navy);
  border-color: transparent;
  box-shadow: var(--glow);
}

.gal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.9rem;
  grid-auto-flow: dense;
}
.gal-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: var(--bg-elev);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.gal-item:nth-child(7n) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s;
}
.gal-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 13, 0.82), transparent 58%);
  opacity: 0;
  transition: opacity 0.35s;
}
.gal-item:hover { transform: scale(1.015); border-color: rgba(192, 122, 74, 0.5); }
.gal-item:hover img { transform: scale(1.09); }
.gal-item:hover::after { opacity: 1; }
.gal-cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.gal-item:hover .gal-cap { opacity: 1; transform: translateY(0); }
.gal-item.is-hidden { display: none; }

/* اللايت بوكس */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 3, 8, 0.94);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
  object-fit: contain;
}
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.25s, transform 0.25s;
}
.lb-btn:hover { background-image: var(--g-main); transform: scale(1.06); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: clamp(0.6rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: clamp(0.6rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-count {
  position: absolute;
  bottom: 20px;
  inset-inline: 0;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- 12. منطقة التغطية ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.areas li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.areas svg { width: 1.05em; height: 1.05em; color: var(--fuchsia); }

/* ---------- 13. الأسئلة الشائعة ---------- */
.faq { display: grid; gap: 0.8rem; max-width: 900px; margin-inline: auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.faq details[open] { border-color: var(--line-strong); background: var(--surface-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 11px; height: 11px;
  border-inline-end: 2px solid var(--fuchsia);
  border-bottom: 2px solid var(--fuchsia);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
  flex: none;
  margin-inline-start: 0.5rem;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-a { padding: 0 1.3rem 1.25rem; color: var(--muted); font-size: 0.96rem; }

/* ---------- 14. شريط الدعوة (CTA) ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  background:
    radial-gradient(120% 160% at 50% 0%, rgba(200, 168, 107, 0.22), transparent 60%),
    radial-gradient(100% 140% at 92% 100%, rgba(192, 122, 74, 0.14), transparent 62%),
    radial-gradient(100% 140% at 8% 100%, rgba(47, 122, 128, 0.12), transparent 62%),
    linear-gradient(135deg, var(--navy), var(--navy-deep));
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
}
.cta-band h2 { margin-bottom: 1rem; }
.cta-band p { color: var(--text-soft); max-width: 62ch; margin-inline: auto; margin-bottom: 2rem; }
.cta-band .hero-cta { justify-content: center; margin-top: 0; }

/* ---------- 15. التواصل ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--surface-2); }
.contact-card .cc-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.contact-card .cc-ico svg { width: 23px; height: 23px; }
.cc-wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.cc-call { background-image: var(--g-cool); }
.cc-tt { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.cc-ig { background: linear-gradient(135deg, #feda75, #d62976 45%, #4f5bd5); }
.contact-card b { display: block; font-family: var(--font-head); color: var(--text); font-size: 1rem; }
.contact-card span { font-size: 0.88rem; color: var(--muted); direction: ltr; display: inline-block; }
.contact-card small { display: block; font-size: 0.76rem; color: var(--muted); }

/* ---------- 16. الفوتر ---------- */
.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-strong);
  background: var(--navy-deep);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2.2rem;
  padding-bottom: 2.5rem;
}
.footer-brand .brand { margin-bottom: 1.1rem; }
.footer-brand p { color: var(--muted); font-size: 0.93rem; max-width: 42ch; }
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col a {
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.2s, padding-inline-start 0.2s;
}
.footer-col a:hover { color: var(--violet); padding-inline-start: 4px; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-social a {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.footer-social a:hover { background-image: var(--g-main); color: var(--navy); border-color: transparent; transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- 17.5 أزرار التواصل الجانبية الثابتة ---------- */
.side-contact {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-contact a {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.side-contact a:hover { transform: translateY(-2px) scale(1.03); }
.side-contact svg { width: 20px; height: 20px; }
.sc-phone { background-image: var(--g-main); color: var(--navy); }
.sc-tt { background: #14181d; }
.sc-ig { background: linear-gradient(135deg, #f9ce34, #ee2a7b 48%, #6228d7); }
.sc-wa { background: #25d366; }

/* ---------- 17.6 شريط تنقل الصفحات أعلى المحتوى (الجوال) ---------- */
.tabbar {
  display: none;
  position: sticky;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 95;
  background: rgba(8, 26, 41, 0.97);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.tabbar a {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 2px 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.62rem;
  line-height: 1;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a[aria-current="page"] { color: var(--violet); border-bottom-color: var(--amber); }

/* ---------- 18. مسار التنقل (Breadcrumb) ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.crumbs a:hover { color: var(--violet); }
.crumbs svg { width: 0.85em; height: 0.85em; opacity: 0.6; }
.crumbs [aria-current] { color: var(--text-soft); }

/* ---------- 19. رأس الصفحة الفرعية ---------- */
.page-hero {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--text-soft);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(200, 168, 107, 0.15), transparent 46%),
    linear-gradient(115deg, var(--navy), var(--navy-deep));
}
.page-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}
.page-hero-inner--text-only { grid-template-columns: minmax(0, 1fr); }
.page-hero h1 { margin-bottom: 1.1rem; }
.page-hero .lead { color: var(--text-soft); }
.page-hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
}
.page-hero-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

/* ---------- 19.5 الفواصل الكريمية بين الأقسام ---------- */

/* تباين كحلي خفيف بين الأقسام المتناوبة */
main > .section:nth-of-type(even) { background: var(--bg-soft); }

/* فاصل كريمي عريض وواضح أعلى كل قسم */
.section::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 8px;
  background: linear-gradient(90deg,
    rgba(255, 251, 240, 0) 0%,
    rgba(234, 223, 203, 0.7) 10%,
    #eadfcb 30%,
    #c8a86b 50%,
    #eadfcb 70%,
    rgba(234, 223, 203, 0.7) 90%,
    rgba(255, 251, 240, 0) 100%);
  box-shadow: 0 0 22px rgba(200, 168, 107, 0.4);
  pointer-events: none;
  z-index: 2;
}

/* الأزرار الشفافة والعناصر البسيطة داخل المساحات الكحلية */
.hero .btn-ghost,
.page-hero .btn-ghost,
.cta-band .btn-ghost { background: rgba(255, 251, 240, 0.07); }

/* ---------- 20. الحركات عند التمرير ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 23. توقيع المطور ---------- */
.developer-signature {
  display: flex;
  width: min(570px, 100%);
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.2rem auto 1.2rem;
  border: 1px solid rgba(200, 168, 107, 0.3);
  border-radius: 20px 5px 20px 5px;
  padding: 1rem 1.2rem;
  background: linear-gradient(120deg, #17344a, #0b1b28);
}
.developer-identity { display: flex; align-items: center; gap: 0.75rem; }
.developer-identity > img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid rgba(200, 168, 107, 0.42);
  border-radius: 16px 4px 16px 4px;
}
.developer-identity small,
.developer-identity strong,
.developer-identity span,
.developer-identity div > a { display: block; }
.developer-identity small,
.developer-identity span { color: rgba(255, 255, 255, 0.66); font-size: 0.66rem; }
.developer-identity strong { margin: 1px 0; color: #fffbf0; font-size: 0.95rem; font-weight: 700; }
.developer-identity div > a {
  margin-top: 3px;
  color: var(--amber);
  font-size: 0.7rem;
  direction: ltr;
  text-align: right;
}
.developer-links { display: flex; flex-wrap: wrap; gap: 7px; }
.developer-links a {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.developer-links a:hover { transform: translateY(-2px); border-color: var(--amber); }
.developer-links img { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .developer-signature { flex-wrap: wrap; justify-content: center; padding: 0.9rem; }
  .developer-identity { width: 100%; justify-content: center; }
  .developer-links { justify-content: center; }
}

/* ---------- 21. نقاط التجاوب ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
}

@media (max-width: 1100px) {
  .nav { display: none; }
  .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav { display: block; }
  .tabbar { display: flex; }
}

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 560px; margin-inline: auto; width: 100%; }
  .hero-badge { inset-inline-start: 50%; transform: translateX(50%); }
  .page-hero-inner { grid-template-columns: 1fr; }
  .svc-block-inner { grid-template-columns: 1fr; }
  .svc-block-media { max-width: 560px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .side-contact { left: 8px; top: 46%; gap: 7px; }
  .side-contact a { width: 38px; height: 38px; border-radius: 11px; }
  .side-contact svg { width: 18px; height: 18px; }
  /* هامش يسار لمحتوى الصفحة حتى لا تغطيه الأيقونات الجانبية */
  main .container { padding-inline-end: 3.4rem; }
}

@media (max-width: 720px) {
  .gal { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .gal-item:nth-child(7n) { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 10; }
  .gal.restoration-gallery { grid-template-columns: 1fr; }
  .restoration-pair-images { gap: 0.45rem; }
  .header-actions .btn-grad { display: none; }
  .side-contact { left: 6px; gap: 6px; }
  .hero-badge { position: static; transform: none; margin-top: 1rem; inset-inline-start: auto; }
  .brand-text small { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .footer-bottom { justify-content: center; text-align: center; }
}

.gal.restoration-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.restoration-pair {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.restoration-pair h3 {
  margin-bottom: 0.65rem;
  font-size: 1rem;
  text-align: center;
}
.restoration-pair-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.restoration-pair--preview { width: 100%; }
.restoration-pair--preview figure { min-width: 0; margin: 0; }
.restoration-pair--preview img { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); object-fit: cover; }
.restoration-pair--preview figcaption { margin-top: 0.35rem; color: var(--text-soft); font-size: 0.85rem; text-align: center; }
.restoration-pair .gal-item { aspect-ratio: 4 / 5; }
.restoration-pair .gal-item:nth-child(7n) { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
.restoration-pair .gal-item img { width: 100%; height: 100%; object-fit: cover; }
.restoration-pair .gal-cap {
  top: 0.55rem;
  bottom: auto;
  inset-inline: 0.55rem;
  width: fit-content;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(8, 26, 41, 0.88);
  opacity: 1;
  transform: none;
}
.gal.restoration-gallery > .gal-item:nth-child(7n) { grid-column: auto; grid-row: auto; aspect-ratio: 1 / 1; }
.gallery-empty-note {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .mobile-nav .m-actions { grid-template-columns: 1fr; }
  .gal + p .btn { white-space: normal; }
}

@media (max-width: 360px) {
  .header-inner { gap: 0.5rem; }
  .brand { gap: 0.45rem; }
  .brand-text strong { font-size: 0.9rem; }
}

/* ---------- 22. الطباعة ---------- */
@media print {
  .site-header, .lightbox, .hero-blob, .tabbar, .side-contact { display: none !important; }
  body { background: #fff; color: #111; }
  body::before { display: none; }
}
