:root {
  /* Paleta luminosa, cálida y acogedora inspirada en la luz diurna de los Andes y los tejados de Paucas */
  --bg-page: #f7f4ee;
  --bg-alt: #efe9df;
  --bg-card: #ffffff;
  --bg-subtle: #f3eee6;
  --hairline: rgba(31, 27, 22, 0.1);
  --hairline-strong: rgba(31, 27, 22, 0.18);

  /* Roles de texto de alto contraste */
  --text-primary: #1f1b16;
  --text-secondary: #544b41;
  --text-muted: #766c60;

  /* Acento cálido teja andina */
  --accent: #b85318;
  --accent-hover: #9a4310;
  --accent-soft: rgba(184, 83, 24, 0.1);

  --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-tag: 6px;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;

  --shadow-card: 0 2px 8px rgba(31, 27, 22, 0.05);
  --shadow-float: 0 12px 32px rgba(31, 27, 22, 0.14);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 23px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.signature-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.signature-line::before {
  content: '';
  width: 24px;
  height: 2px;
  background-color: var(--accent);
  flex-shrink: 0;
}

.kicker-text {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--accent);
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.meta-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}

/* CABECERA CLARA Y LIMPIA */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background-color: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-coord {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 10px;
  border-left: 1px solid var(--hairline-strong);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.main-nav a:hover {
  background-color: var(--bg-alt);
  color: var(--text-primary);
}

/* BOTONES */
.btn {
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out),
    color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn-compact {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.icon-control {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.icon-control:hover {
  background-color: var(--bg-alt);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background-color: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
}

.seg-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--hairline);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* PORTADA TURÍSTICA (HERO DIVIDIDO LUMINOSO) */
.hero-tourism {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--hairline);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.6vw, 56px);
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.hero-subhead {
  font-size: 18px;
  line-height: 28px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.highlight-item strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.highlight-item span {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-main-card {
  margin: 0;
  background-color: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-float);
}

.hero-main-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.hero-photo-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 6px 2px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-photo-caption a {
  color: var(--accent);
  font-weight: 500;
}

/* SECCIONES GENERALES */
.section {
  padding: 72px 0;
}

.section-alt {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.14;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin-top: 6px;
  font-size: 16px;
  color: var(--text-secondary);
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.surface-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.panel-heading {
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* GALERÍA FOTOGRÁFICA DE PAUCAS */
.photo-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.photo-mosaic-grid[hidden],
.orbital-stage-wrap[hidden] {
  display: none;
}

.photo-card {
  grid-column: span 4;
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.photo-card.featured-wide {
  grid-column: span 6;
}

.photo-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-float);
}

.photo-card-frame {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--bg-alt);
  margin-bottom: 12px;
}

.photo-card.featured-wide .photo-card-frame {
  aspect-ratio: 16 / 10;
}

.photo-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card-caption {
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.photo-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.photo-card-caption h3 {
  font-size: 16px;
  line-height: 21px;
  font-weight: 500;
}

.photo-card-caption p {
  font-size: 13.5px;
  line-height: 19px;
}

/* CARRUSEL 3D */
.orbital-stage-wrap {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.orbital-viewport {
  position: relative;
  height: 420px;
  perspective: 1400px;
  display: grid;
  place-items: center;
  overflow: hidden;
  user-select: none;
  cursor: grab;
}

.orbital-viewport:active {
  cursor: grabbing;
}

.orbital-ring {
  position: relative;
  width: 304px;
  height: 328px;
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-out);
}

.orbital-card {
  position: absolute;
  inset: 0;
  padding: 8px;
  border-radius: var(--radius-card);
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.orbital-card-media {
  height: 188px;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--bg-alt);
  margin-bottom: 10px;
}

.orbital-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.orbital-card-body {
  padding: 0 4px 4px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.orbital-card-body h4 {
  font-size: 14px;
  line-height: 19px;
  font-weight: 500;
  margin: 4px 0;
}

.orbital-card-body p {
  font-size: 12px;
  line-height: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.orbital-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.orbit-controls {
  display: flex;
  gap: 8px;
}

/* MAPA SATELITAL REAL EN 3D */
.map3d-frame {
  position: relative;
  height: 620px;
  border-radius: var(--radius-panel);
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-float);
  background-color: #dceaf7;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.terrain-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#paucas-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#paucas-3d-canvas:active {
  cursor: grabbing;
}

.hotspot-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pin-3d-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-tag);
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out),
    color 150ms var(--ease-out);
}

.pin-3d-label:hover,
.pin-3d-label.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}

.pin-3d-label:hover .pin-dot,
.pin-3d-label.active .pin-dot {
  background-color: #ffffff;
}

.hotspot-sheet {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 360px;
  padding: 8px;
  border-radius: var(--radius-panel);
  background-color: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-float);
  transform: translateX(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 280ms var(--ease-out), opacity 200ms var(--ease-out);
}

.hotspot-sheet.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sheet-media {
  position: relative;
  height: 188px;
  border-radius: var(--radius-control);
  overflow: hidden;
  background-color: var(--bg-alt);
}

.sheet-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.sheet-body {
  padding: 14px 10px 10px;
}

.sheet-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sheet-title {
  font-size: 18px;
  line-height: 23px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sheet-sub {
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.sheet-desc {
  font-size: 13.5px;
  line-height: 19px;
  margin-bottom: 10px;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 19px;
  color: var(--text-secondary);
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 2px;
  background-color: var(--accent);
}

.map3d-toolbar {
  position: relative;
  z-index: 6;
  background-color: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--hairline);
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(8px);
}

.hotspot-buttons,
.map3d-right-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* REPRODUCTOR DE YOUTUBE Y COSTUMBRES */
.video-theater {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 20px;
  padding: 16px;
  margin-bottom: 36px;
}

.video-player-frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-control);
  overflow: hidden;
  background-color: #111111;
}

.video-player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-active-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 4px 4px;
}

.video-active-info h3 {
  font-size: 18px;
  line-height: 24px;
  margin-bottom: 4px;
}

.video-active-info p {
  font-size: 14px;
}

.video-playlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.playlist-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-control);
  background-color: var(--bg-page);
  border: 1px solid var(--hairline);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  align-items: center;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.playlist-item:hover,
.playlist-item.active {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}

.playlist-item img {
  width: 104px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.playlist-item h4 {
  font-size: 13.5px;
  line-height: 18px;
  font-weight: 500;
  margin: 2px 0;
}

.culture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.culture-card {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: var(--shadow-card);
}

.culture-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 12px;
  background-color: var(--bg-alt);
}

.culture-card-body {
  padding: 0 6px 8px;
}

.culture-card-body h4 {
  font-size: 16px;
  line-height: 21px;
  margin: 4px 0 6px;
}

.culture-card-body p {
  font-size: 13.5px;
  line-height: 19px;
}

/* EVOLUCIÓN SATELITAL REAL DE GOOGLE EARTH */
.satellite-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sat-main-panel {
  padding: 20px;
}

.timeline-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.step-tab {
  padding: 10px 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--hairline);
  background-color: var(--bg-page);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.step-tab strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.step-tab span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-tab.active {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}

.sat-slider-row {
  margin-bottom: 14px;
}

#sat-range-slider {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.sat-frame {
  border-radius: var(--radius-control);
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  background-color: #1c1917;
  margin-bottom: 20px;
}

.sat-frame img {
  width: 100%;
  aspect-ratio: 16 / 9.2;
  object-fit: cover;
  display: block;
}

.sat-caption-bar {
  padding: 10px 16px;
  background-color: var(--bg-page);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.sat-details-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.sat-copy-col p {
  margin: 8px 0 14px;
  font-size: 14px;
}

.sat-stats-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 24px;
  border-left: 1px solid var(--hairline);
}

.delta-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.delta-number {
  font-size: 28px;
  line-height: 32px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.delta-ref {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.urban-rail {
  padding: 24px;
}

.urban-rail-group {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.urban-rail-group h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* HISTORIA E IDENTIDAD */
.editorial-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.editorial-card {
  padding: 24px;
}

.editorial-card p {
  margin-top: 8px;
}

.vertiente-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.vertiente-box h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.chronology-table {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  padding: 8px 24px;
  box-shadow: var(--shadow-card);
}

.chronology-row {
  display: grid;
  grid-template-columns: 200px 260px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}

.chronology-row:last-child {
  border-bottom: 0;
}

.chronology-row h4 {
  font-size: 16px;
  font-weight: 600;
}

/* TABLA DE 26 PUEBLOS Y ANEXOS */
.search-field {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
}

.search-field input {
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
}

.search-field input:focus {
  outline: none;
}

.ledger-wrap {
  overflow-x: auto;
}

.localities-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.localities-table thead th {
  height: 44px;
  padding: 0 16px;
  background-color: var(--bg-page);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.localities-table tbody tr {
  border-bottom: 1px solid var(--hairline);
  transition: background-color 120ms var(--ease-out);
}

.localities-table tbody tr:last-child {
  border-bottom: 0;
}

.localities-table tbody tr:hover {
  background-color: var(--bg-page);
}

.localities-table tbody tr.is-capital {
  background-color: var(--accent-soft);
}

.localities-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.localities-table .col-num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.localities-table .col-desc {
  color: var(--text-secondary);
  font-size: 13.5px;
  max-width: 480px;
}

.localities-table .col-action {
  text-align: right;
  white-space: nowrap;
}

.loc-name {
  font-weight: 600;
  color: var(--text-primary);
}

.table-link-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-tag);
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-card);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.table-link-btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* SECCIÓN 7: REDES SOCIALES DIRECTAS */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiet-tag {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-tag);
  background-color: var(--bg-subtle);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.social-direct-card {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.social-direct-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-float);
}

.social-platform-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  margin-bottom: 10px;
}

.social-direct-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.social-direct-card p {
  font-size: 13.5px;
  line-height: 19px;
}

.social-cta-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

/* PIE DE PÁGINA LIMPIO */
.site-footer {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  font-size: 15px;
  color: var(--text-primary);
}

.footer-note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-right a:hover {
  color: var(--accent);
}

/* MODAL LIGHTBOX */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(25, 22, 18, 0.8);
  backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(880px, 94vw);
  padding: 10px;
}

.lightbox-media-wrap {
  position: relative;
  border-radius: var(--radius-control);
  overflow: hidden;
  background-color: #181614;
}

.lightbox-media-wrap img {
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  display: block;
}

.lightbox-meta {
  padding: 16px 12px 10px;
}

.lightbox-meta p {
  margin-top: 6px;
}

.lightbox-actions {
  margin-top: 16px;
}

/* ADAPTACIÓN MÓVIL */
@media (max-width: 1080px) {
  .main-nav,
  .brand-coord {
    display: none;
  }
  .hero-split,
  .satellite-layout,
  .editorial-split,
  .video-theater {
    grid-template-columns: 1fr;
  }
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-card,
  .photo-card.featured-wide {
    grid-column: span 6;
  }
  .chronology-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .hotspot-sheet {
    top: auto;
    bottom: 68px;
    left: 16px;
    right: 16px;
    width: auto;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 20px;
  }
  .section {
    padding: 52px 0;
  }
  .hero-highlights,
  .culture-grid,
  .timeline-tabs,
  .sat-details-body {
    grid-template-columns: 1fr;
  }
  .sat-stats-col {
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }
  .photo-card,
  .photo-card.featured-wide {
    grid-column: span 12;
  }
  .hero-main-card img {
    height: 340px;
  }
}
