/* ----------------------------------------------------------
   MEDIA HOVERS MODULE – subgrafica
   FINAL con borde-underline premium
----------------------------------------------------------- */

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

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

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

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

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

/* =========================================
   HOVER VIDEO
========================================= */

.mh-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.et_pb_media_hovers_wrapper.has-hover-video:hover .mh-background {
  opacity: 0;
}

.et_pb_media_hovers_wrapper.has-hover-video:hover .mh-hover-video {
  opacity: 1;
}

/* =========================================
   MEDIA FIT
========================================= */

.mh-fit-cover .mh-background,
.mh-fit-cover .mh-hover-video {
  object-fit: cover;
}

.mh-fit-contain .mh-background,
.mh-fit-contain .mh-hover-video {
  object-fit: contain;
}

/* =========================================
   MEDIA POSITION (video)
========================================= */

.mh-pos-center .mh-hover-video { object-position: center; }
.mh-pos-top .mh-hover-video    { object-position: top; }
.mh-pos-bottom .mh-hover-video { object-position: bottom; }

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

.mh-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;
}

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

/* Igual que en Video Popup */
.mh-play-trigger:hover,
.et_pb_media_hovers_wrapper.has-video:hover .mh-play-icon {
  opacity: 1 !important;
}

.et_pb_media_hovers_wrapper.no-video .mh-play-icon {
  display: none !important;
}

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

.mh-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;
}

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

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

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

  text-decoration: none !important;

  border-bottom: 1px solid transparent;
  padding-bottom: 1px;

  cursor: default;
  transition: color 0.3s ease-in-out, border-bottom-color 0.3s ease-in-out;
}

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

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

/* =========================================
   GROUP HOVER (igual que Video Popup)
========================================= */

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

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

/* =========================================
   NO-VIDEO
========================================= */

.et_pb_media_hovers_wrapper.no-video .mh-meta,
.et_pb_media_hovers_wrapper.no-video .mh-title,
.et_pb_media_hovers_wrapper.no-video .mh-subtitle,
.et_pb_media_hovers_wrapper.no-video .mh-category {
  pointer-events: none !important;
  cursor: default !important;
}

/* =========================================
   MOBILE BEHAVIOR (≤981px)
========================================= */

/* DISABLE */
@media (max-width: 981px) {
  .mh-mobile-disable .mh-hover-video {
    display: none !important;
  }
}

/* TAP */
@media (max-width: 981px) {

  .mh-mobile-tap .mh-hover-video {
    opacity: 0;
  }

  .mh-mobile-tap.mh-show-video .mh-hover-video {
    opacity: 1;
  }

  .mh-mobile-tap.mh-show-video .mh-background {
    opacity: 0;
  }
}

/* AUTO */
@media (max-width: 981px) {

  .mh-mobile-auto .mh-hover-video {
    opacity: 0;
  }

  .mh-mobile-auto.mh-auto-playing .mh-hover-video {
    opacity: 1;
  }

  .mh-mobile-auto.mh-auto-playing .mh-background {
    opacity: 0;
  }
}

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

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

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