/*
 * emapaac-historia.css
 * Rediseño visual de emapaac-historia.php (Nuestra Historia).
 * Fecha: 2026-09-15.
 * Sistema visual compartido con emapaac-valores.css, laboratorio.css,
 * emapaac-denuncias.css y emapaac-aguapotable.css (valores copiados, archivo independiente).
 */

/* ============ TOKENS ============ */
.hs-page {
  --hs-primary: #1e3a8a;
  --hs-primary-2: #1d4ed8;
  --hs-accent: #06b6d4;
  --hs-accent-text: #0e7490;
  --hs-bg: #f8fafc;
  --hs-band: #f0f4f8;
  --hs-text: #334155;
  --hs-muted: #4b5563;
  --hs-border: #f3f4f6;
  --hs-line: #e2e8f0;
  --hs-shadow: 0 10px 15px -3px rgba(0,0,0,.05);
  --hs-shadow-hover: 0 20px 40px rgba(0,0,0,.08);
  display: block;
  font-family: "Poppins", sans-serif;
  color: var(--hs-text);
  background: var(--hs-bg);
}

/* ============ FRANJA DE TITULO (centrada) ============ */
.hs-page section#page-title.hs-titlebar {
  background: var(--hs-band);
  border-bottom: 1px solid #e5e7eb;
  padding: 44px 0;
}
.hs-page #page-title.hs-titlebar .container {
  display: block;
  text-align: center;
}
.hs-page #page-title.hs-titlebar .page-title {
  text-align: center;
  margin: 0 auto;
  max-width: 900px;
  padding: 0;
}
.hs-page #page-title .page-title > h1.hs-titlebar__title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
  color: var(--hs-primary);
  margin: 0 0 6px;
}
.hs-page #page-title .page-title > span.hs-titlebar__sub {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hs-accent-text);
  margin: 0;
}
.hs-page #page-title .breadcrumb.hs-breadcrumb {
  display: block;
  float: none;
  text-align: center;
  margin: 10px auto 0;
  font-size: 13px;
}
.hs-page #page-title .breadcrumb.hs-breadcrumb ul {
  display: inline-block;
  margin: 0;
  padding: 0;
}
.hs-page #page-title .breadcrumb.hs-breadcrumb ul li {
  display: inline;
}
.hs-page #page-title .breadcrumb.hs-breadcrumb ul li a {
  color: var(--hs-muted);
}
.hs-page #page-title .breadcrumb.hs-breadcrumb ul li a:hover {
  color: var(--hs-primary);
}
.hs-page #page-title .breadcrumb.hs-breadcrumb ul li.active,
.hs-page #page-title .breadcrumb.hs-breadcrumb ul li:last-child {
  color: var(--hs-primary);
  font-weight: 600;
  opacity: 1;
}

/* ============ SECCION Y TITULO ============ */
.hs-page section.hs-section {
  padding: 64px 0;
  background: transparent;
  overflow: visible;
}
.hs-page .hs-heading {
  margin: 0 0 28px;
}
.hs-page .hs-heading h5.hs-section-title {
  border-left: 4px solid var(--hs-accent);
  padding-left: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: var(--hs-primary);
  margin: 0;
}
.hs-page .hs-heading h5.hs-section-title::before {
  content: none;
}

/* ============ IMAGEN ============ */
.hs-page .hs-figure {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--hs-shadow-hover);
  max-height: 420px;
  line-height: 0;
  margin: 0 0 56px;
}
.hs-page .hs-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,31,77,0) 45%, rgba(15,31,77,.35) 100%);
  pointer-events: none;
}
.hs-page .hs-figure img.hs-figure__img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: cover;
  display: block;
  transition: transform 6s ease-out;
}
.hs-page .hs-figure:hover img.hs-figure__img {
  transform: scale(1.05);
}

/* ============ LINEA DE TIEMPO ============ */
.hs-page ol.hs-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.hs-page ol.hs-timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--hs-line);
}
.hs-page ol.hs-timeline::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--hs-accent), var(--hs-primary));
  transform-origin: top;
  transform: scaleY(var(--hs-progress, 0));
  transition: transform .2s linear;
}
.hs-page .hs-milestone {
  position: relative;
  padding-left: 82px;
  margin-bottom: 32px;
}
.hs-page .hs-milestone:last-child {
  margin-bottom: 0;
}
.hs-page .hs-milestone__marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--hs-line);
  color: var(--hs-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: border-color .35s, background-color .35s, color .35s, transform .35s;
}
.hs-page .hs-milestone.is-visible .hs-milestone__marker {
  border-color: var(--hs-accent);
  background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2));
  color: #fff;
  transform: scale(1.05);
}
.hs-page .hs-milestone__body {
  position: relative;
  background: #fff;
  border: 1px solid var(--hs-border);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: var(--hs-shadow);
  transition: transform .3s, box-shadow .3s;
}
.hs-page .hs-milestone__body::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 21px;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid var(--hs-border);
  border-right: none;
  border-top: none;
  transform: rotate(45deg);
}
.hs-page .hs-milestone:hover .hs-milestone__body {
  transform: translateY(-4px);
  box-shadow: var(--hs-shadow-hover);
}
.hs-page .hs-milestone__year {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--hs-accent-text);
  background: rgba(6,182,212,.10);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 12px;
}
.hs-page p.hs-milestone__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--hs-muted);
  text-align: left;
}

/* ============ REVEAL Y MOVIMIENTO ============ */
.hs-page.hs-js .hs-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.hs-page.hs-js .hs-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  .hs-page section#page-title.hs-titlebar {
    padding: 34px 0;
  }
  .hs-page #page-title .page-title > h1.hs-titlebar__title {
    font-size: 24px;
  }
  .hs-page section.hs-section {
    padding: 48px 0;
  }
  .hs-page .hs-heading h5.hs-section-title {
    font-size: 20px;
  }
  .hs-page .hs-figure {
    max-height: 240px;
    margin: 0 0 40px;
  }
  .hs-page .hs-milestone__body {
    padding: 20px;
  }
}

@media (max-width: 575px) {
  .hs-page ol.hs-timeline::before,
  .hs-page ol.hs-timeline::after {
    left: 21px;
  }
  .hs-page .hs-milestone {
    padding-left: 64px;
  }
  .hs-page .hs-milestone__marker {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-page .hs-figure img.hs-figure__img {
    transition: none;
    transform: none;
  }
  .hs-page .hs-milestone__body {
    transition: none;
  }
  .hs-page .hs-milestone__marker {
    transition: none;
  }
  .hs-page.hs-js .hs-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hs-page ol.hs-timeline::after {
    transform: scaleY(1);
    transition: none;
  }
}
