/* =========================================================================
   Alexandra Pulido — Gestora Social de Cundinamarca
   Hoja de estilos principal. Se carga después de Bootstrap 5.3.
   ========================================================================= */

@font-face {
  font-family: 'Amithen';
  src: url('../fonts/Amithen.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --morado:        #491B76;   /* títulos y barra superior            */
  --morado-fondo:  #461A72;   /* fondos de sección                   */
  --morado-oscuro: #3A1461;
  --magenta:       #DB0A6F;   /* botones principales                 */
  --magenta-osc:   #B80659;
  --magenta-tag:   #CD1A86;   /* etiquetas ESCUCHAR / ARTICULAR…     */
  --lila:          #9D5CBF;   /* acentos, caligrafía, botón lila     */
  --lila-osc:      #85499F;
  /* La guía usa un lila claro (#B382CD) con texto blanco: 2,5:1 de contraste.
     Se oscurece lo mínimo para alcanzar AA (4,7:1) sin salirse de la paleta. */
  --lila-panel:    #9857BA;
  --navy:          #121141;
  --texto:         #353535;
  --blanco:        #FFFFFF;

  --fuente:        'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fuente-script: 'Amithen', 'Segoe Script', cursive;

  --radio:         22px;
  --radio-tarjeta: 20px;
  --alto-nav:      88px;
  --sombra:        0 14px 34px rgba(25, 8, 45, .14);
}

/* ---------- Base ---------- */

/* El recorte horizontal usa `clip`, nunca `hidden`: `overflow-x: hidden` en
   <body> lo convierte en su propio contenedor de scroll y eso rompe el pegado
   de la barra superior, anula `scroll-padding-top` y ensucia el repintado al
   desplazar. `clip` recorta igual, pero sin crear ese segundo contenedor. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--alto-nav);
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}

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

body {
  font-family: var(--fuente);
  font-weight: 500;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--magenta); color: #fff; padding: .75rem 1.25rem;
  font-weight: 700; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Tipografía compartida ---------- */

.eyebrow { margin: 0 0 .75rem; line-height: 1.1; }
.eyebrow-script {
  font-family: var(--fuente-script);
  color: var(--lila);
  font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.3rem);
  margin-right: .3rem;
  vertical-align: baseline;
}
.eyebrow-bold {
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(1.05rem, .9rem + .7vw, 1.45rem);
  letter-spacing: -.01em;
}
.eyebrow--claro .eyebrow-bold { color: var(--blanco); }
.eyebrow--claro .eyebrow-script { color: var(--blanco); }

.titulo-morado,
.titulo-blanco {
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.015em;
  font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.45rem);
  margin: 0;
}
.titulo-morado { color: var(--morado); }
.titulo-blanco { color: var(--blanco); }

.texto-cuerpo {
  font-size: clamp(1rem, .94rem + .28vw, 1.175rem);
  line-height: 1.6;
}
.texto-cuerpo p { margin-bottom: 1.15rem; }
.texto-cuerpo p:last-child { margin-bottom: 0; }
.texto-cuerpo strong { font-weight: 700; color: var(--navy); }
.texto-claro, .texto-claro strong { color: var(--blanco); }

.texto-justificado { text-align: left; }
@media (min-width: 768px) {
  .texto-justificado { text-align: justify; hyphens: auto; }
}

/* ---------- Botones ---------- */

.btn-ap {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  color: var(--blanco);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  padding: .85rem 2.1rem;
  font-size: clamp(.95rem, .9rem + .2vw, 1.05rem);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  box-shadow: 0 8px 20px rgba(219, 10, 111, .26);
}
.btn-ap:hover, .btn-ap:focus-visible {
  color: var(--blanco);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(219, 10, 111, .34);
}
.btn-ap:active { transform: translateY(0); }

.btn-ap--magenta { background: var(--magenta); }
.btn-ap--magenta:hover, .btn-ap--magenta:focus-visible { background: var(--magenta-osc); }

.btn-ap--lila { background: var(--lila-panel); box-shadow: 0 8px 20px rgba(157, 92, 191, .28); }
.btn-ap--lila:hover, .btn-ap--lila:focus-visible { background: var(--lila-osc); box-shadow: 0 12px 26px rgba(157, 92, 191, .36); }

.btn-ap--sm { padding: .6rem 1.35rem; font-size: .875rem; }
.btn-ap--lg { padding: 1rem 2.6rem; font-size: clamp(1.05rem, .9rem + .7vw, 1.5rem); }

/* ---------- Barra superior ---------- */

.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--morado);
  /* Capa propia: sin esto el navegador repinta la barra sobre el contenido
     ya desplazado y deja restos de la portada al hacer scroll. */
  will-change: transform;
}
.site-header .navbar { padding: 0; min-height: var(--alto-nav); }

.navbar-brand { padding: .6rem 0; margin-right: 1rem; }
.navbar-brand img { height: 54px; width: auto; }

.site-header .navbar-nav { gap: clamp(.5rem, 2vw, 2.35rem); align-items: center; }
.site-header .nav-link {
  color: rgba(255, 255, 255, .92);
  font-weight: 500;
  font-size: 1.0625rem;
  padding: .45rem 0;
  position: relative;
}
.site-header .nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--blanco);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.site-header .nav-link:hover, .site-header .nav-link:focus-visible { color: var(--blanco); }
.site-header .nav-link:hover::after,
.site-header .nav-link:focus-visible::after,
.site-header .nav-link.activo::after { transform: scaleX(1); }

.navbar-pedaleando { display: inline-flex; margin-left: clamp(1rem, 3vw, 2.75rem); }
.navbar-pedaleando img { height: 60px; width: auto; }

.site-header .navbar-toggler {
  border-color: rgba(255, 255, 255, .45);
  padding: .4rem .6rem;
}
.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding-bottom: 1rem; }
  .site-header .navbar-nav { align-items: flex-start; gap: .25rem; }
  .navbar-pedaleando { margin: .75rem 0 0; }
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 62vh, 720px);
  overflow: hidden;
  background: var(--morado-oscuro);
}

/* Rotabanner: ocupa todo el fondo de la portada. */
.hero-fondo { position: absolute; inset: 0; z-index: 0; }
.hero-fondo .carousel-inner,
.hero-fondo .carousel-item,
.hero-fondo picture { display: block; height: 100%; }
.hero-fondo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--foco, center 30%);
}
/* En vertical el recorte es mucho más estrecho: cada imagen usa su propio encuadre. */
@media (max-width: 767.98px) {
  .hero-fondo img { object-position: var(--foco-sm, var(--foco, center 30%)); }
}

/* Velo que garantiza la legibilidad del titular sobre cualquier foto. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(40, 12, 70, .18) 0%, rgba(40, 12, 70, .10) 38%, rgba(40, 12, 70, .62) 100%);
}

.hero-contenido {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--blanco);
  padding-bottom: clamp(4.5rem, 10vh, 6.25rem);
  padding-top: clamp(4rem, 14vh, 8rem);
}

.hero-indicadores {
  z-index: 3;
  margin-bottom: clamp(1rem, 2.5vh, 1.75rem);
}
.hero-indicadores button {
  width: 11px;
  height: 11px;
  margin: 0 6px;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: transparent;
  opacity: 1;
  transition: background-color .25s ease, transform .25s ease;
}
.hero-indicadores button.active { background: var(--magenta); border-color: var(--magenta); transform: scale(1.15); }
.hero-indicadores button:hover { background: rgba(255, 255, 255, .6); }
.hero-titulo {
  font-family: var(--fuente-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.6vw, 5.9rem);
  line-height: 1.02;
  margin: 0 0 .35rem;
  text-shadow: 0 6px 26px rgba(30, 8, 52, .4);
}
.hero-subtitulo {
  font-weight: 600;
  font-size: clamp(1.15rem, .8rem + 1.9vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 clamp(1.25rem, 3vh, 2rem);
  text-shadow: 0 4px 18px rgba(30, 8, 52, .4);
}

/* ---------- Secciones ---------- */

.seccion { padding: clamp(3rem, 7vw, 5.75rem) 0; }
.seccion--claro { background: var(--blanco); }

.seccion--morado {
  position: relative;
  background: var(--morado-fondo);
  color: var(--blanco);
}
#gestiones { background: var(--morado-fondo) url('../img/fondo-gestiones.jpg') center / cover no-repeat; }
.voces     { background: var(--morado-fondo) url('../img/fondo-voces.jpg')     center / cover no-repeat; }

/* ---------- Cita ---------- */

.cita {
  position: relative;
  background: var(--morado-fondo) url('../img/fondo-cita.jpg') center / cover no-repeat;
  color: var(--blanco);
  padding: clamp(2.75rem, 5vw, 3.75rem) 0;
  margin: 0;
}
.cita blockquote {
  position: relative;
  margin: 0 auto;
  max-width: 62rem;
  padding: 0 clamp(2.5rem, 7vw, 5rem);
  text-align: center;
}
.cita p {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.02rem, .8rem + 1.1vw, 1.65rem);
  line-height: 1.32;
}
.cita-comilla {
  position: absolute;
  font-family: var(--fuente);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1;
  color: var(--lila);
  user-select: none;
}
.cita-comilla--abre   { top: -.42em; left: 0; }
.cita-comilla--cierra { bottom: -.72em; right: 0; }

/* ---------- Su forma de gestionar ---------- */

.forma-foto {
  display: block;
  width: 100%;
  max-height: clamp(300px, 36vw, 540px);
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  object-fit: cover;
  object-position: center 32%;
}

.pasos { list-style: none; margin: 0; padding: 0; }

.paso { position: relative; }
.paso + .paso { margin-top: clamp(1rem, 2vw, 1.5rem); }

.paso-etiqueta {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: var(--magenta-tag);
  color: var(--blanco);
  font-weight: 700;
  font-size: clamp(.95rem, .88rem + .3vw, 1.1rem);
  letter-spacing: .02em;
  padding: .45rem 1.5rem;
  border-radius: 12px;
  margin-left: clamp(.5rem, 1.5vw, 1.15rem);
}

.paso-panel {
  position: relative;
  z-index: 1;
  margin-top: -.85rem;
  padding: 1.8rem clamp(1.25rem, 3vw, 2.1rem) 1.5rem;
  background: var(--lila-panel);
  border-radius: var(--radio);
  color: var(--blanco);
  font-size: clamp(.98rem, .92rem + .28vw, 1.1rem);
  line-height: 1.45;
}

/* ---------- Tarjetas de iniciativas ---------- */

.tarjeta {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--blanco);
  border-radius: var(--radio-tarjeta);
  padding: 1.75rem 1.5rem 1.65rem;
  text-align: center;
  box-shadow: 0 16px 34px rgba(24, 6, 46, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(24, 6, 46, .28); }

.tarjeta-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.tarjeta-logo img { max-height: 100%; width: auto; object-fit: contain; }
.tarjeta-logo--wide { height: 92px; }
.tarjeta-logo--wide img { max-width: 78%; }
.tarjeta-logo--tall { height: 112px; }
.tarjeta-logo--tall img { max-width: 60%; }

.tarjeta-texto {
  flex: 1 1 auto;
  margin: 0 0 1.25rem;
  color: var(--texto);
  font-size: .95rem;
  line-height: 1.48;
}
.tarjeta .btn-ap { align-self: center; }

/* ---------- Aliados ---------- */

.aliados {
  position: relative;
  background: var(--blanco);
  overflow: hidden;
}
.aliados-contenido { position: relative; z-index: 1; max-width: 56rem; }
.aliados-contenido .texto-cuerpo { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.aliados-flor {
  position: absolute;
  bottom: 0;
  width: clamp(120px, 15vw, 230px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.aliados-flor--izq { left: 0; }
.aliados-flor--der { right: 0; }

@media (max-width: 767.98px) {
  .aliados-flor { opacity: .35; width: 110px; }
}

/* ---------- Voces del territorio ---------- */

.voces-titulo {
  text-align: center;
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.05;
}
.voces-titulo .eyebrow-script {
  color: var(--blanco);
  font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.1rem);
}
.voces-titulo .eyebrow-bold {
  color: var(--blanco);
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.85rem);
}

.voces-carrusel { position: relative; }

.voces-pista {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: .25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.voces-pista::-webkit-scrollbar { display: none; }

.voces-item {
  flex: 0 0 auto;
  width: calc((100% - 2 * clamp(1rem, 2.5vw, 2rem)) / 3);
  container-type: inline-size;
  scroll-snap-align: center;
}
@media (max-width: 991.98px) { .voces-item { width: calc((100% - clamp(1rem, 2.5vw, 2rem)) / 2); } }
@media (max-width: 575.98px) { .voces-item { width: 82%; } }

.voz-marco {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(15, 4, 30, .38);
}
.voz-marco iframe,
.voz-marco video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Video propio: formato vertical 9:16, igual que en la guía de diseño. */
.voz-marco--video { aspect-ratio: 9 / 16; background: #1c0b30; }
.voz-marco--video video { object-fit: cover; }

/* Reel incrustado: el alto lo fija Instagram. La fórmula reproduce su
   maquetación (1,25 × ancho + cromo fijo) y main.js la corrige con la
   altura exacta que el propio reproductor publica por postMessage. */
.voz-marco--reel {
  aspect-ratio: 1 / 1.9;
  background: var(--blanco);
}
@supports (height: 1cqw) {
  /* `--alto-reel` lo fija main.js una sola vez con la altura mayor que
     publican los reproductores; hasta entonces vale la estimación. */
  .voz-marco--reel {
    aspect-ratio: auto;
    height: var(--alto-reel, calc(100cqw * 1.25 + 205px));
  }
}

.voces-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--blanco);
  color: var(--morado);
  box-shadow: 0 8px 20px rgba(15, 4, 30, .35);
  transition: background-color .18s ease, opacity .18s ease;
}
.voces-nav svg { fill: currentColor; }
.voces-nav:hover { background: var(--magenta); color: var(--blanco); }
.voces-nav:disabled { opacity: .35; cursor: default; }
.voces-nav--prev { left: clamp(-22px, -1.5vw, 0px); }
.voces-nav--next { right: clamp(-22px, -1.5vw, 0px); }

@media (max-width: 575.98px) {
  .voces-nav { width: 40px; height: 40px; }
  .voces-nav--prev { left: -6px; }
  .voces-nav--next { right: -6px; }
}

/* ---------- Pie de página ---------- */

.site-footer { background: var(--blanco); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.footer-logo { width: clamp(180px, 22vw, 260px); height: auto; margin-bottom: clamp(1.25rem, 3vw, 2rem); }

.footer-redes {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem clamp(1.25rem, 4vw, 2.75rem);
}
.footer-redes a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--navy);
  font-weight: 400;
  font-size: clamp(.92rem, .88rem + .2vw, 1.05rem);
  text-decoration: none;
}
.footer-redes a:hover, .footer-redes a:focus-visible { color: var(--magenta); }
.red-icono { flex: 0 0 auto; fill: var(--morado); transition: fill .18s ease; }
.red-icono circle { fill: var(--morado); }
.red-icono path { fill: var(--blanco); }
.footer-redes a:hover .red-icono circle,
.footer-redes a:focus-visible .red-icono circle { fill: var(--magenta); }

.footer-legal { margin: 0; font-size: .82rem; color: #6b6b6b; }

/* ---------- Botón volver arriba ---------- */

.ir-arriba {
  position: fixed;
  right: clamp(.9rem, 2vw, 1.75rem);
  bottom: clamp(.9rem, 2vw, 1.75rem);
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--magenta);
  color: var(--blanco);
  box-shadow: 0 10px 24px rgba(219, 10, 111, .38);
  transition: opacity .25s ease, transform .25s ease, background-color .18s ease;
}
.ir-arriba svg { fill: currentColor; }
.ir-arriba:hover { background: var(--morado); color: var(--blanco); transform: translateY(-3px); }
.ir-arriba[hidden] { display: none; }

/* ---------- Animación de entrada ---------- */

.revelar { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .revelar { opacity: 1; transform: none; }
}
