/* ─────────────────────────────────────────────────────────
   THE MARMARA HOSPITALITY GROUP — Yemekhane Menüsü
   Light Theme · Navy + Gold
───────────────────────────────────────────────────────── */

:root {
  --bg:           #f4f2ee;
  --bg-inner:     #eceae5;
  --white:        #ffffff;
  --navy:         #1b3464;
  --navy-dark:    #0f2040;
  --navy-light:   #2a4a84;
  --navy-pale:    #eef1f8;
  --gold:         #b8943a;
  --gold-light:   #d4ad54;
  --gold-pale:    #fdf6e3;
  --gold-border:  rgba(184,148,58,0.25);
  --border:       #e0dcd4;
  --border-card:  #dedad2;
  --text-primary: #1a2a40;
  --text-sub:     #4a5568;
  --text-muted:   #8a9ab8;
  --text-meal:    #2d3f5a;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 2px 8px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.08);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  background: var(--bg);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 22px 20px 15px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border), 0 2px 16px rgba(0,0,0,0.05);
  animation: fadeDown 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

.header-logo-wrap {
  display: flex;
  justify-content: center;
}

.header-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  animation: logoReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}

.header-divider {
  width: 36px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 10px auto 8px;
  animation: expandLine 0.8s ease 0.4s both;
  transform-origin: center;
}

.header-subtitle {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeIn 0.5s ease 0.6s both;
}

/* ─────────────────────────────────────────────────────────
   DATE HERO
───────────────────────────────────────────────────────── */
.date-hero {
  background: var(--white);
  padding: 28px 24px 22px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  animation: fadeIn 0.5s ease 0.2s both;
}

.date-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.date-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.date-hero-day {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  transition: opacity 0.2s;
}

.date-hero-date {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--navy-dark);
  letter-spacing: 0.2px;
  line-height: 1.2;
  transition: opacity 0.2s, transform 0.2s;
}

.date-hero-ornament {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  opacity: 0.3;
}

.ornament-line {
  width: 28px; height: 1px;
  background: var(--navy);
}

.ornament-diamond {
  width: 4px; height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ─────────────────────────────────────────────────────────
   DAY NAV
───────────────────────────────────────────────────────── */
.day-nav {
  background: var(--white);
  padding: 14px 16px 14px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.5s ease 0.3s both;
}

.day-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.day-track::-webkit-scrollbar { display: none; }

.day-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
  min-width: 50px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.day-tab:hover {
  border-color: var(--navy-light);
  color: var(--navy);
  background: var(--navy-pale);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.day-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(27,52,100,0.28);
}

.day-tab.today:not(.active)::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.day-name {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.day-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────
   MENU SECTION
───────────────────────────────────────────────────────── */
.menu-section {
  padding: 20px 16px 56px;
  max-width: 520px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────
   MENU CARD
───────────────────────────────────────────────────────── */
.menu-card {
  background: var(--white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: cardReveal 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

.card-top-bar {
  height: 3px;
  background: linear-gradient(90deg,
    var(--navy-dark) 0%,
    var(--navy-light) 40%,
    var(--gold) 70%,
    var(--gold-light) 100%
  );
}

.card-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafaf8 0%, var(--white) 100%);
}

.card-icon {
  width: 34px; height: 34px;
  background: var(--gold-pale);
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-dark);
}

.card-count {
  margin-left: auto;
  background: var(--navy-pale);
  color: var(--navy);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── MEAL LIST ── */
.meal-list {
  list-style: none;
  padding: 4px 0 8px;
}

.meal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  opacity: 0;
  transform: translateX(-10px);
  animation: mealSlideIn 0.35s cubic-bezier(0.22,1,0.36,1) forwards;
  border-bottom: 1px solid #f0ece6;
  transition: background 0.15s;
}

.meal-item:last-child { border-bottom: none; }

.meal-item:hover {
  background: #faf8f4;
}

.meal-index {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  width: 14px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.meal-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.5;
  flex-shrink: 0;
}

.meal-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-meal);
  letter-spacing: 0.2px;
  line-height: 1.4;
}

.meal-item:nth-child(1) { animation-delay: 0.04s; }
.meal-item:nth-child(2) { animation-delay: 0.09s; }
.meal-item:nth-child(3) { animation-delay: 0.14s; }
.meal-item:nth-child(4) { animation-delay: 0.19s; }
.meal-item:nth-child(5) { animation-delay: 0.24s; }
.meal-item:nth-child(6) { animation-delay: 0.29s; }
.meal-item:nth-child(7) { animation-delay: 0.34s; }

.card-footer {
  padding: 11px 20px 14px;
  border-top: 1px solid #f0ece6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-footer-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--gold-border), transparent);
}

.card-footer-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.35;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   STATES
───────────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 80px 0;
}

.loading-logo {
  width: 44px; height: 44px;
  position: relative;
}

.loading-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid #e8e4dc;
  border-top-color: var(--navy);
  animation: spin 1s linear infinite;
}

.loading-ring-2 {
  position: absolute; inset: 7px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--gold);
  animation: spin 1.6s linear infinite reverse;
}

.loading-text {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  animation: pulse 1.5s ease infinite;
}

.empty-state {
  text-align: center;
  padding: 72px 24px;
  animation: fadeIn 0.4s ease both;
}

.empty-icon  { font-size: 36px; margin-bottom: 16px; opacity: 0.2; display: block; }
.empty-title { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--navy-dark); margin-bottom: 8px; }
.empty-sub   { font-size: 13px; color: var(--text-muted); }

.error-state {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 22px;
  color: #dc2626;
  font-size: 13px;
  line-height: 1.6;
}

.error-state pre {
  margin-top: 10px; font-size: 11px;
  color: var(--text-muted); overflow: auto; white-space: pre-wrap;
}

/* ─────────────────────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────────────────────── */
@keyframes fadeDown    { from { opacity:0; transform:translateY(-12px);} to { opacity:1; transform:translateY(0);} }
@keyframes fadeIn      { from { opacity:0; } to { opacity:1; } }
@keyframes logoReveal  { from { opacity:0; transform:scale(0.94); } to { opacity:1; transform:scale(1); } }
@keyframes expandLine  { from { transform:scaleX(0); opacity:0; } to { transform:scaleX(1); opacity:1; } }
@keyframes cardReveal  { from { opacity:0; transform:translateY(18px) scale(0.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes mealSlideIn { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:translateX(0); } }
@keyframes spin        { to { transform:rotate(360deg); } }
@keyframes pulse       { 0%,100% { opacity:0.4; } 50% { opacity:1; } }

.date-hero-date.changing {
  opacity: 0;
  transform: translateY(6px);
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .header-logo    { height: 52px; }
  .date-hero-date { font-size: 22px; }
  .day-num        { font-size: 17px; }
  .day-tab        { padding: 8px 10px; min-width: 44px; }
  .meal-name      { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
