/* ==========================================
   VIDEO PREVIEW
========================================== */

.video-preview {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
  cursor: pointer;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-preview:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.video-preview {
  aspect-ratio: 16 / 9;
}

.video-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Overlay oscuro */
.video-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1),
    rgba(0,0,0,0.3)
  );
}

/* Botón Play */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: rgba(17, 137, 166, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  z-index: 2;
  transition: all 0.3s ease;
}

.video-preview:hover .play-button {
  background: var(--brand-2);
  transform: translate(-50%, -50%) scale(1.1);
}


/* ==========================================
   MODAL LIGHTBOX
========================================== */

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 999;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Caja principal */
.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: #000;
  border-radius: 20px;
  padding: 20px;
  animation: modalFade 0.3s ease;
}

/* Animación entrada */
@keyframes modalFade {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Botón cerrar */
.video-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.video-close:hover {
  transform: scale(1.2);
}


/* ==========================================
   YOUTUBE RESPONSIVE
========================================== */

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}


/* ==========================================
   RESPONSIVE MOBILE
========================================== */

@media (max-width: 768px) {
  .video-preview {
    border-radius: 18px;
  }

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 1.6rem;
  }

  .video-modal-content {
    padding: 14px;
    border-radius: 16px;
  }

  .video-close {
    font-size: 1.6rem;
  }
}