/* عمالقة نجد العقارية GNR — أخضر وأبيض */
:root {
  --g9: #063D2E; --g8: #0B5D45; --g7: #0E7253; --g6: #128A63; --g1: #E6F4EE; --g0: #F3FAF6;
  --ink: #13201A; --mute: #5B6B63; --line: #DCE7E1; --bg: #FFFFFF; --soft: #F6F9F7;
  --gold: #C8A45A; --wa: #1FA855; --bad: #B42318;
  --r: 16px; --sh: 0 1px 2px rgba(6, 61, 46, .06), 0 8px 24px rgba(6, 61, 46, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { width: 1.15em; height: 1.15em; flex: none; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
bdi { unicode-bidi: isolate; }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font: 600 16px/1 inherit; font-family: inherit; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--g8); color: #fff; }
.btn.primary:hover { background: var(--g9); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: #178a45; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--g6); color: var(--g8); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 17px; }

/* الهيدر */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--g8); }
.brand .logo svg { width: 40px; height: 40px; }
.bn { display: flex; flex-direction: column; line-height: 1.15; }
.bn b { font-size: 19px; color: var(--g9); }
.bn small { font-size: 12px; color: var(--mute); letter-spacing: .02em; }
.brand.light .bn b { color: #fff; }
.brand.light { color: var(--g6); }
.brand.light .bn small { color: #A8CFBF; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--mute); font-weight: 500; }
.nav a:hover { color: var(--g8); background: var(--g0); }
.nav a[aria-current] { color: var(--g8); background: var(--g1); font-weight: 600; }

/* الواجهة */
.hero { background: radial-gradient(1200px 420px at 85% -10%, #1a9b70 0%, transparent 60%), linear-gradient(160deg, var(--g9), var(--g8) 70%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 64px); mask: linear-gradient(transparent, #000); pointer-events: none; }
.hero-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 64px 0 72px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #BFE3D4; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 4px 12px; border-radius: 99px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; margin: 16px 0 14px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: #9FE0C4; }
.hero p { color: #D2EBE0; font-size: 18px; max-width: 34em; margin: 0; }
.stats { display: flex; gap: 28px; margin-top: 28px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 30px; line-height: 1; }
.stats span { color: #A8CFBF; font-size: 14px; margin-top: 6px; }
.hero-card { background: #fff; color: var(--ink); border-radius: 20px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }

/* الفلتر */
.filter { display: grid; gap: 12px; }
.filter.compact { grid-template-columns: auto repeat(4, minmax(0, 1fr)) auto; align-items: end; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--mute); }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; background: #fff; color: var(--ink); }
.fld textarea { padding: 12px 14px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--g6); outline-offset: -1px; border-color: transparent; }
.seg { display: inline-flex; background: var(--g0); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; color: var(--mute); }
.seg input:checked + span { background: var(--g8); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--g6); }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; }

/* الأقسام */
.sec { padding: 56px 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.sec h2 { font-size: 26px; }
.more { color: var(--g7); font-weight: 600; }
.ph1 { font-size: 30px; margin-bottom: 18px; }
.count { color: var(--mute); margin: 18px 0 14px; }
.lead { color: var(--mute); margin: -6px 0 22px; font-size: 17px; }
.narrow { max-width: 720px; }

/* كروت العقار */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--sh); transform: translateY(-2px); border-color: #c9dcd2; }
.cimg { position: relative; aspect-ratio: 4 / 3; background: var(--g0); }
.cimg img { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: #9CC4B3; background: linear-gradient(135deg, var(--g0), var(--g1)); }
.ph svg { width: 56px; height: 56px; }
.tag { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 8px; color: #fff; background: var(--g8); }
.tag.rent { background: #1F6FB2; }
.cimg .tag { position: absolute; top: 12px; right: 12px; }
.code { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: var(--g9); padding: 3px 8px; border-radius: 7px; direction: ltr; }
.nph { position: absolute; bottom: 10px; left: 10px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 8px; border-radius: 6px; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.price { font-size: 21px; font-weight: 700; color: var(--g8); }
.price small, .dprice small { font-size: 14px; font-weight: 500; color: var(--mute); }
.card h3 { font-size: 16px; font-weight: 600; }
.loc { display: flex; align-items: center; gap: 4px; color: var(--mute); font-size: 14px; }
.specs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink); }
.specs:empty { display: none; }
.specs span { display: inline-flex; align-items: center; gap: 5px; }
.specs svg { color: var(--g7); }
.empty { text-align: center; padding: 48px 16px; background: var(--soft); border: 1px dashed var(--line); border-radius: var(--r); }
.empty p { color: var(--mute); font-size: 17px; margin: 0 0 16px; }

/* شريط اعرض/اطلب */
.band { background: var(--g0); border-block: 1px solid var(--line); }
.band-in { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 40px 0; }
.bcard { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: border-color .2s, box-shadow .2s; }
.bcard:hover { border-color: var(--g6); box-shadow: var(--sh); }
.bcard h3 { font-size: 18px; }
.bcard p { margin: 4px 0 0; color: var(--mute); font-size: 15px; }
.bcard .go { margin-inline-start: auto; color: var(--g7); font-weight: 700; white-space: nowrap; }
.bi { font-size: 30px; width: 56px; height: 56px; display: grid; place-items: center; background: var(--g1); border-radius: 14px; flex: none; }

/* الخطوات */
.steps ol { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--g8); color: #fff; font-weight: 700; margin-bottom: 8px; }
.steps li span { color: var(--mute); font-size: 15px; }

/* صفحة العقار */
.det { padding: 20px 0 56px; }
.crumbs { display: flex; gap: 8px; color: var(--mute); font-size: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--g8); }
.det-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
.gal { position: relative; min-width: 0; }
.gmain { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--g0); scrollbar-width: none; }
.gmain::-webkit-scrollbar { display: none; }
.gmain img, .gmain .ph { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gthumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gthumbs button { flex: 0 0 84px; height: 64px; border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; background: none; }
.gthumbs button:hover { border-color: var(--g6); }
.gthumbs img { width: 100%; height: 100%; object-fit: cover; }
.closed { position: absolute; top: 16px; inset-inline-start: 16px; background: var(--bad); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 10px; }
.dside { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sh); }
.dcode { display: flex; justify-content: space-between; align-items: center; color: var(--mute); font-size: 14px; }
.dcode b { color: var(--g9); direction: ltr; display: inline-block; }
.dside h1 { font-size: 24px; }
.dprice { font-size: 30px; font-weight: 700; color: var(--g8); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pnote { font-size: 14px; font-weight: 600; color: var(--gold); background: #FBF5E8; padding: 2px 8px; border-radius: 6px; }
.specs.big { font-size: 15px; gap: 16px; margin: 0 0 4px; }
.lics { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 12px; }
.det-body { display: grid; gap: 28px; margin-top: 32px; max-width: 760px; }
.det-body h2 { font-size: 20px; margin-bottom: 12px; }
.dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.dl div { background: var(--soft); border-radius: 12px; padding: 10px 14px; }
.dl dt { font-size: 13px; color: var(--mute); }
.dl dd { margin: 0; font-weight: 600; }
.feats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feats li { background: var(--g1); color: var(--g9); padding: 6px 12px; border-radius: 99px; font-size: 14px; font-weight: 500; }
.desc { margin: 0; color: #2B3A33; }
.sticky { display: none; }

/* النماذج */
.card-form { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--sh); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fine { margin: 0; text-align: center; color: var(--mute); font-size: 13px; }
.alert { background: #FEF3F2; color: var(--bad); border: 1px solid #FDA29B; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.thanks { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.thanks h1 { font-size: 28px; }
.thanks p { color: var(--mute); margin: 0 0 8px; }

/* الفوتر */
.foot { background: var(--g9); color: #CFE6DC; margin-top: 24px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding: 44px 0 28px; }
.fcol { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.fcol h4 { margin: 0 0 4px; color: #fff; font-size: 16px; }
.fcol p { margin: 8px 0 0; color: #A8CFBF; }
.fcol a:hover { color: #fff; }
.fcol span { display: flex; gap: 6px; align-items: flex-start; }
.fcol span svg { margin-top: 4px; }
.copy { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: 13px; color: #8DB8A6; }

/* الجوال */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 0 48px; gap: 28px; }
  .filter.compact { grid-template-columns: 1fr 1fr; }
  .filter.compact .seg { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .filter.compact .btn { grid-column: 1 / -1; }
  .det-grid { grid-template-columns: 1fr; }
  .dside { position: static; }
  .steps ol { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .top-in { min-height: 56px; flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; }
  .top .btn.wa.sm { margin-inline-start: auto; }
  .nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 6px 12px; font-size: 14px; }
  .btn.wa.sm span { display: none; }
  .btn.wa.sm { width: 44px; padding: 0; }
  .btn.wa.sm svg { width: 22px; height: 22px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .stats { gap: 20px; }
  .stats b { font-size: 24px; }
  .hero-card { padding: 16px; border-radius: 16px; }
  .filter .seg { display: grid; grid-template-columns: repeat(3, 1fr); }
  .sec { padding: 40px 0; }
  .sec h2 { font-size: 22px; }
  .ph1 { font-size: 24px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .band-in { grid-template-columns: 1fr; padding: 28px 0; gap: 12px; }
  .bcard { flex-wrap: wrap; padding: 18px; }
  .bcard .go { margin-inline-start: 72px; }
  .steps ol { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .card-form { padding: 16px; }
  .foot-in { grid-template-columns: 1fr; gap: 22px; }
  .det { padding-top: 12px; }
  .gmain { border-radius: 12px; margin-inline: -16px; border-radius: 0; }
  .dside { box-shadow: none; padding: 16px; }
  .dside h1 { font-size: 21px; }
  .dprice { font-size: 26px; }
  body.has-sticky { padding-bottom: 84px; }
  .sticky { display: block; position: fixed; inset: auto 0 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); z-index: 30; box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .sticky .btn { min-height: 52px; }
}


/* محجوز + المعاينة */
.rsv { position: absolute; bottom: 10px; right: 10px; background: #B54708; color: #fff; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.closed.rsv-big { background: #B54708; }
.rsv-note { margin: 0; background: #FFFAEB; color: #93370D; border: 1px solid #FEDF89; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pv-bar { background: #FFFAEB; color: #93370D; border-bottom: 1px solid #FEDF89; font-weight: 600; padding: 10px 0; }
.approve { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.approve .err, .card-form .err { color: var(--bad); font-weight: 600; min-height: 20px; }
