/**
 * Estilos para el componente de Entrevista con Video de YouTube
 * Compatible con Bootstrap 5 y Drupal 10
 */

/* Contenedor principal */
.entrevista-container {
  background-color: #ffffff;
  padding: 2rem 1rem;
}

/* Banners superiores */
.banners {
  margin-bottom: 2rem;
}

/* El bloque renderizado agrega wrappers (.field, .field__item) que rompen el grid.
   Forzamos display:contents para que los col-md-6 internos sean hijos directos del row. */
.banners > * {
  display: contents;
}
.banners .field,
.banners .field__item {
  display: contents;
}

/* BS3 col-xs-* no existe en BS5; display:contents rompe .row > * gutter.
   Restauramos el padding que tenían en D7 (Bootstrap 3). */
.banners [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

.banner {
  /*overflow: hidden;*/
}

.banners .banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.375rem;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.banners .banner img:hover {
  transform: scale(1.02);
}

/* Título de la entrevista (hardcoded — legacy) */
.entrevista-title {
  color: var(--rtvc-blue);
  font-size: 2.125rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
  line-height: 1.4;
}

/* Contenido de entrevista desde bloque editable (block_content id=33) */
.entrevista-contenido {
  max-width: 90%;
  margin: 0 auto 60px;
}
.entrevista-contenido .block-title,
.entrevista-contenido h2 {
  color: var(--rtvc-blue);
  font-size: 2.125rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
  line-height: 1.4;
}
.entrevista-contenido iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
}
.entrevista-contenido .field,
.entrevista-contenido .field__item {
  display: contents;
}

/* Contenedor del video */
.video-wrapper {
  max-width: 90%;
  margin: 0 auto 2rem;
}

.video-link {
  text-decoration: none;
  display: block;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  height: 0;
  overflow: hidden;
  background: #000000;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

.video-container:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

/* Thumbnail del video */
.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay del video */
.youtube-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  z-index: 10;
}

.video-container:hover .youtube-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Ícono de YouTube */
.youtube-icon {
  width: 7.5rem;
  height: 5.25rem;
  background-color: #FF0000;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.4);
  position: relative;
}

/* Triángulo de play */
.youtube-icon::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 1.125rem 0 1.125rem 1.875rem;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 0.375rem;
}

.video-container:hover .youtube-icon {
  transform: scale(1.1);
  box-shadow: 0 0.375rem 1.875rem rgba(255, 0, 0, 0.5);
}

/* Contenido adicional */
.entrevista-body {
  margin-top: 2rem;
  padding: 0 1rem;
  line-height: 1.7;
}

.entrevista-content {
  margin-top: 1.5rem;
}

/* Responsive - Tablets */
@media (max-width: 991px) {
  .entrevista-title {
    font-size: 1.5rem;
  }

  .youtube-icon {
    width: 6rem;
    height: 4.2rem;
  }

  .youtube-icon::before {
    border-width: 0.875rem 0 0.875rem 1.5rem;
  }
}

/* Responsive - Móviles */
@media (max-width: 767px) {
  .entrevista-container {
    padding: 1rem 0.5rem;
  }

  .banners {
    margin-bottom: 1.5rem;
  }

  .entrevista-title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
  }

  .youtube-icon {
    width: 5.625rem;
    height: 3.9375rem;
    border-radius: 1rem;
  }

  .youtube-icon::before {
    border-width: 0.875rem 0 0.875rem 1.4375rem;
  }

  .video-container {
    border-radius: 0.375rem;
  }
}

/* Accesibilidad - Foco del teclado */
.video-link:focus {
  outline: 2px solid #0066cc;
  outline-offset: 0.25rem;
}

.video-link:focus .youtube-icon {
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.5);
}

/* Animación de carga para thumbnail */
.video-thumbnail {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Estados de impresión */
@media print {
  .youtube-overlay,
  .youtube-icon {
    display: none;
  }

  .video-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
