/* =====================================================================
   مطعم البيت الصنعاني — style.css
   نظام الألوان والخطوط معرّف كمتغيرات في الأعلى؛ لتغيير الهوية اللونية
   يكفي تعديل القيم داخل :root فقط.
   ===================================================================== */

:root{
  /* لوحة الألوان: تراثية دافئة مستوحاة من العمارة الصنعانية */
  --ivory:        #F6EFE1;
  --ivory-2:      #FBF7EE;
  --card:         #FFFBF2;
  --stone:        #DED0B2;
  --stone-line:   #E4D7BB;
  --brown-950:    #1E140D;
  --brown-900:    #2A1B12;
  --brown-800:    #3A2618;
  --brown-700:    #4A2E1C;
  --clay:         #8B4A2B;
  --clay-dark:    #6E3A22;
  --brass:        #A9793F;
  --brass-light:  #C79A5C;
  --text-main:    #2A1D14;
  --text-muted:   #6B5842;
  --text-on-dark: #EFE4CE;
  --text-on-dark-muted: #C9B79A;

  --font-display: "Aref Ruqaa", serif;
  --font-body: "Tajawal", sans-serif;

  --radius-s: 4px;
  --radius-m: 10px;
  --shadow-card: 0 10px 30px -14px rgba(42,27,18,.35);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

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

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

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

.container{
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
}
.container.narrow{ max-width: 780px; }

/* حركة بسيطة عند ظهور الأقسام أثناء التمرير */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
  html{ scroll-behavior: auto; }
}

/* =========================== الأزرار =========================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
  min-height: 48px;
  line-height: 1;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn-gold{
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  color: var(--brown-950);
}
.btn-gold:hover{ background: linear-gradient(180deg, var(--brass), var(--clay)); color: var(--ivory-2); }

.btn-outline{
  background: transparent;
  border-color: var(--brown-700);
  color: var(--brown-800);
}
.btn-outline:hover{ background: var(--brown-800); color: var(--ivory-2); }

.btn-outline-light{
  border-color: var(--brass-light);
  color: var(--text-on-dark);
}
.btn-outline-light:hover{ background: var(--brass-light); color: var(--brown-950); }

.btn-ghost{
  background: transparent;
  color: var(--clay-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  border-color: transparent;
}
.btn-ghost-light{ color: var(--text-on-dark); }

.btn-wide{ width: 100%; }
.btn-icon{ display: inline-flex; }

/* =========================== شريط التنقل =========================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 239, 225, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone-line);
}
.nav-wrap{
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto; /* يبقى في أقصى اليمين في RTL طبيعيًا */
  color: var(--brown-900);
}
.brand-ornament{ color: var(--brass); display: inline-flex; flex-shrink: 0; }
.brand-text{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--brown-900);
  white-space: nowrap;
}

.main-nav{
  display: none;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin-inline-end: auto;
}
.main-nav a{ position: relative; padding: 6px 0; }
.main-nav a:hover{ color: var(--clay); }
.main-nav a::after{
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: 0;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.main-nav a:hover::after{ transform: scaleX(1); }

.nav-cta{ display: none; padding: 10px 20px; font-size: 14px; }

.hamburger{
  width: 42px; height: 42px;
  border-radius: var(--radius-s);
  border: 1.5px solid var(--stone-line);
  background: var(--card);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.hamburger span{
  width: 20px; height: 2px;
  background: var(--brown-800);
  transition: transform .25s ease, opacity .25s ease;
}
.hamburger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2){ opacity: 0; }
.hamburger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 940px){
  .main-nav{ display: flex; }
  .nav-cta{ display: inline-flex; }
  .hamburger{ display: none; }
  .brand{ margin-left: 0; margin-inline-end: auto; }
}

.main-nav.is-open{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: absolute;
  top: 100%;
  right: 0; left: 0;
  background: var(--ivory-2);
  border-bottom: 1px solid var(--stone-line);
  padding: 10px 22px 18px;
}
.main-nav.is-open a{ width: 100%; padding: 12px 4px; border-bottom: 1px dashed var(--stone-line); }

/* =========================== Hero =========================== */
.hero{
  position: relative;
  background: var(--brown-950);
  color: var(--text-on-dark);
  padding: 96px 20px 88px;
  text-align: center;
  overflow: hidden;
}
.hero-pattern{
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(45deg, var(--brass) 1px, transparent 1px),
    linear-gradient(-45deg, var(--brass) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}
.hero-inner{ position: relative; max-width: 720px; margin: 0 auto; }

.eyebrow-mark{ color: var(--brass-light); margin: 0 0 18px; display: flex; justify-content: center; }

.hero-title{
  font-family: var(--font-display);
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ivory-2);
}
.hero-subtitle{
  font-size: clamp(17px, 3.4vw, 21px);
  color: var(--brass-light);
  font-weight: 500;
  margin: 0 0 22px;
}
.hero-desc{
  font-size: 16px;
  color: var(--text-on-dark-muted);
  max-width: 560px;
  margin: 0 auto 34px;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* =========================== أقسام عامة =========================== */
.section{ padding: 68px 0; }
.section-tint{ background: var(--ivory-2); }
.section-dark{ background: var(--brown-900); color: var(--text-on-dark); }

.kicker{
  color: var(--clay);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  margin: 0 0 8px;
}
.kicker-light{ color: var(--brass-light); }

.section-title{
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 36px);
  color: var(--brown-900);
  margin: 0 0 18px;
}
.section-title.light{ color: var(--ivory-2); }
.section-title.center{ text-align: center; }

.section-sub{
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 15px;
}
.section-sub.center{ text-align: center; }

.lead-text{
  font-size: 17px;
  color: var(--text-main);
  margin: 0 0 18px;
}

.divider{
  color: var(--brass);
  padding: 6px 22px;
  max-width: 400px;
  margin: 0 auto;
}
.divider svg{ width: 100%; height: 20px; }

/* =========================== قائمة الطعام =========================== */
.menu-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px){
  .menu-grid{ grid-template-columns: 1fr 1fr; }
}

.menu-card{
  background: var(--card);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius-m);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}
.menu-cat-title{
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--clay-dark);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stone-line);
}
.menu-list{ list-style: none; margin: 0; padding: 0; }
.menu-list li{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--stone-line);
  font-size: 16px;
}
.menu-list li:last-child{ border-bottom: none; }
.dish-name{ font-weight: 500; color: var(--text-main); }
.dish-price{ color: var(--text-muted); font-size: 13.5px; white-space: nowrap; }
.menu-soon{ color: var(--text-muted); font-size: 14.5px; margin: 0; }
.menu-list-empty{ min-height: 0; }

/* =========================== بطاقات الأطباق المميزة =========================== */
.dish-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px){ .dish-grid{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px){ .dish-grid{ grid-template-columns: repeat(4, 1fr); } }

.dish-card{
  background: var(--card);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s ease, box-shadow .3s ease;
}
.dish-card:hover{ transform: translateY(-4px); box-shadow: 0 16px 34px -16px rgba(42,27,18,.45); }

.dish-photo{ aspect-ratio: 4 / 3; }
.dish-body{ padding: 18px 18px 20px; }
.dish-body h3{ font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; color: var(--brown-900); }
.dish-body p{ font-size: 14px; color: var(--text-muted); margin: 0 0 14px; min-height: 58px; }
.dish-foot{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dish-price-tag{ font-size: 12.5px; color: var(--clay-dark); font-weight: 700; }
.link-details{ font-size: 13.5px; font-weight: 700; color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }

/* صناديق بديلة للصور غير المتوفرة حاليًا */
.placeholder-photo{
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, var(--stone) 0 2px, transparent 2px 14px),
    var(--ivory-2);
  color: var(--text-muted);
  font-size: 13px;
  border: none;
  padding: 0;
  cursor: default;
}

/* =========================== الخدمات =========================== */
.services-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px 26px;
}
@media (min-width: 640px){ .services-grid{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px){ .services-grid{ grid-template-columns: repeat(3, 1fr); } }

.service-item{ text-align: center; padding: 6px 10px; }
.service-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  color: var(--brass-light);
  margin-bottom: 16px;
}
.service-item h3{ font-family: var(--font-display); font-size: 19px; margin: 0 0 8px; color: var(--ivory-2); }
.service-item p{ font-size: 14px; color: var(--text-on-dark-muted); margin: 0; }

/* =========================== معرض الصور =========================== */
.gallery-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px){ .gallery-grid{ grid-template-columns: repeat(3, 1fr); } }

.gallery-item{
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-m);
  overflow: hidden;
  width: 100%;
}
.gallery-item img{ width: 100%; height: 100%; object-fit: cover; }

.lightbox{
  position: fixed; inset: 0;
  background: rgba(20, 12, 7, .92);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox[hidden]{ display: none; }
.lightbox-content{ max-width: 90vw; max-height: 80vh; }
.lightbox-content img{ max-width: 90vw; max-height: 80vh; border-radius: var(--radius-s); }
.lightbox-content .caption{ color: var(--text-on-dark-muted); text-align: center; margin-top: 12px; }
.lightbox-close{
  position: absolute; top: 18px; left: 18px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--stone-line);
  background: transparent;
  color: var(--ivory-2);
  font-size: 18px;
  cursor: pointer;
}

/* =========================== ساعات العمل =========================== */
.hours-table{
  background: var(--card);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hours-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px dashed var(--stone-line);
  font-size: 16px;
}
.hours-row:last-child{ border-bottom: none; }
.hours-days{ font-weight: 700; color: var(--brown-900); }
.hours-time{ color: var(--clay-dark); direction: ltr; unicode-bidi: isolate; }

/* =========================== الحجز =========================== */
.booking-form{
  background: var(--card);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius-m);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.form-row{ margin-bottom: 18px; }
.form-row label{
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-800);
  margin-bottom: 7px;
}
.form-row input, .form-row textarea{
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-s);
  border: 1.5px solid var(--stone-line);
  background: var(--ivory-2);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-main);
}
.form-row input:focus, .form-row textarea:focus{
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169,121,63,.18);
}
.form-row-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 520px){ .form-row-split{ grid-template-columns: 1fr 1fr; } }

.form-note{ text-align: center; font-size: 13px; color: var(--text-muted); margin: 14px 0 0; }

/* =========================== تواصل معنا =========================== */
.contact-phone{
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--brass-light);
  margin: 0 0 26px;
}
.contact-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* =========================== موقعنا =========================== */
.location-address{ text-align: center; font-size: 16px; color: var(--text-muted); margin: 0 0 24px; }
.map-frame{
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--stone-line);
  box-shadow: var(--shadow-card);
  margin-bottom: 26px;
}
.map-frame iframe{ width: 100%; height: 340px; border: 0; display: block; }
.location-cta{ display: flex; justify-content: center; }

/* =========================== Footer =========================== */
.site-footer{ background: var(--brown-950); color: var(--text-on-dark-muted); padding: 52px 0 0; }
.footer-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(239,228,206,.12);
}
@media (min-width: 720px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }

.footer-brand .brand-text{ color: var(--ivory-2); font-size: 22px; }
.footer-brand p{ margin: 10px 0 0; font-size: 14px; }
.footer-links{
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-content: flex-start;
  font-size: 14.5px;
}
.footer-links a:hover{ color: var(--brass-light); }

.footer-bottom{
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 22px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.dev-credit a{ color: var(--brass-light); text-decoration: underline; text-underline-offset: 3px; }

/* =========================== زر واتساب العائم =========================== */
.whatsapp-float{
  position: fixed;
  bottom: 20px;
  left: 20px; /* في RTL يظل واضحًا في الزاوية السفلية */
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.4);
  z-index: 90;
  transition: transform .25s ease;
}
.whatsapp-float:hover{ transform: scale(1.07); }

/* =========================== توفير مساحة اللمس على الهاتف =========================== */
@media (max-width: 480px){
  .hero{ padding: 76px 16px 64px; }
  .section{ padding: 52px 0; }
  .hero-actions .btn, .contact-actions .btn{ width: 100%; }
}
