/* ========== GOOGLE FONTS MODERNI ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Raleway:wght@300;400;500;600;700;800&display=swap');

/* ========== CHARSET UTF-8 ========== */
* {
    charset: utf-8;
}

/* ========== CSS VARIABLES ========== */
:root {
    --primary: #1a1a1a;
    --secondary: #d4a574;
    --accent: #f4ede4;
    --text-dark: #2a2a2a;
    --text-light: #666666;
    --border: #e8dcc8;
    --bg-light: #fef9f3;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========== HERO HEADER ========== */
.hero {
    position: relative;
    height: auto;
    max-height: 320px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 3rem 2rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(212, 165, 116, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    margin-bottom: 1.2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

#hero-title {
    font-family: 'Raleway', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    line-height: 1.1;
}

#hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--secondary);
    letter-spacing: 0.8px;
}

/* ========== STICKY NAVIGATION ========== */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
}

#nav-sections {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
}

.nav-btn {
    padding: 0.55rem 1.2rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

.nav-btn.active {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

/* ========== MAIN CONTAINER ========== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 3.5rem;
    min-height: calc(100vh - 200px);
}

/* ========== MENU SECTIONS ========== */
.menu-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.menu-section {
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    padding: 1.2rem 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: var(--shadow);
}

.section-title:hover {
    background: var(--accent);
    border-color: var(--secondary);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.section-title.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.25);
}

/* ========== SECTION CONTENT WRAPPER ========== */
.section-content-wrapper {
    display: none;
    margin-top: 1.2rem;
}

.section-content-wrapper.active {
    display: block;
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== SECTION DESCRIPTION ========== */
.section-description {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(212, 165, 116, 0.05) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary);
}

.section-description .desc-it {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

.section-description .desc-en {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.5;
}

.section-description p:last-child {
    margin-bottom: 0;
}

/* ========== ACCORDION PIATTI ========== */
.piatti-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.2rem;
    padding: 1rem;
    background: var(--accent);
    border-radius: 8px;
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: stretch;
}

.piatti-grid.active {
    display: grid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* ========== PIATTO CARD - RESTYLING VERTICALE ========== */
.piatto-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.piatto-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary);
    transform: translateY(-4px);
}

/* Layout verticale - immagine in alto */
.piatto-card-with-image,
.piatto-card-no-image {
    display: flex;
    flex-direction: column;
}

/* Immagine full-width in alto */
.piatto-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s;
}

.piatto-card:hover .piatto-image {
    transform: scale(1.05);
}

.piatto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content padding per layout verticale */
.piatto-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 1.2rem;
}

.piatto-content.with-image {
    min-height: auto;
}

.piatto-header {
    margin-bottom: 0.8rem;
}

.piatto-name {
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.piatto-name-en {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
}

/* INGREDIENTI E ALLERGENI - SOLO NEL MODAL */
.modal-content .piatto-ingredients,
.piatto-ingredients {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin: 1rem 0 0.5rem 0;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.08) 0%, rgba(212, 165, 116, 0.03) 100%);
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.modal-content .piatto-ingredients::before,
.piatto-ingredients::before {
    content: '🇮🇹 ';
    font-weight: 600;
    margin-right: 0.5rem;
}

.modal-content .piatto-ingredients-en,
.piatto-ingredients-en {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0.8rem 0 1.2rem 0;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.08) 0%, rgba(212, 165, 116, 0.03) 100%);
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    font-style: italic;
}

.modal-content .piatto-ingredients-en::before,
.piatto-ingredients-en::before {
    content: '🇬🇧 ';
    font-weight: 600;
    margin-right: 0.5rem;
}

.modal-content .piatto-allergens,
.piatto-allergens {
    font-size: 1.1rem;
    color: #c84b31;
    font-weight: 700;
    margin-top: 1.2rem;
    padding: 0.8rem 1rem;
    background: rgba(200, 75, 49, 0.08);
    border-radius: 8px;
    border-left: 4px solid #c84b31;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-content .piatto-allergens::before,
.piatto-allergens::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.piatto-info {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.piatto-footer {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 1rem;
    gap: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ========== PIATTO PRICE - LAYOUT ELEGANTE VERTICALE ========== */
.piatto-price {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.08) 0%, rgba(212, 165, 116, 0.03) 100%);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 3px solid var(--secondary);
}

/* Ogni riga di prezzo (singolo o doppio) */
.piatto-price span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
}

.piatto-price strong {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 700;
}

/* Separatore per prezzi doppi */
.piatto-price span + span {
    border-top: 1px dashed rgba(212, 165, 116, 0.3);
    padding-top: 0.5rem;
    margin-top: 0;
}

.piatto-button {
    padding: 0.7rem 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
}

.piatto-button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(212, 165, 116, 0.3);
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.modal-wrapper {
    position: relative;
    background: white;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    z-index: 2;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.modal-close {
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--secondary);
    color: white;
    transform: rotate(90deg);
}

.modal-content {
    padding: 2rem 1.5rem;
}

.modal-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.modal-title-en {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.detail-item label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    display: block;
}

.detail-item p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.modal-price {
    font-family: 'Raleway', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    padding-top: 1.2rem;
    border-top: 2px solid var(--border);
}

/* ========== SEARCH RESULTS ========== */
.search-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 1rem;
}

.empty-items {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--primary);
    color: white;
    padding: 2rem 3.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-version {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.8rem;
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 1024px) {
    .main-container {
        padding: 2.5rem 2.5rem;
    }
    .nav-bar {
        padding: 0.9rem 1.5rem;
    }
    #hero-title {
        font-size: 2.3rem;
    }
    /* Layout verticale mantiene struttura */
    .piatto-image {
        width: 100%;
        height: 190px;
    }
    .piatto-content {
        padding: 1.1rem;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
    .main-container {
        padding: 2rem 1.5rem;
    }
    .nav-bar {
        padding: 1rem 1rem;
    }
    #nav-sections {
        gap: 0.5rem;
    }
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    #hero-title {
        font-size: 1.8rem;
    }
    #hero-tagline {
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 1.1rem;
        padding: 1rem 1.2rem;
    }
    .piatti-grid {
        padding: 0.8rem;
        gap: 0.8rem;
    }
    /* Layout verticale mantiene struttura */
    .piatto-image {
        width: 100%;
        height: 180px;
    }
    .piatto-content {
        padding: 1rem;
    }
    .piatto-name {
        font-size: 1rem;
    }
    .piatto-info {
        font-size: 0.75rem;
    }
    .piatto-ingredients {
        font-size: 0.95rem;
        padding: 0.6rem 0.8rem;
    }
    .piatto-allergens {
        font-size: 1rem;
        padding: 0.6rem 0.8rem;
    }
    .piatto-price {
        padding: 0.7rem 0.9rem;
    }
    .piatto-price span {
        font-size: 0.85rem;
    }
    .piatto-price strong {
        font-size: 1.2rem;
    }
    .piatto-button {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
    .modal-wrapper {
        max-width: 95vw;
        max-height: 95vh;
    }
    .modal-content {
        padding: 1.5rem 1rem;
    }
    .modal-image {
        height: 200px;
        margin-bottom: 1rem;
    }
    .modal-title {
        font-size: 1.4rem;
    }
    .modal-price {
        font-size: 1.6rem;
    }
    .footer {
        padding: 1.5rem 1.5rem;
    }
}

/* ========== RESPONSIVE - MOBILE SMALL ========== */
@media (max-width: 480px) {
    .main-container {
        padding: 1.5rem 1rem;
    }
    #hero-title {
        font-size: 1.5rem;
    }
    /* Layout verticale mantiene struttura */
    .piatto-image {
        width: 100%;
        height: 160px;
    }
    .piatto-content {
        padding: 0.9rem;
    }
    .piatto-price {
        padding: 0.6rem 0.8rem;
    }
    .piatto-price span {
        font-size: 0.8rem;
    }
    .piatto-price strong {
        font-size: 1.15rem;
    }
    .piatto-button {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
    .modal-title {
        font-size: 1.3rem;
    }
    .modal-price {
        font-size: 1.5rem;
    }
}
