/* =====================================================================
   landing.css — طبقة تعريفية/تسويقية منفصلة تماماً عن تطبيق الشراء
   =====================================================================
   يخدم صفحتين بس: /about و/menu-preview. صفر اعتماد على base.css أو
   base-v2-preview.css — ملف مستقل بالكامل عمداً.

   ⚠️ --brand-bg/--brand-text هون **اختياريان لكل عميل** (about_bg_color/
   about_text_color بـ theme.json — راجع buildAboutExtraRootStyleHTML بـ
   server.js). عميل ما بيحددهم (shaam-restaurant) بيضل يشوف نفس التصميم
   الثابت أبيض/أسود الأصلي (fallback بكل قاعدة أدناه)؛ عميل بيحددهم
   (sanabil-restaurant) بياخذ نسخة بألوانه الخاصة من نفس التخطيط الحرفي
   المطابق لمرجع (مطاعم راقية، أسلوب Cutler & Co). أي لون مشتق هون إما
   فلتر brightness() أو color-mix() مع سطر fallback واضح قبله (نفس تقنية
   بقية المشروع).

   ⚠️ استثناء واحد موثّق: لون أحمر ثابت `#9E1B2E` بـ.landing-info-heading
   تحت (خط تحت عنوان "MAKE A RESERVATION" بأسلوب sanabil-restaurant) —
   تفصيل بصري واحد محدود، مو متغيّر theming خامس (النظام يقتصر على
   الأربعة أعلاه + --brand-font بقرار صاحب المشروع)، وغير قابل للتخصيص
   عبر theme.json عمداً.
   ===================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --space-7: 64px;
}

body {
  font-family: var(--brand-font, 'Cairo', sans-serif);
  background: #fff;
  background: var(--brand-bg, #fff);
  color: #1a1a1a;
  color: var(--brand-text, #1a1a1a);
  /* direction غير محدد هون عمداً — يورَث من [dir] بـ<html> (يضبطه سكربت
     الصفحة حسب about_default_lang/تفضيل المتصفح)، بدل تثبيته rtl دايماً
     زي ما كان سابقاً — ضروري لعميل محتواه إنجليزي بالكامل (sanabil-restaurant). */
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header: شعار + روابط أفقية بسيطة ---------- */
.landing-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid #eee;
}
.landing-header-brand { display: flex; align-items: center; gap: var(--space-3); }
.landing-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.landing-restaurant-name { font-weight: 700; font-size: 1rem; }
.landing-nav { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); font-size: 0.9rem; }
.landing-nav a { transition: color 0.15s ease; }
.landing-nav a:hover { color: var(--brand-primary, #8B2E2E); }

/* ---------- Header overlay mode (opt-in via about_hero_headline) ----------
   Taken out of flow and pinned to the top of the viewport so the tall hero
   below it starts right at y:0 and the header visually sits on top of the
   photo instead of in its own bar. Unused by any client without the big-hero
   fields (shaam-restaurant) — base .landing-header above is untouched. */
.landing-header--overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: none;
  color: #fff;
}
.landing-header--overlay .landing-nav a:hover { color: var(--brand-primary, #8B2E2E); }

/* ---------- Hero: صورة بس، بعرض الشاشة الكامل، بدون أي نص فوقها ---------- */
.landing-hero {
  width: 100%;
  height: 70vh;
  height: 70dvh;
  background-size: cover;
  background-position: center;
}

/* ---------- Hero big mode (opt-in via about_hero_headline) — near-full-
   viewport image, dark-bottom gradient (not a flat overlay, keeps the photo
   readable), headline/subtext/two display-only buttons anchored at the
   bottom. Unused by any client without the field (shaam-restaurant). ---------- */
.landing-hero--big {
  height: 100vh;
  height: 100dvh;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.landing-hero--big::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 55%);
  pointer-events: none;
}
.landing-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-5) var(--space-7);
  text-align: center;
}
.landing-hero-headline {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}
.landing-hero-script {
  font-family: 'Cormorant Garamond', serif; /* --brand-font (Cairo) يبقى للباقي كله */
  font-style: italic;
  font-weight: 500;
}
.landing-hero-subtext {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: var(--space-5);
  color: rgba(255, 255, 255, 0.92);
}
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

@media (max-width: 480px) {
  .landing-hero-headline { font-size: 1.8rem; }
}

/* ---------- زر دعوة للعمل — الزر البارز بنهاية /about وأعلى/أسفل /menu-preview ---------- */
.landing-cta {
  display: inline-block;
  padding: 14px 44px;
  background: var(--brand-primary, #8B2E2E);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.landing-cta:hover { filter: brightness(1.08); }
.landing-cta:active { filter: brightness(0.93); transform: scale(0.98); }
button.landing-cta { cursor: pointer; font-family: inherit; border: none; }
/* Declared after the base .landing-cta rule on purpose — same specificity,
   source order must put this last so its transparent background/border win
   over .landing-cta's solid --brand-primary background. */
.landing-cta--outline {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
}
.landing-cta--outline:hover { filter: none; background: rgba(255, 255, 255, 0.12); }

/* ---------- قسم "مرحباً بكم في [اسم المطعم]" — نص بسيط متوسط المحاذاة ---------- */
.landing-about {
  max-width: 620px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
  text-align: center;
}
.landing-about h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: var(--space-4);
}
.landing-about h2 [data-i18n] { color: var(--brand-primary, #8B2E2E); }
.landing-about p { font-size: 1rem; color: #444; }

/* ---------- معرض الصور: شبكة متساوية، حواف حادة (بدون استدارة) ---------- */
.landing-gallery { padding: 0 var(--space-5) var(--space-7); }
.landing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
}
.landing-gallery-grid img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: opacity 0.2s ease;
}
.landing-gallery-grid img:hover { opacity: 0.85; }

/* ---------- معلومات عملية: 3 أعمدة (LOCATION / Opening Hours / Contact) ---------- */
.landing-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-7);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  border-top: 1px solid #eee;
}
.landing-info-heading {
  flex-basis: 100%;
  align-self: center;
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 2px solid #9E1B2E; /* أحمر ثابت مقصود — راجع الملاحظة أعلى الملف */
}
.landing-info-col { min-width: 160px; }
.landing-info-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #999;
  margin-bottom: var(--space-2);
}
.landing-hours-value { white-space: pre-line; } /* يحترم أسطر opening_hours المتعددة */
.landing-contact-links { display: flex; flex-direction: column; gap: 4px; }

/* ---------- زر "المنيو" البارز بنهاية /about ---------- */
.landing-menu-cta { text-align: center; padding: 0 var(--space-5) var(--space-7); }

/* ---------- Footer: روابط أفقية بسيطة ---------- */
.landing-footer {
  padding: var(--space-5); text-align: center; border-top: 1px solid #eee;
}
.landing-footer-links { display: flex; justify-content: center; gap: var(--space-5); font-size: 0.85rem; margin-bottom: var(--space-2); }
.landing-footer-meta { font-size: 0.8rem; color: #999; }

/* ---------- /menu-preview: عارض PDF inline ---------- */
.menu-preview-title {
  text-align: center; font-size: 1.6rem; font-weight: 700;
  padding: var(--space-6) var(--space-5) var(--space-2);
}
.menu-preview-order-wrap { text-align: center; padding: var(--space-3) var(--space-5); }
.menu-preview { max-width: 900px; margin: 0 auto; padding: 0 var(--space-4) var(--space-4); }

/* width:100% كافي للاستجابة الأفقية؛ الارتفاع بـ dvh (مع fallback لـ vh
   للمتصفحات الأقدم) يتكيف صح مع شريط عنوان المتصفح المتحرك بالموبايل،
   بعكس vh العادي — بدون أي JS أو مكتبة. */
.menu-preview-pdf {
  width: 100%;
  border: 1px solid #eee;
  height: 80vh;
  height: 80dvh;
}
.menu-preview-unavailable {
  text-align: center; color: #999; padding: var(--space-7) var(--space-5);
  font-size: 1rem;
}

/* ---------- استجابة للشاشات الصغيرة ---------- */
@media (max-width: 480px) {
  .landing-header { flex-wrap: wrap; gap: var(--space-3); }
  .landing-hero { height: 45vh; height: 45dvh; }
  .landing-about, .landing-gallery, .landing-info { padding-inline: var(--space-4); }
  .landing-info { gap: var(--space-5); }
}
