:root {
  --navy-deep: #0b0f2e;
  --navy: #1e1f5D;
  --accent: #5b9bd5;
  --accent-2: #9dc3e6;
  --heading: #1e1f5D;
  --text: #fff;
  --text-dim: rgba(255,255,255,.72);
  --line-white: rgba(255,255,255,.22);
  --line-dark: rgba(0,0,0,.22);
  --card-bg: rgba(255,255,255,.05);
  --card-border: rgba(255,255,255,.12);
  --ink: #12173d;
  --ink-dim: #4a5266;
  --max-w: 1500px;
  --spine-gap: 110px;   /* column-gap: room for the spine + nodes */
  --timeline-card-heading: #1e1f5D;
  --timeline-card-text: #000;
}

/* ============================================================
   Timeline component — every rule below is written as a full
   ancestor trail rooted at .timeline-wrap.
   ============================================================ */

.timeline-wrap {
  background: #f9f9f9;
  color: var(--text);
}

.timeline-wrap .timeline-content {
  padding: 100px 0;
}

.timeline-wrap .timeline-content .timeline-intro {
  text-align: center;
  margin-bottom: 56px;
}

.timeline-wrap .timeline-content .timeline-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--heading);
}

.timeline-wrap .timeline-content .timeline-intro p {
  color: #000;
  margin: 12px auto 0;
  max-width: 980px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

/* ---------- The grid ---------- */

.timeline-wrap .timeline-content .timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--spine-gap);
  row-gap: 24px;              /* the ONE uniform spacing value */
}

/* centre spine */
.timeline-wrap .timeline-content .timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--line-dark) 4%, var(--line-dark) 96%, transparent);
}

/* timeline-section-head heading: full-width row on the spine */
.timeline-wrap .timeline-content .timeline .timeline-section-head {
  grid-column: 1 / -1;
  text-align: center;
  position: relative;
  z-index: 2;
  margin: 8px 0;
}

.timeline-wrap .timeline-content .timeline .timeline-section-head h3 {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 10px 26px;
  border-radius: 0;
}

/* timeline-items: column set by side class, row set inline by the loop */

.timeline-wrap .timeline-content .timeline .timeline-item {
  position: relative;
}

.timeline-wrap .timeline-content .timeline .timeline-item.left {
  grid-column: 1;
}

.timeline-wrap .timeline-content .timeline .timeline-item.right {
  grid-column: 2;
}

.timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-card {
  margin-left: auto; /* hug the spine */
}

/* year marker on the spine (half the column-gap + half marker width out) */
.timeline-wrap .timeline-content .timeline .timeline-item .timeline-date {
  position: absolute;
  top: 6px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .86rem;
  z-index: 2;
  box-shadow: 0 0 8px 4px rgba(91,155,213,.22), 0 0 14px 10px rgba(91,155,213,.10);
}

.timeline-wrap .timeline-content .timeline .timeline-item .timeline-date time {
  display: block;
}

.timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-date {
  right: -82px;
}

.timeline-wrap .timeline-content .timeline .timeline-item.right .timeline-date {
  left: -82px;
}

/* connector from card edge to date marker */
.timeline-wrap .timeline-content .timeline .timeline-item::after {
  content: "";
  position: absolute;
  top: 32px;
  width: 28px;
  height: 2px;
  background: var(--line-dark);
}

.timeline-wrap .timeline-content .timeline .timeline-item.left::after {
  right: -28px;
}

.timeline-wrap .timeline-content .timeline .timeline-item.right::after {
  left: -28px;
}

.timeline-wrap .timeline-content .timeline .timeline-item .timeline-card {
  max-width: 420px;
  width: 100%;
  border-radius: 0;
  padding: 22px 24px;
  text-align: left;
}

/* accent line sits on the side facing the date marker,
   and text aligns to the accent side */
.timeline-wrap .timeline-content .timeline .timeline-item.right .timeline-card {
  border-left: 3px solid var(--accent);
}

.timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-card {
  border-right: 3px solid var(--accent);
  text-align: right;
}

.timeline-wrap .timeline-content .timeline .timeline-item.left .brands {
  justify-content: flex-end;
}

.timeline-wrap .timeline-content .timeline .timeline-item .timeline-card h4 {
  color: var(--timeline-card-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-wrap .timeline-content .timeline .timeline-item .timeline-card p {
  color: var(--timeline-card-text);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 14px;
}

.timeline-wrap .timeline-content .timeline .timeline-item .timeline-card p:last-child {
  margin-bottom: 0;
}

.timeline-wrap .timeline-content .timeline .timeline-item .brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-wrap .timeline-content .timeline .timeline-item .brands .brand-logo {
  background: #fff;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.timeline-wrap .timeline-content .timeline .timeline-item .brands .brand-logo img {
  height: 22px;
  width: auto;
  max-width: 150px;
  display: block;
}

/* closing statement */

.timeline-wrap .timeline-content .timeline .tl-end {
  grid-column: 1 / -1;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 8px;
}

.timeline-wrap .timeline-content .timeline .tl-end p {
  display: inline-block;
  background: #999;
  border: 1px solid var(--card-border);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 26px;
  border-radius: 0;
}

/* ---------- Mobile: single column ---------- */
/* display:block makes the inline grid-row styles inert, so the
   same markup collapses cleanly with no overrides needed */

@media (max-width: 760px) {
  .timeline-wrap .timeline-content .timeline {
    display: block;
    padding: 0 20px;
  }

  .timeline-wrap .timeline-content .timeline::before {
    left: 46px;
    transform: none;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item {
    padding: 0 0 40px 64px;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-card {
    margin-left: 0;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-date,
  .timeline-wrap .timeline-content .timeline .timeline-item.right .timeline-date {
    left: 0;
    right: auto;
    width: 52px;
    height: 52px;
    font-size: .8rem;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item.left::after,
  .timeline-wrap .timeline-content .timeline .timeline-item.right::after {
    left: 52px;
    width: 12px;
    right: auto;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item .timeline-card {
    max-width: none;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item.left .timeline-card {
    border-right: 0;
    border-left: 3px solid var(--accent);
    text-align: left;
  }

  .timeline-wrap .timeline-content .timeline .timeline-item.left .brands {
    justify-content: flex-start;
  }

  .timeline-wrap .timeline-content .timeline .timeline-section-head {
    text-align: left;
    margin: 20px 0 30px;
  }

  .timeline-wrap .timeline-content .timeline .tl-end {
    text-align: left;
    padding-top: 8px;
  }
}
