/**
 * @file
 * Sección de videos: bloque del home (below planes) y página /videos.
 */

.whv-section {
  background: #f6f8fb;
}

.whv-header {
  max-width: 720px;
}

.whv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(53, 137, 161, 0.12);
  border: 1px solid rgba(53, 137, 161, 0.35);
  color: #1d3557;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.whv-title {
  color: #1d3557;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.whv-text {
  color: #5b6b80;
  font-size: 1.05rem;
  line-height: 1.75;
}

.whv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.whv-card {
  background: #fff;
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(29, 53, 87, 0.14);
}

.whv-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a1628;
}

.whv-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.whv-card__body {
  padding: 1.1rem 1.25rem 1.35rem;
}

.whv-card__title {
  margin: 0;
  color: #1d3557;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.whv-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.whv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.whv-btn--primary {
  background: #1d3557;
  color: #fff;
  border: 1px solid #1d3557;
}

.whv-btn--primary:hover {
  background: #3589a1;
  border-color: #3589a1;
  color: #fff;
}

.whv-btn--ghost {
  background: transparent;
  color: #1d3557;
  border: 1px solid rgba(29, 53, 87, 0.35);
}

.whv-btn--ghost:hover {
  background: rgba(29, 53, 87, 0.06);
  color: #1d3557;
}

@media (max-width: 575.98px) {
  .whv-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ---------------------------------------------------------------------------
 * Página /videos: reproductor + lista.
 * ------------------------------------------------------------------------ */

.whv-page {
  padding: 1rem 0 3rem;
}

.whv-hero {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.whv-hero .whv-title {
  font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem);
}

.whv-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.whv-stage__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #0a1628;
  box-shadow: 0 18px 46px rgba(29, 53, 87, 0.18);
}

.whv-stage__frame iframe,
.whv-stage__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.whv-stage__title {
  margin: 1.1rem 0 0;
  color: #1d3557;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
}

/* Botón de reproducción sobre la miniatura. */
.whv-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.1) 0%, rgba(10, 22, 40, 0.55) 100%);
  transition: background-color 0.25s ease;
}

.whv-play:hover {
  background: rgba(10, 22, 40, 0.45);
}

.whv-play__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #e5332a;
  color: #fff;
  font-size: 1.6rem;
  padding-left: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.whv-play:hover .whv-play__icon,
.whv-play:focus-visible .whv-play__icon {
  transform: scale(1.08);
  background: #ff0000;
}

.whv-play:focus-visible {
  outline: 3px solid #3589a1;
  outline-offset: -3px;
}

/* Lista lateral de videos. */
.whv-playlist {
  background: #fff;
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
  overflow: hidden;
}

.whv-playlist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(29, 53, 87, 0.1);
  color: #1d3557;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.whv-playlist__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(53, 137, 161, 0.14);
  color: #1d3557;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.whv-playlist__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  max-height: 460px;
  overflow-y: auto;
}

.whv-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.55rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.whv-item:hover {
  background: rgba(29, 53, 87, 0.06);
}

.whv-item.is-active {
  background: rgba(53, 137, 161, 0.12);
}

.whv-item__thumb {
  position: relative;
  flex: 0 0 116px;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  overflow: hidden;
  background: #0a1628;
}

.whv-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.whv-item__badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  background: rgba(10, 22, 40, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.whv-item:hover .whv-item__badge,
.whv-item.is-active .whv-item__badge {
  opacity: 1;
}

.whv-item__title {
  color: #1d3557;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.whv-item.is-active .whv-item__title {
  font-weight: 800;
}

/* Cierre de la página: llamado a la acción. */
.whv-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem 2.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #0a1628 0%, #1d3557 55%, #1a4a7a 100%);
}

.whv-cta__title {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
}

.whv-cta__sub {
  color: rgba(255, 255, 255, 0.75);
}

.whv-cta .whv-btn--primary {
  background: #fff;
  border-color: #fff;
  color: #1d3557;
}

.whv-cta .whv-btn--primary:hover {
  background: #3589a1;
  border-color: #3589a1;
  color: #fff;
}

.whv-cta .whv-btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.whv-cta .whv-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 991.98px) {
  .whv-layout {
    grid-template-columns: 1fr;
  }

  .whv-playlist__list {
    max-height: none;
  }
}

@media (max-width: 575.98px) {
  .whv-play__icon {
    width: 62px;
    height: 62px;
    font-size: 1.2rem;
  }

  .whv-cta {
    padding: 1.5rem;
    text-align: center;
    justify-content: center;
  }

  .whv-cta .whv-actions {
    width: 100%;
  }
}

/* Columna derecha: lista + tarjeta del canal. */
.whv-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.5rem;
}

.whv-channel {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
  color: #1d3557;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whv-channel:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(29, 53, 87, 0.14);
  color: #1d3557;
}

.whv-channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: #e5332a;
  color: #fff;
  font-size: 1.15rem;
}

.whv-channel__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  margin-right: auto;
}

.whv-channel__text small {
  color: #5b6b80;
}

.whv-channel__arrow {
  color: #3589a1;
  transition: transform 0.2s ease;
}

.whv-channel:hover .whv-channel__arrow {
  transform: translateX(3px);
}

@media (max-width: 991.98px) {
  .whv-side {
    position: static;
  }
}

/* Botón de play más pequeño dentro de las tarjetas de la grilla. */
.whv-card .whv-play__icon {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

/* Bloque de videos dentro de la página /planes. */
.wpl-videos {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(29, 53, 87, 0.12);
}

.wpl-videos .whv-title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
}

/* El tema pinta todos los enlaces de /planes con el azul de marca
   (.path-planes .pagina-planes .page-content a), lo que dejaba el botón
   azul sobre azul. Se recupera el texto blanco con mayor especificidad. */
.wpl-page .wpl-videos .whv-btn.whv-btn--primary,
.wpl-page .wpl-videos .whv-btn.whv-btn--primary:hover {
  color: #fff;
}
