/* ============================================================
   1. VARIABILI E RESET
   ============================================================ */
:root {
  --blu: #0A2540;
  --arancio: #F97316;
  --bg: #F4F6F8;
  --testo: #1F2937;
  --bianco: #ffffff;
  --successo: #166534;
  --promo: #22c55e;
  --cibo: #2563eb;
  --bibite: #7c3aed;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--testo);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

/* Accessibilità */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

/* ============================================================
   2. LAYOUT GENERALE E NAVIGAZIONE
   ============================================================ */
header {
  background: var(--blu);
  color: var(--bianco);
  padding: 20px 16px;
  text-align: center;
}

header h1 { margin: 10px 0 0; font-size: 1.8rem; }

nav {
  background: var(--bianco);
  display: flex;
  justify-content: center; /* CENTRATO */
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a { 
  color: var(--blu); 
  font-weight: 700; 
  text-decoration: none; 
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

nav a:hover { 
  color: var(--arancio); 
  background: #f1f5f9;
}

.container {
  padding: 20px 16px;
  max-width: 900px;
  margin: auto;
}

footer {
  text-align: center;
  padding: 30px 16px;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

/* ============================================================
   3. COMPONENTI (CARD E PULSANTI)
   ============================================================ */
.card {
  background: var(--bianco);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* Badge PROMO Verde */
.menu-badge.promo {
  background-color: var(--promo);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 5px;
  display: inline-block;
}

/* Pulsanti Switch Menu */
.nav-menu-switcher { 
  display: flex; 
  justify-content: center; 
  gap: 15px; 
  margin: 25px 0; 
}

.btn-large {
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  flex: 1;
  max-width: 250px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: opacity 0.2s;
}

#btn-cibo { background-color: var(--cibo); color: white; }
#btn-bibite { background-color: var(--bibite); color: white; }
.btn-large.secondary { background-color: #e2e8f0 !important; color: #475569 !important; box-shadow: none; }

/* Pulsante Prenotazione Finale */
.cta-booking-final {
  background-color: var(--successo) !important;
  color: white !important;
  font-size: 1.2rem;
  padding: 20px;
  margin-top: 30px;
  width: 100%;
  border-radius: 15px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.lang-switch { display: flex; justify-content: center; gap: 15px; margin-bottom: 5px; }
.lang-switch a { color: var(--bianco) !important; text-decoration: none; font-weight: 600; font-size: 0.9rem; opacity: 0.8; }
.lang-switch a:hover { opacity: 1; text-decoration: underline; }

/* ============================================================
   4. SLIDESHOW
   ============================================================ */
.slideshow {
  width: 100%;
  height: 420px;
  overflow: hidden;
  position: relative;
}

.slideshow .slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}

.slideshow .slides img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   5. INSTAGRAM FIX
   ============================================================ */
.social-instagram, .footer-instagram {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 25px 0;
  width: 100%;
}

.social-instagram a, .footer-instagram a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  color: inherit;
}

.social-instagram img, .footer-instagram img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
}

/* ============================================================
   6. GRIGLIA FOTO
   ============================================================ */
.insta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.insta-grid a {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

.insta-grid img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ============================================================
   7. MEDIA QUERIES (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
  header h1 { font-size: 1.4rem; }
  .slideshow { height: 280px; }
  
  nav {
    justify-content: center; /* CENTRATO SU MOBILE */
    gap: 10px;
    padding: 10px;
  }
  
  nav a { font-size: 0.9rem; padding: 6px 8px; }

  .btn-large { padding: 15px 10px; font-size: 1rem; }

  /* Tabelle in verticale su mobile */
  table thead { display: none; }
  table tr { display: block; margin-bottom: 15px; border-bottom: 2px solid #eee; }
  table td { display: block; text-align: right; padding: 8px 0; position: relative; }
  table td::before {
    content: attr(data-label);
    position: absolute; left: 0; font-weight: bold;
  }
}

@media (min-width: 769px) {
  .insta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   8. COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: var(--blu);
  color: var(--bianco);
  padding: 16px;
  z-index: 10000;
  display: none;
}


/* Pulsante d'azione principale (usato in Menu e Prenota) */
.btn-submit-main {
  background-color: var(--successo) !important;
  color: white !important;
  font-size: 1.3rem !important;
  padding: 18px !important;
  margin-top: 25px;
  width: 100%;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.1s;
  display: block;
  text-align: center;
}

.btn-submit-main:active {
  transform: scale(0.98);
}