/* =========================================================
   شركة عمر بن حمدان للمحاماة والاستشارات القانونية
   نظام التصميم: مبني على أسلوب shadcn/ui (ألوان محايدة، حدود دقيقة،
   مكونات Button / Badge / Card / Accordion / Sheet / Dialog)
   مع كحلي الهوية ولمسة برونزية خفيفة من الشعار.
   ========================================================= */

/* ---------- 1. المتغيرات (Design Tokens) ---------- */
:root {
  --background: #ffffff;
  --foreground: #0c1824;
  --muted: #f4f4f2;
  --muted-2: #fafaf9;
  --muted-foreground: #64707c;
  --border: #e7e5e2;
  --input: #dddad5;
  --primary: #102336;
  --primary-hover: #1a3550;
  --primary-foreground: #ffffff;
  --secondary: #f1f1ef;
  --accent: #7a6352;
  --accent-soft: #f3efea;
  --silver: #cfd5dc;
  --navy-900: #0c1a28;
  --navy-950: #08131d;
  --ring: rgba(16, 35, 54, .14);
  --ok: #15803d;
  --error: #dc2626;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 20px -6px rgba(16, 24, 40, .12), 0 2px 6px -2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);

  --font-display: 'El Messiri', 'IBM Plex Sans Arabic', serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --section-y: clamp(56px, 7vw, 96px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. الأساسيات ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--foreground);
  background: var(--background);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  color: var(--foreground);
  line-height: 1.3;
  font-weight: 700;
}

h1,
h2 {
  font-family: var(--font-display);
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 300;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: top .2s;
}

.skip-link:focus {
  top: 12px;
}

/* أيقونات Lucide */
.lucide {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  stroke-width: 1.75;
}

/* ---------- 3. Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn:active {
  transform: scale(.98);
}

.btn-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

.btn-icon {
  width: 42px;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 36px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--background);
  border-color: var(--border);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--muted);
}

.btn-light {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(8, 19, 29, .25);
}

.btn-light:hover {
  background: #eef1f4;
}

.btn-outline-light {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .12);
}

/* ---------- 4. Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

.badge-secondary {
  background: var(--secondary);
  color: var(--foreground);
}

.badge-glass {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, .6);
  color: var(--foreground);
  letter-spacing: .5px;
}

/* ---------- 5. الهيدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 42px;
  width: auto;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color .2s, background-color .2s;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--foreground);
  background: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.menu-btn {
  display: none;
}

/* ---------- 6. قائمة الجوال (Sheet) ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  transition: visibility 0s .4s;
}

.drawer.is-open {
  visibility: visible;
  transition-delay: 0s;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 19, 29, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(86vw, 360px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--background);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
}

/* زخارف الهوية داخل قائمة الجوال: أسفل القائمة وزاويتها العلوية */
.drawer-panel::before,
.drawer-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: url('assets/pattern-navy.png') 0 0 / 340px auto repeat;
  pointer-events: none;
}

.drawer-panel::before {
  inset-inline: 0;
  bottom: 0;
  height: 55%;
  opacity: .13;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .6) 45%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .6) 45%, transparent 100%);
}

.drawer-panel::after {
  top: 0;
  left: 0;
  width: 75%;
  height: 40%;
  opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 100% 100% at 0% 0%, #000 0%, transparent 70%);
}

/* خلفية بيضاء خفيفة تحت الروابط حتى تبقى مقروءة فوق الزخرفة */
.drawer-nav a,
.drawer-quick .btn {
  background-color: rgba(255, 255, 255, .7);
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-head img {
  height: 36px;
  width: auto;
}

.drawer-nav {
  display: grid;
  gap: 2px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--foreground);
  opacity: 0;
  transform: translateX(12px);
  transition: background-color .2s, opacity .35s var(--ease), transform .35s var(--ease);
}

.drawer.is-open .drawer-nav a {
  opacity: 1;
  transform: none;
}

.drawer.is-open .drawer-nav a:nth-child(2) { transition-delay: .03s; }
.drawer.is-open .drawer-nav a:nth-child(3) { transition-delay: .06s; }
.drawer.is-open .drawer-nav a:nth-child(4) { transition-delay: .09s; }
.drawer.is-open .drawer-nav a:nth-child(5) { transition-delay: .12s; }
.drawer.is-open .drawer-nav a:nth-child(6) { transition-delay: .15s; }
.drawer.is-open .drawer-nav a:nth-child(7) { transition-delay: .18s; }
.drawer.is-open .drawer-nav a:nth-child(8) { transition-delay: .21s; }

.drawer-nav a:hover,
.drawer-nav a.is-active {
  background: var(--muted);
}

.dn-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--primary);
  font-size: 15px;
  flex-shrink: 0;
}

.drawer-nav a.is-active .dn-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.dn-chev {
  margin-inline-start: auto;
  color: var(--muted-foreground);
  width: 16px;
  height: 16px;
}

.drawer-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.drawer-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wa-ico {
  width: 17px;
  height: 17px;
  color: #16a34a;
}

.drawer-hours {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* ---------- 7. الهيرو (المسجد النبوي) ---------- */
.hero {
  position: relative;
  z-index: 2; /* حتى تعلو بطاقة الاعتمادات على القسم التالي */
  isolation: isolate;
  color: #fff;
  padding-top: clamp(56px, 8vw, 112px);
  background: var(--navy-950);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  animation: heroZoom 16s var(--ease) both;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 40%, rgba(8, 19, 29, .38), transparent 80%),
    linear-gradient(180deg, rgba(8, 19, 29, .88) 0%, rgba(8, 19, 29, .62) 38%, rgba(8, 19, 29, .66) 70%, rgba(8, 19, 29, .96) 100%);
}

/* زخرفة الهوية على طرفي الهيرو */
.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/pattern-white.png') center top / 460px auto repeat;
  opacity: .09;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 32%, transparent 68%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 32%, transparent 68%, #000 100%);
}

.hero-inner {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: clamp(40px, 5vw, 64px);
}

.hero-inner>* {
  animation: fadeUp .8s var(--ease) both;
}

.hero-inner>*:nth-child(2) { animation-delay: .1s; }
.hero-inner>*:nth-child(3) { animation-delay: .18s; }
.hero-inner>*:nth-child(4) { animation-delay: .26s; }

/* العنوان بتأثير الكتابة */
.hero-title {
  display: grid;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 6.2vw, 74px);
  line-height: 1.18;
  letter-spacing: -.3px;
  text-shadow: 0 2px 24px rgba(8, 19, 29, .35);
}

.tw-ghost,
.tw-live {
  grid-area: 1 / 1;
}

.hero-title .hl {
  color: #d5dce3;
  background: linear-gradient(100deg, #ffffff 0%, #d5dce3 55%, #a9b6c3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* النسخة المخفية تحفظ المساحة وتبقى مقروءة لمحركات البحث وقارئات الشاشة */
.js .tw-ghost,
.js .tw-ghost .hl {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: none;
  text-shadow: none;
}

.tw-live {
  pointer-events: none;
}

.tw-caret {
  display: inline-block;
  width: 3px;
  height: .82em;
  margin-inline-start: 6px;
  vertical-align: -.06em;
  border-radius: 2px;
  background: #fff;
  animation: blink 1s linear infinite;
}

/* أثناء الكتابة يبقى المؤشر ظاهراً، وبعد الانتهاء يومض ثلاث مرات ثم يختفي */
.tw-live.is-typing .tw-caret {
  animation: none;
}

.tw-live.is-done .tw-caret {
  animation: blink 1s linear 3, fadeOut .4s 3s forwards;
}

.hero-lead {
  max-width: 660px;
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.9;
  color: rgba(255, 255, 255, .84);
  text-wrap: balance;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.hero-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .7);
}

.hero-place svg {
  width: 15px;
  height: 15px;
}

/* بطاقة الاعتمادات المتداخلة مع حافة الهيرو */
.trust-card {
  position: relative;
  z-index: 3;
  margin-bottom: -58px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-lg);
  color: var(--foreground);
  animation: fadeUp .9s .35s var(--ease) both;
}

.trust-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-inline-end: 28px;
  border-inline-end: 1px solid var(--border);
}

.trust-title strong {
  font-size: 15.5px;
  line-height: 1.45;
}

.trust-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--muted-2);
  color: var(--primary);
  font-size: 19px;
}

.trust-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  text-align: center;
}

.trust-list li+li {
  border-inline-start: 1px solid var(--border);
}

.trust-list small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.trust-logo {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.trust-logo img {
  height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.trust-logo b {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.hero+.section {
  padding-top: calc(var(--section-y) + 58px);
}

/* ---------- 8. الأقسام العامة ---------- */
.section {
  position: relative;
  isolation: isolate;
  padding-block: var(--section-y);
}

.section-muted {
  background: var(--muted-2);
  border-block: 1px solid var(--border);
}

/* زخارف الهوية في كل قسم: زاوية علوية وزاوية سفلية متقابلتان */
.orn-a::before,
.orn-a::after,
.orn-b::before,
.orn-b::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(640px, 85%);
  height: min(460px, 70%);
  background: url('assets/pattern-navy.png') 0 0 / 420px auto repeat;
  opacity: .12;
  pointer-events: none;
}

.orn-a::before {
  top: 0;
  left: 0;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 100% 100% at 0% 0%, #000 0%, transparent 72%);
}

.orn-a::after {
  bottom: 0;
  right: 0;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 0%, transparent 72%);
}

.orn-b::before {
  top: 0;
  right: 0;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 100% 100% at 100% 0%, #000 0%, transparent 72%);
}

.orn-b::after {
  bottom: 0;
  left: 0;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0% 100%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 100% 100% at 0% 100%, #000 0%, transparent 72%);
}

.section-navy {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(207, 213, 220, .08), transparent 60%),
    linear-gradient(165deg, var(--navy-900), var(--navy-950));
  color: #fff;
}

.section-navy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/pattern-white.png') center / 460px auto repeat;
  opacity: .075;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, #000 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, #000 100%);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.section-head.align-start {
  align-items: flex-start;
  text-align: start;
  margin-inline: 0;
}

/* شارة القسم (بديل الخطوط الجانبية) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 14px;
}

.eyebrow svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25;
  margin-bottom: 10px;
  text-wrap: balance;
}

.section-head p {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--muted-foreground);
  text-wrap: balance;
}

.section-head.on-dark h2 {
  color: #fff;
}

.section-head.on-dark p {
  color: rgba(255, 255, 255, .66);
}

.section-head.on-dark .eyebrow {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .9);
  box-shadow: none;
}

.section-head.on-dark .eyebrow svg {
  color: var(--silver);
}

/* ---------- 9. الخدمات ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.svc-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}

.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d9d6d1;
}

.svc-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
}

.svc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.svc-card:hover .svc-media img {
  transform: scale(1.05);
}

.svc-media .badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
}

.svc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 8px;
}

.svc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.svc-icon,
.post-icon,
.why-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--muted-2);
  color: var(--primary);
}

.svc-icon {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

.svc-title h3 {
  font-size: 18px;
}

.svc-body p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted-foreground);
  margin-bottom: 14px;
}

.svc-more,
.post-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--foreground);
  transition: color .2s;
}

.svc-more svg,
.post-link svg {
  width: 16px;
  height: 16px;
  transition: transform .3s var(--ease);
}

.svc-more:hover,
.post-link:hover {
  color: var(--accent);
}

.svc-more:hover svg,
.post-link:hover svg {
  transform: translateX(-4px);
}

/* ---------- 10. القطاعات ---------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.sector {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .09);
  transition: transform .3s var(--ease), background-color .3s, border-color .3s;
}

.sector:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .2);
}

.sector-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e6eaee;
  font-size: 19px;
  margin-bottom: 16px;
}

.sector h3 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 6px;
}

.sector p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .62);
}

/* ---------- 11. لماذا نحن ---------- */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: stretch;
}

.why-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.why-item {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.why-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.why-icon {
  width: 40px;
  height: 40px;
  font-size: 18px;
  margin-bottom: 14px;
}

.why-item h3 {
  font-size: 17.5px;
  margin-bottom: 4px;
}

.why-item p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted-foreground);
}

.why-media {
  position: relative;
  min-height: 460px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--primary);
}

.why-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(8, 19, 29, .7));
}

.why-quote {
  position: absolute;
  z-index: 1;
  inset-inline: 16px;
  bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--foreground);
}

.why-quote svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  transform: scaleX(-1);
  margin-top: 4px;
}

.why-quote p {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
}

/* ---------- 12. فريق العمل ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.member {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--navy-900);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.member:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* شعار المكتب ثابت أعلى يسار كل بطاقة (مع الصور والبدائل) */
.member-mark {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-sm);
}

.member-mark img {
  height: 24px;
  width: auto;
}

.member-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .8s var(--ease);
}

.member:hover .member-photo img {
  transform: scale(1.04);
}

.monogram {
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(70% 55% at 50% 32%, rgba(207, 213, 220, .14), transparent 70%),
    linear-gradient(165deg, #1b3a56, var(--navy-950));
}

.monogram::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/pattern-white.png') center / 360px auto repeat;
  opacity: .06;
}

.mono-letter {
  width: 116px;
  height: 116px;
  margin-bottom: 26%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .04);
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  color: #e9edf1;
  padding-bottom: 8px;
}

.member-info {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 56px 18px 18px;
  background: linear-gradient(180deg, rgba(8, 19, 29, 0) 0%, rgba(8, 19, 29, .82) 50%, rgba(8, 19, 29, .94) 100%);
  color: #fff;
}

.member-info h3 {
  color: #fff;
  font-size: 17.5px;
  margin-bottom: 2px;
}

.member-info p {
  font-size: 13.5px;
  font-weight: 500;
  color: #d9dee4;
  line-height: 1.6;
}

.member-info span {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
}

/* ---------- 13. المدونة ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.post-icon {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.post h3 {
  font-size: 17.5px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}

.post-meta svg {
  width: 14px;
  height: 14px;
}

.post>p:not(.post-meta) {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

/* ---------- 14. الأسئلة الشائعة (Accordion) ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.faq-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.faq-help {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}

.faq-help-icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--muted-2);
  color: var(--primary);
  font-size: 20px;
}

.faq-help strong {
  display: block;
  font-size: 15.5px;
}

.faq-help p {
  font-size: 14px;
  color: var(--muted-foreground);
}

.faq-help .btn {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.faq {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  padding: 4px 22px;
}

.faq details+details {
  border-top: 1px solid var(--border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
  transition: color .2s;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary svg {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
  transition: transform .3s var(--ease);
}

.faq details[open] summary svg {
  transform: rotate(180deg);
}

.faq .answer {
  padding: 0 0 18px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted-foreground);
}

.faq details[open] .answer {
  animation: fadeDown .35s var(--ease);
}

.faq .answer p+p,
.faq .answer ul+p {
  margin-top: 8px;
}

.faq .answer ul {
  margin-top: 8px;
  padding-inline-start: 20px;
  list-style: disc;
}

.faq .answer strong {
  color: var(--foreground);
}

/* ---------- 15. التواصل ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "panel form"
    "map form";
  grid-template-rows: auto 1fr;
  gap: 20px;
}

.contact-panel {
  grid-area: panel;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--primary), var(--navy-950));
  color: #fff;
}

.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/pattern-white.png') center / 440px auto repeat;
  opacity: .05;
}

.contact-panel .section-head {
  margin-bottom: 22px;
}

.contact-panel .section-head h2 {
  font-size: clamp(26px, 2.6vw, 34px);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list a,
.contact-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  transition: background-color .2s, border-color .2s;
}

.contact-list a:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .2);
}

.cl-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e6eaee;
  font-size: 17px;
}

.contact-list small {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .58);
  line-height: 1.4;
}

.contact-list b {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-list b[dir="ltr"] {
  text-align: right;
}

.contact-form {
  grid-area: form;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-sm);
}

.form-head h3 {
  font-size: clamp(20px, 2vw, 23px);
  margin-bottom: 2px;
}

.form-head p {
  font-size: 14.5px;
  color: var(--muted-foreground);
  text-wrap: balance;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.req {
  color: var(--error);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--input);
  background: var(--background);
  font-size: 16px;
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}

.field input[dir="ltr"] {
  text-align: right;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa3ad;
}

.field textarea {
  height: auto;
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364707c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-inline-end: 36px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #9aa6b2;
  box-shadow: 0 0 0 3px var(--ring);
}

.field.has-error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* حقل الرسالة يملأ المساحة المتبقية حتى يتساوى النموذج مع العمود المجاور */
.field-grow {
  flex: 1;
  grid-template-rows: auto 1fr;
}

.field-grow textarea {
  height: 100%;
}

.hint {
  font-size: 13px;
  color: var(--muted-foreground);
}

.hint a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-status {
  font-size: 14.5px;
  font-weight: 500;
}

.form-status:empty {
  display: none;
}

.map-wrap {
  grid-area: map;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 200px;
  background: var(--muted);
}

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
  filter: grayscale(.35);
}

/* ---------- 16. الفوتر (مضغوط) ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  background: var(--muted-2);
  border-top: 1px solid var(--border);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: min(520px, 60%);
  height: 100%;
  background: url('assets/pattern-navy.png') 0 0 / 380px auto repeat;
  opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse 100% 120% at 100% 0%, #000 5%, transparent 70%);
  mask-image: radial-gradient(ellipse 100% 120% at 100% 0%, #000 5%, transparent 70%);
  pointer-events: none;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "brand acc quick";
  align-items: center;
  gap: 16px 40px;
  padding-block: 26px;
}

.footer-brand {
  grid-area: brand;
}

.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted-foreground);
  max-width: 320px;
}

.footer-quick {
  grid-area: quick;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.footer-quick .btn {
  width: 36px;
  height: 36px;
}

.footer-acc {
  grid-area: acc;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.acc {
  height: 58px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}

.acc img {
  max-height: 40px;
  max-width: 130px;
  width: auto;
  height: auto;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  padding-inline-end: 76px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
}

.footer-meta,
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-meta svg,
.to-top svg {
  width: 15px;
  height: 15px;
}

.to-top {
  font-weight: 500;
  color: var(--foreground);
}

.to-top:hover {
  color: var(--accent);
}

/* ---------- 17. زر واتساب العائم ---------- */
.wa-float {
  position: fixed;
  z-index: 60;
  inset-inline-end: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .35);
  transition: transform .35s var(--ease), opacity .35s var(--ease), visibility .35s;
}

.js .wa-float:not(.is-shown) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.9);
}

.wa-float svg {
  width: 29px;
  height: 29px;
}

.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: pulse 2.6s ease-out infinite;
}

.wa-float:hover {
  transform: scale(1.06);
}

/* ---------- 18. النافذة المنبثقة (Dialog) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 19, 29, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(22px, 3.5vw, 32px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal.is-open .modal-card {
  opacity: 1;
  transform: none;
}

.modal-x {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
}

.modal-card h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 27px);
  margin: 12px 0 4px;
  padding-inline-end: 40px;
}

.modal-meta {
  font-size: 13.5px;
  color: var(--muted-foreground);
}

.modal-meta:empty {
  display: none;
}

.modal-content {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 15.5px;
  line-height: 1.95;
  color: #3b4652;
}

.modal-content p+p,
.modal-content p+ul,
.modal-content p+ol,
.modal-content ul+p,
.modal-content ol+p {
  margin-top: 12px;
}

.modal-content ul,
.modal-content ol {
  margin-top: 12px;
  padding-inline-start: 22px;
  display: grid;
  gap: 6px;
}

.modal-content ul {
  list-style: disc;
}

.modal-content li::marker {
  color: var(--accent);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- 19. مؤشرات التمرير ---------- */
.scroller-dots {
  display: none;
}

/* ---------- 20. الحركة ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* =========================================================
   التجاوب
   ========================================================= */
@media (max-width: 1100px) {
  .main-nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .svc-grid,
  .team-grid,
  .sector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand quick"
      "acc acc";
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 38px;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-content .section-head,
  .faq-aside .section-head {
    align-items: center;
    text-align: center;
    margin-inline: auto;
  }

  .why-media {
    min-height: 0;
    aspect-ratio: 16 / 8;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-aside {
    display: contents;
  }

  .faq-aside .section-head {
    order: 1;
    margin-bottom: 0;
  }

  .faq {
    order: 2;
  }

  .faq-help {
    order: 3;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "panel"
      "form"
      "map";
    grid-template-rows: none;
  }
}

/* الجوال */
@media (max-width: 720px) {
  :root {
    --header-h: 60px;
    --section-y: 52px;
  }

  body {
    font-size: 15.5px;
  }

  .header-inner {
    gap: 8px;
  }

  .brand img {
    height: 34px;
  }

  .header-phone {
    display: none;
  }

  .header-cta {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .menu-btn {
    width: 38px;
    height: 38px;
  }

  /* الهيرو */
  .hero {
    padding-top: 0;
  }

  /* الصورة أطول قليلاً من الهيرو ومثبّتة من الأعلى، حتى تنزل القبة إلى المساحة بين النص وبطاقة الاعتمادات */
  .hero-media img {
    height: calc(100% + 30px);
    object-position: 55% 0;
  }

  /* هيرو مريح على الجوال، وبطاقة الاعتمادات قريبة من النص دون أن تغطي القبة */
  .hero-inner {
    min-height: calc(100vh - var(--header-h) - 175px);
    min-height: calc(100svh - var(--header-h) - 175px);
    justify-content: center;
    padding-block: 24px 96px;
  }

  .hero-title {
    font-size: clamp(32px, 9.6vw, 44px);
    line-height: 1.3;
    margin: 0 0 20px;
  }

  .hero-lead {
    font-size: 15.5px;
    line-height: 2;
  }

  .hero-cta {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 32px;
  }

  .hero-cta .btn {
    height: 50px;
    padding: 0 10px;
    font-size: 15px;
  }

  .hero-place {
    margin-top: 24px;
    font-size: 12.5px;
  }

  .hero-overlay::after {
    background-size: 300px auto;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 35%, transparent 75%, #000 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 35%, transparent 75%, #000 100%);
  }

  .trust-card {
    flex-direction: column;
    gap: 12px;
    padding: 14px 10px;
    margin-bottom: -48px;
    border-radius: var(--radius-lg);
  }

  .trust-title {
    padding: 0;
    border: 0;
    gap: 8px;
  }

  .trust-title br {
    display: none;
  }

  .trust-title strong {
    font-size: 14px;
  }

  .trust-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .trust-list {
    width: 100%;
  }

  .trust-list li {
    padding-inline: 6px;
    gap: 4px;
  }

  .trust-list small {
    font-size: 10.5px;
  }

  .trust-logo {
    height: 38px;
    gap: 4px;
  }

  .trust-logo img {
    height: 34px;
  }

  .trust-logo b {
    font-size: 11px;
    white-space: normal;
    line-height: 1.3;
  }

  .hero+.section {
    padding-top: calc(var(--section-y) + 48px);
  }

  /* عناوين الأقسام */
  .section-head h2 {
    font-size: 27px;
  }

  .section-head p {
    font-size: 15px;
  }

  .eyebrow {
    font-size: 12.5px;
    margin-bottom: 10px;
  }

  .orn-a::before,
  .orn-a::after,
  .orn-b::before,
  .orn-b::after {
    width: 90%;
    height: min(320px, 60%);
    background-size: 300px auto;
    opacity: .13;
  }

  /* تمرير أفقي للبطاقات بدل صفحة طويلة */
  .scroller,
  .sector-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .scroller {
    grid-auto-columns: 84%;
  }

  .sector-grid {
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: 46%;
  }

  .scroller::-webkit-scrollbar,
  .sector-grid::-webkit-scrollbar {
    display: none;
  }

  .scroller>*,
  .sector-grid>* {
    scroll-snap-align: start;
  }

  .scroller-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }

  .scroller-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d6d3ce;
    cursor: pointer;
    transition: width .3s var(--ease), background-color .3s;
  }

  .scroller-dots button.is-active {
    width: 22px;
    background: var(--primary);
  }

  .scroller-dots.on-dark button {
    background: rgba(255, 255, 255, .22);
  }

  .scroller-dots.on-dark button.is-active {
    background: #fff;
  }

  /* الخدمات */
  .svc-body {
    padding: 14px 8px 6px;
  }

  .svc-title h3 {
    font-size: 17px;
  }

  .svc-body p {
    font-size: 14px;
    margin-bottom: 10px;
  }

  /* القطاعات */
  .sector {
    padding: 16px 14px;
  }

  .sector-icon {
    width: 38px;
    height: 38px;
    font-size: 17px;
    margin-bottom: 12px;
  }

  .sector h3 {
    font-size: 15px;
    line-height: 1.45;
  }

  .sector p {
    font-size: 13px;
    line-height: 1.75;
  }

  /* لماذا نحن: شبكة 2×2 مرتبة ثم بطاقة الاقتباس */
  .why-grid {
    gap: 14px;
  }

  .why-list {
    gap: 10px;
  }

  .why-item {
    padding: 14px;
  }

  .why-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
    margin-bottom: 10px;
  }

  .why-item h3 {
    font-size: 15.5px;
  }

  .why-item p {
    font-size: 13px;
    line-height: 1.7;
  }

  .why-media {
    aspect-ratio: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--primary), var(--navy-950));
    border-color: transparent;
  }

  .why-media::after {
    display: none;
  }

  .why-media img {
    position: static;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: var(--radius);
  }

  .why-quote {
    position: static;
    padding: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: #fff;
    gap: 8px;
  }

  .why-quote svg {
    width: 18px;
    height: 18px;
    color: var(--silver);
  }

  .why-quote p {
    font-size: 15px;
    line-height: 1.7;
  }

  /* الفريق */
  .team-grid {
    grid-auto-columns: 66%;
  }

  .mono-letter {
    width: 96px;
    height: 96px;
    font-size: 48px;
  }

  .member-info {
    padding: 48px 14px 14px;
  }

  .member-info h3 {
    font-size: 16px;
  }

  .member-info p {
    font-size: 12.5px;
  }

  .member-mark {
    width: 34px;
    height: 34px;
    top: 10px;
    left: 10px;
  }

  .member-mark img {
    height: 21px;
  }

  /* المدونة */
  .post {
    padding: 18px;
  }

  .post-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .post h3 {
    font-size: 16.5px;
  }

  .post>p:not(.post-meta) {
    font-size: 14px;
    margin-bottom: 10px;
  }

  /* الأسئلة الشائعة */
  .faq {
    padding: 2px 16px;
  }

  .faq summary {
    padding: 15px 0;
    font-size: 15px;
  }

  .faq .answer {
    font-size: 14.5px;
    padding-bottom: 15px;
  }

  .faq-help {
    padding: 14px;
  }

  /* التواصل */
  .contact-grid {
    gap: 14px;
  }

  .contact-panel,
  .contact-form,
  .map-wrap {
    border-radius: var(--radius-lg);
  }

  .contact-panel .section-head {
    margin-bottom: 16px;
  }

  .contact-panel .section-head h2 {
    font-size: 25px;
  }

  .contact-list a,
  .contact-list div {
    padding: 10px 12px;
    gap: 12px;
  }

  .cl-icon {
    width: 36px;
    height: 36px;
  }

  .contact-list b {
    font-size: 14.5px;
  }

  .contact-form {
    gap: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .map-wrap,
  .map-frame {
    min-height: 180px;
  }

  /* الفوتر: لا يتجاوز ربع الشاشة */
  .footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand quick"
      "acc acc";
    gap: 12px;
    padding-block: 14px 12px;
  }

  .footer-brand img {
    height: 32px;
    margin: 0;
  }

  .footer-brand p,
  .footer-meta,
  .to-top {
    display: none;
  }

  .footer-quick {
    gap: 6px;
  }

  .footer-acc {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .acc {
    height: 46px;
    padding: 6px;
    border-radius: var(--radius-md);
  }

  .acc img {
    max-height: 30px;
    max-width: 100%;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 2px 14px;
    padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
    padding-inline-end: 60px;
    font-size: 11px;
    line-height: 1.55;
  }

  .footer-bottom>p:first-child {
    flex-basis: 100%;
  }

  .footer-legal {
    gap: 14px;
  }

  .wa-float {
    width: 50px;
    height: 50px;
    inset-inline-end: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .wa-float svg {
    width: 26px;
    height: 26px;
  }

  /* النافذة كورقة سفلية */
  .modal {
    padding: 0;
    place-items: end stretch;
  }

  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateY(40px);
  }

  .modal-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 4px;
    background: var(--border);
  }

  .modal-content {
    font-size: 15px;
  }

  .modal-actions .btn {
    flex: 1;
  }
}

@media (max-width: 380px) {
  .header-cta {
    display: none;
  }

  .hero-cta {
    grid-template-columns: 1fr;
  }

  .sector-grid {
    grid-auto-columns: 62%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .tw-caret {
    animation: none !important;
  }

  .tw-live.is-done .tw-caret {
    display: none;
  }
}

/* =========================================================
   روابط الصفحات النظامية في الفوتر
   ========================================================= */
.footer-legal {
  display: flex;
  gap: 18px;
}

.footer-legal a {
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color .2s;
}

.footer-legal a:hover {
  color: var(--foreground);
}

/* =========================================================
   صفحات الشروط والأحكام وسياسة الخصوصية
   ========================================================= */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(40px, 6vw, 76px);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(207, 213, 220, .1), transparent 60%),
    linear-gradient(160deg, var(--primary), var(--navy-950));
  color: #fff;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/pattern-white.png') center / 440px auto repeat;
  opacity: .08;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 45%, transparent 60%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 45%, transparent 60%, #000 100%);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .7);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.25;
  margin-bottom: 10px;
}

.page-hero p {
  max-width: 640px;
  font-size: clamp(15.5px, 1.3vw, 17.5px);
  line-height: 1.9;
  color: rgba(255, 255, 255, .8);
}

.page-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  font-size: 13px;
  color: rgba(255, 255, 255, .85);
}

.page-meta svg {
  width: 15px;
  height: 15px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* فهرس المحتويات */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}

.toc summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.toc .toc-chev {
  display: none;
  margin-inline-start: auto;
  color: var(--muted-foreground);
  transition: transform .3s var(--ease);
}

.toc ol {
  list-style: none;
  display: grid;
  gap: 2px;
}

.toc ol a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-foreground);
  transition: background-color .2s, color .2s;
}

.toc ol a:hover,
.toc ol a.is-active {
  background: var(--muted);
  color: var(--foreground);
}

.toc ol a.is-active .num {
  color: var(--primary);
}

.toc .num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  min-width: 20px;
}

/* نص الصفحة */
.legal-body {
  max-width: 780px;
}

.legal-body section {
  scroll-margin-top: calc(var(--header-h) + 16px);
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-body section:first-child {
  padding-top: 0;
}

.legal-body h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: clamp(18.5px, 1.6vw, 21px);
}

.legal-body h2 .num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

.legal-body p,
.legal-body li {
  font-size: 15.5px;
  line-height: 1.95;
  color: #3b4652;
}

.legal-body p+p,
.legal-body ul+p,
.legal-body p+ul {
  margin-top: 10px;
}

.legal-body ul {
  padding-inline-start: 22px;
  list-style: disc;
  display: grid;
  gap: 6px;
}

.legal-body li::marker {
  color: var(--accent);
}

.legal-body strong {
  color: var(--foreground);
}

.legal-body section a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid #e6ddd2;
  background: var(--accent-soft);
}

.callout svg {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  color: var(--accent);
}

.legal-body .callout p {
  font-weight: 500;
  color: var(--foreground);
}

.legal-body ul.legal-contact {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  gap: 8px;
}

.legal-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-contact svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.legal-body .legal-contact a {
  font-weight: 500;
  text-decoration: none;
}

.legal-end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.legal-body .legal-other {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  font-weight: 400;
  text-decoration: none;
  color: var(--foreground);
  transition: box-shadow .3s var(--ease), border-color .3s;
}

.legal-other:hover {
  border-color: #d3cfc9;
  box-shadow: var(--shadow-md);
}

.lo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--muted-2);
  color: var(--primary);
  font-size: 19px;
}

.legal-other strong {
  display: block;
  font-size: 16px;
}

.legal-other small {
  display: block;
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.legal-other>svg {
  margin-inline-start: auto;
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

@media (min-width: 901px) {

  /* على الشاشات الكبيرة يبقى الفهرس مفتوحاً دائماً */
  .toc summary {
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    padding: 12px 14px;
  }

  .toc:not([open]) summary {
    padding-bottom: 2px;
    margin-bottom: 0;
    border-bottom: 0;
  }

  .toc .toc-chev {
    display: block;
  }

  .toc[open] .toc-chev {
    transform: rotate(180deg);
  }

  .legal-end {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .page-hero {
    padding-block: 32px 36px;
  }

  .legal-body section {
    padding-block: 20px;
  }

  .legal-body p,
  .legal-body li {
    font-size: 15px;
    line-height: 1.9;
  }

  .legal-body h2 .num {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
