/* ===== DESIGN TOKENS ===== */
:root {
  --gold-light: #F2AC57;
  --gold-mid: #D98236;
  --gold-dark: #BF532C;
  --peach: #F2AD94;
  --black: #0D0D0D;
  --white: #ffffff;
  --off-white: #FFF8F0;
  --card-radius: 16px;
  --shadow-card: 0 4px 24px rgba(13, 13, 13, 0.12);
  --shadow-hover: 0 12px 40px rgba(217, 130, 54, 0.25);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  background: var(--off-white);
  color: var(--black);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== HEADER / HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-mid) 40%, var(--gold-light) 100%);
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -30%;
  width: 160%;
  height: 220%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, var(--off-white), transparent);
  pointer-events: none;
}

.logo-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  animation: fadeInDown 0.8s ease-out;
}

.logo-container img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 6px;
  box-shadow: 0 8px 32px rgba(13, 13, 13, 0.18);
}

.hero-title {
  position: relative;
  z-index: 2;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-subtitle {
  position: relative;
  z-index: 2;
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  animation: fadeInUp 0.8s ease-out 0.35s both;
}

/* ===== SECTION TITLES ===== */
.section-header {
  text-align: center;
  padding: 36px 16px 20px;
}

.section-header h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 800;
  color: var(--gold-dark);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
  margin: 8px auto 0;
  border-radius: 2px;
}

/* ===== MENU GRID ===== */
.menu-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 40px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* ===== MENU CARD ===== */
.menu-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  animation: fadeInUp 0.6s ease-out both;
}

.menu-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.menu-card:active {
  transform: translateY(-2px) scale(0.98);
}

/* Staggered animation delays */
.menu-card:nth-child(1) { animation-delay: 0.05s; }
.menu-card:nth-child(2) { animation-delay: 0.1s; }
.menu-card:nth-child(3) { animation-delay: 0.15s; }
.menu-card:nth-child(4) { animation-delay: 0.2s; }
.menu-card:nth-child(5) { animation-delay: 0.25s; }
.menu-card:nth-child(6) { animation-delay: 0.3s; }
.menu-card:nth-child(7) { animation-delay: 0.35s; }
.menu-card:nth-child(8) { animation-delay: 0.4s; }
.menu-card:nth-child(9) { animation-delay: 0.45s; }
.menu-card:nth-child(10) { animation-delay: 0.5s; }
.menu-card:nth-child(11) { animation-delay: 0.55s; }
.menu-card:nth-child(12) { animation-delay: 0.6s; }
.menu-card:nth-child(13) { animation-delay: 0.65s; }
.menu-card:nth-child(14) { animation-delay: 0.7s; }

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.menu-card:hover .card-image-wrapper img {
  transform: scale(1.08);
}

/* White fade from bottom */
.card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(to top, var(--white) 0%, rgba(255,255,255,0.85) 25%, rgba(255,255,255,0.4) 55%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.card-info {
  position: relative;
  background: transparent;
  padding: 0 16px 16px;
  margin-top: -24px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-name {
  font-size: clamp(1.4rem, 5.5vw, 1.8rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.3;
  text-align: start;
}

.card-price {
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  font-weight: 800;
  color: var(--gold-dark);
  display: inline-block;
  white-space: nowrap;
}

/* Expand icon hint */
.card-expand-hint {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  backdrop-filter: blur(4px);
}

.card-expand-hint svg {
  width: 14px;
  height: 14px;
  fill: var(--gold-dark);
}

.menu-card:hover .card-expand-hint {
  opacity: 1;
  transform: scale(1);
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 24px;
  cursor: pointer;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}

.lightbox-overlay.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: background var(--transition-smooth), transform var(--transition-smooth);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.lightbox-close:hover {
  background: var(--white);
  transform: rotate(90deg);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
  fill: var(--black);
}

.lightbox-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(13,13,13,0.8), transparent);
  text-align: center;
}

.lightbox-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.lightbox-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 28px 16px 32px;
  background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 100%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.footer span {
  color: var(--gold-light);
  font-weight: 600;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
}

html[dir="ltr"] .lang-toggle {
  left: auto;
  right: 16px;
}

.lang-toggle a {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background var(--transition-smooth);
}

.lang-toggle a:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 599px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-info {
    padding: 0 16px 20px;
    margin-top: -28px;
  }

  .logo-container img {
    width: 120px;
    height: 120px;
  }

  .hero {
    padding: 36px 16px 32px;
  }

  .section-header {
    padding: 28px 12px 14px;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .logo-container img {
    width: 150px;
    height: 150px;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .menu-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .menu-section {
    padding: 0 24px 48px;
  }
}

@media (min-width: 1200px) {
  .menu-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .menu-section {
    padding: 0 32px 56px;
  }

  .logo-container img {
    width: 160px;
    height: 160px;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .menu-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .menu-card:hover .card-image-wrapper img {
    transform: none;
  }

  .card-expand-hint {
    opacity: 0.7;
    transform: scale(1);
  }
}
