/* ==========================================================================
   شركة نضيد الشرق المحدودة — نظام التصميم
   ========================================================================== */

:root {
  /* الألوان الأساسية مستخرجة من الشعار */
  --navy-900: #0a1c33;
  --navy-800: #0f2b4c;
  --navy-700: #17395f;
  --navy-600: #1f4a78;
  --gold-500: #c9a44c;
  --gold-400: #dcbc6e;
  --gold-300: #ecd9a5;

  --ink: #16202e;
  --ink-soft: #52627a;
  --line: #e4e8ee;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --cream: #faf7f1;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(15, 43, 76, .06);
  --shadow: 0 10px 30px rgba(15, 43, 76, .09);
  --shadow-lg: 0 24px 60px rgba(10, 28, 51, .16);

  --container: 1200px;
  --header-h: 84px;

  --font: "Tajawal", "IBM Plex Sans Arabic", -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* ---------- إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.3; font-weight: 800; letter-spacing: -.2px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
p { margin: 0 0 1em; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* ---------- إمكانية الوصول ---------- */
.skip-link {
  position: fixed; inset-block-start: -100px; inset-inline-start: 20px; z-index: 300;
  background: var(--navy-800); color: #fff; padding: 12px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700;
  transition: inset-block-start .2s ease;
}
.skip-link:focus { inset-block-start: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}
.site-header.transparent :focus-visible { outline-color: #fff; }

/* ---------- عناصر مشتركة ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 28px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .98rem; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-400)); color: var(--navy-900); box-shadow: 0 8px 22px rgba(201, 164, 76, .32); }
.btn-gold:hover { box-shadow: 0 12px 30px rgba(201, 164, 76, .42); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { border-color: var(--line); background: #fff; color: var(--navy-800); }
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-500); }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em;
  color: var(--gold-500); text-transform: uppercase; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold-500); }

.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.lead { font-size: 1.1rem; color: var(--ink-soft); }

/* ==========================================================================
   الترويسة
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: height .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.transparent { background: transparent; backdrop-filter: none; }
.site-header.transparent .nav-link, .site-header.transparent .brand-name { color: #fff; }
.site-header.transparent .brand-sub { color: rgba(255, 255, 255, .7); }
.site-header.transparent .nav-toggle span { background: #fff; }
.site-header.scrolled {
  height: 70px; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-color: var(--line); box-shadow: var(--shadow-sm);
}
.site-header.scrolled .nav-link, .site-header.scrolled .brand-name { color: var(--navy-800); }
.site-header.scrolled .brand-sub { color: var(--ink-soft); }
.site-header.scrolled .nav-toggle span { background: var(--navy-800); }

.header-inner { display: flex; align-items: center; gap: 28px; width: min(100% - 40px, var(--container)); margin-inline: auto; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; transition: height .25s ease; }
.site-header.scrolled .brand img { height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 1.05rem; color: var(--navy-800); transition: color .25s ease; }
.brand-sub { font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; }

.nav { margin-inline-start: auto; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative; display: block; padding: 8px 14px; border-radius: 8px;
  font-weight: 600; font-size: .96rem; color: var(--navy-800);
  transition: color .2s ease;
}
.nav-link::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px;
  background: var(--gold-500); transform: scaleX(0); transform-origin: right;
  transition: transform .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--gold-500) !important; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta { display: none; }   /* يظهر داخل قائمة الجوال فقط */

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy-800); border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(11px) rotate(-45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-11px) rotate(45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: flex; margin-inline-start: auto; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 12px 20px 22px;
    transform: translateY(-120%); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { color: var(--navy-800) !important; padding: 14px 8px; border-bottom: 1px solid var(--surface-alt); }
  .nav-link::after { display: none; }
  .nav-cta { display: inline-flex; margin-top: 14px; width: 100%; }
}

/* ==========================================================================
   الواجهة الرئيسية (Hero)
   ========================================================================== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 60px) 0 70px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(275deg, rgba(10, 28, 51, .18) 0%, rgba(10, 28, 51, .72) 46%, rgba(10, 28, 51, .94) 100%);
}
.hero-content { max-width: 640px; color: #fff; }
.hero-content h1 { color: #fff; margin-bottom: .4em; }
.hero-content h1 .accent { color: var(--gold-400); }
.hero-content .lead { color: rgba(255, 255, 255, .84); font-size: clamp(1rem, 1.5vw, 1.18rem); margin-bottom: 34px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; }
.hero-stats .stat strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--gold-400); line-height: 1.2; }
.hero-stats .stat span { font-size: .9rem; color: rgba(255, 255, 255, .72); }

/* شريط البحث السريع */
.quick-search {
  position: relative; margin-top: -58px; z-index: 5;
}
.quick-search-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 22px; display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr) auto; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.field select, .field input {
  height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-alt); font-size: .95rem; font-weight: 600; color: var(--ink);
  transition: border-color .2s ease, background .2s ease; width: 100%;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352627a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; background-size: 16px;
  padding-inline-start: 14px; padding-inline-end: 36px;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--gold-500); background: #fff; }
.quick-search-card .btn { height: 48px; }

@media (max-width: 900px) {
  .quick-search-card { grid-template-columns: 1fr 1fr; }
  .quick-search-card .btn { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .quick-search-card { grid-template-columns: 1fr; }
  .hero-stats { gap: 26px; }
}

/* ==========================================================================
   الترويسة الداخلية للصفحات
   ========================================================================== */
.page-hero {
  position: relative; padding: calc(var(--header-h) + 80px) 0 70px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset-block: -60%; inset-inline-start: -25%; width: 85%;
  background: radial-gradient(closest-side, rgba(201, 164, 76, .18), rgba(201, 164, 76, 0) 78%);
  pointer-events: none;
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255, 255, 255, .78); max-width: 620px; font-size: 1.05rem; margin: 0; }
.breadcrumb { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: rgba(255, 255, 255, .6); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--gold-400); }
.breadcrumb .sep { opacity: .5; }

/* ==========================================================================
   نبذة عن الشركة
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 76px); align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 3.2; object-fit: cover; width: 100%; }
.about-media::before {
  content: ""; position: absolute; inset-block-start: -18px; inset-inline-end: -18px;
  width: 55%; height: 55%; border: 2px solid var(--gold-500); border-radius: var(--radius-lg); z-index: -1;
}
.about-badge {
  position: absolute; inset-block-end: -26px; inset-inline-start: -20px;
  background: var(--navy-800); color: #fff; padding: 20px 26px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); text-align: center;
}
.about-badge strong { display: block; font-size: 2rem; color: var(--gold-400); line-height: 1.1; }
.about-badge span { font-size: .82rem; color: rgba(255, 255, 255, .75); }

.check-list { display: grid; gap: 14px; margin: 26px 0 32px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; }
.check-list .tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%; margin-top: 3px;
  background: rgba(201, 164, 76, .15); color: var(--gold-500);
  display: grid; place-items: center;
}
.check-list .tick svg { width: 14px; height: 14px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media::before { display: none; }
  .about-badge { inset-inline-start: 16px; inset-block-end: 16px; }
}

/* ==========================================================================
   الخدمات
   ========================================================================== */
.cards-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards-grid.cards-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cards-grid.cards-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 28px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transform: scaleX(0); transform-origin: right; transition: transform .35s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(15, 43, 76, .08), rgba(201, 164, 76, .16));
  color: var(--navy-800); margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { margin-bottom: .4em; }
.service-card p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* ==========================================================================
   بطاقات الوحدات
   ========================================================================== */
.units-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.unit-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.unit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* خلفية شفافة خفيفة لكل بطاقة حسب حالة الوحدة */
.unit-card.status-available { background: rgba(20, 163, 90, .5); border-color: rgba(20, 163, 90, .6); }
.unit-card.status-soon { background: rgba(217, 131, 36, .5); border-color: rgba(217, 131, 36, .6); }
.unit-card.status-rented { background: rgba(107, 114, 128, .5); border-color: rgba(107, 114, 128, .6); }
.unit-card.status-available .unit-specs { border-block-color: rgba(20, 163, 90, .5); }
.unit-card.status-soon .unit-specs { border-block-color: rgba(217, 131, 36, .5); }
.unit-card.status-rented .unit-specs { border-block-color: rgba(107, 114, 128, .5); }

/* تغميق النصوص الفاتحة فوق الخلفية الملوّنة حتى يبقى التباين مقروءاً */
.unit-card[class*="status-"] .unit-type,
.unit-card[class*="status-"] .unit-location,
.unit-card[class*="status-"] .unit-specs,
.unit-card[class*="status-"] .unit-price > span { color: var(--navy-800); }
.unit-card[class*="status-"] .unit-location svg { color: var(--navy-800); }
.unit-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); }
.unit-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.unit-card:hover .unit-media img { transform: scale(1.07); }

.unit-tags { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  padding: 5px 13px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: rgba(255, 255, 255, .95); color: var(--navy-800); backdrop-filter: blur(4px);
}
.tag-available { background: #14a35a; color: #fff; }
.tag-soon { background: #d98324; color: #fff; }
.tag-rented { background: #6b7280; color: #fff; }
.tag-featured { background: var(--gold-500); color: var(--navy-900); }

.unit-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.unit-type { font-size: .82rem; font-weight: 700; color: var(--gold-500); margin-bottom: 6px; }
.unit-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.unit-location { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .9rem; margin-bottom: 16px; }
.unit-location svg { width: 15px; height: 15px; flex: none; color: var(--gold-500); }

.unit-specs {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 0;
  border-block: 1px solid var(--line); margin-bottom: 16px;
  font-size: .88rem; color: var(--ink-soft); font-weight: 600;
}
.unit-specs .spec { display: flex; align-items: center; gap: 7px; }
.unit-specs svg { width: 16px; height: 16px; color: var(--navy-600); flex: none; }

.unit-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.unit-price strong { font-size: 1.3rem; font-weight: 800; color: var(--navy-800); white-space: nowrap; }
.unit-price > span { font-size: .82rem; color: var(--ink-soft); display: block; }
.unit-price .sar { font-size: .95rem; font-weight: 700; color: inherit; }

/* ==========================================================================
   صفحة الوحدات — الفلاتر
   ========================================================================== */
.units-layout { display: grid; grid-template-columns: 290px 1fr; gap: 34px; align-items: start; }

.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; position: sticky; top: calc(var(--header-h) + 20px);
}
.filters h3 { font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filters .reset { font-size: .82rem; font-weight: 700; color: var(--gold-500); cursor: pointer; background: none; border: 0; padding: 0; }
.filters .reset:hover { text-decoration: underline; }
.filter-group { padding: 18px 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: 0; }
.filter-group > h4 { font-size: .9rem; margin-bottom: 12px; color: var(--navy-800); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: .86rem; font-weight: 600; cursor: pointer; color: var(--ink-soft);
  transition: all .2s ease;
}
.chip:hover { border-color: var(--gold-500); color: var(--gold-500); }
.chip.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.range-value { font-size: .88rem; font-weight: 700; color: var(--navy-800); margin-top: 10px; }
input[type="range"] {
  width: 100%; height: 4px; border-radius: 4px; appearance: none;
  background: var(--line); cursor: pointer; margin: 6px 0 0;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-500); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.results-count { font-weight: 700; color: var(--ink-soft); font-size: .95rem; }
.results-count b { color: var(--navy-800); font-size: 1.1rem; }
.results-bar .field { flex-direction: row; align-items: center; gap: 10px; }
.results-bar select { height: 42px; width: auto; min-width: 180px; }

.filters-toggle { display: none; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.empty-state svg { width: 56px; height: 56px; color: var(--line); margin-bottom: 16px; }
.empty-state h3 { color: var(--navy-800); }

@media (max-width: 940px) {
  .units-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
}

/* ==========================================================================
   نافذة تفاصيل الوحدة
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 24px; background: rgba(10, 28, 51, .62); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden;
  /* الظهور فوري عند الفتح، والإخفاء بعد انتهاء التلاشي */
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.modal[hidden] { display: none; }
.modal.open { opacity: 1; visibility: visible; transition: opacity .28s ease, visibility 0s; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg); width: min(100%, 940px);
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.98); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal-card { transform: none; }
.modal-close {
  position: absolute; inset-block-start: 18px; inset-inline-end: 18px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: var(--navy-800);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: #fff; transform: rotate(90deg); }
.modal-close svg { width: 20px; height: 20px; }
.modal-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-alt); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 30px; }
.modal-body .unit-type { font-size: .9rem; }
.modal-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
.modal-price { text-align: left; }
.modal-price strong { font-size: 1.7rem; color: var(--navy-800); display: block; line-height: 1.2; }
.modal-price span { font-size: .85rem; color: var(--ink-soft); }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin: 22px 0 26px; }
.spec-box {
  background: var(--surface-alt); border-radius: var(--radius); padding: 16px; text-align: center;
}
.spec-box svg { width: 22px; height: 22px; color: var(--gold-500); margin: 0 auto 8px; }
.spec-box strong { display: block; font-size: 1.05rem; color: var(--navy-800); }
.spec-box span { font-size: .8rem; color: var(--ink-soft); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 28px; }
.feature-list li { display: flex; align-items: center; gap: 9px; font-size: .93rem; color: var(--ink-soft); font-weight: 600; }
.feature-list svg { width: 16px; height: 16px; color: #14a35a; flex: none; }

.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ==========================================================================
   لماذا نضيد الشرق / الإحصائيات
   ========================================================================== */
.why { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; position: relative; overflow: hidden; }
.why::after {
  content: ""; position: absolute; inset-block-start: -30%; inset-inline-end: -12%; width: 46%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(201, 164, 76, .2), transparent 70%);
}
.why h2, .why h3 { color: #fff; }
.why .section-head p { color: rgba(255, 255, 255, .74); }
.why-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); position: relative; z-index: 1; }
.why-item { padding: 28px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: background .3s ease, transform .3s ease; }
.why-item:hover { background: rgba(255, 255, 255, .1); transform: translateY(-5px); }
.why-item .num { font-size: .82rem; font-weight: 800; color: var(--gold-400); letter-spacing: .1em; margin-bottom: 12px; display: block; }
.why-item p { color: rgba(255, 255, 255, .72); font-size: .95rem; margin: 0; }

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; text-align: center; }
.stat-item strong { display: block; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; color: var(--gold-500); line-height: 1.15; }
.stat-item span { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }

/* ==========================================================================
   آراء العملاء
   ========================================================================== */
.testimonial {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px;
  display: flex; flex-direction: column; gap: 18px;
}
.testimonial .quote-mark { font-size: 3rem; line-height: .6; color: var(--gold-300); font-family: Georgia, serif; }
.testimonial p { color: var(--ink-soft); font-size: .98rem; margin: 0; flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: var(--gold-400); font-weight: 800;
}
.who b { display: block; font-size: .95rem; color: var(--navy-800); }
.who span { font-size: .82rem; color: var(--ink-soft); }
.stars { color: var(--gold-500); letter-spacing: 2px; font-size: .9rem; }

/* ==========================================================================
   الخطوات
   ========================================================================== */
.steps { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step .step-num {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-800); color: var(--gold-400); font-weight: 800; font-size: 1.15rem;
  margin-bottom: 18px; box-shadow: 0 0 0 8px rgba(15, 43, 76, .06);
}
.step h3 { font-size: 1.08rem; }
.step p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ==========================================================================
   دعوة لاتخاذ إجراء
   ========================================================================== */
.cta-band { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 90px) 0; }
.cta-band .bg { position: absolute; inset: 0; z-index: -2; }
.cta-band .bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 28, 51, .93), rgba(10, 28, 51, .7)); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; color: #fff; }
.cta-inner h2 { color: #fff; margin-bottom: .3em; }
.cta-inner p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   الاتصال
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }

.contact-info { display: grid; gap: 18px; }
.info-card {
  display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; transition: border-color .25s ease, transform .25s ease;
}
.info-card:hover { border-color: var(--gold-500); transform: translateX(-4px); }
.info-icon {
  width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: rgba(201, 164, 76, .13); color: var(--gold-500);
}
.info-icon svg { width: 22px; height: 22px; }
.info-card b { display: block; font-size: .95rem; color: var(--navy-800); margin-bottom: 3px; }
.info-card p, .info-card a { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.info-card a:hover { color: var(--gold-500); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-card textarea {
  min-height: 130px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-alt); resize: vertical; font-size: .95rem; width: 100%;
}
.form-card textarea:focus { outline: none; border-color: var(--gold-500); background: #fff; }
.form-note { font-size: .84rem; color: var(--ink-soft); margin: 14px 0 0; }
.form-success {
  display: none; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 18px;
  background: rgba(20, 163, 90, .1); border: 1px solid rgba(20, 163, 90, .3);
  border-radius: var(--radius-sm); color: #0d7a42; font-weight: 700; font-size: .93rem;
}
.form-success.show { display: flex; }
.form-success svg { width: 20px; height: 20px; flex: none; }

.map-embed { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); margin-top: 40px; }
.map-embed iframe { width: 100%; height: 380px; border: 0; display: block; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   التذييل
   ========================================================================== */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 50px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 20px; }
.site-footer a:hover { color: var(--gold-400); }
.footer-brand img { height: 54px; margin-bottom: 18px; }
.footer-brand p { font-size: .93rem; max-width: 330px; }
.footer-links li { margin-bottom: 11px; font-size: .93rem; }
.footer-contact li { display: flex; gap: 11px; margin-bottom: 14px; font-size: .93rem; }
.footer-contact svg { width: 17px; height: 17px; color: var(--gold-500); flex: none; margin-top: 5px; }

.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); transition: background .25s ease, transform .25s ease, color .25s ease;
}
.socials a:hover { background: var(--gold-500); color: var(--navy-900); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .86rem;
}

@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ==========================================================================
   زر واتساب العائم + للأعلى
   ========================================================================== */
.float-actions { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.float-btn {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: var(--shadow); cursor: pointer; border: 0;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn svg { width: 26px; height: 26px; }
.float-wa { background: #25d366; color: #fff; }
.float-top { background: var(--navy-800); color: #fff; opacity: 0; visibility: hidden; }
.float-top.show { opacity: 1; visibility: visible; }
.float-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   جدول العقود والتحصيل
   ========================================================================== */
.table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; font-size: .92rem; }
.data-table caption { text-align: start; padding: 18px 20px 0; font-size: .84rem; color: var(--ink-soft); }
.data-table th, .data-table td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.data-table thead th {
  background: var(--navy-800); color: #fff; font-size: .85rem; font-weight: 700;
  position: sticky; inset-block-start: 0; z-index: 2; white-space: nowrap;
}
.data-table tbody tr { transition: background .2s ease; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.data-table .unit-ref { font-weight: 700; color: var(--navy-800); }
.data-table .muted { color: var(--ink-soft); font-size: .85rem; }

/* لون خلفية الصف حسب حالة السداد */
.data-table tr.pay-paid    { background: rgba(20, 163, 90, .5); }
.data-table tr.pay-unpaid  { background: rgba(214, 69, 69, .5); }
.data-table tr.pay-partial { background: rgba(217, 131, 36, .5); }
.data-table tr.pay-vacant  { background: rgba(107, 114, 128, .5); }
.data-table tr.pay-paid:hover    { background: rgba(20, 163, 90, .65); }
.data-table tr.pay-unpaid:hover  { background: rgba(214, 69, 69, .65); }
.data-table tr.pay-partial:hover { background: rgba(217, 131, 36, .65); }
.data-table tr.pay-vacant:hover  { background: rgba(107, 114, 128, .65); }
.data-table tr[class*="pay-"] td { border-bottom-color: rgba(15, 43, 76, .12); }
.data-table tr[class*="pay-"] .muted { color: var(--navy-800); }

/* شارة الحالة داخل الصف */
.pay-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: #fff; white-space: nowrap;
}
.pay-badge.paid { color: #0f7a42; }
.pay-badge.unpaid { color: #b03030; }
.pay-badge.partial { color: #9a5c14; }
.pay-badge.vacant { color: #4b5563; }

/* بطاقات الملخّص أعلى الجدول */
.pay-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.pay-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff;
  border-inline-start: 5px solid var(--line);
}
.pay-card strong { display: block; font-size: 1.7rem; line-height: 1.2; color: var(--navy-800); }
.pay-card span { font-size: .86rem; color: var(--ink-soft); font-weight: 600; }
.pay-card.paid { border-inline-start-color: #14a35a; background: rgba(20, 163, 90, .1); }
.pay-card.unpaid { border-inline-start-color: #d64545; background: rgba(214, 69, 69, .1); }
.pay-card.partial { border-inline-start-color: #d98324; background: rgba(217, 131, 36, .1); }
.pay-card.vacant { border-inline-start-color: #6b7280; background: rgba(107, 114, 128, .1); }

/* مفتاح الألوان */
.pay-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: .85rem; color: var(--ink-soft); }
.pay-legend span { display: flex; align-items: center; gap: 8px; }
.pay-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }

@media (max-width: 640px) {
  .data-table { font-size: .86rem; }
  .data-table th, .data-table td { padding: 12px 12px; }
}

/* ==========================================================================
   حركات الظهور
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
