/* ============================================
   1. CSS RESET
============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

input, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
h2
{color: var(--gold);}
/* ============================================
   2. CSS CUSTOM PROPERTIES
============================================ */
:root {
    /* Colori */
    --brown-dark: #3d2b1f;
    --brown-medium: #5a3e2b;
    --brown-light: #7a5c40;
    --cream: #f5f0e1;
    --cream-dark: #e8dfcc;
    --gold: #c8a45a;
    --gold-light: #e0c47a;
    --orange-cta: #c86444;
    --orange-hover: #a84f35;
    --dark-banner: #1a1a1a;
    --dark-overlay: rgba(0, 0, 0, 0.4);
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --text-muted: #666666;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);

    /* Tipografia */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', 'Segoe UI', sans-serif;

    /* Spaziatura */
    --section-padding: 100px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Transizioni */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-carousel: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 50%;
}

/* ============================================
   3. TYPOGRAPHY & GLOBAL
============================================ */
body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--text-dark);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.2;
}




.h2-chiaro {
    color: var(--gold) !important;
}


.h2-scuro {
    color: var(--brown-dark) !important;
}

/* --------------------------------- */

/* Stile base per i titoli di sezione (default marrone scuro) */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 40px;
}

.section-title span {
    color: var(--gold);
    font-style: italic;
}

.section-title--center {
    text-align: center;
}
/* ============================================
   4. LAYOUT UTILITIES
============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ============================================
   5. BUTTONS
============================================ */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn--primary {
    background-color: var(--orange-cta);
    color: var(--white);
    border: 2px solid var(--orange-cta);
}

.btn--primary:hover {
    background-color: var(--orange-hover);
    border-color: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background-color: transparent;
    color: var(--orange-cta);
    border: 2px solid var(--orange-cta);
}

.btn--outline:hover {
    background-color: var(--orange-cta);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   6. HEADER & NAVIGATION
============================================ */
header {
    width: 100%;
    position: fixed; /* Blocca l'header in alto */
    top: 0;
    left: 0;
    z-index: 1000; /* Assicura che stia sopra a tutto, anche alla Hero */
    padding: 20px 0; /* Un po' più arioso all'inizio */
    background-color: transparent; /* Trasparente di default */
    transition: all 0.4s ease; /* Transizione morbida per colore e padding */
}

.header--scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-lg);
    background-color: rgba(61, 43, 31, 0.97);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* O la larghezza che preferisci */
    margin: 0 auto;
    padding: 0 20px;
}

.navbar__logo img {
    height: 60px;
    width: auto;
    transition: height var(--transition-base);
}

header.header-scrolled {
    background-color: var(--primary-brown, #3d2b1f); /* Diventa marrone solido */
    padding: 10px 0; /* Si rimpicciolisce leggermente per ingombrare meno */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Aggiunge profondità */
}

/* Opzionale: Se vuoi che il logo si rimpicciolisca allo scroll */
.logo img {
    height: 60px; /* Dimensione iniziale */
    transition: height 0.4s ease;
}

header.header-scrolled .logo img {
    height: 50px; /* Dimensione ridotta allo scroll */
}

.navbar__menu {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: #ffffff; /* Bianco per essere leggibile sulla foto scura */
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold, #d4af37); /* Usa la tua variabile gold o un codice colore */
}

.navbar__link {
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    position: relative;
    padding: 4px 0;
    transition: color var(--transition-base);
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width var(--transition-base);
}

.navbar__link:hover,
.navbar__link.active {
    color: var(--gold);
}

.navbar__link:hover::after,
.navbar__link.active::after {
    width: 100%;
}

.navbar__social {
    display: flex;
    gap: 16px;
}

.navbar__social a {
    color: var(--white);
    font-size: 1.1rem;
    transition: color var(--transition-base), transform var(--transition-base);
}

.navbar__social a:hover {
    color: var(--gold);
    transform: scale(1.15);
}

/* Hamburger */
.navbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 1001;
}

.navbar__hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: var(--white);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.navbar__hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.open span:nth-child(2) {
    opacity: 0;
}

.navbar__hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   TESTIMONIALS STYLE (GOOGLE CARD REPLICA)
   ========================================== */



.testimonials__actions {
    display: flex !important;
    flex-direction: row !important; /* Forza l'affiancamento su desktop */
    justify-content: center !important; /* Centra orizzontalmente */
    align-items: center !important;     /* Centra verticalmente */
    gap: 20px !important;
    margin-top: 55px !important;
    width: 100% !important;
    flex-wrap: wrap !important; /* Permette di andare a capo solo se lo spazio finisce */
}

.testimonials__actions .btn {
    /* Il segreto è qui: flex 0 0 auto impedisce al bottone di espandersi */
    flex: 0 0 auto !important; 
    width: auto !important;
    max-width: max-content !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important; /* Impedisce al testo del bottone di andare a capo internamente */
    background-color: var(--orange-cta);
    color: var(--white);
}

/* Mobile: solo qui possiamo decidere se tenerli piccoli o farli grandi */
@media (max-width: 600px) {
    .testimonials__actions {
        flex-direction: column !important; /* Uno sopra l'altro solo su mobile */
        gap: 15px !important;
    }
    
    .testimonials__actions .btn {
        width: 90% !important; /* Su mobile è meglio averli un po' più larghi per il pollice */
        max-width: 300px !important;
    }
}

/* --- STILE CARD --- */
a.google-card {
    background: #fff;
    border-radius: 8px; /* Google usa bordi meno arrotondati */
    padding: 16px;      /* Padding standard Google */
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    border: none;
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: left;
    transition: box-shadow 0.3s ease, transform 0.2s;
    font-family: 'Roboto', Arial, sans-serif; /* Google Font look */
}

a.google-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* 1. Header Card: Nome e Menu */
.google-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2px;
}

.google-author {
    font-size: 1rem;
    font-weight: 700;     /* Grassetto */
    color: #202124;       /* Nero Google */
    line-height: 1.2;
}

/* I tre puntini verticali */
.google-menu-icon {
    color: #5f6368;       /* Grigio icona */
    font-size: 1.1rem;
    padding-left: 10px;
}

/* 2. Meta Info (Local Guide) */
.google-meta {
    font-size: 0.75rem;   /* Molto piccolo */
    color: #70757a;       /* Grigio Google */
    margin-bottom: 10px;
    display: block;
}

/* 3. Riga Stelle e Data */
.google-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.google-stars {
    color: #fbcc40;       /* Giallo/Arancio Google esatto */
    font-size: 0.9rem;
    letter-spacing: 1px;  /* Leggero spazio tra le stelle */
}

.google-time {
    font-size: 0.85rem;
    color: #70757a;       /* Grigio data */
}

/* 4. Testo Recensione */
.testimonials__text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #202124;       /* Nero Google */
    font-style: normal;
}

/* Link "Altro" finto */
.read-more {
    color: #1a73e8;       /* Blu Link Google */
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
/*POPUP CARD GOOGLE MAPS*/
/* --- MODALE RECENSIONI --- */
.review-modal-overlay {
    display: none; /* Nascosto di default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Sfondo scuro semitrasparente */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px); /* Effetto sfocato moderno */
}

/* La card dentro la modale */
.review-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    position: relative;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalPop 0.3s ease-out;
}

/* Tasto chiudi */
.close-review {
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}
.close-review:hover {
    color: #000;
}

/* Animazione comparsa card */
@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modifiche alla card nella griglia */
/* La card ora è un div, ma deve sembrare cliccabile */
.google-card {
    cursor: pointer; 
}

/* Il link "Altro" deve essere distinto */
.read-more {
    color: #1a73e8;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.read-more:hover {
    text-decoration: underline;
}

/* ============================================
   7. HERO SECTION
============================================ */
.hero {
    padding-top: 80px;
    
    
    /* MODIFICA 1: Posizionamento dello Sfondo */
    /* Invece di 'center/cover', usiamo '85% center' o 'right center'. 
       Questo forza la coppetta a stare sulla parte destra dello schermo, 
       lasciando libero lo spazio a sinistra per il testo. */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../images/coppetta-gelato-senza-lattosio-canova-hero.webp') no-repeat;
    background-size: cover;      /* Adatta l'immagine per coprire tutto */
    background-position: 80% center; /* Sposta il fuoco (la coppetta) verso destra */
    
    min-height: 90vh;
    display: flex;
    align-items: center;         /* Centra verticalmente */
    
    /* MODIFICA 2: Allineamento Flex */
    justify-content: flex-start; /* Spinge tutto il contenuto (il testo) all'inizio (SINISTRA) */
    
    text-align: center;          /* Mantiene il testo centrato "su se stesso" come volevi */
    overflow: hidden;
    position: relative;
}

.hero__content {
    display: block;
    z-index: 2;
    
    /* MODIFICA 3: Dimensioni e Margini del blocco testo */
    width: 100%;                 /* Larghezza base */
    max-width: 650px;            /* Impedisce al testo di allargarsi troppo verso la coppetta */
    padding: 0 20px;             /* Padding interno sicuro */
    
    /* Questo margine stacca il testo dal bordo sinistro dello schermo in modo elegante */
    margin-left: 5%;             
}

.hero__title {
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.15;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero__title span {
    color: var(--gold);
    font-style: italic;
}

.hero__subtitle {
    font-size: 1.3rem;
    color: #f0f0f0;
    margin-bottom: 40px;
    font-weight: 300;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero__image {
    display: none; 
}




/* ============================================
   8. FEATURES BANNER
============================================ */
.features {
    background-color: var(--dark-banner);
    padding: 60px 0;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.features__item {
    padding: 30px 20px;
    transition: transform var(--transition-base);
}

.features__item:hover {
    transform: translateY(-5px);
}

.features__icon {
    width: 70px;
    height: 70px;
    border: 2px solid var(--gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--gold);
    transition: all var(--transition-base);
}

.features__item:hover .features__icon {
    background-color: var(--gold);
    color: var(--dark-banner);
}

.features__title {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.features__desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* --- LIGHTBOX (ZOOM IMMAGINI) --- */

/* Cursore che indica che l'immagine è cliccabile */
.carousel__card-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.carousel__card-image:hover {
    transform: scale(1.02); /* Leggero feedback al passaggio del mouse */
}

/* Sfondo scuro della modale */
.lightbox-modal {
    display: none; /* Nascosto di default */
    position: fixed; 
    z-index: 9999; /* Deve stare sopra a tutto, anche all'header */
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); /* Nero al 90% di opacità */
}

/* L'immagine ingrandita */
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px; /* Non diventa più grande di così */
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation-name: zoom;
    animation-duration: 0.4s;
}

/* Tasto chiudi (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--gold, #d4af37);
    text-decoration: none;
    cursor: pointer;
}

/* ==========================================
   SEZIONI DARK (Philosophy & Story) - CORRETTO
   ========================================== */

/* 1. Forza lo sfondo Marrone Scuro e il testo Bianco */
section.story,
.story,
#story,
section.philosophy,
.philosophy,
#chi-siamo {
    background-color: rgba(61, 43, 31, 0.97) !important; /* Marrone Scuro */
    color: #ffffff !important;            /* Testo Bianco */
    position: relative;
    padding: 80px 0;
}

/* 2. Forza il colore bianco su TUTTI gli elementi di testo interni */
.story h2, .story h3, .story p, .story span, .story li,
.philosophy h2, .philosophy h3, .philosophy p, .philosophy span {
    color: #ffffff !important;
}

/* 3. Se ci sono sottotitoli o testi muti, li rendiamo leggermente grigi ma leggibili */
.story p, 
.philosophy p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 4. Gestione specifica per i titoli H2 che usano la classe "h2-chiaro" (Oro) */
.story .h2-chiaro,
.philosophy .h2-chiaro {
    color: var(--gold) !important; 
}


/* ============================================
   9. PHILOSOPHY SECTION (Aggiornato)
============================================ */


.philosophy__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.philosophy__image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.philosophy__text .section-title {
    font-size: 2.2rem;
}

.philosophy__text p {
    /* Colore gestito dalla regola dark sopra */
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.philosophy__text .btn {
    margin-top: 15px;
}


/* ============================================
   10. STORY SECTION (Aggiornato)
============================================ */


.story__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.story__image-wrapper img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-slow);
}

.story__image-wrapper:hover img {
    transform: scale(1.03);
}

.story__text {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.story__text p {
    /* Colore gestito dalla regola dark sopra */
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 30px;
}


/* ============================================
   11. FLAVORS CAROUSEL
============================================ */
.flavors {
    padding: var(--section-padding);
    background-color: var(--cream);
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.carousel__viewport {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.carousel__track {
    display: flex;
    transition: transform var(--transition-carousel);
}

.carousel__card {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: pointer;
}

.carousel__card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.carousel__card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.carousel__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.carousel__card:hover .carousel__card-image img {
    transform: scale(1.08);
}

.carousel__card-info {
    padding: 20px;
    text-align: center;
}

.carousel__card-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--brown-dark);
    margin-bottom: 8px;
}

.carousel__card-stars {
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.carousel__card-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--orange-cta);
}

/* Carousel Buttons */
.carousel__btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background-color: var(--brown-dark);
    color: var(--white);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.carousel__btn:hover {
    background-color: var(--gold);
    color: var(--brown-dark);
    transform: scale(1.1);
}

/* Carousel Dots */
.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 35px;
}

.carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: var(--brown-light);
    opacity: 0.4;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.carousel__dot.active {
    opacity: 1;
    background-color: var(--gold);
    transform: scale(1.2);
}

/* ==========================================
   GALLERY SECTION STYLE
   ========================================== */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 43, 31, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* AGGIUNGI QUESTA RIGA */
    pointer-events: none; 
}
.gallery-section {
    padding: 80px 0;
    background-color: #f5f0e1;
}

/* Filtri (Bottoni) */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 2px solid #3d2b1f; /* Colore brand scuro */
    color: #3d2b1f;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit; /* Usa il font del sito */
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #3d2b1f;
    color: #fff;
    transform: translateY(-2px);
}

/* Griglia */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive automatico */
    gap: 20px;
}

/* Card Immagine */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    animation: fadeIn 0.5s ease; /* Animazione filtro */
}

/* Nasconde elementi filtrati */
.gallery-item.hide {
    display: none ;
}

.gallery-item-inner {
    position: relative;
    height: 300px; /* Altezza fissa per uniformità */
    width: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Taglia l'immagine per riempire il box senza deformare */
    transition: transform 0.5s ease;
    display: block;
}

/* Overlay Hover */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 43, 31, 0.7); /* Marrone scuro semitrasparente */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: #fff;
    font-size: 2rem;
    transform: scale(0);
    transition: transform 0.3s ease;
}

/* Effetti Hover */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1); /* Zoom leggero immagine */
}

/* Animazione per il filtro */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .gallery-item-inner {
        height: 250px;
    }
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ============================================
   12. TESTIMONIALS SECTION
============================================ */
.testimonials {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.testimonials__card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
}

.testimonials__card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.testimonials__avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.3rem;
    color: var(--white);
}

.testimonials__text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonials__stars {
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.testimonials__author {
    font-weight: 600;
    color: var(--brown-dark);
    font-size: 0.9rem;
}

/* ============================================
   13. LOCATION / DOVE SIAMO
============================================ */
.location {
    padding: var(--section-padding);
    background-color: var(--cream);
}

.location__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: stretch;
}

.location__map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

.location__map iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: block;
}

.location__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.location__detail {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.location__icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-size: 1.1rem;
}

.location__detail strong {
    display: block;
    font-size: 1rem;
    color: var(--brown-dark);
    margin-bottom: 4px;
}

.location__detail p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.location__detail a {
    color: var(--orange-cta);
    transition: color var(--transition-base);
}

.location__detail a:hover {
    color: var(--orange-hover);
}

/* ============================================
   14. FOOTER
============================================ */
.footer {
    background-color: var(--brown-dark);
    color: var(--white);
    padding-top: 50px;
}

.footer__main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__logo {
    height: 60px;
    width: auto;
    margin-bottom: 12px;
    filter: brightness(1.1);
}

.footer__col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer__col p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer__col p i {
    margin-right: 8px;
    color: var(--gold);
}

.footer__social {
    display: flex;
    gap: 14px;
    margin-top: 5px;
}

.footer__social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--white);
    transition: all var(--transition-base);
}

.footer__social a:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--brown-dark);
    transform: translateY(-3px);
}

.footer__bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ============================================
   15. ANIMATIONS & TRANSITIONS
============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ============================================
   STILI PAGINA 404 (SFONDO MARRONE)
============================================ */

/* Applica lo sfondo marrone solo quando il body ha la classe .page-404 */
body.page-404 {
    background-color: var(--brown-dark);
    color: var(--crema-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Rende la sezione dell'errore trasparente per mostrare il marrone del body */
.page-404 .error-section {
    background-color: transparent;
    flex: 1; /* Spinge il footer in basso */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Regolazione colori testi per contrasto su fondo scuro */
.page-404 .error-content h2,
.page-404 .error-content p {
    color: white;
}

.page-404 .error-icon {
    color: var(--gold);
}

/* Footer nella 404: rimuoviamo bordi o ombre che staccano col fondo */
.page-404 .footer {
    background-color: var(--brown-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   16. MEDIA QUERIES — DESKTOP & LAPTOP
============================================ */

/* Screens Ultra Wide (≥ 2200px) */
@media (min-width: 2200px) {
    .hero__content {
        margin-left: 25%; 
    }
}

/* Lightbox Animazione di apertura */
@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Adattamento per mobile */
@media only screen and (max-width: 700px){
    .lightbox-content {
        width: 95%;
    }
}


/* Range Specifico Laptop/Desktop Medi (770px - 1600px) */
/* Sovrascrive il posizionamento dello sfondo per questo range */
@media (min-width: 770px) and (max-width: 1600px) {
    .hero {
        background-position: 65% center !important; 
    }
}

/* "Hybrid" Mobile/Laptop Query (≤ 1700px) */
@media (max-width: 1700px) {
    .hero {
        background-position: 65% center;
        justify-content: center;
    }
    
    .hero__content {
        margin-left: 0;
        max-width: 70%;
    }
    
    .hero__title {
        font-size: 2.8rem;
    }
}

/* ============================================
   17. MEDIA QUERIES — TABLET (≤ 1045px)
============================================ */
@media (max-width: 1045px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero__title {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2.1rem;
    }

    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .philosophy__grid {
        gap: 40px;
    }

    .philosophy__image img {
        height: 380px;
    }

    .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials__grid .testimonials__card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* ============================================
   18. MEDIA QUERIES — MOBILE (≤ 768px)
============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    /* Navigation Mobile */
    .navbar__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--brown-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right var(--transition-base);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .navbar__menu.open {
        right: 0;
    }

    .navbar__link {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .navbar__social {
        display: none;
    }

    .navbar__hamburger {
        display: flex;
    }

    /* Overlay Mobile Menu */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero Mobile */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .hero__image {
        order: -1;
    }

    .hero__image img {
        max-height: 300px;
    }

    /* Features Mobile */
    .features__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .features__item {
        padding: 20px 15px;
    }

    .features__icon {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }

    .features__title {
        font-size: 0.95rem;
    }

    /* Philosophy Mobile */
    .philosophy__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .philosophy__image img {
        height: 280px;
    }

    .philosophy__text .section-title {
        font-size: 1.8rem;
    }

    /* Story Mobile */
    .story__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .story__image-wrapper img {
        height: 250px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* Carousel Mobile */
    .carousel__card {
        flex: 0 0 calc(100% - 20px);
    }

    .carousel__btn {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    /* Testimonials Mobile */
    .testimonials__grid {
        grid-template-columns: 1fr;
    }

    .testimonials__grid .testimonials__card:last-child {
        max-width: 100%;
    }

    /* Location Mobile */
    .location__grid {
        grid-template-columns: 1fr;
    }

    .location__map {
        min-height: 300px;
    }

    .location__map iframe {
        min-height: 300px;
    }

    /* Footer Mobile */
    .footer__main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }

    .footer__col p i {
        display: none;
    }
    /* Ottimizzazione link telefonici */
    a[href^="tel:"] {
        color: inherit; /* Mantiene il colore del testo circostante */
        text-decoration: none;
        transition: color var(--transition-base);
    }

    a[href^="tel:"]:hover {
        color: var(--gold); /* Feedback visivo al passaggio */
    }

    /* Stile specifico per il footer per risaltare su fondo scuro */
    .footer__link--tel {
        font-weight: 500;
        transition: opacity var(--transition-base);
    }

    .footer__link--tel:hover {
        opacity: 0.8;
    }
}

/* Accorgimento per Mobile: aumenta la dimensione cliccabile */
@media (max-width: 768px) {
    .location__detail a[href^="tel:"],
    .footer__link--tel {
        display: inline-block;
        padding: 5px 0; /* Facilita il tap su schermi touch */
    }
}
@media (max-width: 768px) {
    /* 1. Reset del contenitore principale per l'allineamento verticale */
    .footer__main {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px; /* Spazio uniforme tra le sezioni */
    }

    /* 2. Centratura specifica del logo */
    .footer__brand {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 0;
    }

    .footer__logo {
        height: 55px; /* Dimensione ottimizzata per mobile */
        width: auto;
        display: block;
    }

    /* 3. Ripristino dei paragrafi a tutta larghezza (1 per riga) */
    .footer__col {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer__col p {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    /* 4. Centratura icone social */
    .footer__social {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
}



/* ============================================
   19. MEDIA QUERIES — SMALL MOBILE (≤ 480px)
============================================ */
@media (max-width: 480px) {
    .hero__title {
        font-size: 1.8rem;
    }

    .hero__image img {
        max-height: 240px;
    }

    .features__grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.8rem;
    }

    .carousel__card-image {
        height: 200px;
    }
}