/* ========================================= */
/* 1. RESET E STILI BASE (GLOBAL)            */
/* ========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================= */
/* 2. GABBIA CONTENITORE (Fix Widescreen)    */
/* ========================================= */
/* Questa classe ora è GLOBALE. Tutte le pagine staranno dentro i 1200px */
.home-content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========================================= */
/* 3. TIPOGRAFIA E COLORI                    */
/* ========================================= */
h1, h2, h3 {
    color: #a9343c; /* Rosso Agriturismo */
    margin-bottom: 15px;
    font-weight: 600;
}

h1.main-title-h1 {
    text-align: center;
    font-size: 28px;
    text-transform: uppercase;
    margin: 40px 0;
    line-height: 1.3;
}

strong, .highlight-alt, .intro-bold {
    font-weight: 600 !important;
    color: #333 !important;
    font-style: normal;
}

/* ========================================= */
/* 4. BOTTONI E CTA (Fix Verticali)          */
/* ========================================= */

/* Contenitore dei bottoni */
.cta-wrapper {
    display: flex;
    flex-direction: column; /* Mobile: uno sotto l'altro */
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Stile del Bottone */
.btn-custom-action {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #a9343c;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 350px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-custom-action:hover {
    background-color: #8e2b32;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-icon-span {
    margin-right: 10px;
    font-size: 1.2em;
    line-height: 1;
}

/* ========================================= */
/* 5. RECENSIONI (STILE GLOBALE)             */
/* ========================================= */

.section-reviews {
    background-color: #fafafa; /* Sfondo leggermente grigio per stacco */
    padding: 50px 0;
    margin-top: 40px;
}

.reviews-header {
    text-align: center;
    margin-bottom: 40px;
}
.reviews-title {
    color: #a9343c;
    font-size: 2rem;
    margin-bottom: 10px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 colonna */
    gap: 30px;
}

/* LA SCHEDA (CARD) */
.review-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* L'ombra elegante */
    text-align: left;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* LE STELLE */
.review-stars {
    color: #FFD700; /* Giallo Oro */
    margin-bottom: 15px;
    font-size: 20px;
    letter-spacing: 2px;
}

/* IL TESTO */
.review-text {
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* L'AUTORE */
.review-author {
    text-align: right; /* Allineato a destra come volevi */
    font-weight: 700;
    color: #a9343c; /* Rosso Brand */
    font-size: 0.9rem;
}

.review-source {
    display: block;
    font-weight: 400;
    color: #999;
    font-size: 0.8rem;
    margin-top: 3px;
}

/* DESKTOP: 3 COLONNE */
@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ========================================= */
/* FILE: legal-pages.css                     */
/* Stile unificato per Note Legali, Privacy e Cookie Policy */
/* ========================================= */

.legal-container {
    max-width: 800px; /* Teniamo il testo stretto per renderlo leggibile */
    margin: 40px auto;
    padding: 0 20px;
}

.legal-main-title {
    color: #a9343c;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.legal-content-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

/* =========================================
   SUPER-GALLERIA (Indice Centrale)
========================================= */

.gallery-hub-container {
    max-width: 1400px; /* Molto largo per ospitare bene le 4 colonne */
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
}

/* Intestazione e Messaggio */
.gallery-main-title {
    text-align: center;
    color: #a9343c;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.gallery-welcome-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 50px auto;
    background-color: #f9f9f9;
    padding: 20px 30px;
    border-radius: 15px;
    border-left: 5px solid #a9343c;
}

.davide-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #a9343c;
    flex-shrink: 0;
}

.gallery-welcome-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* Griglia delle Card */
.gallery-grid {
    display: grid;
    /* La magia: crea colonne automatiche. Su PC saranno 4, stringendo diventano 3, poi 2, poi 1 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Stile della singola Card */
.gallery-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card-content h2 {
    font-size: 1.3rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Bottoncini (Le pillole delle sotto-gallerie) */
.sub-gallery-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sub-btn:hover {
    background-color: #a9343c;
    color: #ffffff;
}

/* Responsività per Smartphone */
@media (max-width: 768px) {
    .gallery-welcome-box {
        flex-direction: column;
        text-align: center;
    }
    .gallery-main-title {
        font-size: 2rem;
    }
}

/* =========================================
   GALLERIA APPARTAMENTI (HUB) - NUOVO!
========================================= */
.gallery-hub-title {
    text-align: center; 
    color: #a9343c; 
    margin-bottom: 15px;
}

.gallery-hub-subtitle {
    text-align: center; 
    color: #666; 
    max-width: 800px; 
    margin: 0 auto;
}

.appartamenti-grid {
    display: grid;
    gap: 25px;
    margin-top: 40px;
    /* Di base (per i cellulari): 1 colonna */
    grid-template-columns: 1fr; 
}

/* Quando lo schermo è grande come un tablet: 2 colonne */
@media (min-width: 768px) {
    .appartamenti-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Quando lo schermo è grande come un PC (Desktop): 3 colonne forzate */
@media (min-width: 1024px) {
    .appartamenti-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.app-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    background: #fff;
    display: block;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.app-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.app-card-title {
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* =========================================
   SOTTO-GALLERIE (Es. Singoli Appartamenti)
========================================= */

.subgallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
}

/* Tasto Indietro */
.back-to-gallery {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}

.back-to-gallery:hover {
    color: #a9343c;
}

/* Intestazione */
.subgallery-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.subgallery-title {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.subgallery-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

/* Bottoni di Azione */
.subgallery-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #a9343c;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #8a2930;
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e2e2e2;
}

/* Griglia Foto Mosaico */
.subgallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.sub-img-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sub-img-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sub-img-box:hover img {
    transform: scale(1.05); /* Effetto zoom elegante al passaggio del mouse */
}

/* =========================================
   STILE LIGHTBOX (Effetto Cinema a tutto schermo)
========================================= */

/* Il contenitore scuro che copre tutto (nascosto di default) */
.lightbox-modal {
  display: none; /* Nascosto */
  position: fixed; /* Rimane fisso anche se scorri */
  z-index: 9999; /* Sta sopra a TUTTO */
  padding-top: 50px; /* Spazio sopra l'immagine */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Se l'immagine è troppo alta */
  background-color: rgba(0,0,0,0.92); /* Sfondo nero molto scuro */
}

/* L'immagine vera e propria */
.lightbox-content {
  margin: auto;
  display: block;
  width: 90%;          /* Occupiamo più spazio laterale */
  max-width: 1200px;   /* Alziamo il limite per i panorami */
  max-height: 90vh;    /* Sfruttiamo di più l'altezza */
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
  animation-name: zoom;
  animation-duration: 0.4s;
}

/* Effetto zoom all'apertura */
@keyframes zoom {
  from {transform:scale(0.8); opacity: 0;}
  to {transform:scale(1); opacity: 1;}
}

/* Il pulsante di chiusura (X in alto a destra) */
.close-lightbox {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
  color: #a9343c; /* Diventa rosso al passaggio */
  text-decoration: none;
}

/* Pulsanti Avanti e Indietro */
.prev-lightbox, .next-lightbox {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next-lightbox {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev-lightbox:hover, .next-lightbox:hover {
  background-color: rgba(255,255,255,0.2);
}

/* Su cellulare riduciamo un po' i pulsanti */
@media only screen and (max-width: 700px){
  .lightbox-content {
    width: 95%;
  }
  .prev-lightbox, .next-lightbox, .close-lightbox {
      font-size: 25px;
      padding: 10px;
  }
}

/* --- RESPONSIVE DESKTOP PER TUTTI --- */
@media (min-width: 768px) {
    /* Bottoni in riga su PC */
    .cta-wrapper {
        flex-direction: row; 
        gap: 20px;
    }
    .btn-custom-action {
        width: auto;
        padding: 12px 25px;
    }
}

.legal-section-title {
    color: #333;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #a9343c;
}

.legal-block {
    margin-bottom: 30px;
}

.legal-block h3 {
    color: #a9343c;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-block p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-block strong {
    color: #333;
    font-weight: 600;
}

/* Responsive per i telefoni */
@media (max-width: 768px) {
    .legal-content-box {
        padding: 20px;
    }
    .legal-main-title {
        font-size: 1.5rem;
    }
}