/* GRID ESTILO YOUTUBE */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1320px;
  margin: 40px auto;
  padding: 0 20px;
}

/* TARJETAS */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.video-card:hover {
  transform: scale(1.02);
}

/* CONTENEDOR DE MINIATURA */
.video-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.video-thumb-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
  border-radius: 10px;
}

.video-card:hover .video-thumb-wrapper img {
  opacity: 0.85;
}

/* BOTÓN DE PLAY ESTILO YOUTUBE */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  background: url('https://www.gstatic.com/images/icons/material/system/1x/ondemand_video_white_48dp.png')
              center center no-repeat;
  background-size: 48px;
  filter: drop-shadow(0px 0px 8px rgba(0,0,0,0.9));
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.video-card:hover .play-button {
  transform: translate(-50%, -50%) scale(1.15);
  opacity: 1;
}

/* INFORMACIÓN DEL VIDEO */
.video-info {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  padding: 0 4px;
}

.video-title {
  font-size: 17px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.3em;
}

.video-meta {
  font-size: 14px;
  color: #666;
}
/* MODAL – FONDO OSCURO */
#videoModalOverlay {
  display: none; /* oculto por defecto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* CONTENEDOR DEL MODAL */
#videoModal {
  background: #000;
  padding: 0;
  border-radius: 10px;
  position: relative;
  max-width: 900px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* BOTÓN DE CERRAR */
#closeVideoModal {
  position: absolute;
  top: -35px;
  right: -5px;
  font-size: 40px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 10000;
}