/* =========================================
   RISE — Design System
   Asociación Renovación, Inclusión,
   Sostenibilidad y Educación
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,600&family=Outfit:wght@300;400;500;600&display=swap');

/* ---- Variables ---- */
:root {
  --verde:        #2d3266;
  --verde-medio:  #626689;
  --verde-claro:  #e8eaf6;
  --ambar:        #ea9919;
  --ambar-claro:  #fde9c0;
  --crema:        #fcf8ed;
  --blanco:       #ffffff;
  --texto:        #1a1a2e;
  --texto-medio:  #3d3f6b;
  --texto-suave:  #aeaebb;
  --borde:        #fad79c;

  --fuente-titulo: 'Fraunces', Georgia, serif;
  --fuente-cuerpo: 'Outfit', sans-serif;

  --radio:    8px;
  --radio-lg: 16px;
  --sombra:   0 4px 24px rgba(45,50,102,0.10);
  --sombra-lg: 0 12px 48px rgba(45,50,102,0.15);

  --transicion: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--fuente-cuerpo);
  color: var(--texto);
  background: var(--crema);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Tipografía ---- */
h1, h2, h3, h4 {
  font-family: var(--fuente-titulo);
  line-height: 1.15;
  color: var(--verde);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  {
  color: var(--texto-medio);
  font-size: 1rem;
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}

/* ---- Layout ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-sm { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---- Componentes: Etiqueta de sección ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ambar);
  margin-bottom: 1rem;
}
.tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ambar);
}

/* ---- Componentes: Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radio);
  font-family: var(--fuente-cuerpo);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transicion);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--verde);
  color: var(--blanco);
  border-color: var(--verde);
}
.btn-primary:hover {
  background: var(--verde-medio);
  border-color: var(--verde-medio);
  transform: translateY(-2px);
  box-shadow: var(--sombra);
}
.btn-outline {
  background: transparent;
  color: var(--verde);
  border-color: var(--verde);
}
.btn-outline:hover {
  background: var(--verde);
  color: var(--blanco);
  transform: translateY(-2px);
}
.btn-ambar {
  background: var(--ambar);
  color: var(--blanco);
  border-color: var(--ambar);
}
.btn-ambar:hover {
  background: #c07d0a;
  border-color: #c07d0a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(234,153,25,0.3);
}

/* ---- Componentes: Tarjeta ---- */
.card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 2rem;
  box-shadow: var(--sombra);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-lg);
}
/* Texto dentro de tarjetas: sin justificación para evitar espacios feos
   en contenedores estrechos (tarjetas de valores, cookies, pilar, act…) */
.card p,
.pilar-card p,
.act-card p,
.check-item span,
.about-badge p,
.timeline-content p {
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
}
.card-icon {
  width: 52px;
  height: 52px;
  background: var(--verde-claro);
  border-radius: var(--radio);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
}

/* ---- Componentes: Divisor decorativo ---- */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--ambar), var(--verde));
  border-radius: 2px;
  margin: 1.2rem 0 1.8rem;
}
.divider-center { margin-left: auto; margin-right: auto; }

/* ---- HEADER / NAV ---- */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(249,246,241,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
#header.scrolled {
  border-color: var(--borde);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 80px;
  width: 80px;   /* fuerza dimensiones explícitas — necesario para SVG */
  min-width: 80px;
  display: block;
  object-fit: contain;
  /* El fondo del header es crema/claro, el logo ya es transparente */
}
/* En el footer el fondo es oscuro — invertimos ligeramente para legibilidad */
.logo-img--footer {
  height: 44px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radio);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto-medio);
  transition: all var(--transicion);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--verde);
  background: var(--verde-claro);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--verde);
  border-radius: 2px;
  transition: all var(--transicion);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile nav — estilos base (siempre fixed, oculto por defecto) ---- */
.nav-mobile {
  position: fixed;
  top: 90px; /* fallback; el JS lo sobreescribe con el alto real del header */
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100vh - 90px); /* fallback; JS actualiza top dinámicamente */
  background: var(--crema);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.5rem 1.25rem 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1100; /* por encima del header (z-index: 1000) */
  /* Oculto fuera de pantalla por defecto */
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  visibility: hidden;
}
.nav-mobile.open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  background: var(--crema);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--verde-claro) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--ambar-claro) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ambar-claro);
  color: var(--ambar);
  border: 1px solid rgba(234,153,25,0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 em {
  font-style: italic;
  color: var(--ambar);
}
.hero-lead {
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--borde);
}
.hero-stat-num {
  font-family: var(--fuente-titulo);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--verde);
  line-height: 1;
}
.hero-stat-label { font-size: 0.82rem; color: var(--texto-suave); margin-top: 0.3rem; }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo grande del hero — Partículas flotantes */
.hero-logo-wrap {
  position: relative;
  width: 480px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Halo difuminado de fondo */
.hero-logo-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ambar-claro) 0%, rgba(232,234,246,0.4) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  animation: halo-pulse 5s ease-in-out infinite;
}

/* El anillo decorativo se elimina — las partículas cubren ese rol */
.hero-logo-ring { display: none; }

/* Cada partícula generada por JS */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: particle-orbit var(--dur) ease-in-out infinite var(--delay);
  transform-origin: center center;
}

.hero-logo-img {
  width: 85%;
  height: 85%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 28px rgba(45,50,102,0.16));
  display: block;
  animation: logo-breathe 6s ease-in-out infinite;
}

@keyframes halo-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.75; }
}

@keyframes logo-breathe {
  0%, 100% { transform: translateY(0px)   scale(1); }
  50%       { transform: translateY(-8px) scale(1.02); }
}

@keyframes particle-orbit {
  0%   { opacity: 0;   transform: rotate(var(--start)) translateX(var(--radius)) scale(0.4); }
  15%  { opacity: var(--max-opacity); }
  85%  { opacity: var(--max-opacity); }
  100% { opacity: 0;   transform: rotate(calc(var(--start) + 360deg)) translateX(var(--radius)) scale(0.4); }
}

.hero-badge-main {
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-medio) 100%);
  border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  text-align: center;
  padding: 2.5rem;
  animation: morphShape 8s ease-in-out infinite;
  box-shadow: var(--sombra-lg);
}
.hero-badge-main .big-letter {
  font-family: var(--fuente-titulo);
  font-size: 5rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  opacity: 0.95;
}
.hero-badge-main .sub {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 0.5rem;
  font-weight: 500;
}
.hero-pill {
  position: absolute;
  background: var(--blanco);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  box-shadow: var(--sombra);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: float 4s ease-in-out infinite;
}
.hero-pill:nth-child(2) { top: 10%; left: -10%; animation-delay: -1s; }
.hero-pill:nth-child(3) { bottom: 15%; left: -5%; animation-delay: -2s; }
.hero-pill:nth-child(4) { top: 20%; right: -8%; animation-delay: -0.5s; }
.hero-pill:nth-child(5) { bottom: 8%; right: -5%; animation-delay: -3s; }

@keyframes morphShape {
  0%, 100% { border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%; }
  33%       { border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%; }
  66%       { border-radius: 50% 50% 60% 40% / 60% 40% 50% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}


/* ---- Excepciones: párrafos en contenedores centrados ---- */
.pilares-header p,
.cta-section p,
.page-hero p,
.act-header p,
.about-badge p,
.about-badge-float p,
.hero-lead,
.footer-col p,
.cookie-text p {
  text-align: center;
}

/* ---- SECCIÓN: Pilares ---- */
.pilares { background: var(--blanco); }
.pilares-header { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }

/* Grid simétrico: fila 1 → 3 tarjetas iguales, fila 2 → 2 tarjetas centradas */
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
}
.pilares-grid .pilar-card:nth-child(1) { grid-column: 1 / 3; }
.pilares-grid .pilar-card:nth-child(2) { grid-column: 3 / 5; }
.pilares-grid .pilar-card:nth-child(3) { grid-column: 5 / 7; }
.pilares-grid .pilar-card:nth-child(4) { grid-column: 2 / 4; }
.pilares-grid .pilar-card:nth-child(5) { grid-column: 4 / 6; }

.pilar-card {
  background: var(--crema);
  border-radius: var(--radio-lg);
  padding: 2rem 1.75rem;
  border: 1px solid var(--borde);
  transition: all var(--transicion);
  position: relative;
  overflow: hidden;
}
.pilar-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ambar), var(--verde));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transicion);
}
.pilar-card:hover::before { transform: scaleX(1); }
.pilar-card:hover {
  background: var(--blanco);
  box-shadow: var(--sombra);
  border-color: transparent;
  transform: translateY(-4px);
}
.pilar-num {
  font-family: var(--fuente-titulo);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--borde);
  line-height: 1;
  margin-bottom: 0.75rem;
  font-style: italic;
}
/* Emoji en esquina superior derecha */
.pilar-emoji {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.85;
  transition: transform var(--transicion), opacity var(--transicion);
  pointer-events: none;
}
.pilar-card:hover .pilar-emoji {
  transform: scale(1.15) rotate(-5deg);
  opacity: 1;
}
.pilar-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; padding-right: 2.5rem; }

/* ---- SECCIÓN: Quiénes somos mini ---- */
.about-home {
  background: var(--crema);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-badge {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-medio) 100%);
  border-radius: var(--radio-lg);
  padding: 3rem 2.5rem;
  color: var(--blanco);
}
.about-badge h3 {
  color: var(--blanco);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.about-badge p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }
.about-badge-float {
  position: absolute;
  bottom: -1.5rem; right: -1.5rem;
  background: var(--ambar);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  color: var(--blanco);
  text-align: center;
  box-shadow: var(--sombra-lg);
  min-width: 150px;
}
.about-badge-float .num {
  font-family: var(--fuente-titulo);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}
.about-badge-float .lbl { font-size: 0.78rem; font-weight: 500; opacity: 0.9; margin-top: 0.3rem; }
.about-text h2 { margin-bottom: 0.5rem; }
.about-text .divider { margin-top: 0; }
.about-text p { margin-bottom: 1.25rem; }
.about-checks { margin: 1.5rem 0 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--texto-medio);
}
.check-icon {
  width: 22px;
  height: 22px;
  background: var(--verde-claro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--verde);
}

/* ---- SECCIÓN: Actividades ---- */
.actividades { background: var(--verde); }
.actividades .tag { color: var(--ambar); }
.actividades .tag::before { background: var(--ambar); }
.actividades h2 { color: var(--blanco); }
.actividades .divider { background: linear-gradient(90deg, var(--ambar), rgba(255,255,255,0.3)); }
.act-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.act-intro { max-width: 500px; color: rgba(255,255,255,0.75); }
.act-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radio-lg);
  padding: 1.75rem;
  transition: all var(--transicion);
  backdrop-filter: blur(4px);
}
.act-card:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-3px);
}
.act-card .card-icon {
  background: rgba(255,255,255,0.12);
  font-size: 1.5rem;
}
.act-card h3 { color: var(--blanco); font-size: 1rem; margin-bottom: 0.5rem; }
.act-card p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* ---- SECCIÓN: Transparencia mini ---- */
.transparencia-home { background: var(--blanco); }
.transp-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}
.transp-datos { display: flex; flex-direction: column; gap: 1rem; }
.dato-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--crema);
  border-radius: var(--radio);
  border: 1px solid var(--borde);
}
.dato-label { font-size: 0.85rem; color: var(--texto-suave); font-weight: 500; }
.dato-valor { font-weight: 600; color: var(--verde); font-size: 0.95rem; }

/* ---- SECCIÓN: CTA ---- */
.cta-section {
  background: linear-gradient(135deg, var(--ambar) 0%, #c07d0a 100%);
  text-align: center;
  padding: 5rem 0;
}
.cta-section h2 { color: var(--blanco); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 500px; margin: 0 auto 2.5rem; }
.cta-section .btn-primary {
  background: var(--blanco);
  color: var(--ambar);
  border-color: var(--blanco);
  font-weight: 600;
}
.cta-section .btn-primary:hover { background: var(--crema); }
.cta-section .btn-outline {
  color: var(--blanco);
  border-color: rgba(255,255,255,0.5);
}
.cta-section .btn-outline:hover { background: rgba(255,255,255,0.15); }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- FOOTER ---- */
#footer {
  background: var(--texto);
  color: rgba(255,255,255,1);
  font-size: 0.9rem;
}
.footer-top {
  padding: 4rem 0 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-brand { grid-column: 1 / -1; }
.footer-desc { margin-top: 1rem; line-height: 1.7; color: var(--blanco); }
.footer-col h4 {
  color: var(--blanco);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a {
  color: var(--blanco);
  transition: color var(--transicion);
  font-size: 0.9rem;
}
.footer-col li { color: var(--blanco); font-size: 0.9rem; }
.footer-col a:hover { color: var(--ambar); }
.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--blanco);
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a {
  color: var(--blanco);
  transition: color var(--transicion);
}
.footer-legal a:hover { color: var(--ambar); }

/* ---- PAGE HERO (interior pages) ---- */
.page-hero {
  padding: 9rem 0 4rem;
  background: var(--verde);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}
.page-hero .tag { color: var(--ambar); }
.page-hero .tag::before { background: var(--ambar); }
.page-hero h1 { color: var(--blanco); }
.page-hero-lead { color: rgba(255,255,255,0.72); font-size: 1.1rem; max-width: 580px; margin-top: 1rem; }
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.83rem;
}
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.breadcrumb span { color: rgba(255,255,255,0.3); }
.breadcrumb .current { color: rgba(255,255,255,0.75); }

/* ---- Cookie Banner ---- */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--texto);
  color: rgba(255,255,255,0.8);
  padding: 1.2rem 2rem;
  z-index: 9999;
  display: none;
  border-top: 3px solid var(--ambar);
}
#cookie-banner.show { display: flex; }
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  flex-wrap: wrap;
}
.cookie-text { font-size: 0.88rem; line-height: 1.5; }
.cookie-text a { color: var(--ambar); text-decoration: underline; }
.cookie-btns { display: flex; gap: 0.75rem; flex-shrink: 0; }
.btn-cookie-accept {
  background: var(--ambar); color: var(--blanco);
  border: none; padding: 0.5rem 1.25rem;
  border-radius: var(--radio); cursor: pointer;
  font-family: var(--fuente-cuerpo); font-size: 0.88rem; font-weight: 500;
  transition: all var(--transicion);
}
.btn-cookie-accept:hover { background: #c07d0a; }
.btn-cookie-decline {
  background: transparent; color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2); padding: 0.5rem 1.25rem;
  border-radius: var(--radio); cursor: pointer;
  font-family: var(--fuente-cuerpo); font-size: 0.88rem;
  transition: all var(--transicion);
}
.btn-cookie-decline:hover { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.4); }

/* ---- Animations on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =========================================
   RISE — Estilos base páginas legales
   ========================================= */

/* ---- Layout legal de dos columnas ---- */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* ---- Índice lateral sticky ---- */
.legal-toc {
  position: sticky;
  top: 90px;
}
.legal-toc-inner {
  background: var(--crema);
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
}
.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--texto-suave);
  margin-bottom: 1rem;
}
.legal-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.legal-toc nav a {
  font-size: 0.85rem;
  color: var(--texto-medio);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radio);
  transition: all var(--transicion);
  line-height: 1.4;
}
.legal-toc nav a:hover { background: var(--verde-claro); color: var(--verde); }
.legal-toc nav a.active { background: var(--verde); color: var(--blanco); font-weight: 500; }
.toc-update {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--borde);
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

/* ---- Cuerpo del artículo legal ---- */
.legal-body {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  border: 1px solid var(--borde);
  padding: 3rem;
  min-width: 0; /* evita desbordamiento en grid */
}
.legal-body section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--borde);
}
.legal-body section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.legal-body h2 {
  font-size: 1.4rem;
  color: var(--verde);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--verde-claro);
}
.legal-body h3 { font-size: 1rem; color: var(--texto); margin: 1.5rem 0 0.75rem; }
.legal-body p  { margin-bottom: 1rem; line-height: 1.8; }
.legal-body p:last-child { margin-bottom: 0; }

/* ---- Lista legal ---- */
.legal-list {
  list-style: none;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.legal-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  color: var(--texto-medio);
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}
.legal-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ambar);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.7;
}
/* strong dentro del li fluye inline con el texto */
.legal-list li strong {
  display: inline;
  font-weight: 700;
  color: var(--texto);
}

/* ---- Tabla de datos del titular ---- */
.legal-table {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  margin: 1.25rem 0;
}
.legal-table-row {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--borde);
  align-items: flex-start;
}
.legal-table-row:last-child   { border-bottom: none; }
.legal-table-row:nth-child(even) { background: var(--crema); }
.legal-table-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--texto-suave);
  min-width: 180px;
  flex-shrink: 0;
  padding-top: 1px;
}
.legal-table-value { font-size: 0.9rem; color: var(--texto); font-weight: 500; }

/* ---- Tabla de cookies ---- */
.cookies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.cookies-table th {
  background: var(--verde);
  color: var(--blanco);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cookies-table th:first-child { border-radius: var(--radio) 0 0 0; }
.cookies-table th:last-child  { border-radius: 0 var(--radio) 0 0; }
.cookies-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--borde);
  vertical-align: top;
  line-height: 1.5;
  color: var(--texto-medio);
}
.cookies-table tr:last-child td { border-bottom: none; }
.cookies-table tr:nth-child(even) td { background: var(--crema); }
.cookies-table tr:hover td { background: var(--verde-claro); }

/* ---- Grids semánticos: resumen RGPD y tarjetas de derechos ---- */
.legal-grid-resumen,
.legal-grid-derechos { /* columnas manejadas por style inline en desktop */ }


/* ================================================================
   RESPONSIVE SYSTEM — Mobile First
   Breakpoints:
     - xs:  < 480px   (móviles pequeños)
     - sm:  < 640px   (móviles)
     - md:  < 768px   (móviles grandes / landscape)
     - lg:  < 1024px  (tablets)
     - xl:  < 1280px  (tablets grandes / laptop pequeño)
   ================================================================ */

/* ---- Tablet grande / Laptop pequeño (< 1280px) ---- */
@media (max-width: 1280px) {
  .footer-top  { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2rem; }
  .hero-content { gap: 3rem; }
  .transp-grid  { gap: 2.5rem; }
}

/* ---- Tablet (< 1024px) ---- */
@media (max-width: 1024px) {
  .nav-links   { gap: 0; }
  .nav-links a { padding: 0.4rem 0.65rem; font-size: 0.85rem; }
  .grid-4      { grid-template-columns: repeat(2, 1fr); }
  .footer-top  { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .hero-content { gap: 2.5rem; }
  .hero-badge-main { width: 280px; height: 280px; }
  .hero-logo-wrap  { width: 360px; height: 360px; border-radius: 24px; }
  .about-grid  { gap: 3rem; }
  .about-badge-float { bottom: -1rem; right: -1rem; min-width: 130px; padding: 1.2rem; }
  .transp-grid { grid-template-columns: 1fr 1.3fr; gap: 2.5rem; }
  /* Tablet: pilares en 2 columnas, última fila centrada */
  .pilares-grid { grid-template-columns: repeat(2, 1fr); }
  .pilares-grid .pilar-card:nth-child(1) { grid-column: 1 / 2; }
  .pilares-grid .pilar-card:nth-child(2) { grid-column: 2 / 3; }
  .pilares-grid .pilar-card:nth-child(3) { grid-column: 1 / 2; }
  .pilares-grid .pilar-card:nth-child(4) { grid-column: 2 / 3; }
  .pilares-grid .pilar-card:nth-child(5) { grid-column: 1 / 3; max-width: 50%; margin: 0 auto; width: 100%; }

  /* Legal tablet: reducir columna TOC */
  .legal-layout { grid-template-columns: 190px 1fr; gap: 2rem; }
  .legal-body   { padding: 2.5rem; }
  .legal-body h2 { font-size: 1.25rem; }
  .legal-table-label { min-width: 150px; }
}

/* ---- Tablet pequeña / Móvil grande (< 768px) ---- */
@media (max-width: 768px) {

  /* Navegación */
  .nav-links, .nav-cta .btn-primary { display: none; }
  .nav-toggle  { display: flex; }
  .nav-inner   { height: 64px; }
  .logo-img    { height: 60px; width: 60px; min-width: 60px; }
  .nav-mobile a {
    display: block; padding: 0.9rem 1.1rem;
    border-radius: var(--radio); font-size: 1rem;
    font-weight: 500; color: var(--texto);
    border-bottom: 1px solid var(--borde);
  }
  .nav-mobile a:last-child { border-bottom: none; }
  .nav-mobile a.active, .nav-mobile a:hover { color: var(--verde); background: var(--verde-claro); }
  .nav-mobile .btn-ambar {
    display: block; margin-top: 1rem;
    text-align: center; border-bottom: none;
  }

  /* Grids generales */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* Actividades — cabecera apilada en móvil */
  .act-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .act-header .btn {
    width: 100%;
    justify-content: center;
    color: var(--blanco) !important;
    border-color: rgba(255,255,255,0.4) !important;
  }

  /* Hero */
  .hero-content { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-badge-main { width: 240px; height: 240px; margin: 0 auto; }
  .hero-logo-wrap  { width: 280px; height: 280px; margin: 0 auto; border-radius: 20px; }
  .hero-text { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-stats  { justify-content: center; }

  /* About */
  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { max-width: 480px; margin: 0 auto; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 0.75rem; }
  .footer-legal  { justify-content: center; flex-wrap: wrap; gap: 1rem; }

  /* Page Hero */
  .page-hero    { padding: 7rem 0 3rem; }
  .page-hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }

  /* ---- LEGAL: colapso a columna única ---- */
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .legal-toc         { position: static; }
  .legal-toc-inner   { padding: 1rem 1.25rem; }

  /* TOC horizontal con scroll suave — sin flex-wrap para evitar desbordamiento */
  .legal-toc nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }
  .legal-toc nav::-webkit-scrollbar { display: none; }
  .legal-toc nav a   { white-space: nowrap; font-size: 0.8rem; padding: 0.3rem 0.65rem; }

  .legal-body        { padding: 2rem 1.5rem; }
  .legal-body section { margin-bottom: 2rem; padding-bottom: 2rem; }

  /* Filas de datos del titular: apiladas verticalmente */
  .legal-table-row   { flex-direction: column; gap: 0.15rem; padding: 0.75rem 1rem; }
  .legal-table-label { min-width: unset; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
  .legal-table-value { font-size: 0.88rem; }

  /* Grids de resumen y derechos: 2 columnas en tablet */
  .legal-grid-resumen  { grid-template-columns: repeat(2, 1fr) !important; }
  .legal-grid-derechos { grid-template-columns: repeat(2, 1fr) !important; }

  /* Cookie banner */
  .cookie-inner { flex-direction: column; gap: 1rem; }
  .cookie-btns  { width: 100%; justify-content: stretch; }
  .cookie-btns .btn-cookie-accept,
  .cookie-btns .btn-cookie-decline { flex: 1; text-align: center; }

  /* Junta directiva */
  [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* ---- Móvil (< 640px) ---- */
@media (max-width: 640px) {
  .footer-top  { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: auto; }
  .card        { padding: 1.5rem; }
  .pilar-card  { padding: 1.5rem; }
  .pilares-grid { grid-template-columns: 1fr; }
  .pilares-grid .pilar-card:nth-child(n) { grid-column: 1 / 2; max-width: 100%; }
  .act-card    { padding: 1.4rem; }

  /* Legal tabla datos */
  .legal-table-label { font-size: 0.72rem; }
  .legal-table-row   { padding: 0.65rem 0.85rem; }

  /* Cookies tabla: scroll horizontal de borde a borde */
  .legal-body .cookies-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
  }
  .cookies-table      { font-size: 0.8rem; min-width: 480px; }
  .cookies-table td,
  .cookies-table th   { padding: 0.6rem 0.75rem; }

  .about-badge  { padding: 2rem 1.5rem; }
  .about-badge h3 { font-size: 1.5rem; }
  .grid-3       { grid-template-columns: 1fr; }
}

/* ---- Móvil pequeño (< 480px) ---- */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .nav-logo .logo-text span { display: none; }
  .nav-inner { height: 60px; }
  .hero-eyebrow { font-size: 0.72rem; padding: 0.35rem 0.85rem; }
  .hero-stats   { flex-direction: column; gap: 1rem; }
  .hero-stat-num { font-size: 1.6rem; }
  .hero-actions .btn, .cta-btns .btn { font-size: 0.9rem; padding: 0.85rem 1.25rem; }
  .section    { padding: 2.5rem 0; }
  .section-sm { padding: 1.75rem 0; }
  .pilar-num  { font-size: 2.5rem; }
  .dato-row   { flex-direction: column; gap: 0.25rem; align-items: flex-start; }
  .dato-valor { font-size: 0.9rem; }
  .page-hero  { padding: 6rem 0 2.5rem; }
  .breadcrumb { font-size: 0.78rem; }
  .page-hero-lead { font-size: 0.95rem; }
  .about-badge-float { border-radius: var(--radio); }
  .footer-col h4  { margin-bottom: 0.9rem; }
  .footer-col ul  { gap: 0.5rem; }

  /* Legal compacto */
  .legal-body {
    padding: 1.25rem 1rem;
    border-radius: var(--radio);
  }
  .legal-body h2 { font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: 0.6rem; }
  .legal-body h3 { font-size: 0.92rem; margin: 1.1rem 0 0.6rem; }
  .legal-body p  { font-size: 0.9rem; line-height: 1.7; }
  .legal-body section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; }
  .legal-list li { font-size: 0.88rem; }
  .legal-toc-inner { padding: 0.9rem 1rem; }
  .toc-update { font-size: 0.74rem; }

  /* Tabla datos: aún más compacta */
  .legal-table-row  { padding: 0.6rem 0.75rem; }
  .legal-table-label { font-size: 0.7rem; }
  .legal-table-value { font-size: 0.85rem; }

  /* Scroll cookies ajustado al nuevo padding */
  .legal-body .cookies-table-wrap { margin: 0 -1rem; padding: 0 1rem; }

  /* Grids: resumen a columna única, derechos mantiene 2 cols */
  .legal-grid-resumen  { grid-template-columns: 1fr !important; }
  .legal-grid-derechos { grid-template-columns: repeat(2, 1fr) !important; }

  /* Animaciones desactivadas en móvil (performance) */
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Móvil muy pequeño (< 360px) ---- */
@media (max-width: 360px) {
  .legal-grid-derechos { grid-template-columns: 1fr !important; }
}