/* ============================================================
   بنيان مكة — فرع أسيوط: طبقة صفحات المشاريع — v1
   بتتحمّل بعد /assets/site.v2.css وبتبني عليه. مفيش tokens جديدة
   ومفيش خطوط هنا: الأربع أدوار اللونية والخطوط كلها من site.v2.css.

   ⚠️ الملف ده مكاش immutable على /assiut/assets/.
      أي تعديل = assiut.v2.css. عمره ما يتكتب فوقه.
   ============================================================ */

/* ---------- الهيرو: صورة المشروع جنب الكلام ----------
   الرندرات جاية من بروشورات بنسب مختلفة. `hero-cover` بتقص، و`hero-fit`
   بتعرض الصورة كاملة على الخلفية الغامقة (للرندرات الضيقة جدًا اللي القص
   بيحوّلها لشريحة من البرج). publish.mjs بيختار الفئة من نسبة الصورة نفسها. */
.hero-figure {
  position: relative; margin: 0;
  border: 1px solid var(--ink-line); border-radius: var(--r-card);
  overflow: hidden; background: var(--ink-2);
  aspect-ratio: 4 / 5;
}
.hero-figure > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-cover > img { object-fit: cover; }
.hero-fit > img { object-fit: contain; }
.hero-top > img { object-position: 50% 12%; }
.hero-upper > img { object-position: 50% 34%; }
.hero-center > img { object-position: 50% 50%; }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-figure { aspect-ratio: 16 / 11; }
  .hero-top > img, .hero-upper > img { object-position: 50% 26%; }
  .hero-fit { aspect-ratio: 4 / 5; max-width: 420px; }
}

/* ---------- شريط الأرقام تحت الهيرو ---------- */
.spec-strip { background: var(--paper-deep); border-bottom: 1px solid var(--line); }
.spec-strip .container {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border-inline: 1px solid var(--line);
}
.spec {
  background: var(--paper-deep);
  padding: clamp(18px, 3vw, 26px) clamp(12px, 2vw, 20px);
  display: grid; gap: 4px; align-content: start;
}
.spec .k { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.spec .v {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.15rem, 1.4vw + .75rem, 1.6rem);
  color: var(--gold-deep); line-height: 1.35;
}
.spec .n { font-size: 13px; color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .spec-strip .container { grid-template-columns: 1fr 1fr; }
}

/* ---------- بطاقات معلومات بسيطة (الموقع، المرافق) ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(1.3rem, 3vw, 2rem);
}
.sec-ink .panel { background: var(--ink-2); border-color: var(--ink-line); }
.split {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 3.5vw, 2.6rem); align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.marks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.marks li { display: flex; gap: 12px; font-size: 16px; font-weight: 500; align-items: baseline; }
.marks li::before {
  content: ''; flex: none; width: 9px; height: 9px; border-radius: 2px;
  background: var(--gold); transform: translateY(-1px);
}
.sec-ink .marks li::before { background: var(--gold-soft); }

/* ---------- صور قابلة للتكبير ---------- */
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.zoom-chip {
  position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 2;
  padding: 3px 10px; border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  color: var(--paper); font-size: 11.5px; font-weight: 700;
}
figcaption.cap { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 500; }

/* ---------- الحاسبة ---------- */
.calc {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.2rem, 3vw, 2.2rem); align-items: start;
}
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

.calc-in { display: grid; gap: 20px; }
.calc-range { display: grid; gap: 10px; }
.calc-range .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.calc-range output {
  font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--gold-deep);
}
.calc-range input[type="range"] {
  width: 100%; height: 30px; appearance: none; background: transparent; cursor: pointer;
}
.calc-range input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--line);
}
.calc-range input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--line);
}
.calc-range input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%; background: var(--gold); border: 2px solid var(--card);
  box-shadow: var(--shadow-sm);
}
.calc-range input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border: 2px solid var(--card);
  border-radius: 50%; background: var(--gold); box-shadow: var(--shadow-sm);
}
.calc-range input[type="range"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.calc-out {
  background: var(--ink); color: var(--ink-text);
  border-radius: var(--r-card); padding: clamp(1.3rem, 3vw, 2rem);
}
.calc-out h3 { color: #fff; font-size: 18px; margin-bottom: 18px; }
.calc-line {
  display: flex; align-items: baseline; gap: 10px;
  padding-block: 11px; border-bottom: 1px solid var(--ink-line);
  font-size: 15.5px;
}
.calc-line .k { color: var(--ink-muted); font-weight: 500; flex: none; }
.calc-line .dots { flex: 1; border-bottom: 2px dotted var(--ink-line); transform: translateY(-4px); min-width: 16px; }
.calc-line .v { font-weight: 800; color: var(--ink-text); }
.calc-total {
  margin-top: 20px; padding: 16px 18px; border-radius: var(--r-field);
  background: var(--gold); color: var(--ink);
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
}
.calc-total .k { font-weight: 800; font-size: 15.5px; }
.calc-total .v { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.35rem, 2vw, 1.75rem); }
.calc-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-muted); line-height: 1.75; }

/* ---------- موقع السعر من السوق ---------- */
.bars { display: grid; gap: 16px; margin-block: 26px; }
.bar-row { display: grid; gap: 7px; }
.bar-row .lbl { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; }
.bar-row .lbl span:last-child { color: var(--gold-deep); }
.bar-src { font-size: 13px; color: var(--muted); }
.bar-src a { color: var(--gold-deep); font-weight: 700; }

/* ---------- الأدوار: مرخص مقابل جدية تصالح ---------- */
.floors-wrap { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2rem); align-items: start; }
@media (max-width: 640px) { .floors-wrap { grid-template-columns: 1fr; } }
.floors { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.floors li {
  height: 22px; border-radius: 3px;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: 9px; font-size: 12px; font-weight: 800;
}
.floors .fl-t { background: var(--ink-2); border: 1px solid var(--ink-line); color: var(--ink-muted); }
.floors .fl-l { background: var(--gold); color: var(--ink); }
.floor-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-muted); }

.tiers { display: grid; gap: 14px; }
.tier { border: 1px solid var(--ink-line); border-radius: var(--r-card); padding: 18px 20px; background: var(--ink-2); }
.tier h3 { color: #fff; font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tier .badge { background: var(--gold); color: var(--ink); }
.tier .badge-quiet { background: transparent; border: 1px solid var(--ink-line); color: var(--ink-muted); }
.tier p { margin-top: 8px; color: var(--ink-muted); font-size: 15.5px; max-width: 62ch; }
.tier .when { margin-top: 12px; font-weight: 800; color: var(--gold-soft); font-size: 16px; }

/* ---------- علامة المسودة / النص الناقص ---------- */
.draft {
  border: 3px dashed var(--err);
  border-radius: var(--r-card);
  padding: clamp(1.1rem, 2.6vw, 1.7rem);
  background: color-mix(in srgb, var(--err) 7%, var(--card));
}
.sec-ink .draft { background: color-mix(in srgb, var(--err) 16%, var(--ink-2)); }
.draft > .draft-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.draft-tag {
  background: var(--err); color: #fff;
  font-size: 12.5px; font-weight: 800; letter-spacing: .2px;
  padding: 4px 12px; border-radius: 5px;
}
.draft-head b { font-size: 15px; color: var(--err); }
.sec-ink .draft-head b { color: color-mix(in srgb, var(--err) 45%, #fff); }
.draft-why { margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--err); }
.sec-ink .draft-why { color: color-mix(in srgb, var(--err) 45%, #fff); }

/* ---------- لايت بوكس ---------- */
.lb {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(20, 16, 9, .96);
  padding: clamp(16px, 4vw, 48px);
  place-items: center; grid-template-rows: 1fr auto; gap: 14px;
}
/* شريط الأكشن السفلي بيقعد فوق الكابشن على الموبايل، فبنسيبله مكانه */
@media (max-width: 767px) { .lb { padding-bottom: 94px; } }
.lb[open], .lb.open { display: grid; }
.lb img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; }
.lb-cap { color: var(--ink-muted); font-size: 14.5px; text-align: center; }
.lb-close {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--ink-2); color: var(--ink-text);
  border: 1px solid var(--ink-line); font-size: 20px; line-height: 1;
}
.lb-close:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ---------- مسار الصفحة ---------- */
.trail { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; font-size: 13.5px; color: var(--ink-muted); }
.trail a { color: var(--gold-soft); text-decoration: none; font-weight: 700; }
.trail a:hover { text-decoration: underline; }
.trail li + li::before { content: '‹'; margin-inline-end: 8px; color: var(--ink-line); }

/* ============================================================
   فئات تخطيط صغيرة.
   ⚠️ الـ CSP على الصفحة `style-src 'self'` — يعني خاصية style=""
   على أي وسم **مبتشتغلش**. أي تنسيق لازم يعيش هنا، مش في الـ HTML.
   ============================================================ */
.stack { display: grid; gap: 18px; }
.mt-s { margin-top: 16px; }
.mt   { margin-top: 18px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: 26px; }
.btn-block { width: 100%; }

.ar-plan { aspect-ratio: 1600 / 1352; }
.ar-tall { aspect-ratio: 1600 / 1964; }
.ar-wide { aspect-ratio: 16 / 9; }

.panel-title { font-size: 19px; margin-bottom: 10px; }
.panel-lead { color: var(--muted); font-size: 15.5px; margin-bottom: 18px; }
.facts-lg { font-size: 16px; }
.facts-lg .fact { font-size: 16px; }
.marks-sm { font-size: 15.5px; }
.calc-sub { font-size: 17px; margin-bottom: 12px; }
.hint-sm { font-size: 13px; color: var(--muted); }
.body-quiet { color: var(--muted); font-size: 15.5px; }
.body-ink { color: var(--ink-muted); font-size: 16px; max-width: 70ch; }

/* النص على الخلفيات الغامقة: site.v2.css متوقّعش الفورم جوه قسم ink */
.sec-ink .panel-lead,
.sec-ink .body-quiet,
.sec-ink .ext-note,
.sec-ink .form-side p { color: var(--ink-muted); }
.sec-ink .form-side h2 { color: #fff; }
.sec-ink .hint-sm { color: var(--ink-muted); }

/* بارات المقارنة: SVG عشان عرض القيمة خاصية هندسية مش CSS داخلي */
.bar-row .track { display: block; width: 100%; height: 14px; }
.bar-row .bar-bg { fill: var(--paper); stroke: var(--line); stroke-width: 1; }
.bar-row .bar-fg { fill: var(--gold); }
.bar-row.ref .bar-fg { fill: var(--muted); }


/* ============================================================
   إضافات صفحات BM12 / BM13 / BM16 وصفحة الفرع /assiut/
   ============================================================ */

/* ---------- صور بنسبتها الطبيعية ----------
   المخططات جاية بنسب مختلفة من كل بروشور. بدل فئة aspect-ratio لكل صورة،
   الصورة بتاخد أبعادها الحقيقية من خاصيتي width/height (والـ CLS متغطّي بيهم). */
.media-figure.nat { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; }
.media-figure.nat > img {
  position: static; display: block;
  width: auto; height: auto;
  max-width: 100%;
  /* المخططات الضيقة الطويلة (٥٤٠×١١٧٠) كانت بتطوّل العمود لألف بكسل
     وتسيب فراغ جنب لوحة الحقائق. السقف بيخليها كلها في نفس المدى. */
  max-height: 620px;
  object-fit: initial;
}
.ar-tall9 { aspect-ratio: 3 / 4; }

/* ---------- جريد المخططات: بلاطات متساوية، الرسم كامل من غير قص ----------
   المخططات لازم تفضل مقروءة، فالقص ممنوع عليها: contain على أرضية ورقية،
   والتكبير في اللايت بوكس بيدي المقاس الأصلي. */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: clamp(1.4rem, 3.4vw, 2.2rem);
}
.media-figure.plan {
  aspect-ratio: 4 / 3; background: var(--paper-deep);
  border: 1px solid var(--line);
}
.media-figure.plan > img { object-fit: contain; }

/* ---------- «اتصل للاستعلام»: بديل الحاسبة لما السعر مش منشور ---------- */
.ask {
  background: var(--ink); color: var(--ink-text);
  border-radius: var(--r-card); padding: clamp(1.5rem, 3.4vw, 2.3rem);
}
.ask-k { font-size: 13.5px; font-weight: 700; color: var(--ink-muted); }
.ask-v {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.7rem, 3vw + .6rem, 2.5rem);
  color: var(--gold-soft); line-height: 1.35; margin-top: 6px;
}
.ask-n { margin-top: 12px; font-size: 14.5px; color: var(--ink-muted); max-width: 46ch; }
.ask-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ask-ctas .btn { flex: 1 1 200px; }
/* القسم ورقي بس اللوحة دي غامقة: `.btn-line` الافتراضي نصه بلون الحبر
   فبيختفي على الخلفية الغامقة. نفس معالجة `.sec-ink .btn-line`. */
.ask .btn-line { border-color: var(--ink-line); color: var(--ink-text); background: transparent; }
.ask .btn-line:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: transparent; }
.ask :focus-visible { outline-color: var(--gold-soft); }

/* ---------- جداول مساحات الغرف ---------- */
.unit-tables {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 520px));
  justify-content: center;
  gap: clamp(1.2rem, 3vw, 2rem); margin-top: clamp(1.6rem, 4vw, 2.6rem);
}

/* ---------- كروت المشاريع على صفحة الفرع ---------- */
.proj-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.6vw, 1.8rem);
}
@media (max-width: 960px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-grid .unit-media { min-height: 260px; background: var(--ink-2); }
.proj-grid .unit-media img { object-position: 50% 22%; }
.proj-grid .unit-body h3 a { color: inherit; text-decoration: none; }
.proj-grid .unit-body h3 a:hover { color: var(--gold-deep); }
.proj-grid .unit-badges { flex-wrap: wrap; }
.proj-grid .media-note { top: auto; bottom: 10px; inset-inline-start: 10px; }

/* ---------- روابط المشاريع المجاورة في الفوتر ---------- */
.ftr-sib {
  border-top: 1px solid var(--ink-line);
  padding-block: 16px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
  font-size: 14.5px;
}
.ftr-sib > span { color: var(--ink-muted); font-weight: 700; }
.ftr-sib ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; }
.ftr-sib a { color: var(--gold-soft); text-decoration: none; }
.ftr-sib a:hover { text-decoration: underline; }

/* ---------- فورم صفحة الفرع: أربع مشاريع في صف ---------- */
.seg-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .seg-4 { grid-template-columns: 1fr 1fr; } }

.mb-s { margin-bottom: 10px; }
