/* =========================================================
   رحابة | Rahaba Coffee Cart Rental — Mobile-first, RTL
   ========================================================= */

:root {
  /* -- العلامة التجارية: الألوان الثلاثة الدقيقة فقط -- */
  --cream: #FDFBF7;
  --terracotta: #8B3A2B;
  --charcoal: #1C2826;

  /* كل ما يلي مُشتق حسابياً من الألوان الثلاثة أعلاه فقط
     (تعتيم/مزج) — لا يوجد أي لون جديد مضاف */
  --terracotta-hover: color-mix(in srgb, var(--terracotta) 85%, black);
  --terracotta-tint: color-mix(in srgb, var(--terracotta) 14%, var(--cream));
  --terracotta-tint-strong: color-mix(in srgb, var(--terracotta) 24%, var(--cream));
  --charcoal-muted: color-mix(in srgb, var(--charcoal) 72%, var(--cream));
  --surface: color-mix(in srgb, var(--cream) 92%, var(--charcoal));
  --hairline: color-mix(in srgb, var(--charcoal) 14%, transparent);

  /* أخضر واتساب: هوية بصرية عالمية ثابتة لزر واتساب تحديداً، وليست جزءاً من لوحة رحابة */
  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;

  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(28, 40, 38, 0.08);
  --shadow-md: 0 8px 24px rgba(28, 40, 38, 0.12);
  --container-w: 1080px;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--charcoal);
  direction: rtl;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-weight: 800; margin: 0 0 .5em; color: var(--charcoal); }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== أزرار عامة ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--terracotta-hover); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(253, 251, 247, .5);
}
.btn-ghost:hover { background: rgba(253, 251, 247, .12); }

.btn-outline {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}
.btn-outline:hover { background: var(--terracotta-tint); }

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(253, 251, 247, .55);
}
.btn-outline-light:hover { background: rgba(253, 251, 247, .1); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }

.btn-location {
  background: var(--terracotta-tint);
  color: var(--terracotta-hover);
  border: none;
  border-radius: var(--radius-sm);
  width: 100%;
  padding: 13px 18px;
  font-family: var(--font);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 6px;
}
.btn-location:hover { background: var(--terracotta-tint-strong); }
.btn-location:disabled { opacity: .6; cursor: progress; }

/* ===== الهيدر ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--charcoal);
}
.brand-logo { height: 40px; width: auto; object-fit: contain; }
.brand-logo-fallback {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--terracotta);
  letter-spacing: .5px;
}
.brand-logo-fallback.small { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.brand-tagline {
  font-size: .75rem;
  color: var(--charcoal-muted);
  border-right: 1px solid var(--hairline);
  padding-right: 10px;
  display: none;
}
.header-call {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== الهيرو ===== */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--cream);
  overflow: hidden;
  padding: 56px 0 48px;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    radial-gradient(circle at 15% 20%, var(--terracotta) 0, transparent 40%),
    radial-gradient(circle at 85% 75%, var(--terracotta) 0, transparent 45%);
  pointer-events: none;
}
.hero-content { position: relative; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(139, 58, 43, .35);
  color: var(--cream);
  border: 1px solid rgba(253, 251, 247, .25);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 {
  color: var(--cream);
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  line-height: 1.35;
  max-width: 720px;
  margin-inline: auto;
}
.hero-sub {
  color: rgba(253, 251, 247, .82);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 1.02rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}
.hero-stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stats strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--terracotta);
}
.hero-stats span {
  font-size: .78rem;
  color: rgba(253, 251, 247, .7);
}

/* ===== لماذا رحابة ===== */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 8px;
}
.feature-card {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--terracotta-tint);
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--charcoal-muted); font-size: .92rem; margin: 0; }

/* ===== رأس القسم ===== */
.section-head { text-align: center; max-width: 560px; margin: 0 auto 32px; }
.section-eyebrow {
  display: inline-block;
  color: var(--terracotta);
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
.section-head p { color: var(--charcoal-muted); margin: 0; }
.section-head.light .section-eyebrow { color: var(--cream); }
.section-head.light h2 { color: var(--cream); }
.section-head.light p { color: rgba(253, 251, 247, .78); }

/* ===== القائمة ===== */
.menu-section { padding: 56px 0; }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.menu-card {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.menu-card:hover { transform: translateY(-3px); }
.menu-card:last-child { grid-column: 1 / -1; }
.menu-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.menu-card h3 { font-size: 1rem; margin-bottom: 6px; }
.menu-card p { font-size: .85rem; color: var(--charcoal-muted); margin: 0; }

/* ===== خطوات الحجز (نظرة عامة) ===== */
.how-it-works { padding: 24px 0 56px; }
.steps-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.step-overview-card {
  background: var(--terracotta-tint);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.step-overview-card h3 { font-size: .95rem; margin: 0; }

/* ===== قسم الحجز ===== */
.booking-section {
  background: var(--charcoal);
  padding: 56px 0;
}
.booking-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 22px 18px 28px;
  box-shadow: var(--shadow-md);
  max-width: 640px;
  margin: 0 auto;
}

/* مؤشر التقدم */
.progress-bar {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 0;
  margin: 0 0 28px;
  gap: 4px;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.progress-step::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--hairline);
  z-index: 0;
}
.progress-step:first-child::before { display: none; }
.progress-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--hairline);
  color: var(--charcoal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .85rem;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
  transition: all .2s ease;
}
.progress-label {
  font-size: .68rem;
  color: var(--charcoal-muted);
  display: none;
}
.progress-step.is-active .progress-circle,
.progress-step.is-done .progress-circle {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
}
.progress-step.is-active .progress-label { display: block; font-weight: 700; color: var(--terracotta); }
.progress-step.is-done::before { background: var(--terracotta); }

/* خطوات النموذج */
.form-step { display: none; border: none; padding: 0; margin: 0; }
.form-step.is-active { display: block; animation: fadeIn .25s ease; }
.form-step legend {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 18px;
  padding: 0;
  color: var(--charcoal);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.field { display: block; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--charcoal-muted); }
.field input[type="text"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--hairline);
  background: var(--surface);
  color: var(--charcoal);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(139, 58, 43, .15);
}
.field-hint { font-size: .8rem; color: var(--charcoal-muted); margin: 8px 0 0; }
.field-error { font-size: .82rem; color: var(--terracotta-hover); font-weight: 700; margin: -8px 0 12px; }

.menu-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
.menu-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.menu-select-card input { accent-color: var(--terracotta); width: 18px; height: 18px; flex-shrink: 0; }
.menu-select-card:has(input:checked) {
  border-color: var(--terracotta);
  background: var(--terracotta-tint);
}
.menu-select-icon { font-size: 1.2rem; }
.menu-select-name { font-size: .88rem; font-weight: 700; }

.step-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.step-actions .btn { flex: 1; }
.form-step[data-step="1"] .step-actions .btn { flex: none; margin-inline-start: auto; }

.booking-summary {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: .9rem;
  margin-bottom: 6px;
}
.booking-summary dl { margin: 0; }
.booking-summary .summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--hairline);
}
.booking-summary .summary-row:last-child { border-bottom: none; }
.booking-summary .summary-row dt { color: var(--charcoal-muted); font-weight: 700; flex-shrink: 0; }
.booking-summary .summary-row dd { margin: 0; text-align: left; }

/* ===== آراء العملاء ===== */
.reviews-section { padding: 56px 0; }
.reviews-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.reviews-track::-webkit-scrollbar { height: 6px; }
.reviews-track::-webkit-scrollbar-thumb { background: rgba(28, 40, 38, .18); border-radius: 3px; }
.review-card {
  scroll-snap-align: start;
  flex: 0 0 82%;
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.review-stars { color: var(--terracotta); font-size: .95rem; margin-bottom: 10px; letter-spacing: 2px; }
.review-text { font-size: .92rem; color: var(--charcoal-muted); margin-bottom: 14px; }
.review-name { font-weight: 800; font-size: .9rem; }
.reviews-loading, .reviews-empty { color: var(--charcoal-muted); font-size: .9rem; }

/* ===== التواصل ===== */
.contact-section {
  background: var(--terracotta);
  color: var(--cream);
  text-align: center;
  padding: 48px 0;
}
.contact-section h2 { color: var(--cream); }
.contact-section p { color: color-mix(in srgb, var(--cream) 88%, transparent); }
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.contact-actions .btn { width: 100%; max-width: 320px; }

/* ===== الفوتر ===== */
.site-footer {
  background: var(--charcoal);
  color: rgba(253, 251, 247, .7);
  text-align: center;
  padding: 32px 0 100px;
  font-size: .85rem;
}
.footer-inner p { margin: 0 0 6px; }
.footer-social {
  display: flex;
  justify-content: center;
  margin: 10px 0 16px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(253, 251, 247, .3);
  color: rgba(253, 251, 247, .8);
  transition: border-color .15s ease, color .15s ease;
}
.footer-social a:hover { border-color: var(--terracotta); color: var(--terracotta); }
.footer-copy { color: rgba(253, 251, 247, .45); font-size: .78rem; }

/* ===== زر واتساب العائم ===== */
.fab-whatsapp {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .45);
  z-index: 60;
  transition: transform .15s ease;
}
.fab-whatsapp:active { transform: scale(.92); }

/* ===== توسيع للشاشات الأكبر ===== */
@media (min-width: 560px) {
  .brand-tagline { display: inline; }
  .progress-label { display: block !important; }
}

@media (min-width: 700px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .menu-card:last-child { grid-column: auto; }
  .steps-overview { grid-template-columns: repeat(3, 1fr); }
  .contact-actions { flex-direction: row; justify-content: center; }
  .contact-actions .btn { width: auto; }
  .review-card { flex: 0 0 46%; }
}

@media (min-width: 960px) {
  .menu-grid { grid-template-columns: repeat(5, 1fr); }
  .menu-card:last-child { grid-column: auto; }
  .review-card { flex: 0 0 31%; }
  .hero { padding: 88px 0 72px; }
}
