/* ==========================================================================
   CONFIGURACIÓN GENERAL
========================================================================== */
.bnvital-video-modal {
  font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ==========================================================================
   DISEÑO DE TÍTULOS
========================================================================== */
.vvm-main-title-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.vvm-main-title-badge {
  color: #133D8D;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.vvm-secondary-title {
  color: #133D8D;
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 0 0;
  text-align: center;
  line-height: 1.3;
  /* Truncar texto a 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   VIDEO CONTENEDOR Y PLACEHOLDER (BASE)
========================================================================== */
.vvm-video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background-color: #000;
  box-shadow: 
    0px 1px 2px 0px rgba(0, 0, 0, 0.10),
    0px 10px 6px 0px rgba(0, 0, 0, 0.05);
}

.vvm-video-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fix para navegadores que no soportan aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .vvm-video-container {
    padding-top: 56.25%;
    height: 0;
  }
  .vvm-video-img {
    position: absolute;
    top: 0; 
    left: 0;
  }
}

.vvm-play-button-overlay {
  position: absolute;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.vvm-play-icon {
  width: 68px;
  height: 48px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.vvm-video-container:hover .vvm-play-button-overlay {
  background: rgba(0,0,0,0.2);
}

.vvm-video-container:hover .vvm-play-icon {
  transform: scale(1.1);
}

/* ==========================================================================
   LAYOUT DE VIDEOS Y COLUMNAS
========================================================================== */
.vvm-main-video {
  width: 100%;
  margin-bottom: 32px;
}

.vvm-secondary-videos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.vvm-secondary-item .vvm-play-icon {
  width: 48px;
  height: auto;
}

.vvm-secondary-videos-grid .vvm-secondary-item {
  flex: 0 0 calc(33.333% - 14px);
  width: calc(33.333% - 14px);
}

.vvm-secondary-videos-grid.vvm-count-1 .vvm-secondary-item {
  flex: 0 0 100%;
  width: 100%;
  max-width: 800px;
}

.vvm-secondary-videos-grid.vvm-count-2 .vvm-secondary-item,
.vvm-secondary-videos-grid.vvm-count-4 .vvm-secondary-item {
  flex: 0 0 calc(50% - 10px);
  width: calc(50% - 10px);
}

/* ==========================================================================
   LIGHTBOX (MODAL)
========================================================================== */
.vvm-lightbox {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  display: none; 
  z-index: 999999; 
  justify-content: center; 
  align-items: center;
}

.vvm-lightbox.is-active {
  display: flex; 
  animation: vvm-lightboxFadeIn 0.35s ease-out forwards;
}

.vvm-lightbox-overlay {
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.92); 
  backdrop-filter: blur(8px);
}

.vvm-lightbox-container {
  position: relative; 
  width: 90%; 
  max-width: 1000px; 
  z-index: 10;
}

.vvm-lightbox-close {
  position: fixed; 
  top: 15px; 
  right: 15px; 
  background: rgba(0, 0, 0, 0.1);
  width: 45px; 
  height: 45px; 
  border-radius: 50%; 
  display: flex;
  justify-content: center; 
  align-items: center; 
  border: none; 
  color: white;
  font-size: 35px; 
  cursor: pointer; 
  line-height: 1; 
  z-index: 1000000;
  transition: all 0.3s ease;
}

.vvm-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

@keyframes vvm-lightboxFadeIn {
  0% { opacity: 0; backdrop-filter: blur(0px); }
  100% { opacity: 1; backdrop-filter: blur(8px); }
}

.vvm-lightbox.is-active .vvm-lightbox-container {
  animation: vvm-lightboxScaleUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes vvm-lightboxScaleUp {
  0% { transform: scale(0.95) translateY(10px); }
  100% { transform: scale(1) translateY(0); }
}

#vvm-lightbox-video-content iframe {
  width: 100%; 
  aspect-ratio: 16 / 9; 
  border: none;
  border-radius: 8px; 
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); 
  display: block;
}

/* ==========================================================================
   AJUSTES RESPONSIVOS
========================================================================== */
@media (max-width: 767px) {
  .vvm-play-icon,
  .vvm-secondary-item .vvm-play-icon {
    width: 50px;
    height: auto;
  }
  
  /* En móviles, todos los secundarios vuelven al 100% en una sola columna */
  .vvm-secondary-videos-grid .vvm-secondary-item,
  .vvm-secondary-videos-grid.vvm-count-1 .vvm-secondary-item,
  .vvm-secondary-videos-grid.vvm-count-2 .vvm-secondary-item,
  .vvm-secondary-videos-grid.vvm-count-4 .vvm-secondary-item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}