body,
html {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #222;
  font-family: Arial, sans-serif;
  color: #fff !important;
}

body.page-template-page-estare_cerca_tu_mirada-php header {
  display: none !important;
}

#interactive-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
}

#map-stage-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#map-stage {
  position: relative;
  width: 1058px;
  height: 561px;
  background: #000 url("../images/mapa-proyecto-capas.png") center center / contain no-repeat;
}

#roads-svg {
  width: 100%;
  height: 100%;
}

.road-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.road-overlay img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.75));
  transition: filter 0.15s ease;
}

.road-overlay.hovered img {
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 1)) brightness(1.12);
}

/* Cartela inicial */
#intro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10;
  text-align: center;
  padding: 1.5rem;
  color: #fff !important;
}

#intro-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-decoration: underline;
  text-underline-offset: 8px;
  font-weight: bold;
  color: #fff !important;
}

#intro-overlay p {
  max-width: 600px;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff !important;
}

#intro-overlay button {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  #intro-overlay {
    padding: 1rem;
  }

  #intro-overlay h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-underline-offset: 4px;
  }

  #intro-overlay p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
  }

  #intro-overlay button {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* PUNTOS ROJOS (Mónica, Ana, Cova) */
.hotspot {
  position: absolute;
  width: 20px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 30% 20%, #ffd6e0 0, #c00030 45%, #4b0013 100%);
  box-shadow: 0 0 10px rgba(255, 0, 70, 0.55);
  transform: translate(-50%, -100%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.hotspot-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(14px, -50%);
  font-size: 14px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  white-space: nowrap;
}

.hotspot:hover {
  transform: translate(-50%, -100%) scale(1.1);
  box-shadow: 0 0 26px rgba(255, 80, 120, 0.9);
  filter: brightness(1.1);
}

@media (max-width: 768px) {
  .hotspot {
    width: 12px;
    height: 16px;
    box-shadow: 0 0 6px rgba(255, 0, 70, 0.55);
  }

  .hotspot-label {
    font-size: 10px;
    transform: translate(8px, -50%);
  }
}

/* POPUP PEQUEÑO */
.video-popup {
  position: absolute;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0;
  color: #fff;
  z-index: 20;
  width: 160px;
  text-align: center;
  pointer-events: none;
}

.video-popup-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  color: #000;
}

.video-popup-preview {
  position: relative;
  margin-bottom: 6px;
}

.video-popup-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.video-popup-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-popup-play::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
  margin-left: 3px;
}

.video-popup .popup-title {
  font-size: 1rem;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.video-popup .popup-instruction {
  font-size: 0.7rem;
  margin: 0;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.3;
}

/* Flecha apuntando hacia el punto rojo */
.video-popup-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

/* Flecha hacia abajo (popup arriba del punto) */
.video-popup.arrow-down .video-popup-arrow {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0 10px;
  border-color: #fff transparent transparent transparent;
}

/* Flecha hacia la izquierda (popup a la derecha del punto) */
.video-popup.arrow-left .video-popup-arrow {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-color: transparent #fff transparent transparent;
}

/* Flecha hacia la derecha (popup a la izquierda del punto) */
.video-popup.arrow-right .video-popup-arrow {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #fff;
}

/* Flecha hacia arriba (popup debajo del punto) */
.video-popup.arrow-up .video-popup-arrow {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #fff transparent;
}

/* OVERLAY DE VIDEO */
#video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

#video-overlay video,
#video-overlay iframe {
  max-width: 80%;
  max-height: 80%;
  box-shadow:
    0 10px 80px rgba(0, 0, 0, 0.9),
    0 0 200px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  background: #000;
}

#close-video {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#close-video:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  #close-video {
    top: 10px;
    right: 10px;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
}
