/* ==========================================================================
   10K Caravaca de la Cruz — Hoja de estilos principal
   Carrera solidaria · Caravaca de la Cruz, Región de Murcia
   Colores corporativos: azul y blanco
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Work+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&family=Roboto:wght@400;500;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Marca — azul y blanco */
  --blue-950: #061a36;
  --blue-900: #0a2750;
  --blue-800: #0f3468;
  --blue-700: #144582;
  --blue-600: #17569e;
  --blue-500: #1c6bc4;
  --blue-400: #3f8bdc;
  --blue-300: #7db0ea;
  --blue-150: #d9e9fa;
  --blue-100: #e8f1fb;
  --blue-50: #f4f8fd;
  --white: #ffffff;
  --ink-900: #0c1a2e;
  --ink-700: #38536f;
  --ink-500: #61789a;
  --line-soft: rgba(12, 26, 46, 0.12);
  --line-soft-light: rgba(255, 255, 255, 0.16);
  --shadow-soft: 0 20px 50px -25px rgba(6, 26, 54, 0.45);
  --shadow-lift: 0 30px 60px -20px rgba(6, 26, 54, 0.5);

  /* Tipografía */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto', 'Segoe UI', Arial, sans-serif;

  /* Ritmo */
  --container: 1240px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }

::selection { background: var(--blue-500); color: var(--white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 900px) {
  .container { padding-inline: 40px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--blue-600);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-top: 14px;
  color: var(--ink-900);
}

.section-head p {
  margin-top: 16px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-700);
}

.section-head.center { margin-inline: auto; text-align: center; }
.section-head.on-dark h2 { color: var(--white); }
.section-head.on-dark p { color: rgba(255,255,255,0.76); }
.section-head.on-dark .eyebrow { color: var(--blue-300); }

section { position: relative; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.13s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.21s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.29s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.37s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.45s; }

/* --------------------------------------------------------------------------
   3. Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 16px 30px -12px rgba(28, 107, 196, 0.55);
}
.btn-primary:hover { transform: translateY(-3px); background: var(--blue-600); box-shadow: 0 22px 34px -12px rgba(28, 107, 196, 0.65); }

.btn-white {
  background: var(--white);
  color: var(--blue-700);
  box-shadow: 0 16px 30px -14px rgba(6, 26, 54, 0.4);
}
.btn-white:hover { transform: translateY(-3px); background: var(--blue-100); }

.btn-ghost-light {
  border-color: rgba(255,255,255,0.45);
  color: var(--white);
  background: rgba(255,255,255,0.06);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.75); transform: translateY(-3px); }

.btn-outline-navy {
  border-color: var(--blue-700);
  color: var(--blue-700);
  background: transparent;
}
.btn-outline-navy:hover { background: var(--blue-700); color: var(--white); transform: translateY(-3px); }

.btn-block { width: 100%; }
.btn-sm { padding: 12px 22px; font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   4. Barra superior de utilidad + Header
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--blue-950);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}
.topbar a { color: rgba(255,255,255,0.85); transition: color .2s; }
.topbar a:hover { color: var(--blue-300); }
.topbar-links { display: flex; align-items: center; gap: 22px; }
.topbar-links .dot { color: var(--blue-400); }
.topbar-hide-mobile { display: none; }
@media (min-width: 720px) { .topbar-hide-mobile { display: inline; } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 26, 54, 0.97);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: var(--blue-950);
  box-shadow: 0 12px 30px -18px rgba(0,0,0,0.6);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-text .b1 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--white);
  font-size: 1.32rem;
  letter-spacing: 0.03em;
}
.brand-text .b1 span { color: var(--blue-300); }
.brand-text .b2 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.main-nav { display: none; }
@media (min-width: 1080px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .main-nav a {
    color: rgba(255,255,255,0.82);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 10px 15px;
    border-radius: 999px;
    transition: background .25s, color .25s;
  }
  .main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.1); color: var(--white); }
}

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta { display: none; }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }

.burger {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  flex-direction: column;
  gap: 5px;
}
@media (min-width: 1080px) { .burger { display: none; } }
.burger span {
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 78px 0 0 0;
  background: var(--blue-950);
  z-index: 99;
  padding: 30px 24px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  overflow-y: auto;
}
.mobile-nav.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  text-transform: uppercase;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav .btn { margin-top: 26px; }
@media (min-width: 1080px) { .mobile-nav { display: none; } }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 8%, rgba(63,139,220,0.35), transparent 42%),
    radial-gradient(circle at 6% 96%, rgba(63,139,220,0.22), transparent 45%),
    linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 48%, var(--blue-800) 100%);
}

.hero-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
}

.hero-cross {
  position: absolute;
  z-index: 1;
  opacity: 0.08;
  pointer-events: none;
}
.hero-cross.c1 { top: 6%; right: -70px; width: 360px; transform: rotate(12deg); }
.hero-cross.c2 { bottom: 12%; left: -90px; width: 240px; transform: rotate(-18deg); opacity: 0.06; }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 130px;
  padding-bottom: 64px;
}

.hero-eyebrow { color: var(--blue-300); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.2rem, 9.5vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin-top: 18px;
}
.hero-title .line2 { color: var(--blue-300); }

.hero-sub {
  margin-top: 22px;
  max-width: 580px;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.84);
  font-weight: 400;
}
.hero-sub strong { color: var(--white); font-weight: 700; }

.hero-meta-row {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}
.meta-chip svg { width: 17px; height: 17px; color: var(--blue-300); flex-shrink: 0; }

.hero-ctas {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.hero-reglamento-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255,255,255,0.35);
}
.hero-reglamento-link:hover { color: var(--white); text-decoration-color: var(--white); }
.hero-reglamento-link svg { width: 16px; height: 16px; }

/* Contador regresivo */
.countdown-wrap {
  margin-top: 46px;
}
.countdown-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.countdown {
  display: inline-flex;
  align-items: stretch;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 100%;
}
.countdown .cd-box {
  text-align: center;
  padding: 16px 18px;
  min-width: 68px;
}
@media (min-width: 480px) { .countdown .cd-box { padding: 18px 26px; min-width: 84px; } }
.countdown .cd-box + .cd-box { border-left: 1px solid rgba(255,255,255,0.14); }
.countdown .cd-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1;
  color: var(--white);
  display: block;
  font-variant-numeric: tabular-nums;
}
.countdown .cd-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-300);
}

/* --------------------------------------------------------------------------
   6. Ticker / Marquee
   -------------------------------------------------------------------------- */
.ticker {
  background: var(--white);
  color: var(--blue-800);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 34s linear infinite;
}
.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-track span b { color: var(--blue-500); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   7. Stats
   -------------------------------------------------------------------------- */
.stats {
  background: var(--blue-950);
  color: var(--white);
  padding-block: 54px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
@media (min-width: 720px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { border-left: 2px solid rgba(255,255,255,0.18); padding-left: 18px; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4vw, 3rem);
  color: var(--blue-300);
  line-height: 1;
}
.stat-label {
  margin-top: 8px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   8. Cartel oficial destacado
   -------------------------------------------------------------------------- */
.poster {
  padding-block: 110px;
  background: var(--blue-50);
  overflow: hidden;
}
.poster-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 54px;
  align-items: center;
}
@media (min-width: 960px) {
  .poster-grid { grid-template-columns: 0.8fr 1.2fr; gap: 70px; }
}
.poster-media { position: relative; display: flex; justify-content: center; }
.poster-media img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  transform: rotate(-2.2deg);
  border: 6px solid var(--white);
}
.poster-copy .eyebrow { color: var(--blue-600); }
.poster-copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin-top: 14px;
  color: var(--ink-900);
}
.poster-copy > p {
  margin-top: 18px;
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--ink-700);
  max-width: 560px;
}

.poster-schedule {
  margin-top: 32px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}
.poster-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.poster-row .time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue-600);
  font-weight: 500;
}
.poster-row .what { font-size: 0.97rem; color: var(--ink-900); font-weight: 600; }
.poster-row .what small { display: block; font-weight: 400; color: var(--ink-500); font-size: 0.82rem; margin-top: 2px; }
.poster-row .dist { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-500); white-space: nowrap; }

.poster-note {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blue-100);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.poster-note svg { width: 26px; height: 26px; color: var(--blue-600); flex-shrink: 0; }
.poster-note p { font-size: 0.9rem; color: var(--blue-800); line-height: 1.5; }
.poster-note strong { font-weight: 700; }

.poster-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }

/* --------------------------------------------------------------------------
   9. Recorrido interactivo
   -------------------------------------------------------------------------- */
.route {
  padding-block: 110px;
  background: var(--white);
}

.route-facts-row {
  margin-top: 46px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 700px) { .route-facts-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .route-facts-row { grid-template-columns: repeat(4, 1fr); } }
.route-fact-mini {
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.route-fact-mini .num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--blue-500);
  width: 32px;
  flex-shrink: 0;
}
.route-fact-mini h4 { font-size: 0.95rem; font-weight: 700; color: var(--ink-900); }
.route-fact-mini p { margin-top: 4px; font-size: 0.86rem; color: var(--ink-500); line-height: 1.5; }

.route-visual {
  margin-top: 50px;
  background: var(--blue-950);
  border-radius: var(--radius-lg);
  padding: 34px 28px 30px;
  color: var(--white);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.route-visual .rv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  position: relative;
  z-index: 1;
}
.route-visual .rv-head b { color: var(--blue-300); }

.route-map {
  margin-top: 18px;
  position: relative;
  z-index: 1;
  padding: 10px;
  border-radius: 16px;
  background: var(--blue-900);
  border: 1px solid rgba(255,255,255,0.08);
}
.route-map svg { width: 100%; height: auto; overflow: visible; border-radius: 8px; }

.map-park { fill: #cfe6c8; }
.map-tree { fill: #4f8f52; }
.map-blocks rect { fill: #c7cdd6; stroke: #b3bac6; stroke-width: 1; rx: 3; }
.map-icon-dark { fill: #55606f; }
.map-icon-castle { fill: #a98a68; }
.map-deco, .map-compass { pointer-events: none; }

.route-map .track-line-under {
  fill: none;
  stroke: #ffffff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-map .track-line {
  fill: none;
  stroke: var(--blue-500);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-point { cursor: pointer; }
.route-point circle.dot {
  fill: var(--blue-600);
  stroke: var(--white);
  stroke-width: 2.5;
  transition: r .25s var(--ease), fill .25s var(--ease);
}
.route-point circle.dot-halo {
  fill: none;
  stroke: var(--blue-500);
  stroke-width: 2;
  opacity: 0.5;
  animation: pin-halo 2.4s ease-out infinite;
  transform-origin: 460px 470px;
}
@keyframes pin-halo {
  0% { transform: scale(0.7); opacity: 0.55; }
  100% { transform: scale(1.5); opacity: 0; }
}
.route-point.is-start circle.dot { fill: var(--blue-500); }
.route-point circle.dot-aid { fill: var(--blue-300); }
.route-point circle.dot-control { fill: var(--blue-300); }
.route-point:hover circle.dot, .route-point:focus circle.dot, .route-point.is-active circle.dot {
  fill: var(--ink-900);
  r: 15;
}
.route-point text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10.5px;
  fill: var(--white);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

/* Bocadillo flotante sobre el punto seleccionado */
.map-popover {
  position: absolute;
  z-index: 6;
  width: 216px;
  background: var(--ink-900);
  color: var(--white);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.8rem;
  line-height: 1.45;
  box-shadow: 0 16px 32px -12px rgba(2,8,23,0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events: none;
  --tail-x: 20px;
}
.map-popover.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.map-popover::after {
  content: '';
  position: absolute;
  left: var(--tail-x);
  width: 11px; height: 11px;
  background: var(--ink-900);
  transform: translateX(-50%) rotate(45deg);
}
.map-popover:not(.is-below)::after { bottom: -5px; }
.map-popover.is-below::after { top: -5px; }
.map-popover .popover-title { font-weight: 700; font-size: 0.85rem; color: var(--blue-300); }
.map-popover .popover-desc { margin-top: 3px; color: rgba(255,255,255,0.88); }

.route-hint {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  position: relative;
  z-index: 1;
}

.route-legend-grid {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) { .route-legend-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .route-legend-grid { grid-template-columns: repeat(4, 1fr); } }
.legend-card { display: flex; flex-direction: column; }
.legend-ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.09);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.legend-ic svg { width: 19px; height: 19px; color: var(--blue-300); }
.legend-card b { font-size: 0.92rem; color: var(--white); }
.legend-card p { margin-top: 5px; font-size: 0.84rem; color: rgba(255,255,255,0.65); line-height: 1.55; }

.route-official {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.route-official span { font-size: 0.78rem; color: rgba(255,255,255,0.4); }
.route-official a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   10. Alojamiento teaser
   -------------------------------------------------------------------------- */
.stay {
  position: relative;
  padding-block: 130px;
  color: var(--white);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 30%, rgba(63,139,220,0.4), transparent 45%),
    linear-gradient(150deg, var(--blue-950) 0%, var(--blue-900) 55%, var(--blue-800) 100%);
}
.stay .container { position: relative; z-index: 1; }
.stay-content { max-width: 560px; }
.stay-content .eyebrow { color: var(--blue-300); }
.stay-content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 14px;
  line-height: 1.05;
}
.stay-content p { margin-top: 18px; font-size: 1rem; line-height: 1.7; color: rgba(255,255,255,0.8); }
.stay-stats {
  margin-top: 28px;
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.stay-stats div .n { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; color: var(--blue-300); }
.stay-stats div .l { font-size: 0.78rem; color: rgba(255,255,255,0.62); margin-top: 4px; }
.stay-content .btn { margin-top: 32px; }

/* --------------------------------------------------------------------------
   11. Contacto + Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--blue-950);
  color: rgba(255,255,255,0.62);
  padding-top: 64px;
}

.footer-orgs {
  padding-bottom: 46px;
  margin-bottom: 46px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.footer-orgs h5 {
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-orgs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 620px) { .footer-orgs-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-org-card {
  background: var(--blue-150);
  border-radius: var(--radius-sm);
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  transition: background .3s;
}
.footer-org-card:hover { background: var(--blue-300); }
.footer-org-card img { max-width: 100%; max-height: 52px; object-fit: contain; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
@media (min-width: 860px) { .footer-top { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.65; max-width: 320px; }
.footer-col h5 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 12px; }
.footer-col a { font-size: 0.9rem; transition: color .2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.footer-bottom .credit a { color: var(--blue-300); font-weight: 700; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px -10px rgba(28,107,196,0.6);
  border: none;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}
.back-to-top:hover { background: var(--blue-600); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   12. Páginas internas (alojamientos / patrocinadores)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding: 160px 0 90px;
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 60%, var(--blue-800) 100%);
  color: var(--white);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(63,139,220,0.3), transparent 50%);
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--blue-300); }
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-top: 14px;
  line-height: 1;
}
.page-hero p { margin-top: 18px; max-width: 600px; color: rgba(255,255,255,0.72); font-size: 1.05rem; line-height: 1.65; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: var(--blue-300); }

.stay-directory { padding-block: 90px; background: var(--blue-50); }
.stay-directory .intro { max-width: 700px; margin-bottom: 50px; }
.stay-directory .intro p { color: var(--ink-700); line-height: 1.7; font-size: 1rem; }

.stay-block { margin-bottom: 54px; }
.stay-block h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--blue-900);
}
.stay-block h2 .count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--white);
  background: var(--blue-500);
  padding: 4px 10px;
  border-radius: 999px;
}
.stay-table-wrap {
  margin-top: 22px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}
.stay-table { min-width: 640px; }
.stay-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--blue-100);
  padding: 14px 20px;
}
.stay-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 400;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-900);
}
.stay-table tr:hover td { background: var(--blue-50); }
.stay-table td.name { font-weight: 500; color: var(--ink-900); }
.stay-table td.phone { font-family: var(--font-mono); font-size: 0.83rem; font-weight: 400; color: var(--ink-700); white-space: nowrap; }
.stay-table td.cap { text-align: center; font-weight: 500; color: var(--blue-600); }

.sponsors { padding-block: 90px; background: var(--white); }
.sponsors-group { margin-bottom: 54px; }
.sponsors-group:last-child { margin-bottom: 0; }
.sponsors-group h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sponsors-group h3::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 620px) { .sponsors-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .sponsors-grid { grid-template-columns: repeat(4, 1fr); } }
.sponsor-card {
  background: var(--blue-100);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: transform .3s, border-color .3s, background .3s;
}
.sponsor-card:hover { transform: translateY(-4px); border-color: var(--blue-400); background: var(--blue-150); }
.sponsor-card img { max-width: 100%; max-height: 62px; object-fit: contain; }

.page-cta {
  padding-block: 80px;
  background: var(--blue-950);
  color: var(--white);
  text-align: center;
}
.page-cta h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}
.page-cta p { margin: 16px auto 30px; max-width: 480px; color: rgba(255,255,255,0.7); }
