/* -------------------------
   GALLERY SPECIFICO
------------------------- */

/* Hero ridotto per la gallery */
.hero-slider.small-hero {
    height: 60vh; /* più basso della hero classica */
    background: url('../images/gallery/hero_bg.webp') center/cover no-repeat;
  }
  .hero-slider.small-hero::before {
    background: rgba(0,0,0,0.5);
  }
  
  /* Contenitore pagina gallery */
  .gallery-page .container {
    margin-top: 10px; /* per compensare l’header fisso */
  }
  
  .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 600px;
    color: #fff;
    padding: 0 20px;
    z-index: 2;
}
.hero-content .hero-logo {
    max-width: none;
    margin: 0 auto 20px;
    filter: saturate(1.3) brightness(1.1);
    transition: filter 0.3s ease;
    margin-top: 80px;
}
.hero-content .hero-logo:hover {
    filter: saturate(1.5) brightness(1.2);
}


  /* Sezione introduttiva */
  .gallery-intro {
    text-align: center;
    margin-bottom: 2px;
  }
  .gallery-intro h2 {
    margin-bottom: 2px;
    font-size: 3rem;
  }
  
  /* Righe della gallery */
  .gallery-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2px;
  }
  
  /* Box generico in cui mettiamo le foto */
  .gallery-box {
    background-color: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
  }
  
  /* Vari layout .big, .triple, .quad, .big-wide, etc. 
     Assegna larghezze e regole di base.
  */
  .big {
    flex: 1 1 100%;
  }
  .triple {
    flex: 1 1 100%;
    justify-content: space-around;
  }
  .triple img {
    width: 32%; /* 3 immagini, un piccolo gap */
  }
  .quad {
    flex: 1 1 100%;
  }
  .quad img {
    width: calc(25% - 10px); /* 4 immagini */
    margin: 5px;
  }
  .big-wide {
    flex: 2 1 60%;
  }
  .big-wide img {
    width: 100%;
  }
  .two-small {
    flex: 1 1 40%;
  }
  .two-small img {
    width: 100%;
    margin-bottom: 10px;
  }
  .half {
    flex: 1 1 50%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .half img {
    width: 100%;
  }
  
  /* Immagine comune nel box */
  .gallery-item {
    display: block;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  /* Sezione finale (newsletter) */
  .gallery-extra {
    text-align: center;
    margin: 60px 0;
  }
  .newsletter-form {
    margin-top: 20px;
    display: inline-flex;
    gap: 10px;
  }
  .newsletter-form input[type="email"] {
    padding: 10px;
    border-radius: 9999px;
    border: 1px solid #ccc;
  }
  .newsletter-form button {
    padding: 10px 20px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
  }
  
  /* LIGHTBOX / MODAL */
  .lightbox-modal {
    display: none; /* nascosta di default */
    position: fixed;
    z-index: 1000;
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
  }
  .lightbox-modal .modal-close {
    position: absolute;
    top: 30px; 
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
  }
  .lightbox-modal .modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    border-radius: 5px;
  }
  
  /* Responsive layout per la gallery */
  @media (max-width: 992px) {
    .triple img { width: 31%; }
    .quad img { width: calc(50% - 10px); }
    .two-small, .big-wide { flex: 1 1 100%; }
    .gallery-row { flex-direction: column; }
  }
  
  @media (max-width: 576px) {
    .triple img, .quad img {
      width: 100%;
      margin: 0 0 10px 0;
    }
    .gallery-extra { margin: 40px 0; }
    .newsletter-form {
      flex-direction: column;
      gap: 10px;
    }
  }
  
  /* FEATURED BOXES */
.featured-boxes {
    padding: 10px 0;
    background-color: #f8f7f7;
}

.box-wrap {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.box {
    position: relative;
    display: block;
    flex: 1 1 300px;
    aspect-ratio: 1;        /* Mantiene un formato quadrato */
    text-decoration: none;
    overflow: hidden;
    border-radius: 5px;
}

/* Sfondo immagine dietro al contenuto */
.box::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
    z-index: 0;
}
/* Overlay semitrasparente */
.box::after {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(255,255,255,0);
    transition: background 0.3s ease;
    z-index: 1;
}

.box .box-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    color: #fff;   
    transition: transform 0.3s ease;
}
/* Titolo dentro la box */
.box .box-content h3 {
    font-family: "stilson", serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}
/* Testo dentro la box */
.box .box-content p {
    font-family: "montserrat", sans-serif;
    font-size: 1rem;
}

/* Effetti hover: leggera rotazione/zoom e overlay */
.box:hover::before {
    transform: rotate(1deg) scale(1.05);
}
.box:hover::after {
    background: rgba(255,255,255,0.2);
}
.box:hover .box-content {
    transform: scale(1.15);
}

/* Sfondi diversi per ogni box */
.box-1::before { 
    background-image: url('../images/gallery/img1.webp'); 
}
.box-2::before { 
    background-image: url('../images/gallery/img5.webp'); 
}
.box-3::before { 
    background-image: url('../images/gallery/img4.webp'); 
}

/* BOTTONI */
.btn,
.btn-primary {
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: 9999px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}
.btn {
    background-color: #000;
    color: #f8f7f7;
}
.btn-primary {
    background-color: #d61116;
    color: #f8f7f7;
}
.btn:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
.btn:hover {
    background-color: #333;
}
.btn-primary:hover {
    background-color: #ba1818;
}

.separator-line {
  width: 320px;
  height: 2px;
  background-color: #000;
  margin: 40px auto;
  position: relative;
}

.separator-line::before {
  content: "•";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: #000;
}
