/* ── GENERALI ────────────────────────────────────── */
/* impostazioni del boxing della pagina e font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

/* per impedire la selezione del testo */
* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
}

/* per impedire il grabbing delle immagini */
* {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

html,
body {
    height: 100%;
    margin: 0;
    max-width: var(--max-width);
    margin: auto;
}


/* icone di google */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* stile globale per tutte le icone del sito */
.material-symbols-outlined {
    font-size: 24px;
    color: inherit;
    vertical-align: middle;
}

:root {
    /* ── colori di brand (invariati) ── */
    --color-primary: #F6C21A;
    --color-primary-dark: #ebb608;
    --color-secondary: #a64426;
    --color-secondary-dark: #7a2f19;
    --color-accent: #A8442A;
    --color-white: #FDFFFC;
    --color-text-light: #f0f0f0;
    --color-black: #1F2937;
    --color-transparent: transparent;
    --color-white: #ffffff;
    --color-banner: #e05337 ;
    --color-banner-after: #d03b1d ;

    /* ── nuovi neutri caldi, coerenti con la palette ── */
    --color-cream: #FBF7EF;
    --color-cream-dark: #F4EDE0;
    --border: #E9E0D2;
    --muted: #756E62;

    /* ── ombre (tinte calde, non grigio piatto) ── */
    --shadow-sm: 0 2px 10px rgba(76, 46, 24, 0.07);
    --shadow-md: 0 10px 28px rgba(76, 46, 24, 0.12);
    --shadow-lg: 0 24px 56px rgba(50, 30, 16, 0.20);

    /* ── raggi ── */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --responsive-transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --max-width: 1440px;
}

/* id della mappa */
#map {
    transition: 0.25s ease-in-out;
}

/* ── HEADER E MENU DI NAVIGAZIONE ────────────────────────────────────── */
/* ── variabili locali ── */
:root {
    --header-height: 80px;
    --header-height-sm: 65px;
    --nav-breakpoint: 765px;
    --drawer-width: 72%;
    --drawer-max: 300px;
}

/*---BANNER DI ANNUNCI----------------------------------------------*/
.site-banner {
    position: relative;
    background: var(--color-banner);
    color: #fff;
    text-align: center;
    padding: 20px 40px 20px 56px;
}

.site-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: var(--color-banner-after);
}

/* ── HEADER ────────────────────────────────────────────────────── */
.header {
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-primary);
}

.header-content {
    height: 100%;
    max-width: var(--max-width, 1440px);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 1.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── LOGO ── */
.header-logo_link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.header-logo {
    height: calc(var(--header-height) - 8px);
    width: auto;
    display: block;
    transition: var(--responsive-transition, all 0.2s ease-in-out);
}

/* ── NAVBAR DESKTOP (sopra 765px) ─────────────────────────────── */
.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    display: block;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    color: var(--color-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Playfair Display', 'Georgia', serif;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background: rgba(31, 41, 55, 0.08);
}

.nav-link.active {
    background: var(--color-white);
    color: var(--color-primary);
}

/* elementi mobile nascosti su desktop */
.burger-btn,
.nav-close,
.nav-overlay {
    display: none;
}

/* FOOTER */
.footer {
    position: relative;
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 56px 32px 60px;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

/* filo dorato in cima, per legare il footer al resto della palette */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), transparent 75%);
}

/* effetto piega */
.footer::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 45px 45px;
    border-color: var(--color-transparent) var(--color-transparent) var(--color-secondary-dark) var(--color-transparent);
    box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.18);
    transition: var(--responsive-transition);
}

.footer-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    transition: var(--responsive-transition);
}

.footer-column h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(15px, 2.2vw, 17px);
    font-weight: 700;
    margin: 0 0 14px 10px;
    transition: var(--responsive-transition);
    color: var(--color-primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    font-size: clamp(12px, 2vw, 14px);
    line-height: 1.9;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color 0.2s ease, var(--responsive-transition);
}

.footer-column ul li a {
    color: inherit;
    text-decoration: none;
}

.footer-column ul li a:hover {
    color: var(--color-primary);
}

/* orari con il toggle */
.orari-toggle summary {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    list-style: none;
}

.orari-toggle summary::-webkit-details-marker {
    display: none;
}

.arrow {
    transition: transform 0.2s ease;
    font-size: 20px;
}

.orari-toggle:not([open]) .arrow {
    transform: rotate(180deg);
}

.footer-column ul .orari-list {
    width: 100%;
    margin-top: 6px;
}

.orari-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
    white-space: nowrap;
}

.orari-list .chiuso span {
    font-weight: bold;
    color: var(--color-primary);
}

.footer-column a,
.orari-toggle summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* sezioni presenti in about.css e info.css */
.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 40px;
    line-height: 1.2;
}

/* loader */
#__page-loader-overlay__ {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: all;
    user-select: none;
    -webkit-user-select: none;
}

#__page-loader-overlay__ .loader-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid #e0e0e0;
    border-top-color: #F6C21A;
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 0 8px rgba(246, 194, 26, 0.15);
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ── QUERY RESPONSIVE ────────────────────────────────────── */
/* Sotto i 400px */
@media (max-width: 400px) {
    .logo {
        height: 50px;
        scale: 1.1;
    }
}

/* Sotto i 450px */
@media (max-width: 450px) {
    .footer-table {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .footer-column {
        margin-bottom: 12px;
    }

    .footer-column:last-child {
        margin-bottom: 0;
    }

    .footer-column h3 {
        font-size: 17px;
    }

    .footer-column ul li {
        font-size: 15px;
        line-height: 1.5;
    }

    .footer::after {
        border-width: 0 0 35px 35px;
    }
}


/* sotto i 550px */
@media (max-width: 546px) {
    #map {
        height: 200px;
    }
}

/* ── NAVBAR MOBILE (sotto 765px) ──────────────────────────────── */
@media (max-width: 765px) {

    /* header più basso */
    .header {
        height: var(--header-height-sm);
    }

    .header-logo {
        height: calc(var(--header-height-sm) - 8px);
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
        padding: 80px 0 24px;
    }

    /* drawer laterale */
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: var(--drawer-width);
        max-width: var(--drawer-max);
        height: 100%;
        background: var(--color-secondary-dark);
        z-index: 1001;

        display: flex;
        flex-direction: column;

        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;

        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    }

    .nav.open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    /* link nel drawer */
    .nav-link {
        width: 100%;
        padding: 16px 28px;
        border-radius: 0;
        color: var(--color-white);
        font-size: 18px;
        text-align: right;
    }

    .nav-link.active {
        background: rgba(246, 194, 26, 0.12);
        color: var(--color-primary);
    }

    .nav-list li:last-child .site-nav__link {
        border-bottom: none;
    }

    .nav-list:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 18px;
        left: 18px;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .nav-close:hover {
        background: rgba(255, 255, 255, 0.18);
    }

    .nav-close svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: var(--color-white);
        stroke-width: 2;
        stroke-linecap: round;
    }

    /* burger button */
    .burger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }

    .burger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--color-white);
        border-radius: 3px;
        transition: transform 0.25s ease, opacity 0.25s ease;
        transform-origin: left center;
    }

    .burger-btn.open span:nth-child(1) {
        transform: rotate(45deg) translateY(-1px);
    }

    .burger-btn.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .burger-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translateY(1px);
    }

    /* overlay scuro */
    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s;
    }

    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .content {
        margin-top: 0 !important;
    }
}
