/* ===== DESIGN TOKENS ===== */
:root {
  --gold-light: #dec8aa;
  --gold-mid: #dec8aa;
  --gold-dark: #dec8aa;
  --peach: #dec8aa;
  --black: #dec8aa;
  --white: #183328;
  --off-white: #183328;
  --card-radius: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 12px 40px rgba(222, 200, 170, 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: 'Lemonada', 'Segoe UI', Tahoma, sans-serif;
  background: var(--off-white);
  color: var(--black);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== HEADER / HERO ===== */
.hero {
  background: var(--off-white);
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.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: 0;
  border: none !important;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

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

.hero-subtitle {
  position: relative;
  z-index: 2;
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-weight: 400;
  color: var(--gold-dark);
  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;
  flex: 1;
}

#menu-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.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: #ffffff;
  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, #ffffff 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 24px;
  margin-top: -24px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  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(24, 51, 40, 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(24, 51, 40, 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(24, 51, 40, 0.9);
  border: 1px solid var(--black);
  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(--gold-light);
}

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

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

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

/* ===== CARD SIZES (CUSTOM) ===== */
.custom-select {
  position: relative;
  width: 100%;
  margin: 8px 0;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid rgba(222, 200, 170, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--off-white);
  color: var(--gold-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dec8aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
}

[dir="ltr"] .custom-select-trigger {
  padding: 8px 32px 8px 12px;
  background-position: right 12px center;
}

.custom-select-trigger:hover {
  background-color: rgba(222, 200, 170, 0.15);
  border-color: var(--gold-mid);
}

.custom-select-options {
  position: absolute;
  bottom: calc(100% + 4px); /* open upwards to avoid card crop */
  left: 0;
  right: 0;
  background: var(--off-white);
  border: 1px solid var(--gold-mid);
  border-radius: 12px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.2s ease;
  z-index: 100;
}

.custom-select-options.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: rgba(222, 200, 170, 0.2);
  color: var(--gold-dark);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 28px 16px 32px;
  background: linear-gradient(135deg, var(--white) 0%, #11251d 100%);
  color: rgba(222, 200, 170, 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(222, 200, 170, 0.2);
  color: var(--gold-light);
  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(222, 200, 170, 0.3);
  transition: background var(--transition-smooth);
}

.lang-toggle a:hover {
  background: rgba(222, 200, 170, 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 24px;
    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(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }

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

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

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

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

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

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

/* Laptop & Desktop specific font downsizing */
@media (min-width: 900px) {
  .card-name {
    font-size: 1.15rem !important;
  }
  
  .card-price {
    font-size: 1rem !important;
  }

  .custom-select-trigger, .custom-option {
    font-size: 0.8rem;
    padding: 6px 10px 6px 28px;
    background-size: 14px;
  }

  [dir="ltr"] .custom-select-trigger {
    padding: 6px 28px 6px 10px;
  }

  .section-header h2 {
    font-size: 1.3rem !important;
  }
}

/* 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);
  }
}
