/* ========================================================== */
/* FILE: style.css (Layout Standard e Corretto) */
/* ========================================================== */

/* ========================================================== */
/* CSS CUSTOM PROPERTIES (Variabili) */
/* ========================================================== */
:root {
    --primary-gold: rgb(212, 175, 55);
    --panel-bg-dark: rgba(255, 255, 255, 0.9);
    --button-bg-light: rgba(255, 255, 255, 0.2);
    --button-bg-hover: rgba(212, 175, 55, 0.4);
    --text-dark: #333;
    --text-light: #666;
    --border-light: #ccc;
    --z-canvas: -10;
    --z-content: 10;
    --z-dropdown: 9999;
}

/* ========================================================== */
/* ANIMAZIONI PULSE/GLOW DORATO PER CAMBIO PAGINA */
/* ========================================================== */
@keyframes pulseGlowIn {
  0% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    transform: scale(0.95);
  }
  50% {
    box-shadow: 0 0 30px 15px rgba(212, 175, 55, 0.3);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    transform: scale(1);
  }
}

@keyframes pulseGlowOut {
  0% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 30px 15px rgba(212, 175, 55, 0.5);
    transform: scale(0.95);
  }
}

/* ========================================================== */
/* STILI GENERALI E SETUP INIZIALE */
/* ========================================================== */

html, body {
    overflow-x: hidden;
    background-color: #000;
}

body {
    background-color: transparent; 
    color: var(--primary-gold);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    overflow-x: hidden;
}

/* Stili per il Canvas creato da Three.js (Sfondo fisso) */
canvas {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-canvas);
    pointer-events: none;
}

/* ========================================================== */
/* ANIMAZIONI PAGE FLIP (Libro Realistico) */
/* ========================================================== */

@keyframes turnOutForward {
    0% {
        opacity: 1;
        -webkit-transform: rotateY(0deg);
        transform: rotateY(0deg);
    }
    100% {
        opacity: 0;
        -webkit-transform: rotateY(-90deg);
        transform: rotateY(-90deg);
    }
}

@keyframes turnOutBackward {
    0% {
        opacity: 1;
        -webkit-transform: rotateY(0deg);
        transform: rotateY(0deg);
    }
    100% {
        opacity: 0;
        -webkit-transform: rotateY(90deg);
        transform: rotateY(90deg);
    }
}

@keyframes turnIn {
    0% {
        opacity: 0;
        -webkit-transform: rotateY(90deg);
        transform: rotateY(90deg);
    }
    100% {
        opacity: 1;
        -webkit-transform: rotateY(0deg);
        transform: rotateY(0deg);
    }
}

.turn-out-forward {
    -webkit-animation: turnOutForward 0.5s ease-in-out forwards !important;
    animation: turnOutForward 0.5s ease-in-out forwards !important;
}

.turn-out-backward {
    -webkit-animation: turnOutBackward 0.5s ease-in-out forwards !important;
    animation: turnOutBackward 0.5s ease-in-out forwards !important;
}

.turn-in {
    -webkit-animation: turnIn 0.5s ease-in-out forwards !important;
    animation: turnIn 0.5s ease-in-out forwards !important;
}

/* ========================================================== */
/* CONTENITORE PRINCIPALE (Centraggio e Prospettiva 3D) */
/* ========================================================== */

#main-content-wrapper {
    width: 100%;
    max-width: 100%; 
    margin: 0;
    padding: 10px 0 100px;
    position: relative; 
    z-index: var(--z-content);
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    -webkit-perspective: 1200px;
    perspective: 1200px; 
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}


/* ========================================================== */
/* HEADER, LOGO E TITOLI */
/* ========================================================== */

header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
}


#logo-container {
    width: 100%;
    text-align: center;
    margin: 0;
}


#restaurant-logo {
    display: block; 
    width: 120px; 
    height: auto;
    margin: 0 auto; 
    border-radius: 50%; 
    box-shadow: 0 6px 10px var(--primary-gold);
}


.welcome-message {
    color: var(--primary-gold);
    text-align: center;
    font-size: 1.1em;
    font-style: italic;
    margin: 5px 0;
    line-height: 1.2;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    max-width: 80%;
}


.main-title {
    font-family: 'Cinzel', serif; 
    color: var(--primary-gold);
    font-size: 2em;
    text-align: center;
    margin: 5px 0;
    line-height: 1;
    display: block;
    padding: 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


#menu-container {
    width: 100%; 
    padding: 0;
    box-sizing: border-box;
    margin-top: 0; 
    
}

/* ========================================================== */
/* PULSANTI (STILE SEMITRASPARENTE) */
/* ========================================================== */

#main-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%; 
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin: 10px auto 0;
    align-items: center;
    justify-content: center;
}


.menu-button {
    width: 90%;
    max-width: 450px;
    padding: 15px 20px;
    text-align: center;
    text-transform: uppercase;
    font-family: 'Cinzel', serif; 
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 1px;
    
    color: var(--primary-gold);
    background-color: var(--button-bg-light);
    border: 2px solid var(--primary-gold);
    border-radius: 15px; 
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--primary-gold);
    margin: 0 auto;
}

.menu-button:hover {
    background-color: var(--button-bg-hover);
    transform: scale(1.02);
}

.menu-button:active {
    transform: scale(0.98);
}

/* SELETTORE LINGUA (DROPDOWN) */

#language-dropdown {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-dropdown);
}

#lang-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    display: none;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    
}


#current-lang-btn {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-family: 'Lato', sans-serif; 
    font-weight: 700;
    background-color: var(--button-bg-light);
    color: #f0f0f0;
    border: 2px solid var(--primary-gold);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative; 
    z-index: 1; 
}


  

.flag-icon {
    width: 20px;
    height: 14px;
    margin-right: 5px;
    border: 2px solid var(--primary-gold);
}

.arrow {
    font-size: 1.2em;
    margin-left: 5px;
    transition: transform 0.3s;
}

#lang-options .lang-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    text-align: left;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Lato', sans-serif;
    display: flex;
    align-items: center;
    
}

#lang-options .lang-btn:hover {
    background-color: var(--button-bg-hover);
}

.dropdown-inner {
    position: relative;
}

.item-translation-it {
  display: block;
  font-size: 0.75em;
  color: #888;
  margin-top: 2px;
  font-style: italic;
}

.item-name-italian {
  font-size: 0.85em;
  color: #999;
  font-style: italic;
  margin-top: 2px;
  display: none; /* 👈 visibile solo se lingua ≠ italiano */
  
  line-height: 1.2;
  margin-bottom: 0;
  padding: 0;
  position: relative;
  top: -1px; /* se serve un leggero riallineamento */


}



.menu-section {
  display: none;
  padding: 20px;
  margin: 10px auto;
  width: 90%;
  max-width: 600px;
  position: relative;
  z-index: var(--z-content);
  box-sizing: border-box;

  /* 🎨 GLASSMORPHISM EFFECT - Sfondo blu navy con blur */
  background: rgba(30, 50, 80, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  
  color: #ffffff;
  border-radius: 10px;

  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out;
  
  /* 🌟 PULSE/GLOW ANIMATION */
  animation: pulseGlowIn 0.8s ease-out;
}

.menu-section.hidden {
  animation: pulseGlowOut 0.8s ease-in;
}

/* RESPONSIVE: Su desktop allarga il menu */
@media (min-width: 768px) {
  .menu-section {
    width: 85%;
    max-width: 900px;
    padding: 30px;
  }

  #main-buttons-grid {
    max-width: 700px;
  }

  .menu-button {
    width: 85%;
    max-width: 600px;
  }
}

@media (min-width: 1024px) {
  .menu-section {
    width: 80%;
    max-width: 1000px;
  }
}

/* ========================================================== */
/* FRECCE DI NAVIGAZIONE SEQUENZIALE (Prev/Next) */
/* ========================================================== */



/* === Frecce laterali dorate === */
.menu-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-50%);
  padding: 0 20px;
  pointer-events: none;
  z-index: 100;
  
}

.arrow-button {
  pointer-events: all;
  background-color: transparent;
  border: none;
  font-size: 2.5em;
  color: rgb(212, 175, 55);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.arrow-button:hover {
  transform: scale(1.2);
  background-color: rgba(212, 175, 55, 0.4);
}


/* === Frecce di fallback (se usi ancora nav-buttons in basso) */
.nav-buttons {
  display: none; /* disattivato se usi frecce laterali */
}

/* === Frecce interne (se presenti in singole pagine) */
.category-title {
  font-family: 'Cinzel', serif;
  font-size: 2em;
  color: #ffffff;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 10px var(--primary-gold);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.nav-arrow-container {
  font-size: 2em;
  color: #ccc;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  user-select: none;
}

.nav-arrow-container:hover {
  color:black;
  transform: scale(1.2);
  background-color: var(--button-bg-hover);
}


.description-text { 
    text-align: center;
    font-style: italic;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}

.menu-item.no-border {
    border-bottom: none;
}

/* ... (continua con gli stili dei prodotti e il resto del menu) ... */

.item-details {
    flex-grow: 1;
    padding-right: 15px;
}

.item-name {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.item-description {
    font-size: 0.9em;
    color: #d0d0d0;
    margin: 5px 0 0;
}

/* ========================================================== */
/* ALLERGENI BADGES */
/* ========================================================== */
.allergen-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.allergen-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: rgba(212, 175, 55, 0.08);
    color: rgb(212, 175, 55);
    border: 1.5px solid rgb(212, 175, 55);
    transition: all 0.2s ease;
    cursor: help;
    text-transform: uppercase;
}

.allergen-badge:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.6);
    color: var(--primary-gold);
    transform: translateY(-1px);
}

/* Responsive allergeni */
@media (max-width: 768px) {
    .allergen-badge {
        font-size: 0.65em;
        padding: 3px 8px;
        border: 1.5px solid rgba(212, 175, 55, 0.9) !important;
        background: rgba(212, 175, 55, 0.08) !important;
        color: rgba(212, 175, 55, 0.95) !important;
    }
    
    .allergen-container {
        gap: 5px;
        margin-top: 8px;
    }
}

.item-price {
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    font-size: 1.1em;
    white-space: nowrap; 
}

/* ========================================================== */
/* NAVIGAZIONE SECONDARIA (SOTTO I MENU) */
/* ========================================================== */

#secondary-navigation {
  width: 100%;
  max-width: 100%;
  margin: 50px auto 0;
  padding: 20px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Cinzel', serif; 
}

#secondary-buttons-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  margin: 0 auto;
}

.secondary-title {
  font-family: 'Cinzel', serif;
  color: #f0f0f0;
  font-size: 1.5em;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}



#home-page-btn {
    max-width: 100%; 
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.4); 
}

/* Centra i bottoni nella navigazione secondaria */
#booking-button-container,
#review-button-container,
#instagram-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

/* ORARI DI APERTURA */
#opening-hours {
    width: 90%;
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    text-align: center;
    
    background-color: var(--button-bg-light);
    border: 2px solid var(--primary-gold);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15); 
    border-radius: 12px;
    color: var(--primary-gold);
}


#opening-hours li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
}


#opening-hours h3, 
.day-range, 
.time-range {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); 
}

/* ========================================================== */
/* BOTTONI DI PRENOTAZIONE, RECENSIONE E INSTAGRAM */
/* ========================================================== */

#booking-button-container,
#review-button-container,
#instagram-button-container {
    text-align: center;
    margin: 20px 0 40px 0; 
}

.whatsapp-button,
.review-button,
.instagram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 25px;
    width: 70%; 
    max-width: 350px; 
    font-family: 'Cinzel', serif; 
    background-color: var(--button-bg-light);
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0 auto;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.whatsapp-button:hover,
.review-button:hover,
.instagram-button:hover {
    background-color: var(--button-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.whatsapp-icon-img {
    height: 1.2em; 
    width: auto; 
    margin-right: 10px; 
    vertical-align: middle; 
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5)); 
}

.review-icon {
    display: inline-block; 
    font-size: 1.4em; 
    margin-right: 10px;
    line-height: 1; 
    vertical-align: middle;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); 
}

.instagram-icon {
    width: 24px;
    height: auto;
    vertical-align: middle;
}

.instagram-text {
    display: inline-block;
    vertical-align: middle;
}

/* ========================================================== */
/* PIEDE DI PAGINA (FOOTER) */
/* ========================================================== */

footer {
    width: 100%;
    padding: 20px 0;
    text-align: center; 
    background-color: transparent; 
}

.footer-text {
    margin: 0;
    font-size: 1.2em; 
    color: rgba(255, 255, 255, 0.5); 
    font-weight: 300;
}

.lang-btn.active-lang {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* ========================================================== */
/* ICONE VINI (Calice e Bottiglia) */
/* ========================================================== */

.wine-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin: 0 5px;
    filter: drop-shadow(0 0 2px var(--primary-gold)) brightness(0) saturate(100%) invert(76%) sepia(52%) saturate(476%) hue-rotate(7deg);
}

/* ========================================================== */
/* SEZIONE VINI - LAYOUT TABELLA */
/* ========================================================== */

.wine-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wine-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    margin: 30px 0 15px 0;
    font-weight: bold;
    color: #ffffff;
}

.wine-glass-header,
.wine-bottle-header {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wine-item {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 10px;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}

.wine-item.no-border {
    border-bottom: none;
}

.wine-info {
    display: flex;
    flex-direction: column;
}

.wine-price-glass,
.wine-price-bottle {
    text-align: center;
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    font-size: 1em;
    font-weight: normal !important;
    white-space: nowrap;
}

.wine-description {
    grid-column: 1 / -1;
    margin-top: 5px;
}

/* ========================================================== */
/* MODAL MENU DI CAPODANNO */
/* ========================================================== */
.capodanno-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto;
    padding: 10px;
}

.capodanno-modal-content {
    position: relative;
    margin: 5vh auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    animation: slideDown 0.4s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.capodanno-close {
    position: absolute;
    top: -15px;
    right: -15px;
    color: var(--primary-gold);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-gold);
}

.capodanno-close:hover,
.capodanno-close:focus {
    color: #fff;
    background: var(--primary-gold);
    transform: rotate(90deg);
}

.capodanno-image {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

/* Container per l'immagine nella sezione dedicata */
.capodanno-image-container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.capodanno-full-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.capodanno-full-image:hover {
    transform: scale(1.02);
}

/* Nasconde il titolo nella sezione capodanno */
#capodanno .category-header h2 {
    display: none;
}

#capodanno .category-header {
    justify-content: center;
    padding: 10px 0;
}

/* Responsive per mobile */
@media screen and (max-width: 768px) {
    .capodanno-modal {
        padding: 15px !important;
    }
    
    .capodanno-modal-content {
        width: 90% !important;
        max-width: 100% !important;
        margin: 3vh auto !important;
        max-height: 80vh !important;
    }
    
    .capodanno-image {
        max-height: 75vh !important;
        border-radius: 5px !important;
    }
    
    .capodanno-close {
        top: 5px !important;
        right: 5px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 25px !important;
        border-width: 1px !important;
    }
    
    .capodanno-image-container {
        padding: 10px !important;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .capodanno-modal {
        padding: 15px 10px !important;
    }
    
    .capodanno-modal-content {
        width: 90% !important;
        margin: 3vh auto !important;
        max-height: 75vh !important;
    }
    
    .capodanno-image {
        max-height: 70vh !important;
    }
    
    .capodanno-close {
        top: 2px !important;
        right: 2px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 22px !important;
    }
}






