﻿:root {
    --bg: #ead6c5;
    --bg_Footer: #f4e6d9;
    --ink: #111;
    --brand: #e26b4a;
    --card: #fff;
    --soft: 0 10px 30px rgba(0,0,0,.08);
    --radius: 18px;
}

html, body {
    background: var(--bg);
    color: var(--ink);
}

.shadow-soft {
    box-shadow: var(--soft);
}

.rounded-xl {
    border-radius: var(--radius);
}

.brand {
    color: var(--brand);
}

a {
    color: inherit;
    text-decoration: none;
}

/* HEADER */
.header-wrap {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    text-align: center;
}

.nav-logo {
    height: 110px;
    width: 110px;
    object-fit: contain;
    border-radius: 9999px;
    background: #fff;
    box-shadow: var(--soft);
}

.tagline {
    color: #5c5c5c;
}

/* SEARCH – mobile first */
.search-wrap {
    gap: .75rem;
    margin-top: 1rem;
    max-width: 900px;
    margin-inline: auto;
}

.search-pill {
    background: #fff;
    border: 0;
    box-shadow: var(--soft);
    padding: .55rem .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-radius: 9999px;
    width: 100%;
}

    .search-pill input {
        border: 0;
        outline: 0;
        width: 100%;
        font-size: .95rem;
        padding-top: .15rem;
        padding-bottom: .15rem;
    }

    .search-pill .bi {
        opacity: .65;
        font-size: 1rem;
    }

@media (min-width:768px) {
    .header-wrap {
        padding-top: 2rem;
        padding-bottom: 1.4rem;
    }

    .search-wrap {
        margin-top: 1.3rem;
    }

    .search-pill {
        padding: .65rem 1.1rem;
    }

        .search-pill input {
            font-size: 1rem;
        }
}

/* CATEGORIES */
.cat-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: .4rem 0 .7rem;
    scroll-snap-type: x proximity;
}

@media (min-width:576px) {
    .cat-scroll {
        justify-content: center; /* centra le categorie su tablet/desktop */
    }

    .cat-thumb {
        width: 72px;
        height: 72px;
    }

    .cat-item {
        width: 92px;
    }
}

.cat-item {
    flex: 0 0 auto;
    width: 84px;
    text-align: center;
    scroll-snap-align: start;
}

.cat-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--soft);
    border: 1px solid rgba(0,0,0,.05);
}

    /* QUI ho ingrandito l’icona: 60% -> 80% */
    .cat-thumb img {
        width: 80%;
        height: 80%;
        object-fit: contain;
    }

.cat-label {
    font-size: .8rem;
    margin-top: .35rem;
    white-space: nowrap;
}

.cat-item.active .cat-thumb {
    outline: 3px solid #111;
}

.cat-item:focus-visible .cat-thumb {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

@media (min-width:576px) {
    .cat-thumb {
        width: 72px;
        height: 72px;
    }

    .cat-item {
        width: 92px;
    }
}

/* CARDS */
.h-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
}

    .h-scroll .card {
        min-width: 78%;
        scroll-snap-align: start;
    }

@media (min-width:576px) {
    .h-scroll .card {
        min-width: 52%;
    }
}

@media (min-width:768px) {
    .h-scroll .card {
        min-width: 33%;
    }
}

.rest-card {
    border: 0;
    background: #fff;
}

    .rest-card .img {
        height: 180px;
        width: 100%;
        object-fit: cover;
        border-radius: 14px;
    }

    .rest-card .title {
        font-weight: 700;
        margin: .5rem 0 0;
    }

.section-title {
    font-weight: 900;
    letter-spacing: .2px;
    margin-top: 1rem;
}

/* BANNERS */
.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.ratio-21x9 {
    --bs-aspect-ratio: 42.85%;
}

.ratio-16x9 {
    --bs-aspect-ratio: 56.25%;
}

.ratio-4x3 {
    --bs-aspect-ratio: 75%;
}

/* === MOBILE: banner rows (2-up and 3-up) as horizontal carousel === */
@media (max-width: 575.98px) {
    .banner-scroll {
        display: flex !important;
        overflow-x: auto !important;
        gap: 12px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: .25rem;
    }

        .banner-scroll > [class*="col-"] {
            flex: 0 0 85% !important;
            min-width: 85% !important;
            scroll-snap-align: start;
        }
}

/* FOOTER */
footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    background: var(--bg_Footer);
}

.footer-logo {
    height: 70px;
    width: 70px;
    object-fit: contain;
    border-radius: 9999px;
    background: #fff;
    box-shadow: var(--soft);
}

.social a {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--soft);
}

    .social a:hover {
        transform: translateY(-2px);
    }

/* === MOBILE CAROUSEL: show 2 cards at once (keep horizontal scroll) === */
@media (max-width: 767.98px) {
    .h-scroll.carousel-2 {
        display: flex !important;
        gap: 10px !important;
        overflow-x: auto !important;
        scroll-snap-type: x proximity !important;
        padding-bottom: 6px !important;
    }

        .h-scroll.carousel-2 .card,
        .h-scroll.carousel-2 .rest-card {
            min-width: calc((100% - 10px) / 2) !important;
            flex: 0 0 calc((100% - 10px) / 2) !important;
            scroll-snap-align: start;
        }

            .h-scroll.carousel-2 .rest-card .img {
                height: 220px; /* invece di 140px */
                width: 100%;
                object-fit: cover;
            }
}

/* === MOBILE: banner rows as horizontal carousel (strong override) === */
@media (max-width: 575.98px) {
    .banner-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
    }

        .banner-scroll > [class*="col-"] {
            flex: 0 0 85% !important;
            width: 85% !important;
            max-width: 85% !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            scroll-snap-align: start;
        }
        /* Optional: tweak banner heights for mobile consistency */
        .banner-scroll .banner {
            height: 200px !important;
        }
}

/* === MOBILE: banner carousels with horizontal-only pan === */
@media (max-width: 575.98px) {
    .banner-scroll,
    .banner-scroll-2,
    .banner-scroll-3 {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        align-items: stretch;
    }
        /* default width if only banner-scroll present */
        .banner-scroll > [class*="col-"] {
            flex: 0 0 85% !important;
            width: 85% !important;
            max-width: 85% !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            scroll-snap-align: start;
        }
        /* 2-card row: make items a bit larger */
        .banner-scroll-2 > [class*="col-"] {
            flex: 0 0 90% !important;
            width: 90% !important;
            max-width: 90% !important;
        }
        /* 3-card row: make items a bit narrower to show next peek */
        .banner-scroll-3 > [class*="col-"] {
            flex: 0 0 72% !important;
            width: 72% !important;
            max-width: 72% !important;
        }
        /* compact the banner block heights just on mobile */
        .banner-scroll .banner,
        .banner-scroll-2 .banner,
        .banner-scroll-3 .banner {
            height: 200px !important;
        }
    /* remove extra vertical margins that could induce vertical scroll */
    .banner {
        margin-bottom: 0 !important;
    }
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: .5px;
}

.distance {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: .75;
    font-size: .8rem;
}

.tag-soft {
    display: inline-block;
    background: #f3f3f3;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .72rem;
    margin-top: 6px;
}

/* DROPDOWN risultati sotto la search */
.search-wrap {
    position: relative;
}
/* ancora il dropdown */

.search-overlay {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: transparent;
    inset: auto; /* annulla inset:0 del vecchio overlay */
    z-index: 2000;
    display: block;
    padding-top: 0;
}

.search-overlay-inner {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--soft);
    width: 100%;
    max-width: 900px; /* uguale alla search-wrap max-width */
    margin: 0 auto;
    max-height: 60vh;
    overflow: auto;
    padding: 1rem;
}


.search-overlay .card.rest-card {
    min-width: 0; /* per sicurezza con il grid */
}

/* se non l’hai già definita per le altre card */
.tag-soft {
    display: inline-block;
    background: #f3f3f3;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .72rem;
    margin-top: 6px;
}

.rest-carousel-desktop {
    position: relative;
}

.rest-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto; /* serve per scrollBy */
    scroll-behavior: smooth;
    padding-bottom: .25rem;
}

/* 3 carte per volta */
.rest-carousel-item {
    flex: 0 0 calc(33.333% - 1rem);
}

/* frecce */
.rest-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #ffffff;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    z-index: 5;
}

    .rest-carousel-arrow.prev {
        left: -20px;
    }

    .rest-carousel-arrow.next {
        right: -20px;
    }

/* opzionale: nascondi scrollbar desktop */
@media (min-width: 992px) {
    .rest-carousel-track {
        scrollbar-width: none;
    }

        .rest-carousel-track::-webkit-scrollbar {
            display: none;
        }
}

/* ===========================
             BASE BANNER
             =========================== */

.banner {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ===========================
             TAG IN ALTO A SINISTRA
             (usato ovunque ti serve)
             =========================== */

.banner-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

/* ===========================
             STILE 1: TESTO IN BASSO A LARGHEZZA PIENA
             (hero / banner grandi) -> .banner--bottom
             =========================== */

.banner--bottom .banner-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: #fff;
}

.banner--bottom .banner-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
}

.banner--bottom .banner-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===========================
             STILE 2: TITOLO CENTRATO IN BASSO
             (come il tuo esempio) -> .banner--bottom-title
             =========================== */

.banner--bottom-title .banner-title-bottom {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    padding: 0 0.5rem;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .banner--bottom-title .banner-title-bottom {
        font-size: 1.05rem;
        bottom: 0.7rem;
        white-space: normal;
    }
}

/* ===========================
             STILE 3: TESTO AL CENTRO CON EFFETTO "GLASS"
             (usato nel 3-colonne) -> .banner--center
             =========================== */

.banner--center .banner-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    color: #fff;
}

    .banner--center .banner-caption > div {
        background: rgba(0,0,0,0.4);
        padding: 1rem 1.25rem;
        border-radius: 1rem;
        backdrop-filter: blur(4px);
    }

.banner--center .banner-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.banner--center .banner-subtitle {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===========================
             GRID 2 COLONNE OFFERTE
             (tag in alto + titolo sotto)
             =========================== */

.banner-2col {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* wrapper immagine con ratio bootstrap */
.banner-2col-imgwrap {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

    .banner-2col-imgwrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* tag piccolo dentro la foto in alto a sinistra */
.banner-2col-tag {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

/* titolo sotto la foto, centrato */
.banner-2col-title {
    margin-top: 0.6rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff; /* come nel tuo mock */
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* un filo più piccolo su mobile */
@media (max-width: 576px) {
    .banner-2col-title {
        font-size: 1.05rem;
    }
}

/* ===========================
             BANNERS – stile unico glass
             =========================== */

/* wrapper */
.banner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 24px;
    }

/* TAG opzionale in alto a sinistra */
.banner-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    z-index: 3;
}

/* CAPTION GLASS CENTRALE (uguale per tutti) */
.banner-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.banner-caption-inner {
    display: inline-block;
    max-width: 85%;
    padding: 0.8rem 1.4rem;
    border-radius: 0.9rem; /* rettangolo morbido, NON pillola estrema */
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
}

.banner-title {
    margin: 0 0 0.15rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.banner-subtitle {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* mobile: leggermente più compatto */
@media (max-width: 575.98px) {
    .banner-caption-inner {
        padding: 0.7rem 1.1rem;
    }

    .banner-title {
        font-size: 1rem;
    }

    .banner-subtitle {
        font-size: 0.8rem;
    }
}

/* Contenitore scrollabile delle categorie – versione finale */
/* (tutto il resto del CSS sopra resta identico) */

/* Track interno: le icone */
#tipologieContainer.cat-scroll {
    display: inline-flex;
    gap: 14px;
}

#tipologieContainer .cat-item {
    flex: 0 0 auto;
}

/* Layout principale del carosello (frecce + lista) */
.cat-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    width: 100%;
}

/* Frecce (base, usato su desktop) */
.cat-nav {
    background: rgba(0,0,0,0.07);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cat-nav:hover {
        background: rgba(0,0,0,0.15);
    }

/* Wrapper scrollabile comune (desktop + mobile) */
.cat-scroll-outer {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
}

/* ---------- DESKTOP (>=768px): frecce visibili, scrollbar nascosta ---------- */
@media (min-width: 768px) {

    .cat-scroll-outer {
        scrollbar-width: none;
    }

        .cat-scroll-outer::-webkit-scrollbar {
            display: none;
        }

    .cat-nav {
        visibility: visible;
        opacity: 1;
    }
}

/* ---------- MOBILE (<768px): niente frecce, solo scroll orizzontale ---------- */
@media (max-width: 767.98px) {

    .cat-nav {
        display: none !important; /* nasconde le frecce su mobile */
    }
    /* qui abbassiamo la “linea” di scroll di qualche pixel */
    .cat-scroll-outer {
        scrollbar-width: thin;
        padding-bottom: 8px; /* 👈 sposta la barra un po’ più in basso */
    }

        .cat-scroll-outer::-webkit-scrollbar {
            height: 3px;
        }

        .cat-scroll-outer::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.25);
            border-radius: 10px;
        }
}


/* =====================================
        CAROSELLO "TEST RISTORANTI"
        (2 card visibili su mobile, 3 su desktop)
        ===================================== */

.ristoranti-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
}

    /* base: MOBILE -> 2 card */
    .ristoranti-scroll .card.rest-card {
        flex: 0 0 calc((100% - 12px) / 2);
        min-width: calc((100% - 12px) / 2);
        scroll-snap-align: start;
    }

/* da tablet/desktop in su -> 3 card */
@media (min-width: 768px) {
    .ristoranti-scroll .card.rest-card {
        flex: 0 0 calc(33.333% - 10px);
        min-width: calc(33.333% - 10px);
    }
}

/* =====================================
        CAROSELLO MOBILE RISTORANTI
        card a larghezza fissa
        ===================================== */
@media (max-width: 991.98px) {
    .ristoranti-mobile {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

        .ristoranti-mobile .card.rest-card {
            flex: 0 0 260px;
            width: 260px;
            max-width: 260px;
            scroll-snap-align: start;
        }
}

/* ===========================
        NEWS CARD – STILE COMPLETO
        =========================== */

.news-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    /* FONDAMENTALE */
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .news-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0,0,0,.08);
    }

/* --- COVER QUADRATA 1:1 --- */
.news-cover {
    position: relative;
    padding-top: 100%; /* 1:1 */
    background: #f3f4f6;
    overflow: hidden;
}

    .news-cover img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* --- BODY --- */
.news-body {
    padding: 14px;
    /* FONDAMENTALE */
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0; /* evita che il footer venga tagliato */
}

/* --- TITOLO (2 righe fisse) --- */
.news-title {
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 6px 0;
    line-height: 1.25;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.25em * 2);
}

/* --- DESCRIZIONE (2 righe fisse) --- */
.news-desc {
    margin: 0;
    color: rgba(0,0,0,.65);
    font-size: .9rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.35em * 2);
}

/* --- META (data + visualizzazioni) --- */
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: rgba(0,0,0,.55);
    font-size: .8rem;
}

/* --- FOOTER (bottone sempre in basso) --- */
.news-footer {
    margin-top: auto; /* 🔥 QUESTA È LA CHIAVE */
    padding-top: 12px;
}

/* --- PILLS --- */
.news-pill {
    border: 1px solid rgba(0,0,0,.10);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.02);
    white-space: nowrap;
}

/* ===========================
        HOME NEWS CAROUSEL (COMPLETE)
        Desktop: 4 card precise (no peek)
        Tablet: 2 card
        Mobile: 1 card
        Includes: arrows + dots + hidden scrollbar
        =========================== */

#homeNewsCarousel.news-carousel-wrap {
    position: relative;
    width: 100%;
    overflow: hidden; /* clippa qualsiasi peek */
    padding: 0 44px; /* spazio frecce SENZA rompere il calcolo delle 4 card */
    box-sizing: border-box;
}

/* SCROLLER */
#homeNewsCarousel .news-carousel {
    --gap: 16px;
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 6px 0; /* IMPORTANT: no padding orizzontale -> 4 card perfette */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

    #homeNewsCarousel .news-carousel::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

/* ITEM: 4 card precise = (100% - gap*3)/4 */
#homeNewsCarousel .news-carousel-item {
    flex: 0 0 calc((100% - (var(--gap) * 3)) / 4);
    scroll-snap-align: start;
    box-sizing: border-box;
}

/* FRECCE */
#homeNewsCarousel .news-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
    z-index: 10;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

    /* frecce posizionate dentro il padding del wrap */
    #homeNewsCarousel .news-carousel-nav.prev {
        left: 10px;
    }

    #homeNewsCarousel .news-carousel-nav.next {
        right: 10px;
    }

/* DOTS */
#homeNewsCarousel .news-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 12px 0 0 0;
}

#homeNewsCarousel .news-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.25);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

    #homeNewsCarousel .news-dot.is-active {
        background: rgba(0,0,0,.55);
    }

/* (opzionale) clamp descrizione SOLO in home */
#homeNewsCarousel .news-card .news-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    #homeNewsCarousel .news-card .news-desc p {
        margin: 0;
    }

/* ===========================
        TABLET: 2 card precise
        =========================== */
@media (max-width: 992px) {
    #homeNewsCarousel.news-carousel-wrap {
        padding: 0 36px; /* un filo meno spazio frecce */
    }

    #homeNewsCarousel .news-carousel-item {
        flex: 0 0 calc((100% - (var(--gap) * 1)) / 2);
    }
}

/* ===========================
        MOBILE: 1 card
        =========================== */
@media (max-width: 768px) {
    #homeNewsCarousel.news-carousel-wrap {
        padding: 0; /* niente spazio frecce */
    }

    #homeNewsCarousel .news-carousel {
        padding: 0; /* niente peek */
    }

    #homeNewsCarousel .news-carousel-item {
        flex: 0 0 100%;
        padding: 0 10px; /* aria laterale */
    }
    /* su mobile: swipe + dots */
    #homeNewsCarousel .news-carousel-nav {
        display: none;
    }
}

.footer-legal {
    width: 100%;
    background-color: #c93a3a; /* rosso come screenshot */
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    padding: 10px 15px;
    line-height: 1.4;
}

    .footer-legal a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
    }

        .footer-legal a:hover {
            text-decoration: underline;
        }

@media (max-width: 576px) {
    .footer-legal {
        font-size: 0.8rem;
        padding: 12px 10px;
    }
}

.banner-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--soft);
    height: 100%;
}

.banner-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(0,0,0,.06);
}

.banner-title {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.banner-subtitle {
    font-size: 14px;
    line-height: 1.35;
    opacity: .8;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* mobile: 2 righe */
    overflow: hidden;
}

/* desktop: puoi lasciare 2 oppure salire a 3 */
@media (min-width: 768px) {
    .banner-subtitle {
        -webkit-line-clamp: 2; /* metti 3 se vuoi un pelo più testo */
    }
}


/* bottone "Leggi di più" */
.banner-more {
    display: none;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    opacity: .75;
    cursor: pointer;
}

    .banner-more:hover {
        opacity: 1;
        text-decoration: underline;
    }


/* stato espanso */
.banner-card.is-expanded .banner-subtitle {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.footer-legal-links a {
    color: inherit;
    text-decoration: none;
}

    .footer-legal-links a:hover {
        text-decoration: underline;
    }


/* =========================================
   MOBILE: categorie grandi (3 visibili)
   ========================================= */
@media (max-width: 575.98px) {

    /* gap un filo più ampio per respirare */
    .cat-scroll {
        gap: 12px; /* prima era 10 */
        padding: .6rem 0 .9rem;
        justify-content: flex-start; /* su mobile deve scorrere, non centrarsi */
    }

    /* ogni item = 1/3 della viewport (meno i gap) */
    .cat-item {
        width: auto !important; /* annulla width:84px */
        flex: 0 0 calc((100% - (12px * 2)) / 3); /* 3 visibili */
        scroll-snap-align: start;
    }

    /* tondo più grande e proporzionato */
    .cat-thumb {
        width: clamp(78px, 24vw, 98px);
        height: clamp(78px, 24vw, 98px);
    }

        /* icona leggermente più grande dentro */
        .cat-thumb img {
            width: 82%;
            height: 82%;
        }

    /* se riattivi la label, evita che rompa */
    .cat-label {
        font-size: .78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.cat-thumb {
    background: #fff;
    border-radius: 50%;
    /* profondità */
    box-shadow: 0 6px 14px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.08);
    /* micro bordo luce */
    border: 1px solid rgba(255,255,255,.7);
    transition: transform .18s ease, box-shadow .18s ease;
}

.cat-item:hover .cat-thumb,
.cat-item:focus-visible .cat-thumb {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,.16), 0 4px 6px rgba(0,0,0,.10);
}

.cat-item:active .cat-thumb {
    transform: translateY(1px) scale(.97);
    box-shadow: 0 3px 6px rgba(0,0,0,.12) inset, 0 1px 2px rgba(0,0,0,.15);
}

.cat-hint-dots {
    display: none;
    margin-top: 10px;
    justify-content: center;
    gap: 6px;
    opacity: .55;
}

    .cat-hint-dots span {
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: #000; /* eredita bene, se vuoi metti currentColor */
    }

@media (max-width: 575.98px) {
    .cat-hint-dots {
        display: flex;
    }
}

@media (max-width: 575.98px) {

    /* 1) forza il container a comportarsi come scroller orizzontale */
    #tipologieContainer {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        gap: 12px !important;
        padding: .6rem 12px 1rem !important; /* un po' di respiro ai lati */
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Firefox */
    }

        #tipologieContainer::-webkit-scrollbar {
            display: none;
        }
        /* Chrome/Safari */

        /* 2) ogni bottone: 3 pieni + un pezzetto del 4° */
        #tipologieContainer .cat-item {
            flex: 0 0 calc((100% - (12px * 2)) / 3.35) !important;
            width: auto !important;
            scroll-snap-align: start;
        }

        /* 3) tondo grande */
        #tipologieContainer .cat-thumb {
            width: clamp(88px, 27vw, 110px) !important;
            height: clamp(88px, 27vw, 110px) !important;
        }
}


.lang-switcher {
    display: flex;
    align-items: center;
    line-height: 1;
}

/* Desktop */
.navbar-brand {
    font-size: 1rem;
    line-height: 1.2;
}

/* Mobile: brand più compatto */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: .9rem;
        line-height: 1.15;
    }
}

.footer-legal {
    white-space: nowrap;
}

.vat {
    white-space: nowrap;
}
