/**
 * @file
 * Estilos para el carrusel con video.
 */

/* Eliminar espacios del carrusel */
.nueva-portada .view-carrusel {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.nueva-portada .view-carrusel .views_slideshow_cycle_main {
  padding: 0 !important;
  margin: 0 !important;
}

/* Imágenes del carrusel a ancho completo */
.carrusel-imagen,
.carrusel-imagen-con-video {
  position: relative;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

.carrusel-imagen img,
.carrusel-imagen-con-video img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

/* Texto posicionado sobre la imagen */
.nueva-portada .view-carrusel .container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1140px;
  height: 100%;
  pointer-events: none;
}

.nueva-portada .view-carrusel .container .texto {
  pointer-events: all;
}

/* Botón de play sobre la imagen */
.video-play-button {
  position: absolute;
  top: 58%;
  left: 53%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.3s ease, opacity 0.3s ease;
  padding: 0;
  outline: none;
}

.video-play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 0.9;
}

.video-play-button:focus {
  outline: 2px solid white;
  outline-offset: 4px;
}

/* Modal de video en pantalla completa */
.carrusel-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}




.carrusel-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.carrusel-video-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
}

.carrusel-fullscreen-video {
  width: 100%;
  height: auto;
  max-height: 90vh;
  display: block;
}

/* Botón de cerrar */
.carrusel-video-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.3s ease, transform 0.2s ease;
  padding: 0;
}

.carrusel-video-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.carrusel-video-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .video-play-button svg {
    width: 60px;
    height: 60px;
  }
  
  .carrusel-video-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  
  .carrusel-video-overlay {
    padding: 10px;
  }
}
