:root {
    --sage: #a8bb9f;        /* verde salvia principale */
    --sage-deep: #3a4a3b;   /* verde profondo: sfondo per titoli chiari */
    --ivory: #f8f6f1;       /* avorio caldo, sfondo base */
    --gold: #bfa06a;        /* oro tenue, dettagli */
    --ink: #33392f;         /* testo scuro su chiaro */
    --cream: #f5f2ea;       /* testo chiaro su scuro */
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Cormorant Garamond", Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background-color: var(--ivory);
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--ink);
    overflow-x: hidden;
}

section, .slideshow-container {
    scroll-snap-align: start;
}

/* ---------- Titoli di sezione ---------- */
.titolo-sezione {
    font-weight: 400;
    font-size: 2.2em;
    letter-spacing: 0.5px;
    color: var(--ink);
    text-align: center;
}

.titolo-sezione::after {
    content: "";
    display: block;
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 16px auto 0;
}

.titolo-chiaro {
    color: var(--cream);
}

/* ---------- Scroll-reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visibile {
    opacity: 1;
    transform: none;
}

/* ---------- Slideshow ---------- */
.slideshow-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

.slide-intro {
    width: 100%;
    height: 100%;
    background: var(--sage-deep);
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-intro span {
    color: var(--cream);
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: 4px;
    text-align: center;
    padding: 0 20px;
}

.slide.active img {
    animation: ken-burns 6s ease forwards;
}

@keyframes ken-burns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.slideshow-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 40%);
    z-index: 2;
    pointer-events: none;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: var(--cream);
    font-size: 20px;
    font-weight: 300;
    border: none;
    background: none;
    user-select: none;
    transition: opacity 0.3s ease;
    opacity: 0.6;
    z-index: 3;
}

.prev { left: 8px; }
.next { right: 8px; }

.prev:hover, .next:hover,
.prev:focus, .next:focus {
    opacity: 1;
    outline: none;
}

.dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(245, 242, 234, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: var(--cream);
    transform: scale(1.3);
}

.scroll-hint {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--cream);
    text-decoration: none;
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
    animation: scroll-hint-bounce 2s ease-in-out infinite;
}

.scroll-hint:hover {
    opacity: 1;
}

@keyframes scroll-hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(58, 74, 59, 0.92);
    backdrop-filter: blur(8px);
    padding: 14px 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.menu-toggle {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 1.8rem;
    height: 1.6rem;
}

.menu-toggle div {
    width: 100%;
    height: 1px;
    background: var(--cream);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    background: rgba(58, 74, 59, 0.97);
    backdrop-filter: blur(8px);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    flex-direction: column;
    align-items: start;
    padding-top: 80px;
}

.nav-menu.show {
    transform: translateX(0);
}

.menu-items {
    display: flex;
    flex-direction: column;
    font-size: 1.3em;
    letter-spacing: 1px;
    list-style: none;
}

.menu-items div {
    width: 80%;
    margin: 0 auto;
    padding: 12px 0;
}

.navbar a {
    color: var(--cream);
    text-decoration: none;
    transition: color 0.2s ease;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

.navbar a:hover {
    color: var(--gold);
}

.navbar a.attivo {
    border-bottom-color: var(--gold);
}

.logo {
    margin-left: 1rem;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.5em;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: none;
}

.logo:hover {
    color: var(--gold);
}

/* Nav orizzontale su desktop, hamburger solo su mobile */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    .navbar {
        padding: 14px 28px;
        justify-content: space-between;
    }
    .logo {
        margin-left: 0;
    }
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        transform: none;
        transition: none;
        padding: 0;
    }
    .menu-items {
        flex-direction: row;
        gap: 30px;
        font-size: 1.05em;
    }
    .menu-items div {
        width: auto;
        margin: 0;
        padding: 0;
    }
}

/* ---------- Home / Hero ---------- */
#home {
    background: var(--sage-deep);
    padding-top: 30px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fade-in 0.8s ease both;
}

.hero {
    width: 100%;
    max-width: 640px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.titolo-hero {
    color: var(--cream);
    font-weight: 300;
    font-size: 3em;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 12px;
}

.titolo-hero::after {
    content: "";
    display: block;
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 22px auto 22px;
}

.hero p {
    color: var(--cream);
    text-align: center;
    font-size: 1.2em;
    font-weight: 300;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Piatto del mese ---------- */
#piatto {
    background-color: var(--ivory);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 20px;
}

.piatto-container {
    max-width: 800px;
    text-align: center;
}

.piatto-container .titolo-sezione {
    margin-bottom: 40px;
}

.piatto-contenuto {
    display: flex;
    align-items: center;
    gap: 36px;
    text-align: left;
}

.piatto-foto {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.piatto-testo h3 {
    font-weight: 500;
    font-size: 1.6em;
    color: var(--ink);
    margin-bottom: 10px;
}

.piatto-testo p {
    font-weight: 300;
    line-height: 1.6;
    color: var(--ink);
}

.piatto-fallback {
    width: 100%;
    font-style: italic;
    font-weight: 300;
    text-align: center;
    color: rgba(51, 57, 47, 0.55);
}

/* ---------- Menu ---------- */
#menu {
    background-color: var(--sage);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 20px;
}

.menu-foglio {
    background-color: var(--ivory);
    border: 1px solid var(--gold);
    outline: 1px solid var(--gold);
    outline-offset: 5px;
    max-width: 620px;
    width: 100%;
    padding: 56px 44px;
}

.menu-foglio .titolo-sezione {
    margin-bottom: 44px;
}

.menu-categoria {
    margin-bottom: 40px;
}

.menu-categoria h3 {
    font-weight: 500;
    font-size: 1.25em;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 22px;
}

.menu-categoria ul {
    list-style: none;
}

.menu-categoria li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding: 9px 0;
}

.voce-nome {
    font-weight: 300;
    font-size: 1.1em;
    line-height: 1.4;
}

.voce-nome small {
    color: rgba(51, 57, 47, 0.5);
    font-size: 0.75em;
}

.voce-prezzo {
    font-weight: 400;
    white-space: nowrap;
    color: var(--gold);
}

.menu-nota {
    font-style: italic;
    font-weight: 300;
    font-size: 0.9em;
    text-align: center;
    color: rgba(51, 57, 47, 0.55);
}

/* ---------- Dove siamo ---------- */
#dove {
    background: var(--sage-deep);
}

.dove-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 70px 20px;
}

.dove-indirizzo {
    color: var(--cream);
    font-weight: 400;
    font-size: 1.3em;
    letter-spacing: 0.3px;
    text-align: center;
    margin-top: 26px;
}

#map {
    width: 80%;
    max-width: 700px;
    height: 380px;
    border: 0;
    border-radius: 4px;
    margin-top: 44px;
}

/* ---------- Orari ---------- */
#orari {
    background-color: var(--ivory);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 20px;
}

.orari-container {
    width: 100%;
    max-width: 420px;
}

.orari-container .titolo-sezione {
    margin-bottom: 36px;
}

.orari-lista div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(51, 57, 47, 0.12);
}

.orari-lista div:last-child {
    border-bottom: none;
}

.orari-lista dt {
    font-weight: 400;
}

.orari-lista dd {
    font-weight: 300;
    color: rgba(51, 57, 47, 0.75);
}

/* ---------- Reservation ---------- */
#reservation {
    background-color: var(--sage);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 0;
}

.reservation-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 34px;
}

.reservation-foto {
    width: 100%;
    max-width: 420px;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
}

#reservation-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 90%;
    max-width: 340px;
}

#reservation-form input {
    padding: 10px 4px;
    border: none;
    border-bottom: 1px solid rgba(51, 57, 47, 0.35);
    border-radius: 0;
    background: transparent;
    font-size: 1.1em;
    font-family: var(--font-body);
    color: var(--ink);
    transition: border-color 0.2s ease;
}

#reservation-form input::placeholder {
    color: rgba(51, 57, 47, 0.6);
}

#reservation-form input:focus {
    outline: none;
    border-color: var(--gold);
}

#reservation-form button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #25d366;
    color: white;
    font-weight: 500;
    font-size: 1em;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

#reservation-form button:hover {
    background-color: #1ea952;
    transform: translateY(-1px);
}

#reservation-form button:disabled {
    background-color: rgba(51, 57, 47, 0.25);
    cursor: not-allowed;
    transform: none;
}

.fasce-orarie {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fasce-suggerimento {
    font-style: italic;
    font-weight: 300;
    color: rgba(51, 57, 47, 0.6);
}

.fascia {
    padding: 8px 14px;
    border: 1px solid rgba(51, 57, 47, 0.35);
    border-radius: 20px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.95em;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.fascia:hover {
    border-color: var(--gold);
}

.fascia.selezionata {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--cream);
}

.fascia:disabled {
    border-color: rgba(51, 57, 47, 0.15);
    color: rgba(51, 57, 47, 0.35);
    cursor: not-allowed;
}

.reservation-successo {
    text-align: center;
    max-width: 340px;
}

.reservation-successo p {
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 14px;
}

.reservation-successo a {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 4px;
    background-color: #25d366;
    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* ---------- Recensioni ---------- */
#recensioni {
    background-color: var(--ivory);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.recensioni-container {
    max-width: 900px;
    text-align: center;
}

.recensioni-container .titolo-sezione {
    margin-bottom: 40px;
}

.recensioni-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.recensione-card {
    background-color: transparent;
    color: var(--ink);
    border: 1px solid rgba(51, 57, 47, 0.2);
    border-radius: 4px;
    padding: 28px 22px;
    width: 250px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.recensione-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.recensione-card p {
    font-style: italic;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 14px;
}

.recensione-card span {
    color: var(--gold);
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

/* ---------- Bottone WhatsApp flottante ---------- */
.whatsapp-flottante {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 900;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--sage-deep);
    color: var(--cream);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-flottante:hover {
    background-color: #25d366;
    transform: translateY(-2px);
}

/* display:flex sopra sovrascriverebbe l'attributo hidden: qui lo ripristiniamo */
.whatsapp-flottante[hidden] {
    display: none;
}

/* ---------- Footer ---------- */
footer {
    background-color: var(--sage-deep);
    color: var(--cream);
    text-align: center;
    padding: 20px;
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-menu {
        width: 70%;
    }
    .titolo-hero {
        font-size: 2.1em;
    }
    .hero p {
        font-size: 1.05em;
    }
    .recensione-card {
        width: 90%;
    }
    .piatto-contenuto {
        flex-direction: column;
        text-align: center;
    }
    .piatto-foto {
        width: 200px;
        height: 200px;
    }
    .menu-foglio {
        padding: 40px 24px;
    }
}

/* ---------- Accessibilità: meno animazioni se richiesto ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }
    .slide.active img {
        animation: none;
    }
    .scroll-hint {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #home {
        animation: none;
    }
}
