/* ===========================
   HISTORIA — v3
=========================== */

/* HERO */
.history-hero.v3{
  position: relative;
  min-height: 48vh;
  background-image:
    linear-gradient(0deg, rgba(0,0,0,.45), rgba(0,0,0,.45)),
    url('../images/ibero.webp'); /* RUTA RELATIVA DESDE assets/css/ */
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #fff;
}

.history-hero .hero-overlay{
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.history-hero .hero-inner{
  max-width: 1080px;
  padding: 0 20px;
  text-align: center;
}

.history-hero .eyebrow{
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  background: rgba(255,255,255,.14);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.history-hero h1{
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 8px 0;
}

.history-hero .hero-sub{
  max-width: 820px;
  margin: 0 auto;
  color: #f0f0f0;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* CONTENIDO GENERAL */
.history-content.v3{
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.history-section{
  margin-bottom: 36px;
}

.h-title{
  font-size: clamp(1.4rem, 1.1rem + .9vw, 2rem);
  color: var(--color-secondary);
  text-align: center;
  margin: 0 0 14px 0;
  font-weight: 800;
  letter-spacing: .2px;
}

.history-section p{
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin: 0 auto;
  text-wrap: pretty;
}

.history-section .intro{
  text-align: center;
  color: #444;
}

/* TIMELINE (vertical, moderno) */
.timeline.v3{
  list-style: none;
  margin: 22px auto 0;
  padding: 0 0 0 24px;
  position: relative;
  max-width: 880px;
}

.timeline.v3::before{
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), rgba(231,76,60,.15));
}

.t-item{
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  position: relative;
  padding-bottom: 18px;
}

.t-dot{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(231,76,60,.25);
  position: relative;
  top: 4px;
}

.t-card{
  background: #fff;
  border: 1px solid rgba(16,24,40,.06);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 10px 20px rgba(16,24,40,.06);
}

.t-year{
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--color-secondary);
  font-size: 1.05rem;
}

.t-card p{
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: .98rem;
}

/* GALERÍA HISTÓRICA */
.history-gallery{
  max-width: 1080px;
  margin: 24px auto 40px;
  display: grid;
  gap: 22px;
}

.history-photo{
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
  border: 1px solid rgba(15,23,42,.06);
}

.history-photo img{
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 260px;
}

.history-photo--wide img{
  max-height: 340px;
}

.history-photo figcaption{
  padding: 12px 16px 14px;
  font-size: .95rem;
  color: #444;
  line-height: 1.5;
}

/* Rejilla para las dos fotos pequeñas */
.history-photo-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* RESPONSIVE */
@media (max-width: 900px){
  .history-content.v3{
    padding: 40px 16px 56px;
  }

  .timeline.v3{
    max-width: 100%;
  }
}

@media (max-width: 768px){
  .history-photo-grid{
    grid-template-columns: 1fr;
  }

  .history-photo img,
  .history-photo--wide img{
    max-height: 260px;
  }
}

@media (max-width: 600px){
  .history-hero.v3{
    min-height: 42vh;
  }

  .timeline.v3{
    padding-left: 18px;
  }

  .timeline.v3::before{
    left: 9px;
  }

  .t-item{
    grid-template-columns: 20px 1fr;
    gap: 12px;
  }

  .t-dot{
    width: 12px;
    height: 12px;
    top: 3px;
  }

  .t-card{
    padding: 14px 14px;
    border-radius: 10px;
  }
}

/* Accesibilidad: menos movimiento */
@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    animation: none !important;
  }
}
