/*
 * ====================================
 * 1. VARIABILI E BASE (Estetica Eletta)
 * ====================================
 */

:root {
  /* Palette */
  --bg: #f5f5f5;         /* Sfondo: Grigio molto chiaro, quasi bianco */
  --card: #ffffff;       /* Card: Bianco puro */
  --accent: #cc9900;     /* Accento: Giallo Ocra (Caldo e Ricco) */
  --accent-rgb: 204, 153, 0; /* Versione RGB per ombre e trasparenze */
  --text: #1a1a1a;       /* Testo: Nero molto scuro */
  --muted: #aaaaaa;      /* Grigio medio */
  --dark: #222222;       /* Sidebar/Footer */
  --danger: #cc0000;     /* Rosso per eliminazione */
  
  /* Variabili Globali per Ombre e Bordi */
  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.12); /* Ombra più pronunciata */
  --sidebar-width: 340px; 
}

/* Base e Tipografia */
* { box-sizing: border-box; }
html, body { 
  margin: 0; 
  padding: 0; 
  background: var(--bg); 
  color: var(--text); 
  font-family: 'Cormorant Garamond', Georgia, serif; 
  overflow-x: hidden; 
  min-height: 100vh;
}
body.sidebar-open { overflow: hidden; }

h1, h2, h3, h4, .brand, .num, .price, .title { 
  font-family: 'Times New Roman', serif; 
  font-weight: 700; 
  color: var(--dark); 
  line-height: 1.2;
}


/* Titoli Generici */
.title {
  font-size: 3rem; 
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent); 
  padding-bottom: 5px;
  letter-spacing: 1px;
  text-transform: uppercase; 
}

/* Titoli all'interno di Card/Form (auth-card, form-card, ecc.) */
.auth-card h2, .form-card h2, .reservation-form-section .form-title {
    font-size: 2.2rem; 
    margin-bottom: 1.2rem;
    border-bottom: 3px solid var(--accent); 
    padding-bottom: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase; 
}


/*
 * ====================================
 * 2. LAYOUT E NAVIGAZIONE (Sidebar, Hamburger, Footer)
 * ====================================
 */

/* Contenuto principale */
.content { 
  margin-left: 0; min-height: 100vh; padding: 70px 40px 100px; 
  transition: margin-left 0.3s ease-out; 
}

/* Sidebar (Apertura a Destra - FISSA) */
.sidebar {
  position: fixed; 
  top: 0; 
  /* Assume che --sidebar-width sia definita nel tuo file CSS (es. 280px) */
  right: calc(-1 * var(--sidebar-width)); 
  left: auto;
  height: 100vh; 
  width: var(--sidebar-width); 
  background: var(--dark); 
  border-left: 8px solid var(--accent); 
  padding: 40px 25px; 
  display: flex; 
  flex-direction: column; 
  overflow-y: auto; 
  /* CHIAVE 1: Rimuovi l'overflow-x: hidden. Se lo tieni, devi garantire che la larghezza sia sempre sufficiente. Se lo mantieni, assicurati che la larghezza della sidebar sia maggiore di 280px. */
  overflow-x: hidden; 
  gap: 16px;
  z-index: 1000; 
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.sidebar.active { 
  right: 0; 
  box-shadow: -10px 0 30px rgba(0,0,0,0.7); 
} 

.sidebar .brand { 
  font-weight: 900; 
  letter-spacing: 4px; 
  color: var(--accent); 
  font-size: 2.5rem; 
  margin-bottom: 40px; 
  text-align: center;
  border-bottom: 3px double var(--accent); 
  padding-bottom: 15px;
  
  /* CHIAVE 2: Permette al testo di andare a capo. Il brand è lungo ("Strix GastroFood&Beer") e 2.5rem è grande, quindi va a capo se la sidebar è stretta. */
  white-space: normal;
  /* Assicurati che non ci siano margini negativi o padding insufficiente */
  word-wrap: break-word; 
}

.sidebar nav { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.sidebar a {
  color: var(--bg); 
  text-decoration: none; 
  padding: 15px 18px; 
  border-radius: 4px; 
  border: 1px solid transparent;
  display: block; 
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 500;
  /* CHIAVE 3: Impedisce che il link stesso sia più largo del contenitore */
  white-space: nowrap; 
  /* Forza il testo ad adattarsi, se necessario. */
  max-width: 100%; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.sidebar a:hover { 
  background: var(--accent); 
  color: var(--dark); 
  transform: scale(1.05); 
  border-color: var(--dark);
}

.sidebar .hi { 
  color: var(--muted); 
  border: none; 
  padding: 10px 0; 
  font-style: italic; 
  text-transform: none; 
  text-align: center;
}

/* Pulsante Hamburger */
.menu-toggle {
  position: fixed; top: 25px; right: 25px; left: auto;  
  display: flex; flex-direction: column; justify-content: space-around;
  width: 35px; height: 30px; background: transparent; border: none;
  cursor: pointer; z-index: 1001; padding: 0; 
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); 
  border-radius: 3px;
}
.menu-toggle .line {
  display: block; width: 100%; height: 3px; 
  background: var(--accent); 
  border-radius: 2px; transition: all 0.3s ease-in-out;
}
.sidebar.active ~ .menu-toggle .line:nth-child(1) { transform: translateY(8px) rotate(-45deg); }
.sidebar.active ~ .menu-toggle .line:nth-child(2) { opacity: 0; }
.sidebar.active ~ .menu-toggle .line:nth-child(3) { transform: translateY(-8px) rotate(45deg); }

/* Footer - FISSO IN BASSO */
.footer { 
  position: fixed; bottom: 0; left: 0; right: 0; height: 85px; 
  background: var(--dark); 
  border-top: 5px solid var(--accent); 
  z-index: 99; 
  box-shadow: 0 -4px 15px rgba(0,0,0,0.3); 
}
.footer .footer-inner { 
  display: flex; justify-content: space-around; align-items: center;
  height: 100%; padding: 10px 20px; 
  color: var(--muted); 
  font-size: 14px; 
  line-height: 1.4;
}
.footer strong { color: var(--accent); } 


/*
 * ====================================
 * 3. COMPONENTI DI SISTEMA (Flash, Modal, Carousel)
 * ====================================
 */

/* Flash Messages */
.flash-messages-fixed-container {
    position: fixed;
    top: 50px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 1050; 
    padding: 0 20px; 
    pointer-events: none; 
    width: 90%; 
    max-width: 600px; 
}
.flash {
    padding: 15px 20px;
    margin-bottom: 10px; 
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 6px solid;
    text-transform: uppercase;
    pointer-events: all;
    margin-left: auto;
    margin-right: auto;
    text-align: center; 
    transition: opacity 0.3s ease;
}
.flash-messages-fixed-container.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out; 
}

.flash-success { background-color: #e6ffe6; color: #008000; border-left-color: #008000; }
.flash-info { background-color: #f0f8ff; color: #0066cc; border-left-color: #0066cc; }
.flash-danger, .flash-error { background-color: #ffe6e6; color: var(--danger); border-left-color: var(--danger); }
.flash-warning { background-color: #fff8e6; color: #ff8c00; border-left-color: #ff8c00; }
.login-flash {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #fff8e6; 
    color: var(--dark);
    border: 1px solid var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}


/* MODALS (POP-UP) */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto; 
    background-color: rgba(0,0,0,0.85); 
    justify-content: center; align-items: center; padding: 20px;
}
.modal.show { display: flex; }
.modal-content {
    background-color: var(--card); margin: auto; padding: 30px;
    border: 6px solid var(--accent); max-width: 800px; width: 90%;
    position: relative; border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    opacity: 0; transform: translateY(-50px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    margin:40px;
}
.modal.show .modal-content { opacity: 1; transform: translateY(0); }
.close-btn { 
    color: var(--dark); 
    font-size: 40px; 
    position: absolute; 
    top: 10px; 
    right: 20px; 
    cursor: pointer; 
    line-height: 1; 
    transition: color 0.2s; 
    margin:-2%;
    z-index: 100; 
}
.close-btn:hover, .close-btn:focus { color: var(--danger); text-decoration: none; }
.modal-image { width: 100%; height: 350px; object-fit: cover; object-position: center; margin-bottom: 20px; border-bottom: 3px solid var(--muted); }
.modal-body h3 { font-size: 2.2rem; color: var(--accent); margin-bottom: 10px; border-bottom: 1px solid var(--muted); padding-bottom: 5px; }
.modal-price { font-size: 1.5rem; font-weight: bold; color: var(--text); margin-top: 20px; }


/* CAROSELLO SCORRIMENTO INFINITO */
.carousel-section {
    overflow: hidden; 
    padding: 15px; 
    margin: 40px auto; 
    position: relative; 
    border: 4px double var(--accent); 
    border-radius: 8px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.25); 
    background: var(--card); 
    max-width: calc(3 * 300px + 6 * 10px + 20px + 30px); 
}
.carousel-track {
    display: flex; animation: scroll-left 15s linear infinite; 
}
.carousel-track:hover { animation-play-state: paused; }
.carousel-slide {
    width: 300px; height: 250px; margin: 0 10px; flex-shrink: 0; 
    border: 5px solid var(--card); box-shadow: 0 0 10px rgba(0,0,0,0.1);
    cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
}
.carousel-slide img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; filter: brightness(0.95);
}
.carousel-slide:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); filter: brightness(1); }
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-960px); } 
}

/* ====================================
   NUOVE SEZIONI: Mappa, Orari e Contatti
   ==================================== */

.location-map-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 40px auto;
}

.map-container {
    width: 100%;
    /* Altezza fissa per l'area mappa (gestita dal CSS) */
    height: 400px; 
    border: 1px solid var(--muted);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    
    /* *** ASSICURATI DI RIMUOVERE QUESTI STILI PRECEDENTI: *** */
    background: none; /* Rimuove l'immagine di sfondo */
    display: block;  /* Per assicurare un corretto rendering dell'iframe */
}

/* Rimuovi anche lo stile per .map-placeholder e .map-container .btn.primary se presenti */

@media (max-width: 768px) {
    /* ... altri stili ... */
    .map-container {
        height: 300px; /* Altezza ridotta per schermi più piccoli */
    }
}
/* Stili per la sezione Orari e Contatti */

.schedule-contact-section {
    padding: 40px;
    background: var(--card); 
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-grid h3 {
    color: var(--accent);
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
}

.contact-grid p {
    margin: 8px 0;
    font-size: 1.1rem;
}

/* NUOVI STILI PER GLI ORARI GIORNO PER GIORNO */
.opening-hours .day-time {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 1.05rem;
    border-bottom: 1px dashed var(--muted);
}

.opening-hours .day-time:last-of-type {
    border-bottom: none; /* Rimuovi la linea sotto l'ultimo giorno */
}

.opening-hours .day {
    font-weight: bold;
    color: var(--text);
}

.opening-hours .time {
    color: var(--accent);
    font-weight: 500;
}
.dashboard-header {
    display: flex;
    justify-content: space-between; /* Sposta il titolo e i link ai lati */
    align-items: center;
    flex-wrap: wrap; /* Assicura che i link vadano a capo su schermi piccoli */
    margin-bottom: 30px;
}

.dashboard-header .title {
    margin-right: 20px; /* Spazio tra titolo e pulsanti */
}

/* Raggruppa i pulsanti per mantenerli vicini */
.dashboard-header .admin-link-btn {
    margin-left: 15px; /* Aggiunto al secondo pulsante, come nell'inline style */
    margin-top: 10px; /* Per schermi piccoli */
}


/* Responsive per Contatti e Orari */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    /* Rimuoviamo l'altezza fissa della mappa se è necessario */
    .map-container {
        height: 300px; 
    }
}

.schedule-contact-section {
    padding: 40px;
    /* Usa lo stile list-card che hai già definito */
    background: var(--card); 
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-grid h3 {
    color: var(--accent);
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
}

.contact-grid p {
    margin: 8px 0;
    font-size: 1.1rem;
}

.opening-hours p strong {
    min-width: 120px;
    display: inline-block;
    color: var(--text);
}

/* Responsive per Contatti e Orari */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .map-container {
        height: 300px; 
    }
}

/*
 * ====================================
 * 4. COMPONENTI (Card, Pulsanti, Form)
 * ====================================
 */

/* Cards e Contenitori - Raffinati */
.form-card, .list-card, .dashboard, .menu, .reservation-form-section, .auth-card {
  background: var(--card); 
  border: 1px solid #e0e0e0; 
  border-left: 6px solid var(--accent); 
  padding: 40px; 
  margin: 40px auto; 
  border-radius: 6px; 
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
}
.auth-card { 
    max-width: 450px; 
    padding: 30px; 
    border-left: 8px solid var(--accent); 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 60px auto;
}
.form-card:hover, .list-card:hover, .dashboard:hover, .menu:hover, .reservation-form-section:hover, .auth-card:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.2); 
    transform: translateY(-3px); 
}

/* Pulsanti (Stile Premibile Ocra) */
.btn { 
  display: inline-block; padding: 14px 30px; border-radius: 4px; 
  text-decoration: none; cursor: pointer; transition: all 0.3s ease;
  text-transform: uppercase; letter-spacing: 2px; border: none;
}
.btn.primary { 
  background: var(--accent); 
  color: var(--dark); 
  font-weight: 700; 
  box-shadow: 0 4px 0px #b8860b; 
}
.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 6px 0px #b8860b; 
}
.btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0px #b8860b;
}

.btn.secondary {
    background: var(--bg);
    color: var(--dark);
    border: 2px solid var(--accent); 
    box-shadow: var(--shadow-subtle);
}
.btn.secondary:hover {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.3);
}

.btn.btn-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    box-shadow: none !important;
    transform: none !important;
}
.btn.btn-danger {
    background: var(--danger);
    color: white;
}
.btn.btn-danger:hover {
    background: #990000;
}
.btn.btn-sm-danger {
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 3px;
    box-shadow: none; 
}

/* Input e Textarea (Bordo accentato al Focus) */
input[type="text"], 
input[type="number"], 
input[type="email"], 
input[type="password"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="datetime-local"], 
textarea { 
    width: 100%;
    padding: 12px;
    border: 1px solid var(--muted);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; 
    font-family: inherit;
    min-height: 40px; 
    transition: border-color 0.3s, box-shadow 0.3s;
}
input:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5); 
    outline: none;
}
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark);
}
textarea { resize: none; } 

/* Stili specifici per Input */
input[readonly] {
    background-color: #f8f8f8; 
    cursor: default;
    color: #444;
}
input::placeholder, textarea::placeholder {
    color: var(--muted);
    font-style: italic;
}
/* Rimuove le frecce/spinner dagli input numerici */
.auth-form input[type="number"],
.reservation-form input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield; 
    margin: 0;
}
cta-grid-container {
    max-width: 1200px; /* Larghezza massima per la griglia centrale */
    margin: 60px auto;
    padding: 0 20px;
}

.cta-grid {
    display: grid;
    /* 3 colonne uguali: affianca le CTA */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cta-grid-item {
    /* Eredita lo stile di sfondo e overlay della strip image */
    background-size: cover;
    background-position: center center;
    min-height: 350px; /* Altezza fissa per coerenza visiva */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
    
    /* Centra verticalmente il contenuto (strip-content) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Overlay scuro per ogni elemento della griglia (simula la .image-strip::before) */
.cta-grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
    transition: background 0.3s;
}

.cta-grid-item:hover::before {
    background: rgba(0, 0, 0, 0.65); /* Scuro maggiore all'hover */
}

/* Contenuto di testo interno - deve stare sopra l'overlay */
.cta-grid-item .strip-content {
    padding: 20px;
    max-width: 100%;
}

.cta-grid-item h2 {
    color: var(--accent); 
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.cta-grid-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Immagini di sfondo specifiche per ogni CTA (DA MODIFICARE CON I TUOI PERCORSI) */
.menu-cta {
    background-image: url('/static/images/home_menu.jpg'); 
}
.reviews-cta {
    background-image: url('/static/images/home_reviews.jpg');
}
.fidelity-cta {
    background-image: url('/static/images/home_fidelity.jpg');
}

/*
 * ====================================
 * 5. SEZIONI SPECIFICHE (Hero, Menu, CTA)
 * ====================================
 */

/* HERO - Cornice Dorata */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Montserrat:wght@900&family=Syncopate:wght@700&display=swap');

.hero {
    position: relative; 
    min-height: 100vh; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    /* Cambiato fixed in scroll per evitare movimenti strani e bloccato la posizione */
    background: url('../img/IO9A4311.jpg') center/cover no-repeat;
    background-attachment: scroll; 
    padding: 20px; 
    overflow: hidden; 
}

/* Overlay sulla foto molto leggero per non scurirla troppo */
.hero-overlay {
    position: absolute; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.2); 
    z-index: 1;
}

.hero-inner {
    position: relative; 
    z-index: 2; 
    padding: 60px 20px;
    max-width: 1100px; 
    width: 100%; 
    /* TRASPARENZA QUASI TOTALE: rimosso il nero, lasciato solo un tocco di sfocatura */
    background: transparent; 
    backdrop-filter: blur(4px); /* Sfocatura ridotta per vedere meglio la foto */
    -webkit-backdrop-filter: blur(4px);
    border: none; /* Rimosso bordo per massima pulizia */
    text-align: center;
    animation: heroFadeIn 1.5s ease-out;
}

/* --- TITOLI CON OMBRE POTENZIATE (per leggere senza sfondo scuro) --- */

.welcome-text {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(1.2rem, 3.5vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 10px;
    color: #ffcc00 !important; 
    margin-bottom: 5px;
    /* Ombra nera netta per staccare dal fondo */
    text-shadow: 3px 3px 6px rgba(0,0,0,1);
}

.brand-name {
    display: block;
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(3.5rem, 16vw, 10rem);
    font-weight: 900;
    color: #ffffff !important;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -2px;
    /* Ombra 3D dorata + protezione nera profonda */
    text-shadow: 
        4px 4px 0px #ffcc00, 
        8px 8px 20px rgba(0,0,0,1);
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.hero-divider .line {
    height: 6px; 
    width: clamp(40px, 15vw, 120px);
    background: #ffcc00;
    box-shadow: 2px 2px 5px rgba(0,0,0,1);
}

.hero-divider .diamond {
    color: #ffcc00;
    font-size: 2rem;
    text-shadow: 3px 3px 10px rgba(0,0,0,1);
}

.hero-category {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 5vw, 2.5rem);
    color: #ffcc00 !important;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 4px 4px 10px rgba(0,0,0,1);
}

.hero-motto {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(0.9rem, 3vw, 1.4rem);
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    /* Alone nero pesante per leggere bene il bianco sulla foto nitida */
    text-shadow: 
        2px 2px 0px #000,
        -1px -1px 0px #000,
        1px -1px 0px #000,
        -1px 1px 0px #000,
        0px 0px 15px rgba(0,0,0,1);
}

/* --- DECORAZIONI --- */

.bold-corner {
    position: absolute;
    width: clamp(40px, 10vw, 80px);
    height: clamp(40px, 10vw, 80px);
    border: 8px solid #ffcc00;
    filter: drop-shadow(4px 4px 10px rgba(0,0,0,1));
}
.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Mobile */
@media (max-width: 768px) {
    .hero-inner { padding: 40px 10px; backdrop-filter: none; }
    .bold-corner { border-width: 5px; }
    .side-accent { display: none; }
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Statistiche (Dashboard) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.stat-card {
  background: var(--card); padding: 2rem; border: none;
  box-shadow: var(--shadow-card); transition: all 0.3s;
  border-radius: 4px; text-align: center;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 15px 20px rgba(0,0,0,0.2); }
.stat-card .num { font-size: 3.5rem; color: var(--accent); }

/* Menu Card */
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem;
}
.menu-card {
  box-shadow: var(--shadow-card); border: 1px solid #ddd;
  border-bottom: 4px solid var(--accent);
  overflow: hidden; border-radius: 6px; background: var(--card);
  cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
}
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.25); }

.card-image {
  height: 250px; filter: brightness(0.95); transition: filter 0.3s; overflow: hidden;
}
.menu-card img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
.menu-card:hover .card-image { filter: brightness(1); }
.card-details { padding: 15px 20px; }
.card-details h4 { font-size: 1.6rem; margin: 5px 0 10px; }
.price { color: var(--accent); font-size: 2rem; }

/* Call to Action (CTA) */
.cta-section {
    background: var(--dark); color: var(--bg); padding: 70px 40px;
    margin: 40px 0; text-align: center; border-radius: 8px;
    border: 2px solid var(--accent);
}
.cta-inner h3 { color: var(--accent); font-size: 2.8rem; margin-bottom: 15px; }
.cta-inner p { max-width: 800px; margin: 0 auto 30px; font-size: 1.1rem; line-height: 1.6; }

/* Image Strips (Philosophy, Ambient) */
.image-strip {
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; 
    padding: 80px 40px;
    margin: 60px 0; 
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
}
.image-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}
.strip-content {
    position: relative;
    z-index: 2; 
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--card); 
    
}
.strip-content h2 {
    color: var(--accent); 
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.strip-content p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 30px;
}
.strip-1 {
    background-image: url('../img/IO9A4417.jpg'); 
}
.strip-2 {
    background-image: url('../img/IO9A4007.jpg'); 
}
.image-strip .btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--card);
    border: 2px solid var(--accent);
    box-shadow: none;
}
.image-strip .btn.secondary:hover {
    background: var(--accent);
    color: var(--dark);
    transform: none;
}


/*
 * ====================================
 * 6. MODULI & PAGINE UTENTE (Auth, Prenotazioni, Recensioni, Fidelity)
 * ====================================
 */

/* AUTENTICAZIONE (Auth Card) */

.auth-card .form-group-section {
    border: 1px solid #e0e0e0; 
    padding: 15px; 
    margin-bottom: 20px;
    border-radius: 4px; 
}
.auth-card .form-row {
    display: flex;
    gap: 15px; 
    margin-bottom: 0; 
}
.auth-card .form-row .form-group {
    flex: 1; 
    margin-bottom: 15px; 
}
.auth-card .date-row {
    margin-bottom: 15px;
}
.auth-card .date-inputs {
    display: flex;
    gap: 10px; 
    margin-top: 5px;
}
.auth-card .date-input-day,
.auth-card .date-input-month {
    flex: 1; 
}
.auth-card .date-input-year {
    flex: 2; 
}
.auth-card .date-inputs .form-group {
    margin-bottom: 0; 
}
.required-note {
    font-size: 0.85em;
    color: #777;
    text-align: right;
    margin-top: -5px; 
    margin-bottom: 20px;
}
.auth-switch a { font-weight: 700; color: var(--accent); text-decoration: none; }


/* PRENOTAZIONE (Form e Lista) */
.reservation-form-section { max-width: 800px; margin: 40px auto; }
.reservation-form { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px 20px; 
    margin-top: 20px; 
    padding: 10px 0; 
}
/* Stile per l'immagine del logo all'interno della card */
.fidelity-card .card-logo-img {
    height: 100px; /* Imposta l'altezza del logo per la card */
    width: auto;
    margin-right: 150px; /* Spazio tra logo e testo "STRIX" */
    vertical-align: middle;

    
}

/* Allineamento degli elementi nell'header della card */
.fidelity-card .card-header { 
    text-align: right; 
    display: flex; /* Permette allineamento in riga di img e span */
    justify-content: flex-end; /* Sposta a destra */
    align-items: center; /* Centra verticalmente img e testo */
}

/* Modifica la regola card-header esistente per renderla un flex container */
.card-header {
    text-align: right;
    /* AGGIUNTO */
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
}

/* Campi Data/Ora Separati */
.reservation-form .date-row-group,
.reservation-form .time-row-group {
    margin-bottom: 0;
}
.reservation-form .date-inputs-separate {
    display: flex; gap: 10px; margin-top: 5px;
}
.reservation-form .date-input-day, .reservation-form .date-input-month { flex: 1; }
.reservation-form .date-input-year { flex: 2; }
.reservation-form .time-inputs-separate {
    display: flex; gap: 10px; margin-top: 5px;
}
.reservation-form .time-input-hour, .reservation-form .time-input-minute { flex: 1; }
.reservation-form .date-inputs-separate .form-group,
.reservation-form .time-inputs-separate .form-group { margin-bottom: 0; }

/* Campi a tutta larghezza nella griglia */
.reservation-form .full-width-field,
.reservation-form .note-group,
.reservation-form .full-width-btn { 
    grid-column: 1 / -1; 
    margin-top: 0;
}
.reservation-form .empty-filler {
    display: none; 
}
.reservation-form .full-width-btn {
    text-align: center; 
    margin-top: 10px;
}

/* Lista Prenotazioni */
.reservation-list-section {
    max-width: 800px; 
    margin: 40px auto; 
    padding-top: 20px;
    border-top: 1px solid #ddd;
}
.reservation-list-section .section-title {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--muted);
    letter-spacing: 0.5px;
}
.reservation-item {
    background: #fffafa; border: 1px solid #e0e0e0;
    border-left: 6px solid var(--accent); padding: 20px;
    margin-bottom: 15px; 
    border-radius: 4px; box-shadow: var(--shadow-subtle);
}
.res-date-time strong { color: var(--accent); font-weight: 700; }
.reservation-empty { padding: 20px; text-align: center; font-size: 1.1rem; }
.reservation-list-section .text-info {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: var(--muted);
    border: 1px dashed var(--muted);
    border-radius: 4px;
    background: #f8f8f8;
}

/* RECENSIONI (Form e Lista) */
.review-form-section { 
    max-width: 800px; 
    margin: 40px auto; 
    text-align: center; 
}
.review-login-prompt {
    font-size: 1.2rem;
    color: var(--dark);
    line-height: 1.6;
    margin-top: 20px;
    margin-bottom: 30px;
}
.review-login-prompt p { margin-bottom: 20px; }
.review-login-prompt a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.review-login-prompt a:hover { color: var(--dark); }

.review-form-row {
    display: flex;
    gap: 20px;
    align-items: stretch; 
}
.review-form-row .half {
    flex: 1;
}
.review-form .action-group {
    margin-bottom: 0; 
    text-align: right; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}
.review-form-row .btn.primary {
    width: 100%;
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.review-form-row .file-upload-group {
    display: flex; 
    flex-direction: column;
    justify-content: flex-end; 
    margin-bottom: 0; 
    height: 100%; 
}
.input-file-hidden { 
    width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; 
    position: absolute; z-index: -1; 
}
.custom-file-label {
    display: inline-block;
    padding: 14px 30px; 
    width: 100%;
    text-align: center;
    background: #f0f0f0; 
    color: var(--dark);
    border: 2px dashed var(--accent); 
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1; 
    box-sizing: border-box; 
    margin-top: auto; /* Cruciale per l'allineamento */
}
.custom-file-label:hover {
    background: var(--accent);
    border-color: var(--dark);
    color: var(--dark);
}

/* Rating Stelle (Form e Display) */
.rating-stars {
    display: inline-block; 
    direction: rtl; 
    unicode-bidi: bidi-override;
}
.rating-stars > input { display: none; }
.rating-stars > label {
    display: inline-block; 
    color: var(--muted); 
    font-size: 2.2rem;
    padding: 0 2px;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1; 
}
.rating-stars > input:checked ~ label { color: var(--accent); }
.rating-stars > label:hover,
.rating-stars > label:hover ~ label { color: #d6a92b; }

.rating-display {
    white-space: nowrap; 
    font-size: 1.5rem;
    line-height: 1;
    display: inline-block; 
}
.star-icon {
    color: var(--muted); 
    margin: 0 1px;
    display: inline-block; 
}
.star-icon.filled {
    color: var(--accent); 
}

/* Lista Recensioni */
.reviews-list-section { 
    max-width: 800px; 
    margin: 40px auto; 
}
.review-item {
    background: #ffffff; 
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--accent); 
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 4px;
    box-shadow: var(--shadow-subtle);
}
.review-item:last-child { margin-bottom: 0; }
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--muted);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.review-author strong {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
}
.review-date { font-size: 0.9rem; color: var(--muted); }
.review-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}
.review-photo img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-subtle);
    margin-top: 10px;
}
.review-admin-actions { text-align: right; margin-top: 10px; }
.review-empty {
    font-style: italic;
    text-align: center;
    padding: 20px;
    color: var(--muted);
}


/* FIDELITY CARD E GIFT CARD (Utente) */
.fidelity-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.section-description {
    font-size: 1.1rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 40px;
}
.fidelity-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}
/* Contenitore per rendere la tabella scorrevole su mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Migliora lo scorrimento su iOS */
    margin-bottom: 1rem;
}

/* Assicurati che la tabella non si restringa meno del contenuto necessario */
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Forza la comparsa della barra di scorrimento su schermi piccoli */
}

/* Stile per i form dentro le celle (per non farli andare a capo male) */
.data-table td form {
    white-space: nowrap; 
}

/* Ottimizzazione input numerici */
input[type="number"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* CARD EFFETTIVA */
.fidelity-card {
    width: 100%;
    max-width: 450px;
    height: 280px;
    background: linear-gradient(135deg, var(--card) 0%, #f0f0f0 100%);
    border: 3px solid var(--accent);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    color: var(--dark);
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}
.fidelity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 90%, rgba(var(--accent-rgb), 0.1), transparent 50%);
    opacity: 0.8;
}
.card-logo-text {
    font-family: 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 5px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.card-header { text-align: right; }
.card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
}
.card-name { font-size: 1.5rem; font-weight: 700; margin: 0; text-transform: uppercase; }
.card-id { font-size: 0.9rem; color: var(--muted); margin: 5px 0 0; letter-spacing: 1px; }
.points-label { font-size: 0.8rem; color: var(--dark); margin: 0; text-transform: uppercase; font-weight: 600; }
.points-count { font-size: 2.8rem; font-weight: 900; color: var(--accent); margin: 5px 0 0; line-height: 1; }
.card-footer { text-align: center; }
.card-message { font-style: italic; font-size: 0.9rem; color: var(--muted); }

/* Pulsante Wallet */
.wallet-btn {
    padding: 12px 25px;
    font-size: 1rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--dark);
    color: var(--accent);
    box-shadow: 0 4px 0px #111; 
    border: 2px solid var(--accent);
}
.wallet-btn:hover { background: #000; }

/* GIFT CARD DISPLAY */
.gift-card-display {
    max-width: 900px;
    margin-top: 50px;
    padding: 20px;
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}
.gift-card-display h3 {
    text-align: center;
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--muted);
    padding-bottom: 10px;
}
.gift-card-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}
.gift-card-item {
    background: #f0fff0; 
    border: 2px solid #008000;
    border-radius: 8px;
    padding: 15px;
    width: 250px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.gift-valore {
    font-size: 2.5rem;
    font-weight: 900;
    color: #008000; 
    display: block;
    margin-bottom: 5px;
}
.gift-codice { font-size: 1rem; color: var(--dark); margin-bottom: 10px; }
.gift-note { font-size: 0.9rem; color: var(--muted); text-align: center; font-style: italic; padding-top: 10px; }


/*
 * ====================================
 * 7. ADMIN E DATATABLE
 * ====================================
 */

/* Tabelle Generiche */
.data-table, .styled-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: var(--card); 
    box-shadow: var(--shadow-subtle); 
    border-radius: 6px; 
    overflow: hidden;
}
.data-table th, .data-table td, .styled-table th, .styled-table td { 
    padding: 12px 15px; 
    border: 1px solid #ddd; 
    text-align: left; 
    font-size: 0.95rem; 
}

/* Stile intestazione tabella generica */
.data-table th { 
    background-color: var(--dark); 
    color: var(--bg); 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.data-table tbody tr:nth-child(even) { background-color: #f9f9f9; } 
.data-table tbody tr:hover { background-color: #f0f0f0; }


/* Stile Tabella per Liste Utente (e.g., Prenotazioni) */
.styled-table { box-shadow: var(--shadow-card); }
.styled-table thead tr {
    background-color: var(--accent);
    color: var(--dark);
    text-align: left;
    font-weight: 700;
}
.styled-table tbody tr { border-bottom: 1px solid #e0e0e0; }
.styled-table tbody tr:nth-child(even) { background-color: #f9f9f9; } 
.styled-table tbody tr:hover { background-color: #fff8e6; }
.styled-table .btn-danger {
    padding: 6px 10px;
    font-size: 0.8rem;
    letter-spacing: normal;
}
.styled-table .btn-danger:hover { background: #a30000; }


/* Form Admin */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 0 10px; }
.admin-form .form-row { display: flex; gap: 20px; }
.admin-form .form-row .half { flex: 1; }

/* Ricerca Admin */
.search-form-flex {
    display: flex;
    gap: 15px;
    align-items: center;
}
.search-form-flex .form-group { margin-bottom: 0; }
.search-form-flex .btn.primary {
    padding-top: 12px;
    padding-bottom: 12px;
}
.search-result-card {
    margin-top: 20px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.fidelity-result {
    background: #fcfcfc;
    border-left: 5px solid var(--accent);
}
.giftcard-result {
    background: #f0fff0; 
    border-left: 5px solid #008000;
}
.points-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 10px 0;
}
.giftcard-result .points-large { color: #008000; }
.admin-actions-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-top: 1px dashed var(--muted);
    margin-top: 15px;
}
.status-available { color: #008000; font-weight: 700; }
.status-used { color: var(--danger); font-style: italic; }
.points-count-admin { font-weight: 700; color: var(--accent); }


/*
 * ====================================
 * 8. MEDIA QUERIES
 * ====================================
 */

/* Desktop Layout: (> 980px) */
@media (min-width: 981px) {
  .menu-toggle { display: flex; } 
  .stats { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* Tablet/Mobile Layout: (<= 980px) */
@media (max-width: 980px) {
  .menu-toggle { display: flex; }
  .content { padding: 70px 20px 100px; }
  
  .footer .footer-inner { 
    flex-direction: column; height: 120px; font-size: 12px; 
  }
  .footer div { text-align: center; margin: 3px 0; }
  
  .stats { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 4rem; }
}

@media (max-width: 768px) {
    .admin-form .form-row { flex-direction: column; gap: 0; }
    .modal-content { padding: 20px; width: 100%; margin: 0; min-height: 100vh; border-radius: 0; border: none; }
    .modal-image { height: 250px; }
    
    /* Header Recensioni */
    .review-header { 
        flex-direction: column; 
        align-items: flex-start;
        gap: 8px; 
    }
    .review-date { align-self: flex-end; }
    .rating-display { align-self: center; }
}

@media (max-width: 600px) {
    /* Layout Generico */
    .hero-title { font-size: 3rem; }
    .title { font-size: 2rem; }
    
    /* Prenotazione */
    .reservation-form { grid-template-columns: 1fr; }
    .reservation-form .date-input-year,
    .reservation-form .date-input-day,
    .reservation-form .date-input-month,
    .reservation-form .time-input-hour,
    .reservation-form .time-input-minute {
        flex: 1; 
    }
    /* Recensioni */
    .review-form-row { flex-direction: column; align-items: stretch; }
    .review-form .action-group { text-align: center; } 
    
    /* Autenticazione (Registrazione) */
    .auth-card .form-row {
        flex-direction: column; 
        gap: 0;
    }
    .auth-card .date-input-day,
    .auth-card .date-input-month,
    .auth-card .date-input-year {
        flex: 1; 
    }
    
    /* Fidelity Card */
    .fidelity-card { height: 240px; padding: 20px; }
    .card-logo-text { font-size: 1.8rem; }
    .card-name { font-size: 1.3rem; }
    .points-count { font-size: 2.2rem; }
    .wallet-btn { width: 100%; }
    .gift-card-grid { flex-direction: column; align-items: center; }
    .gift-card-item { width: 100%; }
    
    /* DataTable Responsive */
    .table-responsive { overflow-x: auto; }
    .styled-table th, .styled-table td { padding: 10px 8px; font-size: 0.85rem; }
}