/* ================================
   SECCIÓN MAPA DE BENEFICIOS
   ================================ */

.mapa-beneficios {
  text-align: center;
  background: #fff;
  padding: 150px 5%;
  font-family: 'Poppins', sans-serif;
}

.mapa-beneficios h2 {
  font-size: 2.2rem;
  color: #ff6600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mapa-beneficios .subtitulo {
  color: #444;
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* ================================
   BARRA DE PROGRESO
   ================================ */
.barra-container {
  margin: 30px auto 50px;
  max-width: 450px;
  text-align: left;
}

.barra-container span {
  display: block;
  font-weight: 600;
  color: #111;
  margin-bottom: 5px;
}

.barra {
  width: 100%;
  height: 14px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
}

.barra-progreso {
  height: 100%;
  background: linear-gradient(90deg, #ff6600, #ff9955);
  transition: width 0.5s ease;
}

.barra-texto {
  font-size: 0.9rem;
  margin-top: 6px;
  color: #444;
}

/* ================================
   MAPA Y RED
   ================================ */
.mapa-container {
  position: relative;
  width: 95%;
  max-width: 1000px;
  aspect-ratio: 2 / 1;
  border-radius: 30%;
  overflow: hidden;
  margin: 0 auto 60px;
}

.red-lineas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.red-lineas line {
  stroke: #ff6600;
  stroke-width: 1.8;
  opacity: 0.7;
  stroke-linecap: round;
}

/* ================================
   NODOS
   ================================ */
.nodo {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.3s, box-shadow 0.3s;
}

.nodo:hover {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.6);
  background: #ff6600;
}

/* Nodos principales */
.nodo-tiger,
.nodo-cumbre {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
  border: 3px solid #fff;
  animation: glow 3s ease-in-out infinite;
}

.nodo-tiger { background: #ff6600; }
.nodo-cumbre { background: #1e88e5; }

@keyframes glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 8px rgba(255, 255, 255, 0.3); }
  50% { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
}

/* ================================
   POPUPS
   ================================ */
.nodo .popup {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 10;
}

.nodo:hover .popup {
  opacity: 1;
}

/* ================================
   IMAGEN DE FONDO DEL MAPA
   ================================ */
.mapa-fondo {
  position: absolute;
  top: 0%;
  left: 0%;
  width: 130%;
  height: auto;
  object-fit: cover;
  opacity: 0.95;
  filter: brightness(0.95) contrast(1.15);
  transition: transform 8s ease;
}

.mapa-container:hover .mapa-fondo {
  transform: scale(1.15);
}

/* ================================
   CONTENEDOR GENERAL CON FONDO
   ================================ */
.mapa-fondo-general {
  width: 100%;
  padding: 100px 0;
  background-image: url("images/fondo-mapa-ushuaia.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}

/* ================================
   VERSION MÓVIL
   ================================ */
/* ================================
   VERSION MÓVIL (<=768px)
   ================================ */
@media (max-width: 768px) {
  /* Fondo general sin sombras ni imagen y menos altura útil */
  .mapa-fondo-general {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    padding: 16px 0 20px;   /* antes 20px 0 30px */
  }

  /* Barra de beneficios: pegada al mapa */
  .barra-container {
    margin: 8px auto 12px !important;  /* antes 20px */
    max-width: 92%;
  }

  /* Mapa: más compacto y sin desplazar en negativo */
  @media (max-width: 768px) {
  .mapa-container {
    position: relative;
    top: 0;
    width: 100vw;          /* 🔹 ocupa todo el ancho visible del dispositivo */
    max-width: none;
    left: 0%;
    right: 50%;
    margin-left: -50vw;    /* 🔹 elimina márgenes laterales del body */
    margin-right: -50vw;
    height: 500px;         /* 🔹 altura ajustable según el mapa */
    border-radius: 0;      /* 🔹 sin bordes redondeados */
    overflow: hidden;
    z-index: 5;
  }

  .mapa-fondo {
    width: 190%;
    left: 0%;
    top: 5%;
    height: 120%;
    object-fit: cover;
  }

  /* Líneas y nodos más finos */
  .red-lineas line {
    stroke-width: 1.3;
  }

  .nodo { width: 12px; height: 12px; }
  .nodo-tiger, .nodo-cumbre { width: 18px; height: 18px; }
}




  /* Popups más compactos, aparecen también con focus/active (touch) */
  .nodo .popup {
    font-size: 0.75rem;
    padding: 4px 8px;
    transform: translate(-50%, -115%);
  }
  .nodo:active .popup,
  .nodo:focus .popup { opacity: 1; }
}
@media (max-width: 768px) {
  /* 🔹 Ajusta la posición del mapa dentro del fondo general */
  .mapa-container {
    position: relative;
    top: -150px;       /* 🔸 sube el mapa dentro del fondo general */
    margin-top: 0;
    z-index: 5;       /* 🔸 asegura que quede por encima del fondo */
  }

  /* 🔹 Opcional: reduce el padding del fondo general */
  .mapa-fondo-general {
    padding-top: 20px;  /* 🔸 antes podía ser 50px o más */
    padding-bottom: 30px;
  }
}

/* ================================
   ANIMACIÓN MÓVIL - RED TIGER
   ================================ */
@media (max-width: 768px) {

  /* Movimiento suave del mapa */
  .mapa-container {
    animation: pan-movil 12s ease-in-out infinite alternate;
  }

  @keyframes pan-movil {
    0% { transform: scale(1.05) translateY(0px); }
    50% { transform: scale(1.1) translateY(-10px); }
    100% { transform: scale(1.05) translateY(0px); }
  }

  /* Parpadeo sutil de la red */
  .red-lineas line {
    animation: pulso-lineas 2.8s ease-in-out infinite;
  }

  @keyframes pulso-lineas {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.95; }
  }

  /* Efecto “latido” para los nodos */
  .nodo {
    animation: nodo-latido 3.5s ease-in-out infinite;
  }

  @keyframes nodo-latido {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
  }

  /* Tiger y Cumbre con latido diferenciado */
  .nodo-tiger {
    animation: nodo-tiger-latido 2.5s ease-in-out infinite;
  }

  .nodo-cumbre {
    animation: nodo-cumbre-latido 2.5s ease-in-out infinite;
  }

  @keyframes nodo-tiger-latido {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 8px rgba(255,102,0,0.6); }
    50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 20px rgba(255,102,0,1); }
  }

  @keyframes nodo-cumbre-latido {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 8px rgba(30,136,229,0.6); }
    50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 20px rgba(30,136,229,1); }
  }
}


.nodo.visitado {
  background: #00c853 !important;
  box-shadow: 0 0 15px rgba(0, 200, 83, 0.8);
  transform: translate(-50%, -50%) scale(1.2);
  transition: all 0.3s ease;
}

/* 🔧 Asegura que el modal esté siempre por encima del mapa */
/* MODAL FLEXIBLE — SE PUEDE CERRAR TOCANDO FUERA */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.modal.oculto {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 25px 30px;
  max-width: 380px;
  width: 85%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  z-index: 10000;
  transition: transform 0.3s ease;
}

.modal-content h3 {
  margin-top: 0;
}

.modal.mostrando .modal-content {
  transform: scale(1.05);
}
