/**
 * umivale/carousel-html — mismo sistema visual y mecanismo de rotación que
 * umivale/carousel (blocks/carousel/style.css), pero con contenido de texto
 * libre en vez de título/subtítulo/botón estructurados.
 */

.uv-carousel {
  position: relative;
  overflow: hidden;
}

.uv-carousel--azul {
  background-image: url('./assets/bg-blue-banners.png');
  background-size: cover;
  background-position: center;
}
.uv-carousel--naranja {
  background: linear-gradient(135deg, #FF9A3D 0%, var(--uv-naranja) 45%, #C94E00 100%);
}
.uv-carousel--neutra {
  background: linear-gradient(135deg, #55677d 0%, #3C4858 55%, #29323e 100%);
}

.uv-carousel__track {
  position: relative;
  min-height: 260px;
}

.uv-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
}
.uv-carousel__slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.uv-carousel__inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) {
  .uv-carousel__inner { flex-direction: row; padding: 2.5rem; }
}

/* Contenido HTML libre: hereda blanco/Lato por defecto, el editor puede
   sobreescribir con estilos inline si hace falta un color puntual (mismo
   criterio que uv_clean_inline_content() del pipeline de fichas: no forzar
   !important sobre estilos que el propio HTML declare). */
.uv-carousel-html__content {
  flex: 1 1 0%;
  color: var(--uv-blanco);
  font-family: var(--wp--preset--font-family--lato, 'Lato', sans-serif);
}
.uv-carousel-html__content p { margin: 0 0 0.75rem; font-size: var(--uv-parrafo-s); font-weight: 300; line-height: var(--uv-parrafo-s-line-height); }
.uv-carousel-html__content p:last-child { margin-bottom: 0; }
.uv-carousel-html__content h1,
.uv-carousel-html__content h2,
.uv-carousel-html__content h3 { margin: 0 0 0.75rem; font-size: var(--uv-titulo-xl); font-weight: var(--uv-peso-bold); line-height: var(--uv-titulo-xl-line-height); }
.uv-carousel-html__content strong { font-weight: 700; }
.uv-carousel-html__content a:not([class]) { color: var(--uv-blanco); text-decoration: underline; }
.uv-carousel-html__content--start { text-align: left; }
.uv-carousel-html__content--center { text-align: center; }
.uv-carousel-html__content--end { text-align: right; }

.uv-carousel-html__link { display: contents; color: inherit; text-decoration: none; }

.uv-carousel__media {
  width: 100%;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .uv-carousel__media { width: 33.3333%; }
}
.uv-carousel__img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: 200px;
  object-fit: cover;
  border-radius: 0.75rem;
}

.uv-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: color-mix(in srgb, var(--uv-blanco) 25%, transparent);
  color: var(--uv-blanco);
  cursor: pointer;
  transition: background 0.15s ease;
}
.uv-carousel__arrow:hover { background: color-mix(in srgb, var(--uv-blanco) 40%, transparent); }
.uv-carousel__arrow--prev { left: 12px; }
.uv-carousel__arrow--next { right: 12px; }

.uv-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.uv-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: color-mix(in srgb, var(--uv-blanco) 45%, transparent);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.uv-carousel__dot.is-active {
  background: var(--uv-blanco);
  transform: scale(1.2);
}

@media (max-width: 767px) {
  .uv-carousel__track { min-height: 420px; }
  .uv-carousel-html__content { text-align: center; }
  .uv-carousel__arrow { width: 32px; height: 32px; }
}
