/* ══════════════════════════════════════════════════════════════════════
   ANIMACIONES CINEMATOGRÁFICAS — Black Embassy
   Archivo: ASSETS/css/cinematic.css
   ══════════════════════════════════════════════════════════════════════

   ¿QUÉ HAY EN ESTE ARCHIVO?
   -------------------------
   1. Sección "Presencia Internacional" con el globo terráqueo que se
      ilumina al hacer scroll.
   2. Pines (ciudades) y arcos (rutas) que aparecen en secuencia.
   3. Panel lateral con la lista de ciudades y contadores animados.
   4. Personaje guía ("embajador") que acompaña al visitante y cambia
      su mensaje según la sección donde esté.
   5. Ajustes responsive y respeto a "reducir movimiento".

   ¿CÓMO CAMBIO EL ASPECTO?
   ------------------------
   Los colores salen de las variables de style.css (--gold, --accent,
   --navy...). Si cambias una, este archivo se actualiza solo.

   ¿CÓMO AGREGO UN PAÍS?
   ---------------------
   Abre ASSETS/js/cinematic.js, busca el arreglo COUNTRIES y añade:
       { iso: "PE", name: "Perú", lat: -12.05, lon: -77.04,
         continent: "América" },
   El globo calcula la posición sola. No hay que tocar el CSS.
   ══════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════
   1. SECCIÓN "PRESENCIA INTERNACIONAL"
   ══════════════════════════════════════════════════════════════════════ */

.world-section {
  position: relative;
  padding: 120px 0 130px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 18% 12%, rgba(91, 180, 229, 0.13), transparent 60%),
    radial-gradient(ellipse 55% 55% at 88% 85%, rgba(228, 184, 68, 0.11), transparent 60%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 45%, var(--navy-deep) 100%);
}

/* Rejilla finísima de fondo: da sensación de "sala de control". */
.world-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 78%);
  pointer-events: none;
}

/* Aurora que respira detrás del globo. */
.world-section::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 6%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 180, 229, 0.16), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
  animation: worldAurora 16s ease-in-out infinite alternate;
}

@keyframes worldAurora {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.65; }
  to   { transform: translate3d(60px, -30px, 0) scale(1.12); opacity: 1; }
}

.world-inner { position: relative; z-index: 1; }

.world-section .section-header { margin-bottom: 64px; }

.world-title-line {
  width: 84px;
  height: 2px;
  margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Distribución: globo grande a la izquierda, panel de datos a la derecha. */
.world-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(28px, 3vw, 48px);
  align-items: center;
}

.world-canvas {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  cursor: grab;
  outline: none;
  /* En táctil permitimos el scroll vertical de la página; el giro
     horizontal lo controla cinematic.js. */
  touch-action: pan-y;
  /* --globe-shift lo mueve cinematic.js al hacer scroll. */
  transform: translateY(var(--globe-shift, 0px));
  transition: transform 0.15s linear;
  will-change: transform;
}

.world-canvas.is-dragging { cursor: grabbing; }

.world-canvas:focus-visible {
  box-shadow: 0 0 0 2px rgba(91, 180, 229, 0.75);
}

.world-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(91, 180, 229, 0.2), transparent 58%),
    radial-gradient(circle at 65% 70%, rgba(228, 184, 68, 0.16), transparent 60%);
  filter: blur(24px);
  pointer-events: none;
}

.world-svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Halo exterior del globo. */
.globe-halo {
  fill: none;
  stroke: rgba(91, 180, 229, 0.16);
  stroke-width: 1;
  stroke-dasharray: 2 12;
  transform-origin: 300px 300px;
  animation: globeSpin 90s linear infinite;
}

@keyframes globeSpin {
  to { transform: rotate(360deg); }
}

.globe-sphere {
  stroke: rgba(228, 184, 68, 0.22);
  stroke-width: 1;
}

/* Meridianos y paralelos dinámicos (los redibuja cinematic.js). */
.globe-grid path {
  fill: none;
  stroke: rgba(91, 180, 229, 0.16);
  stroke-width: 1;
  stroke-linecap: round;
}

.globe-grid path.is-equator {
  stroke: rgba(228, 184, 68, 0.32);
  stroke-width: 1.2;
}

.globe-grid path.is-prime {
  stroke: rgba(228, 184, 68, 0.24);
}

/* ── Fronteras de los países ─────────────────────────────────────── */

.world-shapes { pointer-events: none; }

.world-country {
  fill: rgba(120, 170, 210, 0.1);
  stroke: rgba(120, 170, 210, 0.24);
  stroke-width: 0.55;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: auto;
  cursor: pointer;
  transition: fill 0.22s ease, stroke 0.22s ease;
}

/* Los 130 países de la red van siempre marcados en dorado. */
.world-country.is-covered {
  fill: rgba(228, 184, 68, 0.22);
  stroke: rgba(228, 184, 68, 0.55);
}

.world-country.is-covered:hover {
  fill: rgba(228, 184, 68, 0.38);
  stroke: rgba(253, 217, 92, 0.9);
}

.world-country.is-active {
  fill: rgba(228, 184, 68, 0.55);
  stroke: #ffe7a3;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(228, 184, 68, 0.55));
}

/* Etiqueta flotante que sigue al cursor sobre el globo. */
.world-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  padding: 6px 12px;
  border: 1px solid rgba(120, 170, 210, 0.35);
  border-radius: 999px;
  background: rgba(5, 12, 22, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  color: #eff6fb;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.world-tip.is-visible { opacity: 1; }

.world-tip.is-sede {
  border-color: rgba(228, 184, 68, 0.6);
  color: #ffe7a3;
}

/* Aro dorado del borde. */
.globe-ring {
  stroke-width: 1.4;
  filter: drop-shadow(0 0 10px rgba(228, 184, 68, 0.28));
}

/* Arcos entre ciudades. */
.world-link {
  fill: none;
  stroke: url(#arcGold);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: 0;
  transition: opacity 0.6s ease, stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.world-stage.is-lit .world-link {
  opacity: 0.75;
  stroke-dashoffset: 0;
  transition-delay: calc(var(--i, 0) * 110ms + 450ms);
}

/* Chispa que recorre cada arco, como un vuelo. */
.world-link-flow {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 5 120;
  stroke-dashoffset: 0;
  opacity: 0;
}

.world-stage.is-lit .world-link-flow {
  opacity: 0.9;
  animation: routeFlow 5.6s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.45s + 1.2s);
}

@keyframes routeFlow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -125; }
}

/* Punto que viaja por cada arco: parece un vuelo. */
/* (La chispa se define más abajo con .world-link-flow.) */

/* ── Pines de ciudad ─────────────────────────────────────────────── */

.world-pin {
  opacity: 0;
  transform: scale(0.2);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 0.55s ease,
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 85ms + 250ms);
}

.world-stage.is-lit .world-pin {
  opacity: 1;
  transform: scale(1);
}

.pin-halo {
  fill: rgba(228, 184, 68, 0.12);
  transform-box: fill-box;
  transform-origin: center;
}

.world-stage.is-lit .pin-halo {
  animation: pinPulse 3.6s ease-out infinite;
  animation-delay: calc(var(--i, 0) * 0.22s);
}

@keyframes pinPulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.pin-ring {
  fill: none;
  stroke: rgba(228, 184, 68, 0.55);
  stroke-width: 1;
}

.pin-dot {
  fill: var(--gold-light);
  stroke: rgba(6, 13, 24, 0.65);
  stroke-width: 1;
}

.pin-anchor.is-hub .pin-dot {
  fill: var(--white);
  stroke: var(--gold);
  stroke-width: 2;
}

.pin-anchor.is-active .pin-dot {
  fill: var(--accent);
  stroke: var(--white);
  stroke-width: 2;
}

.pin-anchor.is-active .pin-ring {
  stroke: var(--accent);
  stroke-width: 1.6;
}

.pin-label {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  fill: var(--white);
  paint-order: stroke;
  stroke: rgba(6, 13, 24, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pin-anchor.is-active .pin-label { opacity: 1; }

/* Las 12 sedes muestran su nombre siempre: así el globo nunca está "mudo". */
.pin-anchor { cursor: pointer; }
.pin-anchor.is-hub .pin-label {
  opacity: 0.82;
  font-size: 11px;
}
.pin-anchor.is-hub:hover .pin-label,
.pin-anchor.is-hub.is-active .pin-label { opacity: 1; }
.pin-anchor.is-active .pin-label { font-size: 13px; }

/* El punto del hub (Bogotá) siempre brilla un poco más. */
.pin-anchor.is-hub .pin-halo { fill: rgba(91, 180, 229, 0.16); }

/* ── Panel lateral ───────────────────────────────────────────────── */

.world-panel {
  position: relative;
  padding: 34px 34px 30px;
  border: 1px solid rgba(228, 184, 68, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(6, 13, 24, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.world-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(228, 184, 68, 0.5), transparent 40%, rgba(91, 180, 229, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.world-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.world-stat strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-light);
  letter-spacing: -0.02em;
}

.world-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-current {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 1.3em;
}

.world-current i {
  color: var(--gold);
  font-size: 0.7rem;
  animation: worldBlink 2.2s ease-in-out infinite;
}

@keyframes worldBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.world-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 3px 14px;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(228, 184, 68, 0.45) transparent;
  /* Dejamos un pequeño respiro para que el foco no quede pegado. */
  padding-right: 6px;
}

.world-list::-webkit-scrollbar { width: 7px; }
.world-list::-webkit-scrollbar-thumb {
  background: rgba(228, 184, 68, 0.4);
  border-radius: 99px;
}

/* Título de continente dentro de la lista. */
.world-group-title {
  grid-column: 1 / -1;
  margin: 10px 0 2px;
  padding: 0 6px;
  color: var(--gold-light);
  font-family: "DM Sans", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-group-title:first-child { margin-top: 0; }

.world-city {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* La lista aparece en cascada cuando el globo se enciende. */
.world-panel.is-lit .world-city {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 55ms + 350ms);
}

.world-city:hover,
.world-city:focus-visible {
  background: rgba(228, 184, 68, 0.1);
  color: var(--white);
  outline: none;
}

.world-city:focus-visible { box-shadow: inset 0 0 0 1px var(--gold); }

.world-city-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: rgba(228, 184, 68, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.world-city.is-lit .world-city-dot {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(228, 184, 68, 0.75);
}

.world-city.is-active .world-city-dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(91, 180, 229, 0.9);
}

.world-city.is-active .world-city-name { color: var(--white); }

.world-city-country {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Controles del globo: pausar y centrar. */
.world-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.world-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(228, 184, 68, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.world-control:hover {
  background: rgba(228, 184, 68, 0.12);
  border-color: rgba(228, 184, 68, 0.55);
  color: var(--white);
}

.world-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.world-control i { color: var(--gold); }

.world-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.world-hint i {
  color: var(--gold);
  animation: worldHintBounce 2.4s ease-in-out infinite;
}

@keyframes worldHintBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}


/* ══════════════════════════════════════════════════════════════════════
   2. GUILLE — LA GUÍA DE LA EMBAJADA
   ══════════════════════════════════════════════════════════════════════

   Desde la Fase 1 del rediseño, la guía es Guillermina ("Guille"), la
   cara real de la Embajada, no un dibujo. Su retrato vive en un círculo
   con anillo dorado y un punto verde de "en línea", como una asistente
   moderna pero sin perder la seriedad de la institución.

   Reglas de convivencia con el contenido:
   - Solo el globo y el retrato capturan clics; el resto del guía deja
     pasar el ratón.
   - Se esconde mientras el visitante escribe o abre un modal.
   - En escritorio cambia de esquina al cambiar de sección.
   - En pantallas muy anchas se coloca en el margen exterior, junto al
     título, sin invadir el texto.
   - El globo incluye un recorrido con pasos, barra de avance y menú. */

.guide {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 130;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: min(450px, calc(100vw - 40px));
  opacity: 0;
  transform: translateY(26px);
  /* El contenedor no bloquea clics: los hijos interactivos lo reactivan. */
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    right 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    bottom 0.55s ease,
    top 0.55s ease;
}

.guide.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* El visitante lo cerró o hay un formulario/modal en uso. */
.guide.is-suppressed {
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
}

.guide.is-suppressed .guide-bubble,
.guide.is-suppressed .guide-figure {
  pointer-events: none;
}

/* Mientras la guía aún no se muestra (por ejemplo, sobre el hero de la
   portada), ninguno de sus controles debe capturar clics. */
.guide:not(.is-visible) .guide-bubble,
.guide:not(.is-visible) .guide-figure {
  pointer-events: none;
}

/* Cambio de esquina: el retrato queda a la derecha y el globo a la izquierda. */
.guide.is-right {
  flex-direction: row-reverse;
}

/* En pantallas anchas se coloca junto al título, en el margen exterior. */
.guide.is-perched {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.guide.is-perched .guide-figure {
  width: 74px;
  height: 74px;
  margin-left: 14px;
}

/* Hilo dorado que une el retrato con el título de la sección. */
.guide.is-perched .guide-figure::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(228, 184, 68, 0.1), rgba(228, 184, 68, 0.75));
  box-shadow: 0 0 6px rgba(228, 184, 68, 0.4);
}

.guide.is-perched .guide-bubble {
  width: 238px;
  margin: 0;
  border-radius: 16px;
}

.guide.is-perched .guide-bubble::after {
  display: none;
}

.guide[hidden] {
  display: none;
}

/* ── Retrato circular ─────────────────────────────────────────────── */

.guide-figure {
  position: relative;
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.5));
  transform-origin: bottom center;
  animation: guideFloat 5.4s ease-in-out infinite;
}

/* Halo dorado que gira muy despacio alrededor del retrato. */
.guide-figure::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    rgba(228, 184, 68, 0) 0deg,
    rgba(253, 217, 92, 0.85) 70deg,
    rgba(228, 184, 68, 0.12) 150deg,
    rgba(228, 184, 68, 0) 250deg
  );
  animation: guideHalo 7s linear infinite;
}

@keyframes guideHalo {
  to { transform: rotate(360deg); }
}

@keyframes guideFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.guide-photo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(228, 184, 68, 0.82);
  background: radial-gradient(circle at 50% 25%, #1b3a5c, #0a1628);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s ease;
}

.guide-photo picture,
.guide-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.guide-photo img {
  object-fit: cover;
}

.guide-figure:hover .guide-photo,
.guide-figure:focus-visible .guide-photo {
  border-color: var(--gold-light);
}

.guide-figure:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Punto verde de "en línea". */
.guide-online {
  position: absolute;
  right: 3px;
  bottom: 5px;
  z-index: 2;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #08131f;
  background: #38d39f;
  box-shadow: 0 0 10px rgba(56, 211, 159, 0.8);
}

/* ── Globo de diálogo ─────────────────────────────────────────────── */

.guide-bubble {
  position: relative;
  width: min(316px, calc(100vw - 150px));
  margin-bottom: 34px;
  padding: 14px 15px 12px;
  border: 1px solid rgba(228, 184, 68, 0.34);
  border-radius: 18px 18px 18px 6px;
  background: linear-gradient(155deg, rgba(20, 43, 68, 0.97), rgba(8, 19, 33, 0.98));
  color: var(--text);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Solo este recuadro captura clics; el resto del guía no estorba. */
  pointer-events: auto;
  --guide-progress: 0%;
}

/* Hilo dorado en el borde superior del globo. */
.guide-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(253, 217, 92, 0.65), transparent);
}

/* Punta del globo hacia el retrato. */
.guide-bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 12px;
  width: 14px;
  height: 14px;
  background: #0a1a2d;
  border-left: 1px solid rgba(228, 184, 68, 0.34);
  border-bottom: 1px solid rgba(228, 184, 68, 0.34);
  transform: rotate(45deg);
}

.guide.is-right .guide-bubble {
  border-radius: 18px 18px 6px 18px;
}

.guide.is-right .guide-bubble::after {
  left: auto;
  right: -7px;
  border-left: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(228, 184, 68, 0.34);
  border-top: 1px solid rgba(228, 184, 68, 0.34);
}

/* ── Cabecera del globo ───────────────────────────────────────────── */

.guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.guide-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}

.guide-role {
  padding: 2px 7px;
  border: 1px solid rgba(228, 184, 68, 0.28);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.guide-menu-btn,
.guide-close {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.64rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.guide-menu-btn {
  margin-left: auto;
}

.guide-menu-btn:hover,
.guide-close:hover,
.guide-menu-btn[aria-expanded="true"] {
  background: var(--gold);
  color: var(--navy-deep);
}

.guide-menu-btn:focus-visible,
.guide-close:focus-visible,
.guide-next:focus-visible,
.guide-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Mensaje ──────────────────────────────────────────────────────── */

.guide-text {
  display: block;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
}

.guide-text.is-changing {
  animation: guideTextIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guideTextIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* ── Menú del recorrido ───────────────────────────────────────────── */

.guide-menu {
  max-height: 218px;
  margin: 10px 0 2px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border-top: 1px solid rgba(228, 184, 68, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(228, 184, 68, 0.4) transparent;
}

.guide-menu[hidden] {
  display: none;
}

.guide-menu li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.guide-menu-item:hover {
  color: var(--gold-light);
  background: rgba(228, 184, 68, 0.06);
}

.guide-menu-item.is-current {
  color: var(--white);
}

.guide-menu-num {
  min-width: 18px;
  color: rgba(228, 184, 68, 0.7);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.guide-menu-item.is-current .guide-menu-num {
  color: var(--gold-light);
}

/* ── Progreso y pie del globo ─────────────────────────────────────── */

.guide-progress {
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.guide-progress span {
  display: block;
  width: var(--guide-progress);
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.guide-step {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.guide-step:empty {
  display: none;
}

.guide-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(228, 184, 68, 0.34);
  border-radius: 50px;
  background: rgba(228, 184, 68, 0.08);
  color: var(--gold-light);
  font-family: "DM Sans", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.guide-next:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

.guide-next i {
  font-size: 0.58rem;
}

/* ── Botón para volver a mostrar a Guille ─────────────────────────── */

.guide-reopen {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 129;
  width: 50px;
  height: 50px;
  display: none;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(228, 184, 68, 0.5);
  border-radius: 50%;
  background: #08131f;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-reopen.is-visible {
  display: grid;
}

.guide-reopen picture,
.guide-reopen img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* Punto verde del botón cerrado. */
.guide-reopen::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #08131f;
  background: #38d39f;
  box-shadow: 0 0 8px rgba(56, 211, 159, 0.8);
}

.guide-reopen:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.guide-reopen:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Ajustes finos de pantalla ────────────────────────────────────── */

@media (max-width: 768px) {
  .guide {
    left: 12px;
    bottom: 14px;
  }

  .guide-figure {
    width: 76px;
    height: 76px;
  }

  .guide-bubble {
    width: min(288px, calc(100vw - 140px));
    margin-bottom: 28px;
    padding: 13px 13px 11px;
  }

  .guide-reopen {
    left: 12px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  .guide-reopen picture,
  .guide-reopen img {
    width: 44px;
    height: 44px;
  }
}

/* En móviles, el botón flotante de Noticias ocupa la esquina inferior
   derecha. Subimos a Guille para que su globo no quede tapado. */
@media (max-width: 640px) {
  .guide {
    bottom: 78px;
  }
}

@media (max-width: 520px) {
  .guide-figure {
    width: 64px;
    height: 64px;
  }

  .guide-bubble {
    width: min(262px, calc(100vw - 112px));
    margin-bottom: 22px;
    padding: 12px 12px 10px;
  }

  .guide-name {
    font-size: 0.98rem;
  }

  .guide-role {
    padding: 2px 6px;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }

  .guide-text {
    font-size: 0.78rem;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   3. RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .world-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .world-canvas { max-width: 620px; }

  .world-panel {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .world-section { padding: 90px 0 96px; }
  .world-section .section-header { margin-bottom: 44px; }
  .world-canvas { max-width: 520px; }
  .world-panel { padding: 26px 22px 24px; border-radius: 20px; }
  .world-stat strong { font-size: 2rem; }
  .world-list { gap: 2px 12px; }
  .world-city { font-size: 0.78rem; }
}

@media (max-width: 520px) {
  .world-canvas { max-width: 100%; }
  .world-stats { gap: 8px; }
  .world-stat strong { font-size: 1.7rem; }
  .world-stat span { font-size: 0.6rem; letter-spacing: 0.08em; }
  .world-list { grid-template-columns: 1fr; }
  .world-city { padding: 6px 6px; }
}

/* Si el visitante tiene el dedo/cursor encima del globo, los países y los
   pines responden; el resto del SVG deja pasar los gestos de arrastre. */
.world-svg { pointer-events: none; }
.world-svg .pin-anchor { pointer-events: auto; }


/* ══════════════════════════════════════════════════════════════════════
   4. ACCESIBILIDAD: REDUCIR MOVIMIENTO
   ══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .world-section::after,
  .globe-halo,
  .guide-figure,
  .guide-figure::before,
  .pin-halo,
  .world-hint i,
  .world-current i,
  .world-link-glow {
    animation: none !important;
  }

  .world-canvas { transition: none; }

  .world-pin,
  .world-link,
  .guide {
    transition: none !important;
  }

  /* Aun sin animación, todo debe quedar visible al entrar en pantalla. */
  .world-pin { opacity: 1; transform: none; }
  .world-link { opacity: 0.6; }
}
