/* ========================================
   SEZIONE HERO PROGETTO
   ======================================== */
.hero-progetto {
  background-color: var(--bs-primary);
  min-height: 500px;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 50px;
}

.titolo-label {
  font-weight: 500 !important;
}

/* Title */
.hero-progetto .h1-hero {
  text-transform: uppercase !important;
  font-size: clamp(3.5rem, 10vw, 90px) !important;
  color: white !important;
  font-weight: 300 !important;
}

/* Year - allineato in basso */
.hero-progetto-year {
  display: inline-block;
  color: #ffffff;
  padding-bottom: 0.25rem;
}

/* Info Wrapper */
.hero-progetto-info-wrapper {
  border-top: 1px solid white;
  margin-top: 7rem;
  position: relative;
  min-height: 170px !important;
}

.hero-progetto-info-col {
  position: relative;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-progetto-info-col:first-child {
  padding-left: 0;
}

.hero-progetto-info-col:last-child {
  padding-right: 0;
}

/* Rimuoviamo il vecchio selettore ::after per pulizia */
.hero-progetto-info-col::after {
  display: none !important;
}

/* Linee divisorie verticali */
.hero-progetto-info-col + .hero-progetto-info-col::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: white;
  display: block;
}



/* Info Label and Value */
.hero-progetto-info-label {
  color: #ffffff;
  margin-bottom: 0.625rem;
  text-transform: capitalize;
}

.hero-progetto-info-value {
  color: #ffffff;
  line-height: 1.5;
}

.hero-progetto-info-item {
  padding-top: 3rem;
}

/* Responsive Hero */
@media (max-width: 991.98px) {
  .hero-progetto {
    padding-bottom: 50px !important;
    min-height: max-content !important;
  }

  .hero-progetto .h1-hero {
    font-size: clamp(2.75rem, 8vw, 70px) !important;
  }

  .hero-progetto-year {
    margin-top: 1rem;
    padding-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  /* Rimuove le linee su mobile */
  .hero-progetto-info-col + .hero-progetto-info-col::before {
    display: none !important;
  }
  
  .hero-progetto-info-col {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero-progetto .h1-hero {
    font-size: clamp(2.75rem, 8vw, 50px) !important;
    margin-bottom: 1rem !important;
  }

  .hero-progetto-info-wrapper {
    margin-top: 3rem;
  }
}

@media (max-width: 575.98px) {
  .hero-progetto {
    padding: 20px 0;
  }

  .hero-progetto .h1-hero {
    font-size: clamp(1.75rem, 10vw, 40px) !important;
  }
}

/* ========================================
   SEZIONE IMMAGINE E TESTO CENTRALI
   ======================================== */
.sezione-immagine-testo {
  padding: 80px 0;
}

.sezione-immagine-testo .row.align-items-center {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.immagine-testo-wrapper img {
  min-width: 440px;
  min-height: 600px;
  display: block;
  object-fit: cover;
}

.testo-testo-wrapper {
  padding-left: 3rem;
}

/* Responsive Immagine Testo */
@media (max-width: 991.98px) {
  .sezione-immagine-testo {
    padding: 40px 0;
  }

  .sezione-immagine-testo .row.align-items-center {
    max-width: 100%;
  }

  .testo-testo-wrapper {
    padding: 0 !important;
  }

  .immagine-testo-wrapper img {
    min-width: 220px;
    min-height: 380px;
    display: block;
    object-fit: cover;
  }
}

/* ========================================
   SEZIONE MOSAICO IMMAGINI (FIX SPAZIO BIANCO & LIGHTBOX)
   ======================================== */

.mosaico-container {
  display: flex;
  gap: 0 !important;
  width: 100%;
  height: fit-content; 
  min-height: auto; /* ✅ FIX: Auto per adattarsi perfettamente al contenuto VH */
}

/* Spazio tra i gruppi */
.mosaico-container + .mosaico-container {
  margin-top: 0; /* ✅ Nessun margine tra i blocchi */
  min-height: auto;
}

.mosaico-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.mosaico-card {
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
  position: relative;
}

.mosaico-card img {
  transition: transform 0.3s ease;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

/* ✅ Stile per il link Lightbox */
.mosaico-card a.glightbox {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

/* Responsive Mosaico */
@media (max-width: 768px) {
  .mosaico-container {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }

  .mosaico-column {
    height: auto;
  }

  .mosaico-card {
    height: 300px !important;
  }
}

/* Tablet - Rimosse altezze fisse */
@media (min-width: 769px) and (max-width: 1024px) {
  .mosaico-container {
    min-height: auto !important;
  }

  .mosaico-container + .mosaico-container {
    min-height: auto;
  }
}

/* Desktop Medio - Rimosse altezze fisse */
@media (min-width: 1025px) and (max-width: 1440px) {
  .mosaico-container {
    min-height: auto !important;
  }

  .mosaico-container + .mosaico-container {
    min-height: auto;
  }
}

/* Desktop Grande - Rimosse altezze fisse */
@media (min-width: 1441px) {
  .mosaico-container {
    min-height: auto !important;
  }

  .mosaico-container + .mosaico-container {
    min-height: auto;
  }
}

/* ========================================
   SEZIONE TESTO E CAROSELLO
   ======================================== */
.sezione-testo-carosello {
  padding: 80px 0;
}

/* SLIDER 3 IMMAGINI VISIBILI */
.slider-container-wrapper {
  width: 100%;
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
}

.slider-viewport {
  overflow: visible;
  width: 100%;
}

.slider-track-flex {
  display: flex;
  gap: 2.5rem;
  cursor: grab;
  user-select: none;
  will-change: transform;
}

.slider-track-flex:active {
  cursor: grabbing;
}

.slider-slide {
  flex: 0 0 calc(33.333% - 1.666rem);
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(0.9);
  opacity: 0.7;
  transform-origin: center center;
  will-change: transform, opacity;
}

/* Immagini container */
.slider-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: none;
}

/* Slide attiva */
.slider-slide.active .slider-image-container {
  box-shadow: none;
}

.slider-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* FRECCE CAROSELLO */
/* QUADRATO (sfondo) - versione prev capovolta */
.cta-link.prev::before {
  content: "";
  position: absolute;
  left: 20px; 
  top: 50%;
  transform: translateY(-50%) scale(1);
  transform-origin: left center;
  width: 22px;
  height: 22px;
  background-color: var(--bs-secondary);
  border-radius: 0;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.35s ease;
}

/* FRECCIA - versione prev capovolta */
.cta-link.prev::after {
  content: "➝";
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  z-index: 2;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

/* Hover per prev */
.cta-link.prev:hover::before {
  transform: translateY(-50%) scale(1.5);
}

.cta-link.prev:hover::after {
  transform: translateY(-50%) translateX(-4px) rotate(180deg);
}

/* Responsive Slider */
@media (max-width: 1200px) {
  .slider-slide {
    flex: 0 0 calc(40% - 1.25rem);
  }

  .slider-track-flex {
    gap: 2rem;
  }
}

@media (max-width: 991.98px) {
  .slider-container-wrapper {
    padding: 3rem 0;
  }

  .slider-slide {
    flex: 0 0 calc(50% - 1rem);
  }

  .slider-track-flex {
    gap: 2rem;
  }

  .slider-image-container {
    border-radius: 14px;
  }
}

@media (max-width: 767.98px) {
  .slider-container-wrapper {
    padding: 2rem 0;
  }

  .slider-slide {
    flex: 0 0 calc(70%);
  }

  .slider-track-flex {
    gap: 1.5rem;
  }

  .slider-image-container {
    border-radius: 12px;
  }
}

/* ========================================
   SEZIONE COLLABORA
   ======================================== */
.cta-section {
  width: 100%;
  border-left: none !important;
  border-right: none !important;
}

.cta-container {
  width: 100%;
  padding: 0;
}

/* CTA attaccati tra loro */
.contenitore-interno {
  border: 1px solid var(--bs-neutral);
}
.cta-section .d-flex {
  gap: 0 !important;
}

.contenitore-interno .cta-primary {
  border-right: none !important;
}

/* Responsive CTA */
@media (max-width: 768px) {
  .cta-section {
    padding: 15px 0;
  }

  .cta-section .d-flex {
    flex-direction: column;
    align-items: stretch;
  }
}