/* ============================================================
   MAPA DE SUCURSALES — Portátiles Nicaragua
   ============================================================ */

.pn-mapa {
  flex: 0 0 340px;
  width: 340px;
  padding: 16px 14px 14px;
  background:
    radial-gradient(400px 300px at 50% 20%, rgba(1, 159, 230, 0.14), transparent 70%),
    linear-gradient(180deg, #050b1f 0%, #0a1230 100%);
  border-radius: var(--radius-md);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.pn-mapa::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(1, 159, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 159, 230, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}
.pn-mapa > * { position: relative; z-index: 1; }

/* ------------------------------------------------------------
   HEAD
   ------------------------------------------------------------ */
.pn-mapa__head { text-align: center; padding-top: 2px; }

.pn-mapa__badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(1, 159, 230, 0.16);
  border: 1px solid rgba(1, 159, 230, 0.4);
  border-radius: var(--radius-pill);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pn-blue-light);
  margin-bottom: 6px;
}
.pn-mapa__title {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 3px;
}
.pn-mapa__desc {
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------
   SVG
   ------------------------------------------------------------ */
.pn-mapa__canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 2px;
  flex: 1;
}
.pn-mapa__svg {
  width: 100%;
  height: auto;
  max-height: 320px;
  display: block;
  filter: drop-shadow(0 4px 18px rgba(1, 159, 230, 0.15));
}

.pn-mapa__depto {
  fill: url(#pnCountryGrad);
  stroke: #019FE6;
  stroke-width: 0.8;
  stroke-linejoin: round;
  transition: fill 200ms ease, stroke 200ms ease;
}
.pn-mapa__depto:hover {
  fill: rgba(1, 159, 230, 0.15);
  stroke: #7fd0f4;
  stroke-width: 1.2;
}

/* ------------------------------------------------------------
   MARKERS
   ------------------------------------------------------------ */
.pn-mapa__marker { cursor: pointer; outline: none; }
.pn-mapa__marker:focus { outline: none; }

.pn-mapa__marker-glow {
  fill: url(#pnMarkerGlow);
  opacity: 0;
  transition: opacity 200ms ease;
}
.pn-mapa__marker:hover .pn-mapa__marker-glow,
.pn-mapa__marker:focus .pn-mapa__marker-glow { opacity: 1; }

.pn-mapa__marker-dot {
  fill: #019FE6;
  stroke: #ffffff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px rgba(1, 159, 230, 0.9));
  transition: fill 200ms ease;
}
.pn-mapa__marker:hover .pn-mapa__marker-dot,
.pn-mapa__marker:focus .pn-mapa__marker-dot {
  fill: #7fd0f4;
  filter: drop-shadow(0 0 10px rgba(1, 159, 230, 1));
}

.pn-mapa__marker-pulse {
  fill: none;
  stroke: #019FE6;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pnMapPulse 2.6s ease-out infinite;
  opacity: 0.55;
  pointer-events: none;
}
@keyframes pnMapPulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pn-mapa__marker-pulse { animation: none; opacity: 0.3; }
}

.pn-mapa__marker-label {
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  text-anchor: middle;
  font-family: Montserrat, sans-serif;
  font-size: 9px;
  font-weight: 600;
  fill: #ffffff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.7);
  transform: translateY(3px);
}
.pn-mapa__marker:hover .pn-mapa__marker-label,
.pn-mapa__marker:focus .pn-mapa__marker-label {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   CTA
   ------------------------------------------------------------ */
.pn-mapa__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--pn-blue);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background 200ms ease, gap 200ms ease, transform 200ms ease;
  margin-top: auto;
}
.pn-mapa__cta:hover {
  background: var(--pn-blue-dark);
  color: #fff;
  gap: 12px;
  transform: translateY(-1px);
}
.pn-mapa__cta i { font-size: 0.68rem; transition: transform 200ms ease; }
.pn-mapa__cta:hover i { transform: translateX(2px); }

/* Error */
.pn-mapa--error {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 30px 16px;
}
.pn-mapa--error code { color: var(--pn-blue-light); font-family: monospace; }

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1280px) {
  .pn-mapa { flex-basis: 300px; width: 300px; }
  .pn-mapa__svg { max-height: 280px; }
  .pn-mapa__title { font-size: 0.78rem; }
}