/*!
 * BePart Innova — imagen del mapa y del vídeo antes de cargarlos (ver assets/js/bp-embeds.js).
 * La caja ocupa exactamente lo mismo que el iframe al que sustituye: el mapa conserva la clase «map» de la plantilla (en escritorio,
 * 200 % del ancho de su columna, 500 px de alto y en gris), y aquí se repite lo que mobile-base.css da a «iframe.map» en móvil. El
 * vídeo mide lo que medía el iframe (655 × 457) y en móvil lo que le da mobile-about.css (ancho completo, 16:9).
 * No cambia la tipografía: los textos heredan la fuente de la página.
 */

/* ── Mapa ─────────────────────────────────────────────────────────────────────────────────────────── */
.map.bp-mapa {
  /* en línea, como el iframe al que sustituye: así deja el mismo hueco de línea debajo y la caja no cambia al pulsar */
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  overflow: hidden;
  background: #e5e5e5;
  filter: none; /* el gris de la plantilla, solo en la imagen: los botones mantienen su color */
}
.bp-mapa-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}
.bp-mapa-acciones {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bp-embed-btn,
.bp-embed-link {
  display: inline-block;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 10px 18px;
  border-radius: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  text-decoration: none;
}
.bp-embed-btn {
  background: #1278bd;
  color: #fff;
  border: 0;
}
.bp-embed-btn:hover {
  background: #0e5f96;
}
.bp-embed-link,
.bp-embed-link:visited {
  background: #fff;
  color: #1278bd;
  border: 0;
}
.bp-embed-link:hover {
  color: #0e5f96;
}
.bp-embed-btn:focus-visible,
.bp-embed-link:focus-visible,
.bp-video:focus-visible {
  outline: 3px solid #ffb400;
  outline-offset: 2px;
}
.bp-embed-nota {
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.4;
}
.bp-embed-nota span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}
.bp-embed-nota[hidden],
.bp-embed-btn[hidden] {
  display: none;
}
.bp-osm,
.bp-osm:visited {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
}
.bp-osm:hover {
  text-decoration: underline;
}

/* En móvil y tableta, lo mismo que mobile-base.css da al iframe del mapa */
@media (max-width: 1100px) {
  .contact-us div.bp-mapa {
    display: block;
    width: 100%;
    max-width: 100%;
    height: clamp(260px, 70vw, 440px);
  }
}
/* En pantallas estrechas, botones más compactos en una fila para que no tapen la chincheta del centro */
@media (max-width: 575.98px) {
  .bp-mapa-acciones {
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    gap: 6px;
  }
  .bp-mapa-acciones .bp-embed-btn,
  .bp-mapa-acciones .bp-embed-link {
    font-size: 13px;
    padding: 8px 12px;
  }
  .bp-embed-nota {
    font-size: 11px;
  }
}

/* ── Vídeo ────────────────────────────────────────────────────────────────────────────────────────── */
.bp-video,
.bp-video:visited {
  position: relative;
  display: inline-block; /* en línea, como el iframe al que sustituye (mismo hueco de línea debajo) */
  vertical-align: baseline;
  width: 655px; /* como el iframe (width="655px"), que en escritorio no se ajusta a su columna */
  height: 457px;
  overflow: hidden;
  background: #000;
  color: #fff;
  text-decoration: none;
}
.bp-video img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.bp-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 50px;
  margin: -25px 0 0 -36px;
  border-radius: 14px;
  background: rgba(18, 120, 189, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: background 0.15s;
}
.bp-video-play::after {
  content: '';
  position: absolute;
  left: 29px;
  top: 15px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}
.bp-video:hover .bp-video-play,
.bp-video:focus-visible .bp-video-play {
  background: #0e5f96;
}
.bp-video-nota {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .bp-video-play {
    transition: none;
  }
}

/* En móvil, lo mismo que mobile-about.css da al iframe del vídeo */
@media (max-width: 991.98px) {
  #infos .main-content .right-image .bp-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
