/* ---- BASE & SCROLL ---- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

/* ---- HERO SECTION ---- */
.hero-section {
    position: relative;
    min-height: 800px;
    background: url('../ASSETS/images/risto-menu/risto-menu-hero.webp') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 60px;
    color: var(--text-light);
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.526);
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.titolo h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 16px rgba(0,0,0,0.2);
    margin-bottom: 14px;
}

.titolo .subtitle {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.06em;
    opacity: 0.9;
}

/* ---- LAYOUT PRINCIPALE ---- */
#main-content {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 40px;
}

/* ---- NAV CIBO (Sticky & Menu Selector) ---- */
.menu-nav {
    position: sticky;
    z-index: 1000;
    width: 100%;
    background: #f2f2f2;
    border-radius: 0 0 12px 12px;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    top: 0;
}

/* Desktop: Lista orizzontale */
.desktop-menu-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.desktop-menu-list li a {
    display: block;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-mid);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.desktop-menu-list li a:hover,
.desktop-menu-list li a.active {
    color: var(--green);
    border-bottom-color: var(--green);
    background: #fdf5f0;
}

/* ---- NUOVO CUSTOM DROPDOWN (Mobile) ---- */
.custom-dropdown {
    display: none; /* Nascosto di base su Desktop */
    position: relative;
    width: 90%;
    margin: 5px auto;
}

.dropdown-trigger {
    width: 100%;
    background: #fff;
    border: 2px solid var(--green);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}

.dropdown-trigger i {
    color: var(--green);
}

.dropdown-trigger .arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

/* Ruota freccia quando aperto */
.custom-dropdown.open .arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    list-style: none;
    padding: 10px 0;
    display: none; /* Gestito dallo script */
    z-index: 1001;
    border: 1px solid #eee;
}

.dropdown-options li {
    padding: 12px 20px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-options li:hover {
    background: #fdf5f0;
    color: var(--green);
}

.dropdown-options li.active {
    color: var(--green);
    background: #fdf5f0;
}

/* ---- CONTENUTO MENU ---- */
.menu-principale {
    width: 100%;
}

.menu-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ---- SEZIONE MENU ---- */
.sezione-menu {
    scroll-margin-top: 200px;
}

.sezione-menu h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0e8e0;
    position: relative;
}

.sezione-menu h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--green);
}

/* ---- GRID PIATTI ---- */
.antipasti, .primi-piatti, .secondi, .contorni, .dolci {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* ---- CARD PIATTI ---- */
.antipasto, .primo-piatto, .secondo, .contorno, .dolce {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.antipasto:hover, .primo-piatto:hover, .secondo:hover, .contorno:hover, .dolce:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.antipasto img, .primo-piatto img, .secondo img, .contorno img, .dolce img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.antipasto:hover img, .primo-piatto:hover img, .secondo:hover img, .contorno:hover img, .dolce:hover img {
    transform: scale(1.05);
}

.antipasto h3, .primo-piatto h3, .secondo h3, .contorno h3, .dolce h3 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 14px 14px 4px;
    line-height: 1.4;
}

.antipasto p, .primo-piatto p, .secondo p, .contorno p, .dolce p {
    font-size: 13px;
    color: var(--text-mid);
    padding: 0 14px 10px;
    line-height: 1.5;
    flex-grow: 1;
}

.prezzo {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
    padding: 8px 14px 14px;
    margin-top: auto;
}

/* ---- BEVANDE ---- */
.bevande {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.bevanda {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.2s;
}

.bevanda:hover {
    transform: scale(1.02);
}

.bevanda h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.bevanda .prezzo {
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
    padding: 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .desktop-menu-list {
        display: none !important;
    }

    .custom-dropdown {
        display: block; /* Mostra il dropdown custom su mobile */
    }

    .antipasti, .primi-piatti, .secondi, .contorni, .dolci {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .antipasti, .primi-piatti, .secondi, .contorni, .dolci {
        grid-template-columns: 1fr;
    }
}