/* ═══════════════════════════════════════════════════════════════════════
   RESET E CONFIGURAZIONE BASE
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    scroll-snap-type: y proximity;
    font-family: "DM Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background-color: #f4f1de;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER - Navigazione principale
   ═══════════════════════════════════════════════════════════════════════ */

.site-header {
    width: 100%;
    box-sizing: border-box;
    background-color: #f4f1de;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 300;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 20px 30px;
}

header a {
    white-space: nowrap;
    text-decoration: none;
    color: #083752;
    font-weight: bold;
    font-size: 16px;
}

header a:hover {
    color: #da2c2d;
}

/* ─── Mega menu ─── */

.menu-item { position: relative; }
.menu-item > a { cursor: pointer; transition: all 0.3s ease; }
.menu-item > a.active { color: #da2c2d; }

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 50vh;
    background-color: #f4f1de;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 40px 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mega-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mega-menu-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.mega-menu-panel.active { display: flex; }

.mega-menu-panel a {
    font-size: 22px;
    font-weight: bold;
    color: #083752;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.mega-menu-panel a:hover {
    color: #da2c2d !important;
    transform: translateX(6px);
}

.mega-menu-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 22px;
    color: #083752;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.mega-menu-close:hover { color: #da2c2d; }

.mega-menu-overlay {
    position: fixed;
    inset: 0;
    top: 65px;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mega-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════════════════════════
   BOTTONE TORNA SU
   ═══════════════════════════════════════════════════════════════════════ */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #083752;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#backToTop:hover {
    background-color: #da2c2d;
}

/* ═══════════════════════════════════════════════════════════════════════
   MARQUEE GALLERY - Due righe di foto in scorrimento automatico
   ═══════════════════════════════════════════════════════════════════════ */

.marquee-section {
    width: 100%;
    background-color: #f4f1de;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px 0;
    overflow: hidden;
    scroll-snap-align: start;
    height: calc(100vh - 65px);
    justify-content: center;
}

.marquee-row {
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
}

.marquee-left {
    animation: scrollLeft 60s linear infinite;
}

.marquee-right {
    animation: scrollRight 60s linear infinite;
}

@keyframes scrollLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.marquee-img {
    height: 260px;
    width: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.marquee-row:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-text {
    font-size: 48px;
    font-weight: bold;
    color: #083752;
    text-align: center;
    letter-spacing: 4px;
    user-select: none;
}   
/* ═══════════════════════════════════════════════════════════════════════
   FEATURED SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.featured-section {
    display: flex;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    scroll-snap-align: start;
    margin: 0;
}

.featured-left {
    flex: 1;
    overflow: hidden;
    background-color: #083752;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-image {
    width: 80%;
    max-width: 500px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.featured-right {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #083752;
}

.featured-right p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: white;
}

.featured-button {
    font-size: 18px;
    text-decoration: none;
    padding: 12px 30px;
    background-color: #276aa4;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 10px;
    align-self: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
}

.featured-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   PULSANTI MENU
   ═══════════════════════════════════════════════════════════════════════ */

.menu-buttons-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════
   MENU RISTORANTE
   ═══════════════════════════════════════════════════════════════════════ */

.restaurant-menu-section {
    width: 100%;
    padding: 60px 20px;
    background-color: #da2c2d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    scroll-snap-align: start;
    margin: 0;
}

.restaurant-menu-section h2 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 16px;
}

.restaurant-menu-section .menu-restaurant-button {
    font-size: 18px;
    padding: 12px 30px;
    background-color: #f1880d;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
    min-width: 200px;
    text-align: center;
    will-change: transform;
    transform: translateZ(0);
}

.restaurant-menu-section .menu-restaurant-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   MENU PIZZERIA
   ═══════════════════════════════════════════════════════════════════════ */

.pizza-menu-section {
    width: 100%;
    padding: 60px 20px;
    background-color: #f1880d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    scroll-snap-align: start;
    margin: 0;
}

.pizza-menu-section h2 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 16px;
}

.pizza-menu-section .menu-pizza-button {
    display: inline-block;
    font-size: 18px;
    padding: 12px 30px;
    background-color: #fbc655;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
    min-width: 200px;
    text-align: center;
    will-change: transform;
    transform: translateZ(0);
}

.pizza-menu-section .menu-pizza-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   SEZIONE VINI
   ═══════════════════════════════════════════════════════════════════════ */

.wines-section {
    width: 100%;
    padding: 60px 20px;
    background-color: #083752;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    scroll-snap-align: start;
    margin: 0;
}

.wines-section h2 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 16px;
}

.wines-description {
    font-size: 18px;
    color: #ffffff;
    line-height: 1.6;
    max-width: 600px;
    text-align: center;
    margin-bottom: 36px;
}

.wines-button {
    display: inline-block;
    font-size: 18px;
    text-decoration: none;
    padding: 12px 30px;
    background-color: #276aa4;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
    min-width: 200px;
    text-align: center;
    will-change: transform;
    transform: translateZ(0);
}

.wines-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   GRIGLIA MOSAICO
   ═══════════════════════════════════════════════════════════════════════ */

.menu-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 15px;
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.mosaic-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.mosaic-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.mosaic-large {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.mosaic-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.mosaic-small {
    grid-column: span 1;
    grid-row: span 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   GALLERY SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.gallery-section {
    width: 100%;
    padding: 60px 20px;
    background-color: #f4f1de;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    scroll-snap-align: start;
    gap: 50px;
    margin: 0;
}

.gallery-item {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    width: 100%;
}

.gallery-item-left { flex-direction: row; }

.gallery-image {
    width: 40%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.gallery-text-right h3 {
    font-size: 24px;
    color: #083752;
    margin-bottom: 15px;
}

.gallery-text-left h3 {
    font-size: 24px;
    color: #dd3534;
    margin-bottom: 15px;
}

.gallery-text-right p,
.gallery-text-left p {
    font-size: 16px;
    color: #212121;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════
   SEZIONE CONTATTI
   ═══════════════════════════════════════════════════════════════════════ */

.contact-section {
    width: 100%;
    padding: 60px 20px;
    text-align: center;
    background-color: #dd3534;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    scroll-snap-align: start;
    margin: 0;
    box-sizing: border-box;
}

.contact-section h2 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 10px;
}

.contact-section p {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.contact-section label {
    text-align: left;
    font-weight: bold;
    color: #ffffff;
    margin-top: 8px;
}

.contact-section input[type="text"],
.contact-section input[type="email"],
.contact-section input[type="tel"],
.contact-section input[type="date"],
.contact-section input[type="time"],
.contact-section input[type="number"],
.contact-section select,
.contact-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #f4f1de;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-section input[type="submit"] {
    padding: 10px 20px;
    background-color: #ed715a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
}

.contact-section input[type="submit"]:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   SEZIONE MAPPA E PARCHEGGI
   ═══════════════════════════════════════════════════════════════════════ */

.parking-section {
    width: 100%;
    padding: 60px 20px;
    background-color: #083752;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    scroll-snap-align: start;
    margin: 0;
}

.parking-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.parking-map {
    flex: 1.5;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.parking-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.parking-info {
    flex: 1;
    color: #ffffff;
}

.parking-info h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #fbc655;
}

.parking-info p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.parking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.parking-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.parking-list li:last-child {
    border-bottom: none;
}

.parking-list li::before {
    content: "📍";
    position: absolute;
    left: 0;
    top: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODALE CONFERMA
   ═══════════════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(33, 33, 33, 0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: #ffffff;
    padding: 50px 60px;
    border-radius: 20px;
    max-width: 450px;
    width: 85%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    position: relative;
}

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

.modal-content h3 {
    font-size: 32px;
    color: #1745ac;
    margin: 20px 0 15px;
    font-weight: bold;
}

.modal-content p {
    font-size: 16px;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

.modal-icon {
    margin: 0 auto 25px;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #f0be31;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #f0be31;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 1.5;
    stroke-miterlimit: 10;
    stroke: #f0be31;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #f0be31;
    stroke-width: 3;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 30px #f0be31; } }

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

footer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 50px 40px;
    background-color: #212121;
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    margin: 0;
    align-items: center;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section h4 {
    color: #fbc655;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.footer-section p {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.footer-logo-section {
    align-items: center;
    justify-content: center;
}

.footer-logo-img {
    height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 2px solid #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #ffffff;
}

.social-icons a:hover {
    background-color: #f1880d;
    border-color: #f1880d;
    color: #212121;
    transform: translateY(-3px);
}

.social-icons svg {
    width: 20px;
    height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE - Media queries per dispositivi mobili
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .mega-menu {
        height: auto;
        min-height: 40vh;
        padding: 40px 30px;
    }

    .menu-mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 150px);
    }
    
    .marquee-text {
       font-size: 28px;
     letter-spacing: 2px;
    }

    .marquee-img {
        height: 160px;
    }
    .featured-section {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .featured-left {
        flex: none;
        width: 100%;
        height: 60vw;
    }

    .featured-right {
        flex: 1;
        width: 100%;
        padding: 30px 20px;
    }

    .featured-image {
        width: 100%;
        max-width: 100%;
        height: 100%;
        aspect-ratio: unset;
        border-radius: 0;
    }

    .gallery-item {
        flex-direction: column;
    }

    .gallery-item-right {
        flex-direction: column;
    }

    .gallery-image {
        width: 100%;
    }

    .gallery-item-left .gallery-image,
    .gallery-item-right .gallery-image {
        order: -1;
    }

    .menu-mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 200px);
}

.mosaic-large,
.mosaic-tall,
.mosaic-small,
.mosaic-wide {
    grid-column: span 1;
    grid-row: span 1;
}

    .menu-buttons-row {
        flex-direction: column;
        align-items: center;
    }

    .form-row {
        flex-direction: column;
    }

    .parking-container {
        flex-direction: column;
    }

    .parking-map {
        width: 100%;
        height: 300px;
    }

    footer {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-logo-section {
        align-items: center;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        padding: 8px 16px;
        font-size: 13px;
    }
}