/* Overlay */
#hdp-overlay.hdp-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999999;
  background: rgba(0,0,0,.55);
}
#hdp-overlay.hdp-overlay.is-open{ display: flex; }

/* Contenedor modal (sin “tarjeta” aquí) */
#hdp-overlay .hdp-modal{
  position: relative;
  width: min(900px, 96vw);
  max-height: 96vh;
  overflow: visible;          /* para que la X sobresalga */
  background: transparent;
  padding: 0;
}

/* La “tarjeta” real + scroll */
#hdp-overlay .hdp-content{
  background: #000000;
  width: 100%;
  max-height: 96vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  padding: 0;
  /* background: transparent; */
  position: relative;
  z-index: 1;
  scrollbar-gutter: stable;
}

/* Botón cerrar */
#hdp-overlay .hdp-close{
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
  z-index: 9999999;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
#hdp-overlay .hdp-close:hover{ filter: brightness(0.95); }

/* =========================
   FIX 1: WPBakery “full-bleed”
   (quita el offset/anchos raros de vc_row)
   ========================= */
#hdp-overlay .hdp-content .vc_row,
#hdp-overlay .hdp-content .wpb_row{
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Columnas: elimina el gutter que deja “margen” dentro */
#hdp-overlay .hdp-content .vc_column_container{
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#hdp-overlay .hdp-content .vc_column-inner{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Evita hueco inferior típico del último bloque */
#hdp-overlay .hdp-content .wpb_content_element:last-child,
#hdp-overlay .hdp-content .vc_row:last-child,
#hdp-overlay .hdp-content .wpb_row:last-child{
  margin-bottom: 0 !important;
}

/* =========================
   FIX 2: imágenes enormes
   (forzamos responsivo dentro del popup)
   ========================= */
#hdp-overlay .hdp-content img{
  max-width: 100% !important;
  height: auto !important;
  display: block;             /* evita espacios raros por baseline */
}

/* En VC Single Image a veces el wrapper mete inline-block */
#hdp-overlay .hdp-content .wpb_single_image,
#hdp-overlay .hdp-content .vc_single_image-wrapper{
  max-width: 100% !important;
}
