/* Carousel component */
.carousel {
  position: relative;
  overflow: hidden;
  background: #0b1220;
  color: #fff;
}

.carousel__viewport {
  width: 100%;
}

.carousel__track {
  display: flex;
  transition: transform .45s ease;
  will-change: transform;
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

.carousel__slide {
  position: relative;
  min-width: 100%;
  height: clamp(336px, 50.4vw, 624px);
  isolation: isolate;
}

.carousel__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.75);
  z-index: 0;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
}

.carousel__caption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  max-width: var(--container, 1120px);
  margin: 0 auto;
  height: 100%;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.carousel__caption h2 {
  margin: 0;
  font-size: clamp(42px, 7.5vw, 66px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.carousel__caption p {
  margin: 0 0 8px 0;
  color: #e2e8f0;
  font-size: clamp(14px, 2.2vw, 18px);
}

/* Sutil resplandor negro para mejorar legibilidad sobre fondos claros */
.carousel__caption h2,
.carousel__caption p {
  text-shadow: 0 2px 4px rgba(0,0,0,.45), 0 6px 14px rgba(0,0,0,.35);
}

.carousel__ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.carousel__prev { left: 12px; }
.carousel__next { right: 12px; }

.carousel__dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  gap: 6px;
  justify-content: center;
}


.carousel__dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: width .2s ease, background-color .2s ease;
}
.carousel__dot[aria-selected="true"] {
  background: var(--secondary, #22D3EE);
  width: 32px; /* 4x del ancho base */
  height: 8px;
}

@media (max-width: 932px) {
  .carousel__caption { padding: 18px 16px; }
  /* Botón móvil: mismo tamaño y más discreto */
  .carousel__caption .btn {
    font-size: 14px;
    padding: 10px 14px;
    width: 40vw; /* 40% del ancho de pantalla */
    justify-content: center;
    min-width: 40vW;
  }
}
