/* historia.css — Estilos. Las reglas adaptables están al final y en bloques de medios. */

nav a[aria-current="page"] {
  box-shadow: inset 0 -4px var(--red);
}
.history-page {
  --ink: #0e245e;
  --accent: #f00038;
  overflow: hidden;
}
.history-intro {
  max-width: 1400px;
  margin: auto;
  padding: 40px 40px 32px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}
.history-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--red);
}
.history-intro h1 {
  font: 700 clamp(32px, 3.5vw, 58px) / 1 var(--heading);
  margin: 12px 0 0;
  letter-spacing: -0.5px;
}
.history-intro h1 em {
  font-style: normal;
  color: var(--red);
}
.history-intro p {
  font-size: 14px;
  color: #707a8d;
  line-height: 1.8;
}
.history-experience {
  position: relative;
  color: #fff;
  background: #10265f;
}
.experience-top {
  height: 58px;
  border-bottom: 1px solid #ffffff18;
  padding: 0 max(40px, calc((100vw - 1320px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  color: #bdcbe9;
}
.scroll-hint {
  display: flex;
  gap: 22px;
  align-items: center;
  color: #dce5f7;
}
.scroll-hint > span {
  font-size: 25px;
  color: #ef1748;
}
.history-track {
  display: flex;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  outline-offset: -4px;
  touch-action: pan-x pan-y;
  min-height: 570px;
}
.history-track::-webkit-scrollbar {
  display: none;
}
.history-track.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.history-chapter {
  flex: 0 0 100%;
  min-width: 0;
  min-height: 570px;
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 5%;
  align-items: center;
  padding: 40px max(60px, calc((100vw - 1320px) / 2)) 48px;
  scroll-snap-align: start;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, #0a1e50 0%, #193773 100%);
}
.history-chapter:nth-child(even) {
  background: linear-gradient(120deg, #132c68 0%, #223f88 100%);
}
.ghost-year {
  position: absolute;
  font: 800 clamp(270px, 34vw, 520px) / 0.85 var(--heading);
  color: #ffffff04;
  -webkit-text-stroke: 1px #ffffff0e;
  left: 21%;
  top: 5%;
  z-index: -1;
  pointer-events: none;
  transform: translateX(var(--year-shift, 0px));
  will-change: transform;
}
.chapter-copy {
  position: relative;
  max-width: 485px;
  transform: translateX(var(--copy-shift, 0px));
  opacity: var(--copy-opacity, 1);
  will-change: transform;
}
.chapter-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #b7c8ec;
  display: flex;
  align-items: center;
  gap: 13px;
}
.chapter-tag:before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--red);
}
.chapter-year {
  font: 700 clamp(95px, 10vw, 158px) / 0.95 var(--heading);
  letter-spacing: -3px;
  color: #fff;
  display: flex;
  align-items: end;
  gap: 28px;
  margin: 13px 0 16px;
}
.year-rule {
  width: 65px;
  height: 7px;
  background: var(--red);
  margin-bottom: 20px;
}
.chapter-copy h2 {
  font: 600 clamp(28px, 3.1vw, 46px) / 1.05 var(--heading);
  max-width: 430px;
  letter-spacing: 0.2px;
  margin: 0 0 18px;
}
.chapter-copy p {
  font-size: 16px;
  line-height: 1.85;
  color: #ccd8ee;
  max-width: 430px;
}
.chapter-index {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8da4cd;
  display: inline-block;
  border-top: 1px solid #ffffff22;
  padding-top: 17px;
  margin-top: 27px;
}
.chapter-figure {
  margin: 0;
  position: relative;
  min-width: 0;
  transform: translateX(var(--photo-shift, 0px));
  will-change: transform;
}
.photo-window {
  height: clamp(270px, 29vw, 435px);
  background: #f0f0f0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 50px #0004;
  border-radius: 3px;
}
.photo-window img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.035) translateX(var(--inner-shift, 0px));
  will-change: transform;
  background: #e9e9e9;
}
.chapter-figure:before {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 65px;
  height: 65px;
  border-top: 3px solid var(--red);
  border-right: 3px solid var(--red);
  z-index: 2;
}
.chapter-figure:after {
  content: "";
  position: absolute;
  bottom: 17px;
  left: -12px;
  width: 65px;
  height: 65px;
  border-bottom: 1px solid #6683b8;
  border-left: 1px solid #6683b8;
}
.chapter-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 17px 0 0;
  color: #91a8d0;
}
.timeline-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0 max(40px, calc((100vw - 1320px) / 2));
  height: 105px;
  border-top: 1px solid #ffffff16;
  background: #0b2053;
}
.history-arrow {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid #647ba3;
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 25px;
  transition: background 0.2s;
}
.history-arrow:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
}
.history-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}
.year-navigation {
  display: flex;
  position: relative;
  flex: 1;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  height: 80px;
  scroll-behavior: smooth;
}
.year-navigation::-webkit-scrollbar {
  display: none;
}
.year-stop {
  min-width: 74px;
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 10px 0 5px;
  background: none;
  color: #93a8cb;
  font: 600 18px var(--heading);
}
.year-stop:before {
  content: "";
  position: absolute;
  top: 17px;
  height: 1px;
  background: #3a527f;
  width: 100%;
}
.rail-dot {
  height: 14px;
  width: 14px;
  border: 4px solid #0b2053;
  background: #647ca5;
  border-radius: 50%;
  z-index: 1;
  transition:
    background 0.25s,
    box-shadow 0.25s;
}
.year-stop.active {
  color: #fff;
}
.year-stop.active .rail-dot {
  background: var(--red);
  box-shadow: 0 0 0 1px #f00038;
}
.year-stop:hover {
  color: white;
}
.history-progress {
  height: 3px;
  background: #152d5e;
}
.history-progress span {
  height: 100%;
  display: block;
  width: 5%;
  background: var(--red);
  transition: width 0.12s linear;
}
.history-ending {
  max-width: 1400px;
  margin: auto;
  padding: 52px 40px 25px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}
.history-ending h2 {
  font: 700 clamp(30px, 3vw, 44px) / 1.08 var(--heading);
  margin-top: 12px;
  color: var(--blue);
}
.history-ending h2 em {
  font-style: normal;
  color: var(--red);
}
.history-ending p {
  font-size: 14px;
  line-height: 1.9;
  color: #6d778c;
  margin-bottom: 18px;
}
.history-ending .red-button {
  font-size: 14px;
  gap: 22px;
}
.history-source {
  max-width: 1320px;
  margin: 0 auto;
  padding: 5px 0 30px;
  font-size: 11px;
  color: #8a93a2;
  line-height: 1.8;
}
.history-source a {
  text-decoration: underline;
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (min-width: 1650px) {
  .history-chapter {
    padding-left: max(70px, calc((100vw - 1400px) / 2));
    padding-right: max(70px, calc((100vw - 1400px) / 2));
    min-height: 640px;
    gap: 7%;
  }
  .history-track {
    min-height: 640px;
  }
  .chapter-copy h2 {
    font-size: 48px;
  }
  .chapter-copy p {
    font-size: 18px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 1100px) {
  .history-intro {
    padding: 30px;
  }
  .history-intro p {
    display: none;
  }
  .history-chapter {
    padding: 40px;
    gap: 35px;
    min-height: 530px;
  }
  .history-track {
    min-height: 530px;
  }
  .chapter-copy p {
    font-size: 15px;
  }
  .chapter-tag {
    font-size: 10px;
    letter-spacing: 1.5px;
  }
  .chapter-year {
    font-size: 105px;
  }
  .chapter-figure figcaption span:last-child {
    display: none;
  }
  .history-source {
    padding-left: 30px;
    padding-right: 30px;
  }
  .experience-top,
  .timeline-controls {
    padding-left: 30px;
    padding-right: 30px;
  }
  .history-ending {
    padding: 35px 30px 25px;
  }
  .year-stop {
    min-width: 65px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 700px) {
  .history-intro {
    padding: 25px 22px;
  }
  .history-kicker {
    font-size: 10px;
    letter-spacing: 1.6px;
  }
  .history-intro h1 {
    font-size: 36px;
    line-height: 1.05;
  }
  .history-intro h1 em {
    display: block;
  }
  .experience-top {
    height: 46px;
    padding: 0 22px;
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .scroll-hint {
    gap: 8px;
    font-size: 9px;
  }
  .history-chapter {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 25px;
    padding: 27px 26px 28px;
    min-height: 640px;
  }
  .history-track {
    min-height: 640px;
  }
  .chapter-copy {
    max-width: none;
  }
  .chapter-tag {
    font-size: 10px;
  }
  .chapter-year {
    font-size: 87px;
    line-height: 0.9;
    margin: 10px 0 12px;
    letter-spacing: -1px;
  }
  .year-rule {
    height: 5px;
    margin-bottom: 10px;
    width: 45px;
  }
  .chapter-copy h2 {
    font-size: 31px;
    max-width: 100%;
    margin-bottom: 12px;
  }
  .chapter-copy p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 100%;
    min-height: 48px;
  }
  .chapter-index {
    display: none;
  }
  .photo-window {
    height: 240px;
  }
  .chapter-figure figcaption {
    font-size: 8px;
    padding-top: 11px;
  }
  .chapter-figure:before {
    top: -8px;
    right: -8px;
    width: 35px;
    height: 35px;
  }
  .chapter-figure:after {
    display: none;
  }
  .ghost-year {
    font-size: 250px;
    left: 3%;
    top: 10%;
  }
  .timeline-controls {
    gap: 10px;
    height: 87px;
    padding: 0 17px;
  }
  .history-arrow {
    width: 34px;
    height: 34px;
    font-size: 21px;
  }
  .year-navigation {
    height: 70px;
  }
  .year-stop {
    min-width: 58px;
    font-size: 17px;
  }
  .history-ending {
    display: block;
    padding: 35px 22px 20px;
  }
  .history-ending h2 {
    font-size: 32px;
  }
  .history-ending > div + div {
    margin-top: 22px;
  }
  .history-ending p {
    font-size: 13px;
  }
  .history-source {
    padding: 0 22px 25px;
    font-size: 10px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (prefers-reduced-motion: reduce) {
  .history-track,
  .year-navigation {
    scroll-behavior: auto;
  }
  .ghost-year,
  .chapter-copy,
  .chapter-figure,
  .photo-window img {
    transform: none !important;
    opacity: 1 !important;
  }
  .history-progress span {
    transition: none;
  }
}
.photo-window img {
  object-fit: cover;
}
.history-chapter[data-year="1995"] .photo-window img,
.history-chapter[data-year="1998"] .photo-window img,
.history-chapter[data-year="2009"] .photo-window img {
  object-fit: contain;
  background: #fff;
}

/* INICIO: PANELES DE HITOS 2014–2025. No representan fotografías históricas. */
.milestone-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: clamp(22px, 3vw, 48px);
  background: radial-gradient(circle at 100% 0%, #ffffff 0, #e6edfa 70%);
  color: var(--blue);
  isolation: isolate;
}
.milestone-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 3px; }
.milestone-value { font: 700 clamp(32px, 4.3vw, 70px)/1.05 var(--heading); letter-spacing: -1px; overflow-wrap: anywhere; }
.milestone-label { font-size: clamp(10px, 1vw, 14px); font-weight: 700; letter-spacing: 1.5px; line-height: 1.6; max-width: 95%; }
.milestone-road { position: absolute; width: 135%; height: 32px; background: var(--red); bottom: -8px; left: -12%; transform: rotate(-7deg); z-index: -1; }
.history-ending > div { flex: 1; min-width: 0; }
@media (max-width:700px) {
  .milestone-panel { gap: 15px; padding: 26px; }
  .milestone-value { font-size: clamp(32px, 9vw, 50px); }
}
/* FIN: PANELES DE HITOS */
