/* cwhero.css — cwsport theme */

/* ── Variables ── */
.cwhero {
  --cwhero-h-desktop: 560px;
  --cwhero-h-mobile: 380px;
  --cwhero-accent: #E53E3E;
  --cwhero-transition: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Container ── */
.cwhero {
  position: relative;
  width: 100%;
  height: var(--cwhero-h-mobile);
  overflow: hidden;
  background: #111;
}

@media (min-width: 768px) {
  .cwhero {
    height: var(--cwhero-h-desktop);
  }
}

/* ── Track ── */
.cwhero__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── Slide ── */
.cwhero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--cwhero-transition);
  cursor: default;
}

.cwhero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.cwhero__slide.is-leaving {
  opacity: 0;
  z-index: 2;
}

/* Clickable slide */
.cwhero__slide[data-link] {
  cursor: pointer;
}

/* ── Background image ── */
.cwhero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.cwhero__slide.is-active .cwhero__bg {
  transform: scale(1);
}

/* ── Video background ── */
.cwhero__video {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Vídeo móvil — solo en móvil */
.cwhero__video-mobile {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* Vídeo desktop — oculto en móvil */
.cwhero__video-desktop {
  display: none;
  position: absolute;
  inset: 0;
}

@media (max-width: 991px) {
  .cwhero__video-mobile {
    display: block;
  }
  /* Si hay vídeo móvil, ocultar imagen de fondo */
  .cwhero__slide:has(.cwhero__video-mobile) .cwhero__bg {
    display: none;
  }
}

@media (min-width: 992px) {
  .cwhero__video-desktop {
    display: block;
  }
}

.cwhero__video-desktop iframe,
.cwhero__video-desktop video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: 177.78vh;
  height: 56.25vw;
}

/* ── Overlay ── */
.cwhero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 100%
  );
  z-index: 2;
}

/* ── Content / CTA ── */
.cwhero__content {
  position: absolute;
  bottom: 36px;
  left: 28px;
  z-index: 3;
}

@media (min-width: 768px) {
  .cwhero__content {
    bottom: 52px;
    left: 60px;
  }
}

.cwhero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cwhero__cta:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: #111;
  text-decoration: none !important;
}

.cwhero__cta .material-icons {
  font-size: 18px;
  transition: transform 0.2s;
}

.cwhero__cta:hover .material-icons {
  transform: translateX(3px);
}

/* ── Dots ── */
.cwhero__dots {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 10;
  display: flex;
  gap: 6px;
  align-items: center;
}

.cwhero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s;
}

.cwhero__dot:hover {
  background: rgba(255, 255, 255, 0.65);
}

.cwhero__dot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 3px;
}

/* ── Arrows ── */
.cwhero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: none; /* hidden on mobile */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}

@media (min-width: 768px) {
  .cwhero__arrow {
    display: flex;
  }
}

.cwhero__arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cwhero__arrow--prev {
  left: 16px;
}

.cwhero__arrow--next {
  right: 16px;
}

.cwhero__arrow .material-icons {
  font-size: 26px;
}

/* ── Accent color bar (bottom of active slide) ── */
.cwhero__slide.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cwhero-accent);
  z-index: 5;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .cwhero__bg { transition: none; transform: none !important; }
  .cwhero__slide { transition: none; }
}
