/* ----------------------------------------------------------
   VIDEO POPUP MODULE – subgrafica
   UNIFICADO CON MEDIA HOVERS & PROJECT LINK
   Underline premium (border-bottom)
----------------------------------------------------------- */

/* =========================================
   WRAPPER
========================================= */

.et_pb_video_popup_wrapper {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
}

/* =========================================
   STILL IMAGE
========================================= */

.video-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  opacity: 0.90;
}

.video-background {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease-in-out;
  object-fit: cover;
  object-position: center;
}

/* =========================================
   PLAY ICON
========================================= */

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.video-play-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 5;
}

/* Evitar cambios de opacidad en hover */
.video-play-trigger:hover,
.et_pb_video_popup_wrapper.has-video:hover .video-play-icon {
  opacity: 1 !important;
}

/* No video, no icon */
.et_pb_video_popup_wrapper.no-video .video-play-icon {
  display: none !important;
}

/* =========================================
   META OVERLAY
========================================= */

.video-meta {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--bl);
  pointer-events: auto;
  transition: color 0.3s ease-in-out;
}

.video-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================================
   TEXTS (underline premium unificado)
========================================= */

.video-title,
.video-subtitle,
.video-category {
  font-family: var(--ffa);
  font-weight: var(--fwl-reg);
  line-height: var(--flh0); /* unificado */
  text-transform: uppercase;
  margin: 0;
  color: var(--bl);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);

  text-decoration: none !important;

  /* Underline premium */
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;

  opacity: 1; /* evitar fades */
  cursor: default;
  transition: color 0.3s ease-in-out, border-bottom-color 0.3s ease-in-out;
}

.video-title {
  font-size: var(--fs-h1) !important;
  font-weight: var(--fwl-med);
}

.video-subtitle,
.video-category {
  font-size: var(--fs-h2) !important;
}

/* =========================================
   GROUP HOVER – unificado
========================================= */

.et_pb_video_popup_wrapper.has-video .video-meta:hover .video-title,
.et_pb_video_popup_wrapper.has-video .video-meta:hover .video-subtitle,
.et_pb_video_popup_wrapper.has-video .video-meta:hover .video-category {
  border-bottom-color: currentColor !important;
  color: var(--bl);
  cursor: pointer;
}

.et_pb_video_popup_wrapper.has-video .video-meta:hover {
  cursor: pointer;
}

/* =========================================
   INTERACTIVIDAD
========================================= */

/* Imagen baja opacidad en hover */
.et_pb_video_popup_wrapper.has-video:hover .video-background {
  opacity: 0.85;
}

/* No interactividad cuando no hay video */
.et_pb_video_popup_wrapper.no-video .video-meta,
.et_pb_video_popup_wrapper.no-video .video-title,
.et_pb_video_popup_wrapper.no-video .video-subtitle,
.et_pb_video_popup_wrapper.no-video .video-category {
  pointer-events: none !important;
  cursor: default !important;
  border-bottom-color: transparent !important;
}

/* No interacción en imagen */
.video-image-wrapper img {
  pointer-events: none;
}

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

@media (max-width: 767px) {
  .video-meta {
    left: 14px;
    right: 14px;
    bottom: 12px;
  }

  .video-title    { font-size: 16px !important; }
  .video-subtitle { font-size: 13px !important; }
  .video-category { font-size: 13px !important; }
}