.csw-banner {
  position: relative;
  width: var(--csw-w-desk, 100%);
  height: var(--csw-h-desk, 100vh);
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}
.csw-banner.container{
  margin: 40px auto;
}
.csw-banner.container .item{
  border-radius: 20px;
  padding: 40px auto;
}

/* ==========================================================================
   ESTADO BASE DE LOS SLIDES
   ========================================================================== */
.csw-banner .item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.csw-banner .item.active {
  z-index: 2;
  pointer-events: auto;
}

.csw-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback de Miniatura y Precarga */
.csw-video-thumbnail-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: opacity 0.6s ease;
}
.item.active[data-video-type="local"] .csw-video-thumbnail-fallback,
.item.active[data-video-type="youtube"] .csw-video-thumbnail-fallback {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   ESTILOS DE REPRODUCTORES MULTIMEDIA
   ========================================================================== */
.csw-banner video.banner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.csw-banner .youtube-player {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.csw-banner .youtube-player iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}


/* ==========================================================================
   EFECTOS (Estructuras de Transición CSS)
   ========================================================================== */
.csw-banner.effect-fade .item { opacity: 0; transition: opacity 1.2s ease-in-out; }
.csw-banner.effect-fade .item.active { opacity: 1; }

.csw-banner.effect-zoom .item { opacity: 0; transition: opacity 1.2s ease-in-out; }
.csw-banner.effect-zoom .item.active { opacity: 1; }
.csw-banner.effect-zoom .item img, .csw-banner.effect-zoom .item video.banner-video { transform: scale(1.15); transition: transform 1.2s ease-in-out; }
.csw-banner.effect-zoom .item[data-video-type="youtube"] .youtube-player { transform: translate(-50%, -50%) scale(1.15); transition: transform 1.2s ease-in-out; }
.csw-banner.effect-zoom .item.active img, .csw-banner.effect-zoom .item.active video.banner-video { transform: scale(1); }
.csw-banner.effect-zoom .item.active[data-video-type="youtube"] .youtube-player { transform: translate(-50%, -50%) scale(1); }

.csw-banner.effect-pan-right .item { opacity: 0; transition: opacity 1.2s ease-in-out; }
.csw-banner.effect-pan-right .item.active { opacity: 1; }
.csw-banner.effect-pan-right .item img, .csw-banner.effect-pan-right .item video.banner-video { transform: scale(1.1) translateX(-2%); transition: transform 7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.csw-banner.effect-pan-right .item.active img, .csw-banner.effect-pan-right .item.active video.banner-video { transform: scale(1.1) translateX(2%); }

.csw-banner.effect-blur-fade .item { opacity: 0; filter: blur(15px); transform: scale(1.02); transition: opacity 1.2s ease-in-out, filter 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s ease-in-out; }
.csw-banner.effect-blur-fade .item.active { opacity: 1; filter: blur(0px); transform: scale(1); }
.csw-banner.effect-blur-fade .item.last-active { z-index: 1; }

.csw-banner.effect-reveal-split .item { opacity: 1; clip-path: inset(0 50% 0 50%); transition: clip-path 1.1s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1; }
.csw-banner.effect-reveal-split .item.active { clip-path: inset(0 0 0 0); z-index: 3; }
.csw-banner.effect-reveal-split .item.last-active { clip-path: inset(0 0 0 0); z-index: 2; transition: none; }

.csw-banner.effect-close-split .item { opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1; }
.csw-banner.effect-close-split .item.active { clip-path: inset(0 0 0 0); z-index: 2; }
.csw-banner.effect-close-split .item.last-active { clip-path: inset(0 50% 0 50%); z-index: 3; }

/* ==========================================================================
   INTERFAZ DE USUARIO
   ========================================================================== */
.nav button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.3); color: white; border: none; padding: 15px; cursor: pointer; z-index: 10; font-size: 1.5rem; }
.nav button:hover { background: rgba(168, 10, 96, 0.8); }
.nav .prev { left: 10px; }
.nav .next { right: 10px; }

.dots { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.5); border-radius: 50%; cursor: pointer; }
.dot.active { background: #FFC62D; transform: scale(1.2); }

/* ==========================================================================
   CAPTIONS LIBRES (Textarea_html)
   ========================================================================== */
.csw-banner figcaption.csw-custom-html-caption {
  position: absolute;
  z-index: 3;
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 30px;
  bottom: 80px;
  width: 85%;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  box-sizing: border-box;
}

.csw-banner .item.active figcaption.csw-custom-html-caption {
  animation: cswFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.35s;
}

/* Control tipográfico adaptativo del contenedor html */
.csw-custom-html-caption h1, .csw-custom-html-caption h2, .csw-custom-html-caption h3 {
  font-size: 4rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 5px;
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
.csw-custom-html-caption p {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin: 0;
  opacity: 0.95;
}
.csw-custom-html-caption p:last-child { margin-bottom: 0; }
/* ==========================================================================
   BOTONES DENTRO DE LOS CAPTIONS LIBRES
   ========================================================================== */
.csw-custom-html-caption a {
  display: inline-block;
  padding: 12px 28px;
  margin-top: 10px;
  background-color: #FFC62D; /* Dorado institucional de los dots */
  color: #000000 !important; /* Texto oscuro para legibilidad sobre el amarillo */
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none !important;
  letter-spacing: 2px;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.csw-custom-html-caption a:hover {
  background-color: #A80A60; /* Magenta/Rosa de la navegación hover */
  color: #ffffff !important; /* Cambio a blanco para contraste óptimo */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 10, 96, 0.4);
}

.csw-custom-html-caption a:active {
  transform: translateY(1px);
}

@keyframes cswFadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MEDIA QUERIES (Responsive Dinámico)
   ========================================================================== */
@media (max-width: 768px) {
  .csw-banner {
    height: var(--csw-h-mob, 80vh) !important;
    width: 90% !important;
  }
  .csw-custom-html-caption {
    width: 90% !important;
    bottom: 60px !important;
    padding: 15px !important;
  }
  .csw-custom-html-caption h1, .csw-custom-html-caption h2, .csw-custom-html-caption h3 { font-size: 1.8rem !important; }
  .csw-custom-html-caption p { font-size: 1rem !important; }
  .csw-custom-html-caption a {
    padding: 10px 22px !important;
    font-size: 0.85rem !important;
    margin-top: 5px !important;
  }
}