/* ===========================================================
   ATYA CONSULTING — Refresh demo
   Token system: topographic / cartographic direction
   Display: Fraunces · Body/UI: Public Sans · Utility: JetBrains Mono
   =========================================================== */

:root {
  /* -- Brand-derived color tokens -- */
  --ink: #0f2438;
  --ink-soft: #4a5c6c;
  --navy: #1c4d7c;
  --navy-deep: #0e2c47;
  --navy-mid: #164066;
  --lime: #a6c93c;
  --lime-deep: #7fa02b;
  --clay: #bd6f3e;
  --clay-deep: #9c5527;
  --sand: #f2ead9;
  --sand-deep: #e9ddc3;
  --paper: #fbf8f2;
  --line: #ddd0b3;
  --white: #ffffff;

  /* -- Semantic -- */
  --bg: var(--sand);
  --surface: var(--paper);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--line);
  --focus-ring: #2a7fd6;

  /* -- Type -- */
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;

  /* -- Scale -- */
  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.7rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.2vw, 2.6rem);
  --step-4: clamp(2.5rem, 2rem + 2.2vw, 4rem);

  /* -- Rhythm -- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5.5rem;

  --radius: 6px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; color: var(--navy-deep); }
p { margin: 0 0 var(--space-sm); color: var(--text-soft); }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-md); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--clay-deep);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0; top: 0;
  background: var(--navy-deep); color: var(--white);
  padding: 0.75em 1.25em; z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--lime); color: var(--navy-deep); }
.btn-primary:hover { background: var(--lime-deep); }
.btn-outline { border-color: currentColor; color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-ghost { border-color: var(--border); color: var(--navy-deep); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); background: var(--white); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ===========================================================
   Header
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 0.75em; }
.brand img { height: 34px; width: auto; }
.brand-name { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); text-transform: uppercase; }

.main-nav > ul { display: flex; align-items: center; gap: var(--space-lg); }
.main-nav li { position: relative; }
.main-nav a,
.submenu-toggle {
  color: var(--white);
  font-weight: 500;
  font-size: 0.98rem;
  font-family: var(--font-body);
  position: relative;
  padding: 0.4em 0;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.main-nav a::after,
.submenu-toggle::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--lime);
  transition: right 0.25s var(--ease);
}
.main-nav a:hover::after,
.submenu-toggle:hover::after,
.main-nav a[aria-current="page"]::after,
.has-submenu.is-open .submenu-toggle::after { right: 0; }
.main-nav a[aria-current="page"] { color: var(--lime); }

.submenu-toggle svg { width: 13px; height: 13px; transition: transform 0.2s var(--ease); }
.has-submenu.is-open .submenu-toggle svg { transform: rotate(180deg); }

.submenu {
  list-style: none;
  margin: 0;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 18px 34px -14px rgba(15, 36, 56, 0.4);
  padding: 0.4em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 20;
}
.has-submenu.is-open .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a {
  display: block;
  padding: 0.6em 0.75em;
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}
.submenu a::after { display: none; }
.submenu a:hover { background: var(--sand); color: var(--navy); }
.submenu a[aria-current="page"] { color: var(--navy); background: var(--sand); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 0.5em;
  border-radius: 4px;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (min-width: 761px) {
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .has-submenu:hover > .submenu-toggle svg,
  .has-submenu:focus-within > .submenu-toggle svg {
    transform: rotate(180deg);
  }
  .has-submenu:hover > .submenu-toggle::after,
  .has-submenu:focus-within > .submenu-toggle::after {
    right: 0;
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--navy-deep);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: flex-start; gap: 0; padding: var(--space-sm) var(--space-md) var(--space-md); }
  .main-nav li { width: 100%; }
  .main-nav a,
  .submenu-toggle { display: flex; justify-content: space-between; padding: 0.9em 0; width: 100%; }

  .submenu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.25s var(--ease);
  }
  .has-submenu.is-open .submenu { max-height: 320px; padding: 0.2em 0 0.7em; }
  .submenu a { color: rgba(255, 255, 255, 0.78); padding: 0.6em 0 0.6em 1.1em; }
  .submenu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--lime); }
  .submenu a[aria-current="page"] { background: rgba(255, 255, 255, 0.06); color: var(--lime); }
}

/* ===========================================================
   Topographic motif (signature element)
   =========================================================== */
.topo-bg {
  background-image:
    repeating-radial-gradient(circle at 18% 30%, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 2px, transparent 34px),
    repeating-radial-gradient(circle at 82% 70%, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 2px, transparent 42px);
}
.topo-bg-light {
  background-image:
    repeating-radial-gradient(circle at 12% 20%, rgba(15,44,71,0.05) 0, rgba(15,44,71,0.05) 1px, transparent 2px, transparent 30px),
    repeating-radial-gradient(circle at 88% 80%, rgba(15,44,71,0.045) 0, rgba(15,44,71,0.045) 1px, transparent 2px, transparent 38px);
}

.contour-divider {
  width: 100%;
  height: 34px;
  display: block;
  color: var(--border);
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy-mid) 62%, var(--navy) 100%);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy h1 { font-size: var(--step-4); color: var(--white); margin: 0.4em 0 0.5em; }
.hero-copy h1 em { font-style: normal; color: var(--lime); }
.hero-copy p { color: rgba(255,255,255,0.78); font-size: var(--step-1); max-width: 46ch; margin-bottom: var(--space-md); }
.hero-actions { display: flex; gap: 1em; flex-wrap: wrap; }

.hero-map {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 380px;
  margin-inline: auto;
}
.hero-map svg { width: 100%; height: 100%; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.35)); }
.hero-map .pin {
  transform-origin: center bottom;
  animation: drop 0.6s var(--ease) backwards;
}
.hero-map .pin:nth-child(1) { animation-delay: 0.15s; }
.hero-map .pin:nth-child(2) { animation-delay: 0.3s; }
.hero-map .pin:nth-child(3) { animation-delay: 0.45s; }
.hero-map .pin:nth-child(4) { animation-delay: 0.6s; }
.hero-map .pin:nth-child(5) { animation-delay: 0.75s; }
@keyframes drop {
  from { opacity: 0; transform: translateY(-14px) scale(0.6); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-map .pin { animation: none; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: left; }
  .hero-map { max-width: 280px; margin-inline: 0; }
}

/* ===========================================================
   Sections
   =========================================================== */
.section { padding: var(--space-xl) 0; }
.section-tight { padding: var(--space-lg) 0; }
.section-head { max-width: 62ch; margin-bottom: var(--space-lg); }
.section-head h2 { font-size: var(--step-3); margin-top: 0.35em; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--navy-deep); color: rgba(255,255,255,0.85); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .section-head p { color: rgba(255,255,255,0.65); }

/* ===== Quiénes somos ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.about-figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.figure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}
.figure-card .num { font-family: var(--font-mono); font-size: var(--step-2); color: var(--navy); display: block; }
.figure-card .label { font-size: 0.85rem; color: var(--text-soft); }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* ===== Áreas de acción ===== */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.area-card {
  background: var(--surface);
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  transition: background 0.2s var(--ease);
}
.area-card:hover { background: var(--white); }
.area-card .icon {
  width: 42px; height: 42px;
  color: var(--navy);
}
.area-card h3 { font-size: 0.98rem; font-family: var(--font-body); font-weight: 700; color: var(--navy-deep); }
@media (max-width: 980px) { .areas-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===========================================================
   Nuestros Proyectos — teaser + full grid
   =========================================================== */
.projects-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color .25s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px -18px rgba(15,36,56,0.35); border-color: var(--navy); }
.project-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--sand-deep); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card .body { padding: var(--space-sm) var(--space-md) var(--space-md); flex: 1; display: flex; flex-direction: column; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay-deep);
  background: rgba(189,111,62,0.1);
  border: 1px solid rgba(189,111,62,0.3);
  padding: 0.3em 0.6em;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.7em;
  align-self: flex-start;
}
.project-card h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.project-meta {
  margin-top: auto;
  padding-top: 0.8em;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
}
@media (max-width: 980px) { .projects-teaser-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .projects-teaser-grid { grid-template-columns: 1fr; } }

.section-cta-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-md); flex-wrap: wrap; }

/* ===== CTA band ===== */
.cta-band {
  background: var(--lime);
  color: var(--navy-deep);
  padding: var(--space-lg) 0;
}
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.cta-band h2 { font-size: var(--step-2); }
.cta-band .btn-primary { background: var(--navy-deep); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--ink); }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.7); padding: var(--space-lg) 0 var(--space-md); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-grid h4 { color: var(--white); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1em; }
.footer-grid .brand img { height: 30px; margin-bottom: 1em; }
.footer-grid p, .footer-grid address { font-size: 0.92rem; line-height: 1.7; font-style: normal; }
.footer-grid a:hover { color: var(--lime); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.62);
  flex-wrap: wrap;
  gap: 0.5em;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); } }

/* ===========================================================
   Proyectos page — Map + Fichas técnicas
   =========================================================== */
.map-hero {
  background: var(--navy-deep);
  color: var(--white);
  padding: var(--space-xl) 0;
}
.map-hero .section-head { margin-bottom: var(--space-md); }
.map-hero p { max-width: 60ch; }

#project-map {
  height: 560px;
  width: 100%;
  background: var(--sand-deep);
  border-top: 1px solid var(--border);
}
@media (max-width: 700px) { #project-map { height: 420px; } }

.leaflet-tile-pane { filter: sepia(0.35) saturate(0.55) hue-rotate(160deg) brightness(1.08) contrast(0.96); }
.leaflet-popup-content-wrapper { border-radius: 4px; font-family: var(--font-body); }
.leaflet-popup-content { margin: 0.9em 1em; }
.map-popup .tag { margin-bottom: 0.4em; }
.map-popup h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.25em; color: var(--navy-deep); }
.map-popup a { display: inline-block; margin-top: 0.6em; color: var(--navy); font-weight: 700; font-size: 0.85rem; text-decoration: underline; }

/* ===== Agrupación de pines (cluster) ===== */
.atya-cluster { background: transparent; border: none; }
.cluster-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--navy);
  border: 3px solid var(--lime);
  border-radius: 50%;
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px -4px rgba(15, 36, 56, 0.5);
}

.map-legend {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 0.5em; }
.map-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ===== Filters ===== */
.filters { display: flex; flex-wrap: wrap; gap: 0.6em; margin-bottom: var(--space-lg); }
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.55em 1em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.is-active { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card.is-hidden { display: none; }
.project-card .view-file {
  margin-top: 0.9em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
}
.project-card .view-file svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.project-card .view-file:hover svg { transform: translateX(3px); }

/* ===== Ficha técnica (tabla reutilizada en el detalle de proyecto) ===== */
.ficha-table { width: 100%; border-collapse: collapse; margin: var(--space-sm) 0 var(--space-md); font-family: var(--font-mono); font-size: 0.82rem; }
.ficha-table tr { border-bottom: 1px dashed var(--border); }
.ficha-table td { padding: 0.85em 0; vertical-align: top; }
.ficha-table td:first-child { color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; width: 42%; padding-left: 1em; }
.ficha-table td:last-child { color: var(--ink); font-weight: 600; padding-right: 1em; }

/* ===== Demo notice ===== */
.demo-flag {
  background: var(--clay);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-align: center;
  padding: 0.55em;
  letter-spacing: 0.03em;
}
.demo-flag strong { text-transform: uppercase; }

/* ===========================================================
   Ficha de proyecto — detalle (single template)
   =========================================================== */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  gap: 0.5em;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--lime); }

.detail-hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
}
.detail-hero .cover-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 44, 71, 0.35) 0%, rgba(14, 44, 71, 0.94) 100%);
}
.detail-hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg) 0;
}
.detail-hero-content .tag {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}
.detail-hero-content h1 {
  color: var(--white);
  font-size: var(--step-3);
  margin: 0.3em 0 0.5em;
  max-width: 26ch;
}
.detail-meta-row {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.detail-content h2 {
  font-size: var(--step-2);
  margin: var(--space-lg) 0 0.6em;
}
.detail-content h2:first-child { margin-top: 0; }
.detail-content ul { margin: 0 0 var(--space-md); }
.detail-content ul li {
  position: relative;
  padding-left: 1.7em;
  margin-bottom: 0.65em;
  color: var(--text-soft);
}
.detail-content .objetivos li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--navy);
  font-weight: 700;
}
.detail-content .resultados li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--lime-deep);
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: var(--space-sm) 0 var(--space-lg);
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}
@media (max-width: 620px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

.detail-sidebar {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-sidebar .sidebar-head {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}
.detail-sidebar .ficha-table { margin: 0; padding: var(--space-sm) var(--space-md); }
#detail-map { height: 220px; width: 100%; }

.back-links {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}
