/* --- Struttura Generale --- */
.treatment {
  padding: 0 20px;
  display: flex;
  gap: 40px;
  margin-bottom: 5em;
}

.treatment.reverse {
  flex-direction: row-reverse;
}

.treatment.reverse .treatment-content {
  align-items: flex-end;
  text-align: right;
}

/* --- Media (Immagini e Video) --- */
.treatment-media {
  max-width: 50%;
  height: 500px;
}

.treatment-media.full-width {
  max-width: 100%;
  margin-bottom: 5em;
  padding: 0 20px;
  position: relative;
}

.play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.treatment-media img,
.treatment-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* --- Contenuto Testuale (Ottimizzato) --- */
.treatment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.6; /* Migliora la leggibilità generale */
}

.treatment-content h2 {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 20px;
}

/* Sottotitoli per le sezioni interne */
.treatment-content h3 {
  font-size: 20px;
  color: var(--color-primary);
  margin-top: 25px; /* Crea distacco dal paragrafo precedente */
  margin-bottom: 15px;
}

.treatment-content p {
  font-size: 1em;
  margin-bottom: 15px;
  color: var(--color-text);
}

/* Gestione Liste Semantiche */
.treatment-content ul {
  list-style-type: none; /* Rimuoviamo i pallini standard */
  padding: 0;
  margin-bottom: 20px;
  width: 100%; /* Assicura che occupi lo spazio necessario per l'allineamento */
}

.treatment-content ul li {
  font-size: 1em;
  margin-bottom: 10px;
  color: var(--color-text);
}

/* Gestione icone/emoji nelle liste */
.treatment-content ul li::before {
  content: "✨"; /* Usa un'emoji fissa o lascia quella nell'HTML */
  margin-right: 10px;
}

/* Allineamento icone quando la sezione è reversed (a destra) */
.treatment.reverse .treatment-content ul li {
  flex-direction: row-reverse;
  text-align: right;
}

.treatment.reverse .treatment-content ul li::before {
  margin-right: 0;
  margin-left: 10px;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
}

.lightbox.show {
  display: flex;
}

.lightbox video {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  cursor: pointer;
}

/* --- Swiper --- */
.mainSwiper, .lightboxSwiper {
  width: 100%;
  height: 500px;
}

.mainSwiper .swiper-slide img,
.mainSwiper .swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightboxSwiper {
  width: 80%;
  height: 80%;
}

.lightboxSwiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightboxSwiper img {
  width: 100%;
}

.lightboxSwiper img,
.lightboxSwiper video {
  height: 100%;
  object-fit: contain;
}

/* --- Responsive --- */
@media (max-width: 678px) {
  .treatment, .treatment.reverse {
    flex-direction: column;
  }

  .treatment.reverse .treatment-content {
    align-items: flex-start;
    text-align: left;
  }

  .treatment.reverse .treatment-content ul li {
    flex-direction: row;
    text-align: left;
  }

  .treatment.reverse .treatment-content ul li::before {
    margin-right: 10px;
    margin-left: 0;
  }

  .treatment-media {
    max-width: 100%;
    order: 2;
  }

  .treatment-media img {
    max-width: 100%;
  }

  .treatment-media video {
    max-width: 100%;
  }

  .treatment-content h2 {
    font-size: 28px;
  }
}