/* ============================================
   ESTILOS SECCIÓN TRAYECTORIA (history.css)
   Mobile-First
   ============================================ */

.history-section {
  background-color: var(--color-blanco);
  padding: 0 0 140px 0;  /* ← sin padding-top, lo maneja el container */
  font-family: var(--font-base);
  position: relative;
  z-index: 2;
  /* SIN margin-top negativo — lo eliminamos */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  transform: translateY(-6vw); /* ← sube solo el contenido, no la sección */
}

/* --- Cabecera --- */
.history-header {
  text-align: center;
  margin-bottom: 30px;
}

.history-main-title {
  font-size: clamp(1.4rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--color-negro);
  margin-bottom: 16px;
  line-height: 1.2;
}

.tagline-wrapper {
  display: inline-block;
  border: 2px solid #F39200;
  border-radius: 20px;
  padding: 8px 20px;
  margin: 0 auto;
  width: 90%;
  max-width: 400px;
}

.history-tagline {
  font-size: 0.875rem;
  color: var(--color-negro);
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

/* --- Timeline móvil --- */
.timeline-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-graphic-wrapper {
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 20px 0;
}

.timeline-gif {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Separadores móvil */
.v-separator {
  width: 20px;
  height: 12px;
  position: relative;
  margin-bottom: 20px;
}

.v-separator::before,
.v-separator::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 2px;
  background-color: #B01E2E;
  top: 50%;
}

.v-separator::before {
  left: 0;
  transform: rotate(35deg);
  border-radius: 2px 0 0 2px;
}

.v-separator::after {
  right: 0;
  transform: rotate(-35deg);
  border-radius: 0 2px 2px 0;
}

/* --- Hitos --- */
.timeline-item {
  background: var(--color-blanco);
  padding: 10px 15px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  margin: 0 auto;
}

.timeline-year-title {
  font-size: 1rem;
  color: #B01E2E;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.3;
}

.timeline-text {
  font-size: 0.875rem;
  color: var(--color-negro);
  line-height: 1.5;
  margin: 0;
}

/* ===========================
   DESKTOP (992px+)
=========================== */
@media (min-width: 992px) {
  .history-section {
    padding: 0 0 180px 0;
  }

  .container {
    transform: translateY(-8vh); /* ← ajuste fino en desktop */
  }

  .history-header {
    margin-bottom: 60px;
  }

  .tagline-wrapper {
    border-radius: 25px;
    padding: 10px 30px;
    max-width: none;
    width: auto;
  }

  .history-tagline {
    font-size: 1rem;
  }

  .v-separator {
    display: none;
  }

  .timeline-container {
    display: grid;
    grid-template-columns: 1fr 380px 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }

  .timeline-graphic-wrapper {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: 100%;
    margin: 0;
  }

  .item-2007 { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
  .item-2018 { grid-column: 1; grid-row: 2; justify-self: end; text-align: right; }
  .item-2017 { grid-column: 3; grid-row: 1; justify-self: start; text-align: left; }
  .item-2024 { grid-column: 3; grid-row: 2; justify-self: start; text-align: left; }

  .timeline-item {
    max-width: 420px;
    padding: 0;
    margin: 0;
  }

  .timeline-year-title { font-size: 1.125rem; }
  .timeline-text { font-size: 0.9375rem; line-height: 1.6; }
}