.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.7s ease;
}

.carousel-slide {
  min-width: 100%;
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots .dot.active {
  background: #333;
}

/* desktop: muestra la imagen grande, oculta la mobile */
.img-text-cel { display: none; }

/* mobile: oculta la grande, muestra la chica */
@media (max-width: 768px) {
  .img-text     { display: none; }
  .img-text-cel { display: block; }
}

/* --- Slide wrapper y caption --- */

.slide-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Desktop: altura fija, imagen cubre sin deformarse */
.slide-wrapper .img-text {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Mobile: oculta por defecto, se activa en el breakpoint */
.slide-wrapper .img-text-cel {
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.4;
  box-sizing: border-box;
}

/* Mobile */
@media (max-width: 980px) {
  .slide-wrapper .img-text {
    display: none;
  }

  .slide-wrapper .img-text-cel {
    display: block;
    width: 100%;
    height: 100vh;    /* fallback */
    height: 100dvh;   /* navegadores modernos */
    object-fit: cover;
    object-position: center;
  }

  .carousel-slide {
    height: 100vh;    /* fallback */
    height: 100dvh;
  }

  .slide-wrapper {
    height: 100vh;    /* fallback */
    height: 100dvh;
  }

  .slide-caption {
    font-size: 0.75rem;
    padding: 8px 12px;
  }
}


