/* ==========================================================================
   Landing 100 años — template: landing-100-anios-template.php
   Todo el CSS está bajo .c100 para no chocar con main.css ni Tailwind.
   ========================================================================== */

.c100 {
  --c100-navy: #06213C;
  --c100-ink: #1E254C;
  --c100-red: #F14E23;
  --c100-orange: #F4862B;
  --c100-orange-soft: #FBD9BF;
  --c100-gray-year: #E1E5E9;
  --c100-gray-bg: #F3F7F8;
  --c100-gray-text: #637381;
  --c100-shadow: 0 12px 32px rgba(6, 33, 60, .10);
  --c100-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --c100-serif: 'Playfair Display', Georgia, serif;
  --c100-wrap: 1480px;

  font-family: var(--c100-sans);
  color: var(--c100-ink);
  background: #fff;
  overflow-x: hidden;
}

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

.c100 img { display: block; max-width: 100%; }
.c100 figure { margin: 0; }

.c100-wrap {
  width: 100%;
  max-width: calc(var(--c100-wrap) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.c100-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.c100-desk { display: none; }

.c100 .material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Títulos: sans bold + italic serif ---------------------------------- */
.c100 .c100-titulo {
  font-family: var(--c100-sans);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--c100-ink);
  margin: 0;
}

.c100 .c100-titulo em {
  display: block;
  font-family: var(--c100-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.c100 .c100-titulo--centro { text-align: center; }

/* --- Botones redondos y contador ---------------------------------------- */
.c100-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.c100 .c100-contador {
  margin: 0 8px 0 0 !important;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c100-red);
  opacity: .85;
}
.c100 .c100-contador strong { opacity: 1; }
.c100 .c100-contador span { opacity: .75; }

.c100-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--c100-ink);
  border-radius: 50%;
  background: transparent;
  color: var(--c100-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color .18s ease, color .18s ease;
}
.c100-btn:hover { background: var(--c100-ink); color: #fff; }
.c100-btn:focus-visible { outline: 3px solid rgba(96, 138, 243, .5); outline-offset: 2px; }
.c100-btn:disabled { opacity: .35; cursor: default; background: transparent; color: var(--c100-ink); }
.c100-btn .material-symbols-rounded { font-size: 22px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.c100-hero {
  background: var(--c100-gray-bg);
  min-height: 62vw;
  max-height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.c100-hero__lockup {
  width: min(90vw, 730px);
  height: auto;
  mix-blend-mode: multiply;
}

/* Hero con video de fondo */
.c100-hero.c100-hero--video {
  position: relative;
  overflow: hidden;
  background: var(--c100-navy);
  min-height: 0;
  max-height: none;
  /* ocupa toda la pantalla debajo del header (--c100-header lo mide landing-100.js) */
  height: calc(100svh - var(--c100-header, 75px));
  min-height: 420px;
}

.c100-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Velo oscuro para que el lockup se lea sobre cualquier parte del video */
.c100-hero--video::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(6, 33, 60, .55) 0%, rgba(6, 33, 60, .25) 70%);
}

/* Lockup en versión blanca (hace-100-anios-blanco.png) */
.c100-hero--video .c100-hero__lockup {
  position: relative;
  z-index: 2;
  mix-blend-mode: normal;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .35));
}

/* ==========================================================================
   LÍNEA DE TIEMPO
   ========================================================================== */
.c100-historia {
  position: relative;
  background: var(--c100-gray-bg);
  padding: 48px 0 56px;
}

.c100-historia__grid { position: relative; }

.c100-historia__intro {
  position: relative;
  z-index: 2;
  text-align: center;
}

.c100-arcos {
  width: 110px;
  height: auto;
  aspect-ratio: 262 / 42;
  margin: 0 auto 12px;
  display: block;
  overflow: visible;
}
.c100-arcos path { fill: #fff; stroke: var(--c100-ink); stroke-width: 1.5; stroke-linejoin: round; }
.c100-arcos .c100-arcos__centro { fill: var(--c100-navy); stroke: var(--c100-navy); }

.c100-historia .c100-titulo {
  font-size: clamp(1.75rem, 4.6vw, 5.5rem);
  font-weight: 500;
}
.c100-historia .c100-titulo em { display: inline; font-weight: 700; }

.c100-anio-fondo { display: none; }

/* Fila de años (mobile) */
.c100-timeline { position: relative; z-index: 2; }

.c100-timeline__lista {
  list-style: none;
  margin: 20px auto 0;
  padding: 0;
  max-width: 300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-top: 2px solid var(--c100-orange);
  padding-top: 26px;
}
.c100-timeline__lista::before {
  content: '';
  position: absolute;
  top: -7px;
  /* avanza de izquierda a derecha con los años (--c100-progreso: 0 a 1, lo setea el JS) */
  left: calc(var(--c100-progreso, 0) * (100% - 12px));
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c100-red);
  transition: left .6s cubic-bezier(.22, .61, .36, 1);
}

.c100 .c100-timeline__vecino {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c100-gray-year);
  min-width: 3em;
  margin: 0;
}

.c100-hito { text-align: center; }
.c100-hito[hidden] { display: none; }
.c100-hito.is-active { animation: c100-fade .35s ease both; }

@keyframes c100-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.c100 .c100-hito__anio {
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c100-red);
  margin: -30px 0 18px !important; /* se alinea con la fila de años en mobile */
}

.c100 .c100-hito__titulo {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--c100-ink);
  margin: 0 auto 8px;
  max-width: 14ch;
}

.c100 .c100-hito__desc {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--c100-ink);
  margin: 0 auto !important;
  max-width: 34ch;
}

.c100-hito__media {
  position: relative;
  width: 210px;
  margin: 24px auto 0;
}

.c100-hito__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.c100-chip {
  position: absolute;
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--c100-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c100-ink);
}
.c100-chip .material-symbols-rounded { font-size: 28px; }
.c100-chip--1 { left: -26px; top: 42%; }
.c100-chip--2 { right: -16px; top: -10px; }

/* ==========================================================================
   EVOLUCIÓN
   ========================================================================== */
.c100-evolucion {
  background: var(--c100-navy);
  color: #fff;
  padding: 48px 0 40px;
}
.c100 .c100-evolucion .c100-titulo {
  color: #fff;
  font-size: clamp(2rem, 3.8vw, 4.5rem);
}

.c100-logos {
  position: relative;
  margin-top: 32px;
}

.c100-logos__lista {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 260px;
  min-height: 90px;
  display: grid;
}

.c100-logos__item {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
}
.c100-logos__item.is-active { opacity: 1; visibility: visible; }
.c100-logos__item img { max-height: 120px; width: auto; }

.c100-logos__flecha {
  position: absolute;
  top: 45px;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}
.c100-logos__flecha--prev { left: 0; }
.c100-logos__flecha--next { right: 0; }

.c100-logos__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.c100-logos__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid #fff;
}
.c100-logos__dots span.is-active { background: #fff; }

/* ==========================================================================
   ESPACIOS
   ========================================================================== */
.c100-espacios { padding: 48px 0 24px; }

.c100 .c100-espacios .c100-titulo {
  font-size: clamp(1.75rem, 4.6vw, 5.5rem);
  max-width: 13ch;
}
.c100 .c100-espacios .c100-titulo em { display: inline; }

.c100-galeria.is-midiendo .c100-galeria__pista,
.c100-galeria.is-midiendo .c100-galeria__item { transition: none !important; }

.c100-galeria {
  margin-top: 24px;
  overflow: hidden;
}

.c100-galeria__pista {
  display: flex;
  gap: 16px;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1); /* frena gradual */
  will-change: transform;
}

.c100-galeria__item {
  flex: 0 0 86%;
  border-radius: 28px;
  overflow: hidden;
}
.c100-galeria__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  max-height: calc(100vh - var(--c100-header, 75px) - 150px); /* mobile: controles visibles */
}

/* ==========================================================================
   CIERRE
   ========================================================================== */
.c100-gracias { padding: 56px 0 72px; }

.c100 .c100-gracias .c100-titulo { font-size: clamp(2rem, 3.8vw, 4.5rem); }

.c100-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.c100-like__btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--c100-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}
.c100-like__btn:hover { transform: scale(1.06); }
.c100-like__btn:focus-visible { outline: 3px solid rgba(96, 138, 243, .5); outline-offset: 3px; }
.c100-like__btn[aria-pressed="true"] { background: var(--c100-orange); }
.c100-like__btn[aria-pressed="true"] .material-symbols-rounded { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.c100-like__btn.is-pop { animation: c100-pop .35s ease; }

@keyframes c100-pop {
  50% { transform: scale(1.18); }
}

.c100-like__dato {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c100-ink);
}
.c100-like__dato .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.c100 .c100-gracias__texto {
  text-align: center;
  font-size: .9375rem;
  line-height: 1.6;
  margin: 28px auto 0 !important;
  max-width: 34ch;
}

/* ==========================================================================
   SOLO MOBILE / TABLET
   ========================================================================== */
@media (max-width: 1023px) {

  /* Foto del hito centrada y separada del texto (.c100 figure le anulaba el margen) */
  .c100 .c100-hito__media { margin: 36px auto 0; }

  /* Títulos de sección: todos centrados, 40px y la cursiva 36px (Figma) */
  .c100 .c100-historia .c100-titulo,
  .c100 .c100-evolucion .c100-titulo,
  .c100 .c100-espacios .c100-titulo,
  .c100 .c100-gracias .c100-titulo {
    font-size: 40px;
    line-height: 1.05;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .c100 .c100-titulo em { font-size: 36px; }
}

/* ==========================================================================
   DESKTOP
   ========================================================================== */
@media (min-width: 1024px) {

  .c100-desk { display: inline; }

  /* Márgenes laterales proporcionales al diseño (233px en un frame de 1920px) */
  .c100-wrap { max-width: 1920px; padding: 0 12vw; }

  .c100-hero { min-height: 0; height: 780px; }

  /* Línea de tiempo
     Todo el bloque entra en el alto de la pantalla (descontando el header de 75px):
     título + años a la izquierda, imagen a la derecha. Los tamaños escalan con vh. */
  .c100-historia {
    --c100-alto: calc(100vh - var(--c100-header, 75px));
    background: #fff;
    min-height: var(--c100-alto);
    display: flex;
    align-items: center;
    padding: clamp(24px, 5vh, 80px) 0;
  }

  .c100-historia__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    column-gap: 40px;
  }

  /* Los contenedores intermedios no generan caja: sus hijos se ubican en esta grilla */
  .c100-timeline,
  .c100-timeline__slides,
  .c100-hito.is-active { display: contents; }

  .c100-historia__intro {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  .c100-arcos { width: clamp(130px, 19vh, 200px); margin: 0 0 clamp(8px, 1.5vh, 16px); }

  .c100 .c100-historia .c100-titulo { font-weight: 700; font-size: clamp(2.5rem, 7vh, 5.5rem); }
  .c100-historia .c100-titulo em { display: block; font-weight: 400; }

  .c100-anio-fondo {
    display: block;
    position: absolute;
    z-index: 1;
    top: -2vh;
    left: 34%;
    font-family: var(--c100-sans);
    font-weight: 800;
    font-size: clamp(11rem, 33vh, 25rem);
    line-height: .85;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 2px var(--c100-orange-soft);
    pointer-events: none;
    user-select: none;
  }
  .c100-anio-fondo span { display: block; }
  .c100-anio-fondo span + span {
    margin-left: .45em;
    font-style: italic;
  }

  /* Lista vertical con años vecinos (misma celda que el texto del hito activo) */
  .c100-timeline__lista {
    grid-column: 1;
    grid-row: 2;
    z-index: 2;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    max-width: none;
    margin: clamp(16px, 3vh, 40px) 0 0 40px;
    padding: 4px 0 4px 42px;
    border-top: 0;
    border-left: 2px solid rgba(244, 134, 43, .55);
    height: clamp(300px, 44vh, 520px);
  }
  /* Punto que baja por la línea a medida que avanzan los años (--c100-progreso: 0 a 1, lo setea el JS) */
  .c100-timeline__lista::before {
    top: calc(var(--c100-progreso, 0) * (100% - 16px));
    left: -9px;
    width: 16px; height: 16px;
    transition: top .6s cubic-bezier(.22, .61, .36, 1);
  }

  .c100 .c100-timeline__vecino { font-size: clamp(2rem, 5.5vh, 3.5rem); line-height: 1; letter-spacing: -0.02em; }

  .c100-hito { text-align: left; }

  .c100-hito__texto {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    z-index: 2;
    margin-top: clamp(16px, 3vh, 40px);
    padding-left: 110px;
    margin-right: -60px; /* el texto puede ocupar parte del espacio entre columnas */
    animation: c100-fade .35s ease both;
  }

  .c100 .c100-hito__anio { font-size: clamp(2.25rem, 5.5vh, 3.5rem); margin: 0 0 clamp(8px, 1.8vh, 22px) !important; }
  .c100 .c100-hito__titulo { font-size: clamp(1.5rem, 3.6vh, 2.25rem); max-width: none; margin: 0 0 clamp(8px, 1.8vh, 22px); }
  .c100 .c100-hito__desc { font-size: clamp(1rem, 2.2vh, 1.1875rem); line-height: 1.75; max-width: 46ch; margin: 0 !important; }

  /* Imagen: ocupa toda la altura de la columna derecha, limitada por el alto de pantalla */
  .c100-hito__media {
    --c100-foto-alto: min(560px, calc(var(--c100-alto) - 2 * clamp(24px, 5vh, 80px) - 90px));
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    justify-self: end;
    z-index: 2;
    width: calc(var(--c100-foto-alto) * 455 / 560);
    margin: 0 0 40px;
    animation: c100-fade .35s ease both;
  }
  .c100-hito__media::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: -40px;
    width: 135%;
    height: clamp(70px, 12vh, 120px);
    transform: translateX(-50%);
    border-radius: 50%;
    border: 2px solid var(--c100-orange);
    background: #fff;
    box-shadow: 0 30px 60px rgba(6, 33, 60, .08);
  }
  .c100-hito__media img { height: var(--c100-foto-alto); aspect-ratio: auto; border-radius: 16px; }

  .c100-chip { width: clamp(64px, 10vh, 104px); height: clamp(64px, 10vh, 104px); border-radius: 18px; }
  .c100-chip .material-symbols-rounded { font-size: clamp(30px, 4.6vh, 48px); }
  .c100-chip--1 { left: calc(-0.5 * clamp(64px, 10vh, 104px)); top: 50%; }
  .c100-chip--2 { right: calc(-0.5 * clamp(64px, 10vh, 104px)); top: auto; bottom: -10px; }

  .c100-timeline .c100-nav {
    grid-column: 1;
    grid-row: 3;
    z-index: 2;
    justify-content: flex-start;
    margin: clamp(12px, 2.5vh, 36px) 0 0 40px;
  }
  /* Navegación vertical en desktop: arriba = anterior, abajo = siguiente */
  .c100-timeline .c100-btn .material-symbols-rounded { transform: rotate(90deg); }

  /* Evolución */
  .c100-evolucion { padding: clamp(48px, 8vh, 96px) 0; }

  .c100-logos { margin-top: clamp(32px, 5vh, 56px); }
  .c100-logos__lista {
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(24px, 3vw, 48px);
  }
  .c100-evolucion .c100-wrap { padding: 0 6vw; } /* más ancho para que los logos se vean grandes */
  .c100-logos__item { opacity: 1; visibility: visible; flex: 1 1 0; min-width: 0; display: block; }
  .c100-logos__item:first-child { flex-grow: 1.6; } /* el sello con texto fino necesita más ancho */
  .c100-logos__item img { width: 100%; height: auto; max-height: clamp(90px, 9vw, 150px); object-fit: contain; margin: 0 auto; }
  .c100-logos__flecha,
  .c100-logos__dots { display: none; }

  /* Espacios */
  .c100-espacios { padding: 120px 0 40px; }
  .c100 .c100-espacios .c100-titulo { max-width: none; }
  .c100 .c100-espacios .c100-titulo em { display: block; }

  .c100-galeria { margin-top: clamp(32px, 6vh, 80px); }
  .c100-galeria__pista { gap: 40px; }
  .c100-galeria__item {
    flex: 0 0 calc(38% - 20px);
    /* foto + controles entran en la pantalla (sin contar el título) */
    height: min(600px, calc(100vh - var(--c100-header, 75px) - 170px));
    border-radius: clamp(40px, 5vw, 70px);
    transition: flex-basis .6s cubic-bezier(.22, .61, .36, 1);
  }
  .c100-galeria__item.is-active { flex-basis: calc(66% - 20px); }
  .c100-galeria__item img { aspect-ratio: auto; }

  .c100-nav--derecha { justify-content: flex-end; margin-top: 32px; }

  /* Cierre */
  .c100-gracias { padding: 110px 0 160px; }
  .c100-like { margin-top: 70px; }
  .c100-like__btn { width: 74px; height: 74px; }
  .c100-like__btn .material-symbols-rounded { font-size: 34px; }
  .c100-like__dato { font-size: 1.375rem; }
  .c100 .c100-gracias__texto { max-width: none; font-size: 1.125rem; margin-top: 36px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .c100 *,
  .c100 *::before,
  .c100 *::after {
    animation: none !important;
    transition: none !important;
  }
}
