/* Estilos para la sección Antes y Después */
.before-after-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
}

.before-after-div {
  max-width: 1200px;
  margin: 0 auto;
}

.before-after-title {
  display: flex;
  align-items: center;
  max-width: 100%;
  justify-content: center;
  gap: 1rem;
}

.before-after-title hr {
  background-color: #ff6b6b;
  border-radius: 0.5rem;
  width: 20%;
  border-color: #ff6b6b;
  height: 4px;
}

.before-after-title h2 {
  font-size: 3rem;
  color: #ff6b6b;
  font-weight: bold;
  text-align: center;
  margin: 0;
}

.before-after-slider-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Contenedor principal del slide */
.before-after-container {
  display: flex;
  gap: 30px;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}

/* Sección de imágenes (izquierda) */
.before-after-images {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
}

.before-after-images img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Si hay una sola imagen, que ocupe todo el espacio */
.before-after-images img:only-child {
  max-height: 700px;
}

/* Si hay dos imágenes */
.before-after-images img:first-child:not(:only-child),
.before-after-images img:last-child:not(:only-child) {
  max-height: 300px;
}

/* Sección de texto (derecha) */
.before-after-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6rem;
}

.text-section {
  padding: 20px;
  background: #f8f8f8;
  border-radius: 10px;
  border-left: 4px solid #ff6b6b;
}

.text-section.after-section {
  border-left: 4px solid #4ecdc4;
}

.text-section h3 {
  font-size: 1.3rem;
  color: #ff6b6b;
  margin: 0 0 10px 0;
  font-weight: bold;
}

.text-section.after-section h3 {
  color: #4ecdc4;
}

.text-section p {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: 1rem;
}

/* Estilos para las flechas del slider */
.before-after-splide .splide__arrow {
  background: #ff6b6b;
  opacity: 0.9;
  width: 3rem;
  height: 3rem;
}

.before-after-splide .splide__arrow:hover {
  opacity: 1;
  background: #ff5252;
}

.before-after-splide .splide__arrow svg {
  fill: white;
}

/* Estilos para la paginación */
.before-after-splide .splide__pagination__page {
  background: #ddd;
}

.before-after-splide .splide__pagination__page.is-active {
  background: #ff6b6b;
}

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

  .before-after-images,
  .before-after-text {
    flex: none;
  }

  .before-after-images img:first-child:not(:only-child),
  .before-after-images img:last-child:not(:only-child) {
    max-height: 250px;
  }

  .before-after-title h2 {
    font-size: 1.5rem;
  }

  .text-section h3 {
    font-size: 1.1rem;
  }

  .text-section p {
    font-size: 0.9rem;
  }
}

@media (max-width: 425px) {
  .before-after-section {
    padding: 40px 15px;
  }

  .before-after-container {
    padding: 15px;
  }

  .text-section {
    padding: 15px;
  }
}
