/*
Theme Name: COARTCUL - Raiz del Biobio
Theme URI: https://coartcul.cl
Author: Codilogia
Author URI: https://codilogia.cl/
Description: Tema oficial para COARTCUL. Integra el archivo interactivo de Memoria Viva, catalogo documental, gestion de noticias y la cartografia comunitaria de San Rosendo con mapa interactivo Leaflet.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: coartcul
*/
/* =========================================================
   COARTCUL — Paleta Oficial + Fondo Glassmorphism Animado
   ========================================================= */

/* ── Tokens / Variables ──────────────────────────────────── */
:root {
  /* Cacao (marrón) */
  --c-cacao-900: #2b0f0f;
  --c-cacao-700: #5a1d1b;
  --c-cacao-500: #7b2b23;

  /* Acentos */
  --c-coral-star: #c8194f;
  --c-coral-hover: #a31240;
  --c-canela-line: #8e3b30;

  /* Río (teal) */
  --c-rio-700: #0f8c85;
  --c-rio-500: #17a29a;
  --c-rio-300: #79c3c2;

  /* Cielo y Lima */
  --c-cielo-200: #bddde0;
  --c-lima-500: #d6d22a;

  /* Arena (fondos) */
  --c-sand-100: #f6f4ef;
  --c-sand-200: #ece7df;
  --c-white: #ffffff;

  /* Texto */
  --text-main: var(--c-cacao-900);
  --text-sub: #5a1d1b;
  --text-mute: #8e6b65;

  /* Sombras */
  --shadow-sm: 0 1px 6px rgba(43, 15, 15, .07);
  --shadow-md: 0 4px 20px rgba(43, 15, 15, .11);
  --shadow-lg: 0 12px 48px rgba(43, 15, 15, .16);

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;

  /* Tipografías */
  --font-h: 'Outfit', sans-serif;
  --font-b: 'Inter', sans-serif;

  /* Easings */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ── Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-b);
  background: var(--c-sand-100);
  color: var(--text-main);
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

/* ── Fondo animado optimizado (GPU 0%) ───────────────────── */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background: var(--c-sand-100);
  contain: strict;
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  animation: blob-float 26s ease-in-out infinite alternate;
  will-change: transform;
}

/* Pausar animación de blobs al hacer scroll pasando la portada (0% uso de GPU) */
.site-bg.is-paused .blob {
  animation-play-state: paused !important;
}

.blob.b1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(121, 195, 194, 0.42) 0%, rgba(121, 195, 194, 0.22) 38%, rgba(121, 195, 194, 0.05) 58%, transparent 72%);
  top: -200px;
  left: -200px;
  animation-duration: 26s;
}

.blob.b2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(214, 210, 42, 0.22) 0%, rgba(214, 210, 42, 0.10) 38%, rgba(214, 210, 42, 0.03) 58%, transparent 72%);
  top: 20%;
  right: -180px;
  animation-duration: 32s;
  animation-delay: -8s;
}

.blob.b3 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(189, 221, 224, 0.42) 0%, rgba(189, 221, 224, 0.20) 38%, rgba(189, 221, 224, 0.04) 58%, transparent 72%);
  bottom: -200px;
  left: 30%;
  animation-duration: 28s;
  animation-delay: -15s;
}

/* Animación simplificada a solo traslación GPU (sin re-escalado de texturas radiales) */
@keyframes blob-float {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(35px, -30px, 0);
  }

  100% {
    transform: translate3d(-30px, 25px, 0);
  }
}

/* Noise texture overlay desactivado por rendimiento GPU */
.site-bg::after {
  display: none;
}

/* ── Typography helpers ──────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-h);
  font-weight: 800;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-b);
  cursor: pointer;
}

.section-tag {
  display: none;
}

/* El usuario pidió retirarlos */

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--c-cacao-700);
  margin-bottom: 1rem;
}

.section-title span {
  color: var(--c-rio-500);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-mute);
  max-width: 640px;
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mt-2 {
  margin-top: .5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-pad {
  padding: 6rem 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.9rem;
  border-radius: 100px;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-spring), background-color .35s var(--ease-spring), border-color .35s var(--ease-spring), color .35s var(--ease-spring), box-shadow .35s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transition: transform .55s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--c-coral-star);
  color: #fff;
  box-shadow: 0 8px 20px rgba(200, 25, 79, .28);
}

.btn-primary:hover {
  background: var(--c-coral-hover);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(200, 25, 79, .36);
}

.btn-outline {
  background: transparent;
  border-color: var(--c-rio-700);
  color: var(--c-rio-700);
}

.btn-outline:hover {
  background: var(--c-rio-700);
  color: #fff;
  transform: translateY(-3px);
}

/* Adaptación responsive armónica para todos los botones estándar */
@media (max-width: 768px) {
  .btn {
    padding: .7rem 1.6rem;
    font-size: .95rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: .62rem 1.35rem;
    font-size: .88rem;
    gap: .45rem;
  }
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, .05);
  transition: transform .35s var(--ease-expo), box-shadow .35s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}



/* =========================================================
   NAVBAR
   ========================================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  background: transparent;
  border-bottom: 1px solid transparent;
}
#navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(246, 244, 239, .98);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--c-sand-200);
  opacity: 0;
  transition: opacity .4s var(--ease-expo);
  z-index: -1;
}

/* Soporte nativo para la barra de administración de WordPress */
.admin-bar #navbar {
  top: 32px;
}

.admin-bar #inicio {
  padding-top: calc(80px + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar #navbar {
    top: 46px;
  }

  .admin-bar #inicio {
    padding-top: calc(80px + 46px);
  }

  .admin-bar .mobile-menu {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

@media screen and (max-width: 600px) {
  #wpadminbar {
    position: fixed !important;
  }

  .admin-bar #navbar {
    top: 46px !important;
  }
}

#navbar.scrolled {
  padding: .7rem 0;
}
#navbar.scrolled::before {
  opacity: 1;
}

/* En navegadores basados en Chromium/WebKit se mantiene el blur sutil; en Firefox se desactiva para 60fps constantes */
@supports not (-moz-appearance: none) {
  #navbar::before {
    background: rgba(246, 244, 239, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

body.menu-open #navbar.scrolled::before,
body.menu-open #navbar::before {
  opacity: 0 !important;
}


.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 52px;
  border-radius: 4px;
  transition: transform .3s;
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

/* Links: blancos sobre hero oscuro */
.nav-link {
  font-size: .93rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .88);
  position: relative;
  padding: .4rem 0;
  transition: color .3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--c-rio-300);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Links: oscuros cuando scrolleado */
#navbar.scrolled .nav-link {
  color: var(--text-sub);
}

#navbar.scrolled .nav-link::after {
  background: var(--c-rio-500);
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
  color: var(--c-cacao-700);
}

.nav-cta {
  background: var(--c-coral-star);
  color: #fff;
  padding: .55rem 1.4rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: .9rem;
  box-shadow: 0 4px 14px rgba(200, 25, 79, .3);
  transition: background-color .3s ease, transform .3s ease, box-shadow .3s ease;
  border: none;
}

.nav-cta:hover {
  background: var(--c-coral-hover);
  transform: translateY(-2px);
}

/* Mobile */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.bar {
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 4px;
  transition: .4s;
}

#navbar.scrolled .bar {
  background: var(--c-cacao-700);
}

body.menu-open .bar {
  background: var(--c-cacao-700) !important;
}

/* Force color when menu is open */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(246, 244, 239, .98);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 65px;
  padding-bottom: 40px;
  gap: 2rem;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  list-style: none;
  width: 100%;
}

.mobile-menu-list li {
  text-align: center;
}

.mobile-link {
  font-size: 1.6rem;
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--c-cacao-700);
  transition: color .3s;
}

.mobile-link:hover {
  color: var(--c-rio-500);
}

.mobile-link.emphasis {
  color: var(--c-coral-star);
  font-size: 2rem;
}

@media screen and (max-width: 480px) {
  .mobile-menu-list {
    gap: 1.2rem;
  }
  .mobile-link {
    font-size: 1.3rem;
  }
  .mobile-link.emphasis {
    font-size: 1.6rem;
  }
}

/* =========================================================
   HERO
   ========================================================= */
#inicio {
  min-height: 100vh;
  padding-top: 80px;
  background-image: linear-gradient(rgba(20, 5, 5, 0.75), rgba(43, 15, 15, 0.5)), url('img/fondo.jpeg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

#inicio .container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Decorative rings */
#inicio::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -160px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
  pointer-events: none;
}

#inicio::after {
  content: '';
  position: absolute;
  bottom: -220px;
  left: -220px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: rgba(200, 25, 79, .07);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0px;
}

.hero-title-logo {
  margin-bottom: 0px;
  margin-top: -2.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-img-title {
  max-width: 680px;
  width: 90%;
  height: auto;
  transition: transform 0.5s var(--ease-spring);
}

.hero-img-title:hover {
  transform: scale(1.02);
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, .78);
  max-width: 600px;
  margin: -2.5rem auto 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn-hero-primary {
  background: var(--c-coral-star);
  color: #fff;
  box-shadow: 0 8px 24px rgba(200, 25, 79, .35);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 100px;
  padding: .85rem 2rem;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: transform .35s var(--ease-spring), background-color .35s var(--ease-spring);
}

.btn-hero-primary:hover {
  background: var(--c-coral-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(200, 25, 79, .45);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .35);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 100px;
  padding: .85rem 2rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: transform .35s ease, background-color .35s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-3px);
}

/* Stats panel */

.hero-stats {
  width: 100%;
  background: rgba(20, 5, 5, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: auto;
  /* Push to bottom of flex hero if needed, but it's currently at end of flow */
  position: relative;
  z-index: 10;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-align: left;
  transition: transform 0.3s;
  flex: 1 1 auto;
  justify-content: center;
}

.stat-item:hover {
  transform: translateY(-3px);
}

.stat-item i {
  font-size: 1.6rem;
  color: var(--c-rio-300);
  background: rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.stat-num {
  font-family: var(--font-h);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 3.5ch;
  text-align: center;
}

.stat-lbl {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  max-width: 100px;
}

@media (max-width: 1200px) {
  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  .stat-item {
    flex: 1 1 calc(33.333% - 1.5rem);
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .hero-stats {
    padding: 1.2rem 1rem;
    gap: 1.2rem;
  }

  .stat-item {
    flex: 1 1 calc(50% - 1.2rem);
    min-width: 120px;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
  }

  .stat-item i {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .stat-num {
    font-size: 1.2rem;
  }

  .stat-lbl {
    font-size: 0.6rem;
  }
}

/* =========================================================
   2. QUIÉNES SOMOS
   ========================================================= */
#quienes-somos {
  background: transparent;
  padding: 6rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  padding: 2rem;
  background: var(--c-white);
  border-radius: var(--r-md);
  /* Material Design elevation simplificada para rendimiento en Firefox */
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(43, 15, 15, .05);
  transition: transform .35s var(--ease-expo), border-color .35s;
}

.about-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--c-rio-300);
}

.about-card-icon {
  font-size: 2rem;
  color: var(--c-rio-700);
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.3rem;
  color: var(--c-cacao-700);
  margin-bottom: .8rem;
}

.about-card p {
  color: var(--text-mute);
  font-size: .95rem;
}

.about-card p+p {
  margin-top: .5rem;
}

/* =========================================================
   EQUIPO (Team Cards)
   ========================================================= */
.team-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(43, 15, 15, .05);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, .05);
  text-align: center;
  transition: transform .35s var(--ease-expo), box-shadow .35s;
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.team-img-wrap {
  width: 100%;
  height: 260px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: hidden;
  background: var(--c-sand-200);
  flex-shrink: 0;
}

.team-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.team-info-badge {
  margin: -2.5rem 1rem 1.2rem;
  padding: 1.2rem 0.5rem;
  border-radius: var(--r-md);
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.badge-coral {
  background: var(--c-coral-star);
  color: #fff;
}

.badge-rio {
  background: var(--c-rio-700);
  color: #fff;
}

.team-info-badge h4 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  line-height: 1.1;
}

.team-role {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
}

.team-prof {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 0.3rem;
}

.team-desc {
  padding: 0 1.2rem;
  font-size: 0.9rem;
  color: var(--text-mute);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.5;
}

/* =========================================================
   3. MEMORIA VIVA
   ========================================================= */
#memoria-viva {
  background: var(--c-sand-200);
  padding: 6rem 0;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--c-white);
  border: 1.5px solid rgba(43, 15, 15, .15);
  color: var(--text-mute);
  padding: .45rem 1.3rem;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--c-rio-700);
  border-color: var(--c-rio-700);
  color: #fff;
}

.bento-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px;
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.gallery-item {
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform .4s var(--ease-expo);
}

.gallery-item:hover {
  transform: scale(1.025);
  box-shadow: var(--shadow-lg);
}

.gallery-item.i-large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.i-wide {
  grid-column: span 2;
}

.gallery-item.i-nor {
  grid-column: span 1;
}

.gallery-item-1 {
  background: linear-gradient(135deg, var(--c-cacao-900), var(--c-cacao-700));
}

.gallery-item-2 {
  background: linear-gradient(135deg, var(--c-rio-700), var(--c-rio-500));
}

.gallery-item-3 {
  background: linear-gradient(135deg, var(--c-canela-line), var(--c-cacao-500));
}

.gallery-item-4 {
  background: linear-gradient(135deg, var(--c-lima-500), var(--c-rio-300));
}

.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 15, 15, .8) 0%, rgba(43, 15, 15, .15) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: .85;
  transition: opacity .3s;
}

.gallery-item:hover .item-overlay {
  opacity: 1;
}

.item-tag {
  align-self: flex-start;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  padding: .2rem .7rem;
  border-radius: 4px;
  font-size: .78rem;
  margin-bottom: .6rem;
}

.item-overlay h4 {
  color: #fff;
  font-size: 1.2rem;
}

.item-overlay p {
  color: rgba(255, 255, 255, .8);
  font-size: .87rem;
  margin-top: .3rem;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(200, 25, 79, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 0 20px rgba(200, 25, 79, .5);
}

.gallery-item:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Audio mock */
.audio-player-mock {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(0, 0, 0, .25);
  padding: .5rem .8rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, .1);
}

.btn-icon {
  background: var(--c-rio-500);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waveform {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 18px;
}

.waveform span {
  width: 3px;
  background: rgba(255, 255, 255, .6);
  border-radius: 2px;
}

.waveform span:nth-child(even) {
  height: 100%;
}

.waveform span:nth-child(odd) {
  height: 45%;
}

.audio-time {
  color: rgba(255, 255, 255, .7);
  font-size: .8rem;
}

/* =========================================================
   4. APRENDIZAJES Y SABERES
   ========================================================= */
#saberes {
  background: transparent;
  padding: 6rem 0;
}

.saberes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.saberes-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(43, 15, 15, .05);
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease-expo), box-shadow .35s, border-color .35s;
}

.saberes-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-rio-500);
}

.saberes-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 1.2rem;
}

.si-green {
  background: var(--c-rio-700);
}

.si-gold {
  background: var(--c-lima-500);
}

.si-red {
  background: var(--c-coral-star);
}

.saberes-card h3 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
  color: var(--c-cacao-700);
}

.saberes-card p {
  color: var(--text-mute);
  font-size: .93rem;
  flex: 1;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-sand-200);
  color: var(--c-rio-700);
  font-weight: 600;
  font-size: .9rem;
  transition: color .3s;
}

.download-link:hover {
  color: var(--c-rio-500);
}

/* =========================================================
   6. TRANSPARENCIA
   ========================================================= */
#transparencia {
  background: transparent;
  padding: 6rem 0;
}

.transp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.3rem;
  background: var(--c-white);
  border: 1px solid var(--c-sand-200);
  border-radius: var(--r-sm);
  transition: background-color .3s ease, border-color .3s ease, transform .3s ease;
}

.doc-item:hover {
  background: rgba(121, 195, 194, .12);
  border-color: var(--c-rio-500);
  transform: translateX(6px);
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(15, 140, 133, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--c-rio-700);
  flex-shrink: 0;
}

.doc-item span {
  flex: 1;
  font-size: .93rem;
  font-weight: 500;
  color: var(--c-cacao-700);
}

.doc-item .fa-download {
  color: var(--text-mute);
}

/* Donut */
.chart-panel {
  background: var(--c-white);
  border: 1px solid var(--c-sand-200);
  border-radius: var(--r-md);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.chart-panel h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--c-cacao-700);
}

.donut-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.donut {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(var(--c-rio-700) 0% 65%, var(--c-lima-500) 65% 90%, var(--c-coral-star) 90% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(43, 15, 15, .12);
}

.donut-hole {
  width: 126px;
  height: 126px;
  background: var(--c-white);
  border-radius: 50%;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: var(--text-mute);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-green {
  background: var(--c-rio-700);
}

.dot-gold {
  background: var(--c-lima-500);
}

.dot-red {
  background: var(--c-coral-star);
}

/* =========================================================
   7. NOTICIAS
   ========================================================= */
#noticias {
  background: var(--c-sand-200);
  padding: 6rem 0;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .news-grid {
    gap: 1.15rem;
  }
}

@media (max-width: 960px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(43, 15, 15, .06);
  display: flex;
  flex-direction: column;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-coral-star);
}

.news-img {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: var(--c-sand-200);
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

.news-body {
  padding: 1.2rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-body h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  color: var(--c-cacao-900);
}

.news-body p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-mute);
  margin-bottom: 1rem;
}

.news-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

.news-img-bg {
  position: absolute;
  inset: 0;
  transition: transform .5s;
}

.news-card:hover .news-img-bg {
  transform: scale(1.05);
}

.ni-1 {
  background: linear-gradient(135deg, var(--c-cacao-900), var(--c-cacao-500));
}

.ni-2 {
  background: linear-gradient(135deg, var(--c-rio-700), var(--c-rio-300));
}

.ni-3 {
  background: linear-gradient(135deg, var(--c-canela-line), var(--c-lima-500));
}

.news-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  z-index: 1;
}

.nt-coral {
  background: var(--c-coral-star);
  color: #fff;
}

.nt-teal {
  background: var(--c-rio-700);
  color: #fff;
}

.nt-lima {
  background: var(--c-lima-500);
  color: var(--c-cacao-900);
}

.news-body {
  padding: 1.5rem;
}

.news-date {
  font-size: .8rem;
  color: var(--text-mute);
}

.news-body h3 {
  font-size: 1.05rem;
  margin: .5rem 0 .8rem;
  color: var(--c-cacao-700);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--c-rio-700);
  font-weight: 600;
  font-size: .88rem;
}

.read-more i {
  transition: transform .3s;
}

.news-card:hover .read-more i {
  transform: translateX(4px);
}

/* =========================================================
   8. TERRITORIO Y MEMORIA — MAPA INTERACTIVO SAN ROSENDO
   ========================================================= */
#territorio {
  background: transparent;
  padding: 6rem 0;
  position: relative;
}

/* ── Barra de filtros de categoría ── */
.territory-filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.t-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 100px;
  background: var(--c-white);
  border: 1.5px solid var(--c-sand-200);
  color: var(--c-cacao-700);
  font-family: var(--font-b);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.t-filter-btn i {
  font-size: 0.85rem;
  opacity: 0.8;
  transition: transform 0.2s;
}

.t-filter-btn:hover {
  transform: translateY(-2px);
  border-color: var(--c-rio-500);
  color: var(--c-rio-700);
  box-shadow: var(--shadow-md);
}

.t-filter-btn:hover i {
  transform: scale(1.15);
}

.t-filter-btn.active {
  background: var(--c-cacao-700);
  border-color: var(--c-cacao-700);
  color: var(--c-white);
  box-shadow: 0 4px 14px rgba(90, 29, 27, 0.25);
}

.t-filter-btn.active i {
  opacity: 1;
}

/* ── Layout del Mapa y Sidebar ── */
.territory-map-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.5rem;
  background: var(--c-white);
  padding: 1rem;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(43, 15, 15, 0.08);
}

@media (max-width: 992px) {
  .territory-map-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Visor del Mapa Leaflet ── */
.territory-map-wrapper {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  min-height: 580px;
  background: var(--c-sand-200);
}

#san-rosendo-map {
  width: 100%;
  height: 100%;
  min-height: 580px;
  z-index: 1;
}

/* Controles flotantes sobre el mapa */
.map-floating-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-float-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(43, 15, 15, 0.12);
  color: var(--c-cacao-900);
  font-family: var(--font-b);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.map-float-btn:hover {
  background: var(--c-white);
  color: var(--c-coral-star);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.map-badge-info {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 500;
  background: rgba(43, 15, 15, 0.92);
  color: var(--c-white);
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  flex-shrink: 0;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green-ring 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse-green-ring {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }

  70% {
    transform: scale(2.4);
    opacity: 0;
  }

  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* ── Panel Lateral de Hitos ── */
.territory-sidebar {
  display: flex;
  flex-direction: column;
  height: 580px;
  background: #faf8f5;
  border-radius: var(--r-md);
  border: 1px solid var(--c-sand-200);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.1rem 1.2rem 0.8rem;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-sand-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-title-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sidebar-title-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(15, 140, 133, 0.1);
  color: var(--c-rio-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sidebar-title-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-cacao-900);
  line-height: 1.2;
}

.sidebar-title-box p {
  font-size: 0.78rem;
  color: var(--text-mute);
}

.landmarks-counter {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  background: var(--c-sand-200);
  color: var(--c-cacao-700);
}

/* Buscador rápido dentro del panel */
.sidebar-search-box {
  position: relative;
  padding: 0.6rem 1.2rem;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-sand-200);
}

.sidebar-search-box i {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-mute);
}

.sidebar-search-box input {
  width: 100%;
  padding: 0.45rem 0.8rem 0.45rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--c-sand-200);
  background: #fbf9f6;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-search-box input:focus {
  border-color: var(--c-rio-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 162, 154, 0.15);
}

/* Lista scrollable de hitos */
.landmarks-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: var(--c-sand-200) transparent;
}

.landmarks-list::-webkit-scrollbar {
  width: 6px;
}

.landmarks-list::-webkit-scrollbar-thumb {
  background: var(--c-sand-200);
  border-radius: 4px;
}

/* Tarjeta individual de hito */
.landmark-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--c-white);
  border: 1px solid rgba(43, 15, 15, 0.08);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.landmark-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-rio-500);
  box-shadow: 0 6px 16px rgba(43, 15, 15, 0.08);
}

.landmark-card.active {
  border-color: var(--c-coral-star);
  background: #fffafa;
  box-shadow: 0 4px 14px rgba(200, 25, 79, 0.12);
}

.landmark-card-media {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-sand-200);
  position: relative;
}

.landmark-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.landmark-card:hover .landmark-card-media img {
  transform: scale(1.08);
}

.landmark-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.landmark-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.landmark-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-ferroviario {
  background: rgba(200, 25, 79, 0.1);
  color: var(--c-coral-star);
}

.badge-memoria {
  background: rgba(90, 29, 27, 0.12);
  color: var(--c-cacao-700);
}

.badge-natural {
  background: rgba(15, 140, 133, 0.12);
  color: var(--c-rio-700);
}

.badge-comunidad {
  background: rgba(214, 210, 42, 0.22);
  color: #797700;
}

.landmark-year {
  font-size: 0.72rem;
  color: var(--text-mute);
  font-weight: 600;
}

.landmark-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-cacao-900);
  margin-bottom: 0.25rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landmark-desc {
  font-size: 0.78rem;
  color: var(--text-mute);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.landmark-action-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-rio-700);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  transition: color 0.2s;
}

.landmark-action-link:hover {
  color: var(--c-coral-star);
}

/* Footer del panel lateral */
.sidebar-footer {
  padding: 0.9rem;
  background: var(--c-white);
  border-top: 1px solid var(--c-sand-200);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-cta-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f6f3ee;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
}

.sidebar-cta-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--c-coral-star);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.sidebar-cta-text h5 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-cacao-900);
}

.sidebar-cta-text p {
  font-size: 0.72rem;
  color: var(--text-mute);
  line-height: 1.2;
}

/* ── Leyenda Cartográfica ── */
.territory-legend {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  background: var(--c-white);
  padding: 1rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(43, 15, 15, 0.08);
  font-size: 0.82rem;
  color: var(--text-sub);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ferroviario {
  background: var(--c-coral-star);
}

.dot-memoria {
  background: var(--c-cacao-700);
}

.dot-natural {
  background: var(--c-rio-700);
}

.dot-comunidad {
  background: #d6d22a;
  border: 1px solid #b5b118;
}

/* ── Pines Personalizados de Leaflet ── */
.sr-custom-marker {
  position: relative;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sr-custom-marker:hover,
.sr-custom-marker.active {
  transform: scale(1.22) translateY(-4px);
  z-index: 999 !important;
}

.sr-marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 2px solid #ffffff;
  position: relative;
}

.sr-marker-pin i {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 0.95rem;
}

.sr-marker-ferroviario {
  background: #c8194f;
}

.sr-marker-memoria {
  background: #5a1d1b;
}

.sr-marker-natural {
  background: #0f8c85;
}

.sr-marker-comunidad {
  background: #c29505;
}

/* Pulso animado bajo el pin */
.sr-marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: none;
}

/* Solo animar cuando el mapa de San Rosendo está visible en pantalla */
#san-rosendo-map:not(.map-paused) .sr-marker-pulse {
  animation: sr-pin-pulse 2.4s ease-out infinite;
  opacity: 0.7;
}

/* Pausar pulsos del mapa cuando no está en pantalla */
#san-rosendo-map.map-paused .sr-marker-pulse {
  animation: none !important;
  opacity: 0 !important;
}

.sr-marker-ferroviario+.sr-marker-pulse {
  background: #c8194f;
}

.sr-marker-memoria+.sr-marker-pulse {
  background: #5a1d1b;
}

.sr-marker-natural+.sr-marker-pulse {
  background: #0f8c85;
}

.sr-marker-comunidad+.sr-marker-pulse {
  background: #c29505;
}

@keyframes sr-pin-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }

  70% {
    transform: scale(2.2);
    opacity: 0;
  }

  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* ── Popups Personalizados de Leaflet ── */
.sr-leaflet-popup .leaflet-popup-content-wrapper {
  background: var(--c-white);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(43, 15, 15, 0.22);
  border: 1px solid rgba(43, 15, 15, 0.08);
}

.sr-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: 280px !important;
  font-family: var(--font-b);
}

.sr-leaflet-popup .leaflet-popup-tip {
  background: var(--c-white);
}

.sr-popup-card {
  display: flex;
  flex-direction: column;
}

.sr-popup-media {
  width: 100%;
  height: 125px;
  position: relative;
  background: var(--c-sand-200);
}

.sr-popup-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sr-popup-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sr-popup-info {
  padding: 0.9rem;
}

.sr-popup-title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-cacao-900);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.sr-popup-desc {
  font-size: 0.78rem;
  color: var(--text-mute);
  line-height: 1.38;
  margin-bottom: 0.75rem;
}

.sr-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: var(--c-cacao-700);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.sr-popup-btn:hover {
  background: var(--c-coral-star);
}

/* =========================================================
   9. CONTACTO
   ========================================================= */
#contacto {
  background: linear-gradient(158deg, var(--c-cacao-900) 0%, var(--c-cacao-700) 55%, var(--c-cacao-500) 100%);
  padding: 6rem 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  color: #fff;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #fff;
  margin-bottom: 1rem;
}

.contact-info p {
  color: rgba(255, 255, 255, .75);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  transition: color .3s;
}

.contact-link-item:hover {
  color: var(--c-rio-300);
}

.cli-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-socials {
  margin-top: 2.5rem;
}

.contact-socials p {
  font-size: .82rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 1rem;
}

.socials-row {
  display: flex;
  gap: .8rem;
}

.soc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  transition: background-color .3s ease, transform .3s ease;
}

.soc-icon:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-3px);
}

/* Form panel */
.contact-form-panel {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(43, 15, 15, .3);
}

.contact-form-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 1.8rem;
  color: var(--c-cacao-700);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-mute);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--c-sand-100);
  border: 1.5px solid var(--c-sand-200);
  border-radius: var(--r-sm);
  font-family: var(--font-b);
  font-size: .95rem;
  color: var(--text-main);
  transition: border-color .3s, box-shadow .3s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-rio-500);
  background: var(--c-white);
  box-shadow: 0 0 0 3px rgba(23, 162, 154, .15);
}

.form-group input[type="email"]:invalid:not(:placeholder-shown) {
  border-color: red;
  color: red;
}

.form-group select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e6b65' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 1.1em;
  background-color: var(--c-sand-100);
}

.form-group select option {
  background: #fff;
}

.form-submit {
  width: 100%;
  padding: .95rem;
  border: none;
  border-radius: 100px;
  background: var(--c-coral-star);
  color: #fff;
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(200, 25, 79, .28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  transition: transform .35s var(--ease-spring), background-color .35s var(--ease-spring), box-shadow .35s var(--ease-spring);
  margin-top: .4rem;
}

.form-submit:hover {
  background: var(--c-coral-hover);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(200, 25, 79, .38);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--c-cacao-900);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer img {
  height: 44px;
  opacity: .85;
  filter: brightness(1.4);
}

footer p {
  font-size: .88rem;
  color: rgba(246, 244, 239, .55);
  text-align: center;
}

footer p span {
  color: var(--c-rio-300);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-soc-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease-expo), background-color 0.3s var(--ease-expo), color 0.3s var(--ease-expo), border-color 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo);
  text-decoration: none;
}

.footer-soc-link:hover {
  background: var(--c-rio-700);
  color: #fff;
  border-color: var(--c-rio-300);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(15, 140, 133, 0.4);
}

.scroll-top {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
  transition: background .3s;
}

.scroll-top:hover {
  background: rgba(255, 255, 255, .2);
}

/* =========================================================
   ANIMACIONES DE ENTRADA (Scroll Reveal - Suave, Visible y Elegante)
   ========================================================= */
.reveal-up {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  opacity: 0;
  transform: translate3d(-28px, 0, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translate3d(28px, 0, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.active.reveal-up,
.active.reveal-left,
.active.reveal-right {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.22s;
}

/* Animación armónica y fluida para los hitos de la línea de tiempo (Memoria Viva) */
.timeline-item.reveal-up {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.reveal-up.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* En pantallas grandes (laptop/escritorio), sutil cadencia para tarjetas pares (lado derecho) */
@media (min-width: 769px) {
  .timeline-item.right-side.reveal-up {
    transition-delay: 0.1s;
  }
}

/* Respeto a las preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right,
  .timeline-item.reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-desc {
    max-width: 100%;
  }

  .stat-row {
    flex-wrap: wrap;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }


  .saberes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .transp-layout {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .bento-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.i-large {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {

  .container,
  .container-wide {
    padding: 0 1rem;
  }

  #navbar {
    padding: 0.65rem 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .logo-img {
    height: 42px;
  }

  /* Ocultar en móvil "Arte · Cultura · Territorio" en el Hero */
  .hero-tag {
    display: none !important;
  }

  .hero-title-logo {
    margin-top: 0.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card-karen .team-img-wrap img {
    transform: translateY(-10px);
  }

  .saberes-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .bento-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item.i-large,
  .gallery-item.i-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .section-pad {
    padding: 4rem 0;
  }

}

/* ── Memoria Viva — Search box ───────────────────────────── */
.mv-search {
  margin-bottom: 2rem;
}

.mv-search-box {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 560px;
  margin: 0 auto;
  background: var(--c-white);
  border: 1.5px solid var(--c-sand-200);
  border-radius: 100px;
  padding: .65rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s, box-shadow .3s;
}

.mv-search-box:focus-within {
  border-color: var(--c-rio-500);
  box-shadow: 0 0 0 3px rgba(23, 162, 154, .15);
}

.mv-search-box i {
  color: var(--text-mute);
  font-size: .95rem;
  flex-shrink: 0;
}

.mv-search-box input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-b);
  font-size: .95rem;
  color: var(--text-main);
}

.mv-search-box input::placeholder {
  color: var(--text-mute);
}

/* Gallery item — year / territory / tags */
.item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}

.item-anio {
  background: rgba(0, 0, 0, .45);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
}

.item-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .7rem;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: rgba(255, 255, 255, .72);
}

.item-etiquetas {
  color: rgba(255, 255, 255, .5);
  font-size: .75rem;
}


@media (max-width: 480px) {

  .container,
  .container-wide {
    padding: 0 0.75rem;
  }

  .nav-container {
    padding: 0 0.75rem;
  }


  .saberes-card,
  .news-card {
    padding: 1.25rem 1rem;
  }
}

/* ── Transparencia — KPI summary ────────────────────────── */
.transp-summary {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.transp-kpi {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
  padding: 1rem 1.2rem;
  background: var(--c-white);
  border: 1px solid var(--c-sand-200);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}

.transp-kpi i {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.kpi-green {
  color: var(--c-rio-700);
}

.kpi-red {
  color: var(--c-coral-star);
}

.kpi-num {
  display: block;
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--c-cacao-700);
}

.kpi-lbl {
  font-size: .78rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .5px;
}

@media (max-width: 640px) {

  .transp-summary {
    flex-direction: column;
  }
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

/* Para páginas internas (Noticias) con fondo claro desde el inicio */
#navbar.navbar-inner .nav-link {
  color: var(--c-cacao-700);
}

#navbar.navbar-inner .nav-link::after {
  background: var(--c-rio-700);
}

#navbar.navbar-inner .nav-link:hover,
#navbar.navbar-inner .nav-link.active {
  color: var(--c-cacao-900);
}

#navbar.navbar-inner .logo-img {
  filter: drop-shadow(0 2px 4px rgba(43, 15, 15, 0.15));
}

#navbar.navbar-inner .bar {
  background: var(--c-cacao-700);
}

/* =========================================================
   LÍNEA DE TIEMPO COMUNAL (MEMORIA VIVA) - MINIMALISTA Y ARMONIOSA
   ========================================================= */
.timeline-container {
  margin-top: 3.5rem;
  margin-bottom: 5rem;
  padding: 0 1rem;
  position: relative;
}

.timeline-title {
  text-align: center;
  font-size: 2.1rem;
  font-family: var(--font-h);
  font-weight: 800;
  color: var(--c-cacao-900);
  margin-bottom: 3.5rem;
  position: relative;
  display: block;
}

.timeline-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: rgba(43, 15, 15, 0.22);
  margin: 0.75rem auto 0;
  border-radius: 999px;
}

/* Contenedor del riel */
.timeline-track {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 0 3rem 0;
}

/* La línea vertical continua: visible, limpia y perfectamente integrada */
.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: var(--c-rio-300);
  border-radius: 999px;
  z-index: 1;
}

/* Punto terminal minimalista al final de la línea */
.timeline-track::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  background: var(--c-rio-500);
  border-radius: 50%;
  z-index: 2;
}

/* Item contenedor: lado izquierdo por defecto */
.timeline-item {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  width: 50%;
  padding-right: 42px;
  margin-bottom: 2.8rem;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 2;
}

/* Item contenedor: lado derecho (pares) */
.timeline-item.right-side {
  margin-left: auto;
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 42px;
}

/* Conector horizontal desde la línea hacia la tarjeta */
.timeline-connector {
  position: absolute;
  top: 50%;
  right: 0;
  width: 42px;
  height: 2px;
  background: var(--c-rio-300);
  transform: translateY(-50%);
  z-index: 2;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.right-side .timeline-connector {
  right: auto;
  left: 0;
  background: var(--c-rio-300);
}

/* Efecto hover sobre el conector */
.timeline-item:hover .timeline-connector {
  background: var(--c-coral-star);
  box-shadow: 0 0 6px rgba(200, 25, 79, 0.25);
}

/* El Punto / Nodo central: limpio, discreto y elegante */
.timeline-node {
  position: absolute;
  top: 50%;
  right: -10px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 2px solid var(--c-rio-500);
  border-radius: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(43, 15, 15, 0.06);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item.right-side .timeline-node {
  right: auto;
  left: -10px;
  border-color: var(--c-rio-500);
}

/* Núcleo interior del nodo */
.timeline-node .node-core {
  width: 7px;
  height: 7px;
  background: var(--c-rio-500);
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.timeline-item.right-side .timeline-node .node-core {
  background: var(--c-rio-500);
}

/* Efecto hover interactivo sobre el nodo */
.timeline-item:hover .timeline-node {
  transform: translateY(-50%) scale(1.25);
  border-color: var(--c-coral-star);
  box-shadow: 0 0 0 4px rgba(200, 25, 79, 0.15), 0 3px 10px rgba(43, 15, 15, 0.08);
}

.timeline-item:hover .timeline-node .node-core {
  background: var(--c-coral-star);
}

/* Tarjeta limpia y compacta (con imagen, fecha y título) */
.timeline-content {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(43, 15, 15, 0.08);
  box-shadow: 0 2px 12px rgba(43, 15, 15, 0.04);
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  text-align: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(43, 15, 15, 0.08);
  border-color: rgba(200, 25, 79, 0.25);
}

/* Imagen dentro de la tarjeta */
.timeline-img-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: var(--c-sand-200);
}

.timeline-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.timeline-item:hover .timeline-img-wrap img {
  transform: scale(1.05);
}

/* Cuerpo de la tarjeta: fecha, título y acción */
.timeline-card-body {
  padding: 0.85rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-coral-star);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.timeline-label {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-cacao-900);
  margin: 0;
  line-height: 1.35;
}

/* Botón interactivo "Leer" en la tarjeta (alineado a la derecha para acceso rápido en móvil y desktop) */
.timeline-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  align-self: flex-end;
  margin-left: auto;
  font-family: var(--font-b);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-rio-700);
  background: rgba(15, 140, 133, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 140, 133, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none; /* el click lo captura el item */
}

.timeline-read-btn i {
  font-size: 0.72rem;
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-read-btn {
  background: var(--c-coral-star);
  border-color: var(--c-coral-star);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(200, 25, 79, 0.25);
  transform: translateY(-2px);
}

.timeline-item:hover .timeline-read-btn i {
  transform: translateX(2px);
}

.timeline-item:active .timeline-read-btn {
  transform: scale(0.95);
}

/* Navegador interactivo por años */
.timeline-year-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 3rem auto;
  max-width: 900px;
  padding: 0 1rem;
}

.timeline-year-btn {
  background: #ffffff;
  border: 1px solid rgba(43, 15, 15, 0.12);
  color: var(--c-cacao-700);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-h);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(43, 15, 15, 0.04);
}

.timeline-year-btn:hover {
  border-color: var(--c-rio-500);
  color: var(--c-rio-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(43, 15, 15, 0.08);
}

.timeline-year-btn.active {
  background: var(--c-coral-star);
  border-color: var(--c-coral-star);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(200, 25, 79, 0.3);
  transform: translateY(-2px);
}

.timeline-item.filtered-out {
  display: none !important;
}

/* =========================================================
   RESPONSIVE (MÓVIL Y TABLET VERTICAL)
   ========================================================= */
@media (max-width: 768px) {
  .timeline-track {
    padding: 1rem 0 2rem 0;
  }

  /* Línea vertical pegada a la izquierda */
  .timeline-track::before {
    left: 20px;
    transform: none;
    width: 3px;
    background: var(--c-rio-300);
  }

  .timeline-track::after {
    display: none;
  }

  .timeline-item,
  .timeline-item.right-side {
    width: 100%;
    margin-left: 0;
    padding-left: 46px;
    padding-right: 0;
    justify-content: flex-start;
    margin-bottom: 1.8rem;
  }

  /* Conector horizontal hacia la tarjeta en móvil */
  .timeline-connector,
  .timeline-item.right-side .timeline-connector {
    left: 20px;
    right: auto;
    width: 26px;
    height: 2px;
    top: 30px;
    transform: none;
    background: var(--c-rio-300);
  }

  /* Nodo alineado sobre la línea vertical */
  .timeline-node,
  .timeline-item.right-side .timeline-node {
    left: 10px !important;
    right: auto !important;
    top: 30px;
    transform: translateY(-50%) !important;
    width: 20px;
    height: 20px;
    border-color: var(--c-rio-500);
  }

  .timeline-item:hover .timeline-node,
  .timeline-item.right-side:hover .timeline-node {
    transform: translateY(-50%) scale(1.2) !important;
  }

  /* Tarjeta ocupa el ancho disponible */
  .timeline-content,
  .timeline-item.right-side .timeline-content {
    max-width: 100%;
    text-align: left;
  }
}

/* =========================================================
   GLOBAL MODAL
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(43, 15, 15, 0.92);
}
@supports not (-moz-appearance: none) {
  .modal-overlay {
    background: rgba(43, 15, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-spring);
  padding: 1rem;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--c-sand-100);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s var(--ease-spring);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.show .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--c-cacao-900);
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s, transform 0.3s;
  box-shadow: var(--shadow-sm);
}

.modal-close:hover {
  background: #fff;
  transform: rotate(90deg);
  color: var(--c-coral-star);
}

.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-media {
  width: 100%;
  background: var(--c-cacao-900);
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  overflow: hidden;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 2.5rem;
}

.modal-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.85rem;
}

.modal-year-pill {
  font-family: var(--font-h);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--c-coral-star);
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(200, 25, 79, 0.25);
}

.modal-date-pill {
  font-family: var(--font-b);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-rio-700);
  background: rgba(15, 140, 133, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 140, 133, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-status-pill {
  font-family: var(--font-b);
  font-size: 0.8rem;
  font-weight: 700;
  color: #8c5b0f;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.modal-status-pill.status-terminado {
  color: #15803d;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.modal-status-pill.status-realizando {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.modal-status-pill.status-preparacion {
  color: #b45309;
  background: #fef3c7;
  border-color: #fde68a;
}

.modal-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-rio-700);
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.85rem;
  line-height: 1.3;
  color: var(--c-cacao-700);
  margin-bottom: 1.1rem;
}

.modal-desc {
  font-size: 1.08rem;
  color: var(--text-main);
  line-height: 1.7;
}


@media (max-width: 768px) {
  .modal-info {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}

/* =========================================================
   FOOTER PREMIUM, CODILOGIA CREDITS & COOKIES / ANALYTICS
   ========================================================= */

.site-footer {
  background: linear-gradient(145deg, #180808 0%, #260d0d 45%, #150606 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 5rem 0 2.2rem;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 140, 133, 0.5), rgba(200, 25, 79, 0.4), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

/* Col 1: Brand & Institutional / SEO */
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  margin-bottom: 1.1rem;
}

.footer-logo {
  height: 50px;
  width: auto;
  max-width: 150px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  object-fit: contain;
  background: transparent;
  padding: 0;
  display: block;
  transition: transform 0.25s ease;
}

.footer-logo:hover {
  transform: scale(1.02);
}

.footer-brand-title {
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.footer-seo-desc {
  font-size: 0.92rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.74);
  margin: 0 0 1.5rem 0;
}

.footer-seo-desc strong {
  color: #ffffff;
  font-weight: 600;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-soc-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.05rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.footer-soc-link:hover {
  background: var(--c-rio-700);
  border-color: var(--c-rio-500);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(15, 140, 133, 0.4);
}

/* Col Titles */
.footer-col-title {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 1.25rem 0;
  position: relative;
  padding-bottom: 0.55rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--c-rio-500);
  border-radius: 2px;
}

/* Col 2: Navigation Links */
.footer-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-links li a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav-links li a i {
  font-size: 0.75rem;
  color: var(--c-rio-500);
  transition: transform 0.2s ease;
}

.footer-nav-links li a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-nav-links li a:hover i {
  transform: translateX(2px);
  color: var(--c-rio-300);
}

/* Col 3: Contact */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.footer-contact-list li i {
  color: var(--c-rio-300);
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.footer-contact-list li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-list li a:hover {
  color: var(--c-rio-300);
  text-decoration: underline;
}

.footer-community-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-community-card i {
  font-size: 1.4rem;
  color: var(--c-rio-300);
  flex-shrink: 0;
}

.footer-community-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
}

/* Col 4: Privacy & Analytics */
.footer-privacy-text {
  font-size: 0.88rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.2rem 0;
}

.footer-privacy-text strong {
  color: #ffffff;
}

.footer-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.btn-footer-cookie {
  background: rgba(15, 140, 133, 0.15);
  border: 1px solid rgba(15, 140, 133, 0.45);
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-footer-cookie:hover {
  background: var(--c-rio-700);
  border-color: var(--c-rio-500);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 140, 133, 0.35);
}

.footer-cookie-info-link {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.footer-cookie-info-link:hover {
  color: #ffffff;
}

/* Bottom Bar: Copyright & Codilogia Developer Badge */
.footer-bottom-bar {
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-bottom-copy p {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom-copy strong {
  color: rgba(255, 255, 255, 0.9);
}

.footer-developer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.65);
}

.developer-link,
.footer-developer a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.developer-link:hover,
.footer-developer a:hover {
  color: #ffffff;
  text-decoration-color: var(--c-rio-300);
}

.codilogia-badge {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  box-shadow: none;
}

.codilogia-tag {
  display: none;
}

.scroll-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.scroll-top:hover {
  background: var(--c-rio-700);
  border-color: var(--c-rio-500);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(15, 140, 133, 0.4);
}

/* =========================================================
   COOKIE CONSENT BANNER (Glassmorphism)
   ========================================================= */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: rgba(26, 9, 9, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.45);
  transform: translateY(120%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
}

.cookie-icon-box {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  background: rgba(15, 140, 133, 0.2);
  border: 1px solid rgba(15, 140, 133, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-rio-300);
  font-size: 1.4rem;
}

.cookie-content {
  flex-grow: 1;
}

.cookie-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-h);
}

.cookie-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.cookie-text strong {
  color: #ffffff;
}

.cookie-buttons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, var(--c-rio-700) 0%, var(--c-rio-500) 100%);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 140, 133, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.btn-cookie-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(15, 140, 133, 0.45);
}

.btn-cookie-reject {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn-cookie-reject:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.btn-cookie-info {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.btn-cookie-info:hover {
  color: #ffffff;
}

/* =========================================================
   COOKIE MODAL OVERLAY
   ========================================================= */

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 5, 5, 0.90);
}
@supports not (-moz-appearance: none) {
  .cookie-modal-overlay {
    background: rgba(15, 5, 5, 0.70);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
.cookie-modal-overlay {
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal-container {
  background: #ffffff;
  border-radius: 18px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-overlay.active .cookie-modal-container {
  transform: translateY(0);
}

.cookie-modal-header {
  background: var(--c-sand-100);
  padding: 1.25rem 1.6rem;
  border-bottom: 1px solid var(--c-sand-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--c-cacao-900);
  font-family: var(--font-h);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cookie-modal-header h3 i {
  color: var(--c-rio-700);
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-mute);
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  padding: 0.3rem;
  line-height: 1;
}

.cookie-modal-close:hover {
  color: var(--c-coral-star);
  transform: rotate(90deg);
}

.cookie-modal-body {
  padding: 1.6rem;
  overflow-y: auto;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.68;
}

.cookie-modal-body p {
  margin: 0 0 1rem 0;
}

.cookie-modal-body h4 {
  font-size: 1rem;
  color: var(--c-cacao-700);
  margin: 1.3rem 0 0.4rem 0;
  font-family: var(--font-h);
}

.cookie-modal-footer {
  padding: 1rem 1.6rem;
  border-top: 1px solid var(--c-sand-200);
  background: var(--c-sand-100);
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   RESPONSIVE FOOTER & COOKIES
   ========================================================= */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.2rem;
  }

  .cookie-buttons {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-cookie-accept,
  .btn-cookie-reject {
    width: 100%;
    text-align: center;
  }

  .btn-cookie-info {
    width: 100%;
    text-align: center;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 1.1rem;
  }

  .footer-developer {
    justify-content: center;
  }

  .scroll-top {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 3.8rem 0 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-col-title {
    margin-bottom: 0.9rem;
  }
}

/* ==========================================================================
   MEMORIA VIVA - PÁGINAS INDIVIDUALES Y EXPLORACIÓN COMPLETA
   ========================================================================== */
.mv-archive-cta-wrapper {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

@media (max-width: 768px) {
  .mv-archive-cta-wrapper {
    margin-top: 1.75rem;
  }
}

.mv-card-more-link {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mv-card-more-link:hover {
  opacity: 0.85;
}

.mv-card-more-link:hover i {
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

/* Audio Player HTML5 estilizado */
.mv-audio-section audio::-webkit-media-controls-panel {
  background-color: #f1f5f9;
  border-radius: 8px;
}

.mv-audio-section audio::-webkit-media-controls-play-button {
  background-color: #1b4d6e;
  border-radius: 50%;
}

/* Tarjetas de archivos relacionados */
.mv-related-section .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

@media (max-width: 768px) {
  .mv-meta-bar {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.6rem !important;
  }
  
  .mv-single-header h1 {
    font-size: 1.65rem !important;
  }
  
  .mv-doc-section > div {
    flex-direction: column;
    text-align: center;
  }
  
  .mv-doc-section .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   Página 404 — No Encontrado (Identidad COARTCUL)
   ========================================================= */
.page-404-main {
  padding-top: clamp(130px, 14vw, 175px);
  padding-bottom: clamp(60px, 8vw, 110px);
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.error-404-container {
  max-width: 1060px;
  margin: 0 auto;
  width: 100%;
}

.error-404-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-lg);
  border-radius: var(--r-lg, 28px);
}
@supports not (-moz-appearance: none) {
  .error-404-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}
.error-404-card {
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 3.5rem;
}

.error-404-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--c-rio-500), var(--c-coral-star), var(--c-canela-line));
}

.error-404-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem;
  background: rgba(200, 25, 79, 0.08);
  border: 1px solid rgba(200, 25, 79, 0.22);
  border-radius: 100px;
  color: var(--c-coral-star);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.error-404-badge i {
  color: var(--c-coral-star);
}

.error-404-glance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  margin-bottom: 1.2rem;
  user-select: none;
}

.error-404-glance .num {
  font-family: var(--font-h);
  font-size: clamp(4.5rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--c-cacao-700);
  text-shadow: 0 4px 18px rgba(90, 29, 27, 0.12);
}

.error-icon-disc {
  width: clamp(75px, 12vw, 115px);
  height: clamp(75px, 12vw, 115px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 162, 154, 0.18) 0%, rgba(200, 25, 79, 0.1) 100%);
  border: 2px dashed var(--c-rio-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-rio-700);
  font-size: clamp(2rem, 5vw, 3.2rem);
  position: relative;
  box-shadow: 0 10px 24px rgba(23, 162, 154, 0.15);
  animation: pulse-disc 4s ease-in-out infinite alternate;
}

@keyframes pulse-disc {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(23, 162, 154, 0.15);
  }
  100% {
    transform: scale(1.06);
    box-shadow: 0 15px 32px rgba(200, 25, 79, 0.2);
  }
}

.error-404-title {
  font-family: var(--font-h);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--c-cacao-900);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.error-404-title span {
  color: var(--c-rio-500);
}

.error-404-desc {
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-mute);
  max-width: 660px;
  margin: 0 auto 2.2rem;
  line-height: 1.75;
}

.error-404-search {
  max-width: 580px;
  margin: 0 auto 2.2rem;
}

.error-search-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--c-white);
  border: 1.5px solid var(--c-sand-200);
  border-radius: 100px;
  padding: 0.45rem 0.5rem 0.45rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.error-search-inner:focus-within {
  border-color: var(--c-rio-500);
  box-shadow: 0 0 0 3px rgba(23, 162, 154, 0.18);
}

.error-search-inner i {
  color: var(--text-mute);
  font-size: 1rem;
  flex-shrink: 0;
}

.error-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--text-main);
  min-width: 0;
}

.error-search-input::placeholder {
  color: var(--text-mute);
  opacity: 0.85;
}

.error-search-submit {
  border-radius: 100px;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.error-404-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}

.error-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  color: var(--text-mute);
}

.error-divider::before,
.error-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed rgba(43, 15, 15, 0.15);
}

.error-divider span {
  padding: 0 1.25rem;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-mute);
}

.error-404-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: left;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 1.35rem;
  background: var(--c-white);
  border: 1px solid rgba(43, 15, 15, 0.07);
  border-radius: var(--r-md, 18px);
  text-decoration: none;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}

.shortcut-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-rio-500);
  box-shadow: 0 10px 24px rgba(43, 15, 15, 0.08);
}

.shortcut-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
  transform: scale(1.1);
}

.icon-terracotta {
  background: rgba(142, 59, 48, 0.12);
  color: var(--c-canela-line);
}

.icon-teal {
  background: rgba(23, 162, 154, 0.12);
  color: var(--c-rio-700);
}

.icon-coral {
  background: rgba(200, 25, 79, 0.12);
  color: var(--c-coral-star);
}

.icon-warm {
  background: rgba(90, 29, 27, 0.1);
  color: var(--c-cacao-700);
}

.shortcut-text {
  flex: 1;
  min-width: 0;
}

.shortcut-text h3 {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-cacao-900);
  margin-bottom: 0.2rem;
  transition: color 0.2s ease;
}

.shortcut-card:hover .shortcut-text h3 {
  color: var(--c-rio-700);
}

.shortcut-text p {
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.4;
  margin: 0;
}

.shortcut-arrow {
  color: var(--c-sand-200);
  font-size: 0.9rem;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.shortcut-card:hover .shortcut-arrow {
  transform: translateX(4px);
  color: var(--c-rio-500);
}

/* Sugerencias de lectura */
.error-404-suggestions {
  margin-top: 1.5rem;
}

.suggestions-title {
  font-family: var(--font-h);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--c-cacao-700);
  margin-bottom: 0.4rem;
}

.suggestions-title span {
  color: var(--c-rio-500);
}

/* Responsividad para móviles */
@media (max-width: 768px) {
  .error-404-card {
    padding: 2.2rem 1.25rem;
    margin-bottom: 2.5rem;
  }
  
  .error-404-shortcuts {
    grid-template-columns: 1fr;
  }
  
  .error-search-inner {
    padding: 0.35rem 0.4rem 0.35rem 1rem;
  }

  .error-search-submit {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }

  .error-404-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-404-actions .btn {
    width: 100%;
    justify-content: center;
  }
}