/* ==================================================
   KFC المنيو الإلكتروني — تصميم خفيف واحترافي
   الألوان مستخرجة من الشعار: أحمر كنتاكي، أسود، كريمي
   متجاوب: هاتف / تابلت / حاسوب
   ================================================== */

:root {
  --red: #be1622;
  --red-dark: #9c111b;
  --black: #1c1714;
  --bg: #faf7f0;          /* كريمي فاتح من خلفية الشعار */
  --surface: #ffffff;
  --line: #e9e1d2;        /* خط شعري دافئ */
  --text: #2a241f;
  --muted: #8d8174;
  --gold: #b98a2f;        /* لشارة "جديد" */

  --font-display: 'El Messiri', sans-serif;
  --font-body: 'Almarai', sans-serif;

  --shadow-sm: 0 1px 3px rgba(28, 23, 20, .06);
  --shadow-md: 0 10px 30px rgba(28, 23, 20, .09);
  --radius: 14px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============ الهيدر ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .5px;
  color: #fff;
  background: var(--red);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.brand-text small {
  font-size: .6rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: .88rem;
  color: #fff;
  background: var(--red);
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 22px;
  transition: background .2s ease, transform .2s ease;
}

.header-cta .icon { width: 16px; height: 16px; }
.header-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ============ الهيرو ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #93101a 0%, var(--red) 55%, #cf1a26 100%);
  color: #fff;
  overflow: hidden;
}

/* نقش هاف-تون خفيف يضيف عمقاً دون إزعاج */
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, .16) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: .5;
  pointer-events: none;
}

/* حلقة زخرفية كبيرة في الزاوية */
.hero::after {
  content: "";
  position: absolute;
  top: -190px;
  inset-inline-start: -190px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 70px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 56px;
  padding-block: 72px;
}

.hero-kicker {
  display: inline-block;
  width: fit-content;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--cream, #f8edd7);
  background: rgba(0, 0, 0, .22);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 20px;
  animation: fade-up .7s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.7rem, 6vw, 4.3rem);
  line-height: 1.05;
  animation: fade-up .7s .12s ease both;
}

.hero-slogan {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(255, 248, 238, .85);
  margin-top: 14px;
  animation: fade-up .7s .24s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: fade-up .7s .36s ease both;
}

.btn-light,
.btn-ghost {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 34px;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-light {
  background: #fff;
  color: var(--red);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}

/* بطاقة الفروع */
.branches-card {
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  animation: fade-up .7s .3s ease both;
}

.branches-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--black);
}

.branches-sub {
  font-size: .8rem;
  color: var(--muted);
  margin: 4px 0 18px;
}

.branch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.branch-row + .branch-row { margin-top: 10px; }

.branch-row:hover {
  border-color: rgba(190, 22, 34, .45);
  background: var(--bg);
  transform: translateX(-3px);
}

.branch-pin {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(190, 22, 34, .09);
  color: var(--red);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.branch-text {
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  min-width: 0;
}

.branch-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--black);
}

.branch-area {
  font-size: .76rem;
  font-weight: 700;
  color: var(--muted);
}

.branch-go {
  margin-inline-start: auto;
  color: var(--muted);
  transition: color .2s ease, transform .2s ease;
}

.branch-go .icon { width: 18px; height: 18px; }

.branch-row:hover .branch-go {
  color: var(--red);
  transform: translateX(-3px);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ شريط الفلترة ============ */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(250, 247, 240, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 14px;
}

.search-wrap {
  position: relative;
  flex-shrink: 0;
  width: 250px;
}

.search-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 40px 10px 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(190, 22, 34, .1);
}

#search-input::placeholder { color: var(--muted); font-weight: 400; }

/* تبويبات قابلة للتمرير أفقياً على الهاتف */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.tab:hover { border-color: var(--red); color: var(--red); }

.tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ============ منطقة المنيو ============ */
.menu-area {
  padding-block: 40px 80px;
  min-height: 55vh;
}

.results-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 26px;
}

.menu-section { margin-bottom: 56px; }
.menu-section:last-child { margin-bottom: 0; }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.section-icon-wrap {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--red);
}

.section-icon-wrap .icon { width: 22px; height: 22px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--black);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  border: none;
  border-top: 1px solid var(--line);
}

.section-count {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ============ بطاقات الأصناف ============ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;          /* الهاتف: عمود واحد */
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  animation: fade-up .5s ease both;
}

.card:hover {
  border-color: rgba(190, 22, 34, .45);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* صورة المنتج */
.card-media {
  aspect-ratio: 16 / 10;
  background: #f1ebdd;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.card:hover .card-media img { transform: scale(1.05); }

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* السطر الأول: الاسم ... السعر (بأسلوب المنيو الكلاسيكي) */
.card-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--black);
  line-height: 1.3;
}

.card-leader {
  flex: 1;
  min-width: 16px;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-4px);
}

.card-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--red);
  white-space: nowrap;
}

.card-price small {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  margin-inline-start: 3px;
}

.card-name-en {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.card-desc {
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.75;
  color: #6b6053;
  margin-top: 10px;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  min-height: 22px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-chip {
  font-size: .66rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

.tag-spicy   { color: var(--red); background: rgba(190, 22, 34, .08); border: 1px solid rgba(190, 22, 34, .25); }
.tag-new     { color: var(--gold); background: rgba(185, 138, 47, .08); border: 1px solid rgba(185, 138, 47, .3); }
.tag-popular { color: var(--black); background: rgba(28, 23, 20, .05); border: 1px solid rgba(28, 23, 20, .15); }

.card-cal {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  margin-inline-start: auto;
}

/* ============ الحالة الفارغة ============ */
.empty-state {
  text-align: center;
  padding-block: 80px;
  color: var(--muted);
}

.empty-icon {
  width: 44px;
  height: 44px;
  stroke-width: 1.3;
  margin-bottom: 16px;
}

.empty-state p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state span { font-size: .85rem; }

/* ============ الفوتر ============ */
.site-footer {
  background: var(--black);
  color: #cfc6ba;
  border-top: 3px solid var(--red);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding-block: 52px 40px;
}

.footer-slogan {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  font-size: .88rem;
  font-weight: 700;
}

.footer-info p { display: inline-flex; align-items: center; gap: 8px; }
.footer-info .icon { width: 16px; height: 16px; color: var(--red); stroke-width: 2; }
.footer-info a { color: inherit; text-decoration: none; transition: color .2s ease; }
.footer-info a:hover { color: #fff; }

.footer-note {
  font-size: .72rem;
  color: #8d8174;
  max-width: 420px;
  line-height: 1.9;
  margin-top: 8px;
}

/* ==================================================
   التجاوب
   ================================================== */

/* التابلت: عمودان */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* الحاسوب: ثلاثة أعمدة */
@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .search-wrap { width: 280px; }
}

/* التابلت والهاتف: الهيرو عمود واحد */
@media (max-width: 899px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    padding-block: 56px 52px;
  }
  .hero-kicker { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .branches-card { text-align: start; }
}

/* الهاتف: تكييف الهيدر وشريط الفلترة */
@media (max-width: 639px) {
  :root { --header-h: 64px; }

  .brand-logo { width: 40px; height: 40px; font-size: .82rem; }
  .brand-text strong { font-size: 1.05rem; }
  .brand-text small { letter-spacing: 1.8px; }

  .header-cta { padding: 10px 14px; }
  .header-cta span { display: none; }   /* أيقونة الهاتف فقط */
  .header-cta .icon { width: 18px; height: 18px; }

  .hero-inner { padding-block: 44px 44px; gap: 30px; }
  .branches-card { padding: 20px 16px; }

  .filter-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .search-wrap { width: 100%; }

  .menu-area { padding-block: 30px 60px; }
  .section-title { font-size: 1.3rem; }
  .section-icon-wrap { width: 38px; height: 38px; }
  .card-body { padding: 16px; }
}

/* تقليل الحركة لمن يفضّل ذلك */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
