/* ==========================================================================
   Vertical Timeline — vertical-timeline.css
   Layout: each item is full-width; content is pushed left or right via padding.
   Center line + dot are absolute-positioned on the wrapper.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --vt-bg:              #1212c8;
  --vt-line-color:      rgba(255, 255, 255, 0.40);
  --vt-dot-color:       #ffffff;
  --vt-dot-size:        14px;
  --vt-half-dot:        7px;            /* dot-size / 2 */
  --vt-accent:          #00e5ff;
  --vt-text-color:      #ffffff;
  --vt-text-muted:      rgba(255, 255, 255, 0.82);
  --vt-year-size:       2.6rem;
  --vt-body-size:       0.95rem;
  --vt-photo-border:    8px solid #ffffff;
  --vt-photo-radius:    4px;
  --vt-gap:             2.25rem;
  --vt-center-gap:      3rem;           /* space between content edge and center line */
  --vt-transition:      0.35s ease;
  --vt-anim-distance:   28px;
}

/* --------------------------------------------------------------------------
   Optional section wrapper
   -------------------------------------------------------------------------- */
.vt-timeline-section {
  background-color: var(--vt-bg);
  padding: 4rem 1.5rem 5rem;
}

/* Section heading */
.vt-section-heading {
  text-align: center;
  color: #ffffff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 2.5rem;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   Full-width outer wrapper
   -------------------------------------------------------------------------- */
.vt-timeline-outer {
  width: 100%;
  max-width: 100%;
  background-color: var(--vt-bg);
}

.vt-timeline-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Scoped box-sizing reset — prevents padding from overflowing the layout
   -------------------------------------------------------------------------- */
.vt-timeline,
.vt-timeline *,
.vt-timeline *::before,
.vt-timeline *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Timeline wrapper
   -------------------------------------------------------------------------- */
.vt-timeline {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  padding-top: 3em;
  background-color: var(--vt-bg);
}

/* Center vertical line — stops before the centered card's bottom padding */
.vt-timeline::before {
  content: '';
  position: absolute;
  top: 160px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  /* Fade out in the last ~5rem so it doesn't overlap the bottom cap padding */
  background: linear-gradient(
    to bottom,
    var(--vt-line-color) 0%,
    var(--vt-line-color) calc(100% - 5rem),
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Timeline heading — h2 above the top year cap
   -------------------------------------------------------------------------- */
.vt-timeline-heading {
  text-align: center;
  color: #ffffff;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Top / bottom year caps — centered on the line, big cyan year label.
   The line segment is drawn with ::before/::after so it doesn't depend on
   matching a background colour (works inside any Bricks section).
   -------------------------------------------------------------------------- */
.vt-timeline-cap {
  position: relative;
  width: 100%;
  text-align: center;
  z-index: 2;
  clear: both;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Extend the vertical line through the cap */
.vt-timeline-cap::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: var(--vt-line-color);
  z-index: 0;
}

/* Dot centered on the line inside the cap */
.vt-timeline-cap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--vt-dot-size);
  height: var(--vt-dot-size);
  background: var(--vt-dot-color);
  border-radius: 50%;
  z-index: 1;
}

.vt-timeline-cap--top {
  padding: 1rem;
  padding-bottom: 4rem;
  margin-bottom: 1em;
  background: var(--vt-bg);
}

.vt-timeline-cap--top::before {
  top: 50%;
  bottom: 0;
}

.vt-timeline-cap--bottom {
  padding: 1rem;
  padding-top: 5rem;
  background: var(--vt-bg);
}

.vt-timeline-cap--bottom::before {
  top: 0;
  bottom: 50%;
}

.vt-cap-title {
  display: block;
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.vt-cap-year {
  display: inline-block;
  font-size: var(--vt-year-size);
  font-weight: 900;
  color: var(--vt-accent);
  letter-spacing: 0.02em;
  line-height: 1;
  position: relative;
  z-index: 1;
  padding: 0 1.25rem;
  background: var(--vt-bg); /* hides the line behind the text */
  margin-bottom: 2em;
}

/* --------------------------------------------------------------------------
   Timeline item — full width, content pushed to one side via padding
   -------------------------------------------------------------------------- */
.vt-timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: var(--vt-gap);
  min-height: 40px;
  z-index: 3;
}

/* Right side: push content to the right half */
.vt-timeline-item--right {
  padding-left: calc(50% + var(--vt-center-gap));
  padding-right: 1rem;
}

/* Left side: push content to the left half */
.vt-timeline-item--left {
  padding-right: calc(50% + var(--vt-center-gap));
  padding-left: 1rem;
}

/* Pull cards closer — skip first and center (last) card */
.vt-timeline-item--right:not([data-vt-index="0"]),
.vt-timeline-item--left:not([data-vt-index="0"]) {
  margin-top: -230px;
}

/* Last item — centered card sitting on the line */
.vt-timeline-item--center {
  padding-left: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vt-timeline-item.vt-timeline-item--center.vt-animate.vt-visible {
  background: var(--vt-bg);
  margin: 0;
  padding-bottom: 5em;
}

.vt-timeline-item--center .vt-timeline-content {
  width: 50%;
  max-width: 420px;
  text-align: center;
}

.vt-timeline-item--center .vt-timeline-dot {
  display: none;
}

.vt-timeline-item--center .vt-timeline-dot::after {
  display: none;
}

.vt-timeline-item--center .vt-timeline-image .vt-thumbnail {
  width: 100%;
}

.vt-timeline-item--center .vt-timeline-body ul,
.vt-timeline-item--center .vt-timeline-body ol {
  display: inline-block;
  text-align: left;
}

@media (max-width: 640px) {
  .vt-timeline-item--center .vt-timeline-content {
    width: 100%;
    max-width: none;
    padding: 0 1rem;
  }
}

/* --------------------------------------------------------------------------
   White dot on the center line — vertically centered on the image if present,
   otherwise at the top of the content block.
   -------------------------------------------------------------------------- */
.vt-timeline-dot {
  position: absolute;
  top: 110px;                /* center of a ~220px max-height image */
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--vt-dot-size);
  height: var(--vt-dot-size);
  background: var(--vt-dot-color);
  border-radius: 50%;
  z-index: 2;
}

/* When there is no image, move dot to top of the content */
.vt-timeline-item:not(:has(.vt-timeline-image)) .vt-timeline-dot {
  top: 1.5rem;
  transform: translateX(-50%);
}

/* Horizontal connector: dot → content */
.vt-timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  width: calc(var(--vt-center-gap) - var(--vt-half-dot));
  background: var(--vt-line-color);
}

.vt-timeline-item--right .vt-timeline-dot::after {
  left: 100%;
}

.vt-timeline-item--left .vt-timeline-dot::after {
  right: 100%;
}

/* --------------------------------------------------------------------------
   Content area — no card box, text directly on dark bg
   -------------------------------------------------------------------------- */
.vt-timeline-content {
  color: var(--vt-text-color);
}

/* Left cards: align all content to the right */
.vt-timeline-item--left .vt-timeline-content {
  text-align: right;
}

.vt-timeline-item--left .vt-timeline-body ul,
.vt-timeline-item--left .vt-timeline-body ol {
  padding-left: 0;
  padding-right: 1.25em;
  list-style-position: inside;
}

/* --------------------------------------------------------------------------
   Featured image — white-bordered box
   -------------------------------------------------------------------------- */
.vt-timeline-image {
  margin-bottom: 0.85rem;
  padding: 15px 15px 25px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.18);
}

.vt-timeline-image .vt-thumbnail {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border: none;
  border-radius: var(--vt-photo-radius);
}

/* --------------------------------------------------------------------------
   Big cyan year label
   -------------------------------------------------------------------------- */
.vt-timeline-year {
  display: block;
  font-size: var(--vt-year-size);
  font-weight: 900;
  color: var(--vt-accent);
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 0.55rem;
}

/* --------------------------------------------------------------------------
   Event title
   -------------------------------------------------------------------------- */
.vt-timeline .vt-timeline-title,
h3.vt-timeline-title {
  font-size: var(--vt-year-size);
  font-weight: 900;
  color: var(--vt-text-color);
  margin: 0 0 0.55rem;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   WYSIWYG body content — bullets, paragraphs, bold, links
   -------------------------------------------------------------------------- */
.vt-timeline-body {
  font-size: 18px;
  color: var(--vt-text-muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.vt-timeline-body p {
  margin: 0 0 0.4em;
}

.vt-timeline-body ul,
.vt-timeline-body ol {
  margin: 0 0 0.4em;
  padding-left: 1.25em;
}

.vt-timeline-body ul { list-style: disc; }
.vt-timeline-body ol { list-style: decimal; }

.vt-timeline-body li {
  margin-bottom: 0.25em;
  color: var(--vt-text-muted);
}

.vt-timeline-body strong,
.vt-timeline-body b {
  color: #ffffff;
  font-weight: 700;
}

.vt-timeline-body a {
  color: var(--vt-accent);
  text-decoration: underline;
}

.vt-timeline-body a:hover {
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Expanded full content
   -------------------------------------------------------------------------- */
.vt-timeline-full-content {
  font-size: var(--vt-body-size);
  color: var(--vt-text-muted);
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.vt-timeline-full-content[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Toggle button
   -------------------------------------------------------------------------- */
.vt-toggle-btn {
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: var(--vt-accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2em 0.7em;
  margin-bottom: 0.5rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background var(--vt-transition);
}

.vt-toggle-btn:hover { background: rgba(0, 229, 255, 0.12); }

.vt-toggle-icon {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
  transition: transform var(--vt-transition);
}

.vt-toggle-btn[aria-expanded="true"] .vt-toggle-icon {
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   "Read more" link
   -------------------------------------------------------------------------- */
.vt-timeline-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--vt-accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  transition: opacity var(--vt-transition);
}

.vt-timeline-link:hover { opacity: 0.7; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.vt-no-events {
  text-align: center;
  color: var(--vt-text-muted);
  padding: 3rem;
}


/* --------------------------------------------------------------------------
   Scroll-reveal animation
   -------------------------------------------------------------------------- */
.vt-animate {
  opacity: 0;
  transform: translateY(var(--vt-anim-distance));
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.vt-animate.vt-visible {
  opacity: 1;
  transform: translateY(0);
}

.vt-animate[data-vt-index="0"] { transition-delay: 0ms; }
.vt-animate[data-vt-index="1"] { transition-delay: 80ms; }
.vt-animate[data-vt-index="2"] { transition-delay: 160ms; }
.vt-animate[data-vt-index="3"] { transition-delay: 240ms; }
.vt-animate[data-vt-index="4"] { transition-delay: 320ms; }
.vt-animate[data-vt-index="5"] { transition-delay: 400ms; }
.vt-animate[data-vt-index="6"] { transition-delay: 480ms; }
.vt-animate[data-vt-index="7"] { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  .vt-animate { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive — single column ≤ 640px
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .vt-timeline {
    padding-top: 1.5em;
  }

  .vt-timeline::before {
    left: 20px;
    top: 120px;
  }

  .vt-timeline-cap {
    position: initial;
  }

  .vt-timeline-item--right,
  .vt-timeline-item--left {
    padding-left: 48px;
    padding-right: 1rem;
  }

  .vt-timeline-item--left .vt-timeline-content {
    text-align: left;
  }

  .vt-timeline-item--left .vt-timeline-body ul,
  .vt-timeline-item--left .vt-timeline-body ol {
    padding-left: 1.25em;
    padding-right: 0;
    list-style-position: outside;
  }

  .vt-timeline-dot {
    left: 20px;
    transform: translateX(-50%);
    top: 0.75rem;
  }

  .vt-timeline-item--right .vt-timeline-dot::after,
  .vt-timeline-item--left .vt-timeline-dot::after {
    left: 100%;
    right: auto;
    width: 14px;
  }

  .vt-timeline-year {
    font-size: calc(var(--vt-year-size) * 0.72);
  }

  .vt-timeline-item--center .vt-timeline-content {
    width: 100%;
    max-width: none;
    padding: 0 1rem;
  }

  .vt-cap-year {
    font-size: calc(var(--vt-year-size) * 0.8);
  }

  /* Reset negative margin — single column on mobile, no overlap needed */
  .vt-timeline-item--right:not([data-vt-index="0"]),
  .vt-timeline-item--left:not([data-vt-index="0"]) {
    margin-top: 0;
  }
}
