/* ==========================================================================
   Content Slide Component
   Two-column layout with image + text content and timeline entries.
   ========================================================================== */

.content-slide {
  display: flex;
  flex-direction: column;
  gap: var(--space-8, 2rem);
  align-items: center;
  width: 100%;
  max-width: 946px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .content-slide {
    flex-direction: row;
    gap: 6rem;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   Layout Variants
   -------------------------------------------------------------------------- */

/* Image on left (default) - image column comes first */
.content-slide--image-left {
  /* Default order: image first, content second */
}

/* Image on right - reverse column order on desktop */
@media (min-width: 768px) {
  .content-slide--image-right {
    flex-direction: row-reverse;
  }
}

/* --------------------------------------------------------------------------
   Image Column — stacked images for crossfade
   -------------------------------------------------------------------------- */

.content-slide__image-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .content-slide__image-col {
    width: 300px;
    max-width: 300px;
    flex-shrink: 0;
  }
}

/* Display mode 2: larger image, tighter gap */
@media (min-width: 768px) {
  .content-slide--display-2 {
    gap: 35px;
    max-width: 1140px;
  }

  .content-slide--display-2 .content-slide__image-col {
    width: 555px;
    max-width: 555px;
  }
}

.content-slide__image-stack {
  position: relative;
  width: 100%;
}

.content-slide__image {
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
}

/* After first image, stack on top via absolute positioning for crossfade */
.content-slide__image ~ .content-slide__image,
.content-slide__image--active ~ .content-slide__image {
  position: absolute;
  top: 0;
  left: 0;
}

/* First image (or start image) stays in flow to set container height */
.content-slide__image:first-child {
  position: relative;
}

.content-slide__image--active {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Content Column
   -------------------------------------------------------------------------- */

.content-slide__content-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 1rem);
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Eyebrow & Heading
   -------------------------------------------------------------------------- */

.content-slide__eyebrow {
  color: var(--color-navy, #003A70);
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  font-feature-settings: 'liga' off, 'clig' off;
}

.content-slide__heading {
  color: var(--color-navy, #003A70);
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  font-feature-settings: 'liga' off, 'clig' off;
}

/* --------------------------------------------------------------------------
   Top & Bottom Text
   -------------------------------------------------------------------------- */

.content-slide__top-text {
  color: var(--color-text-body, #313131);
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.content-slide__bottom-text {
  color: var(--color-text-body, #313131);
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  margin-top: var(--space-2, 0.5rem);
}

/* --------------------------------------------------------------------------
   Timeline Entries
   -------------------------------------------------------------------------- */

.content-slide__entries {
  display: flex;
  flex-direction: column;
}

.content-slide__entry {
  display: flex;
  gap: var(--space-3, 0.75rem);
}

/* --------------------------------------------------------------------------
   Timeline Connector (dot + line)
   -------------------------------------------------------------------------- */

.content-slide__entry-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
  padding-top: 6px;
}

.content-slide__entry-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--color-cyan, #00BCD4);
  background: var(--color-white, #fff);
  flex-shrink: 0;
}

.content-slide__entry-dot--filled {
  background: var(--color-cyan, #00BCD4);
}

.content-slide__entry-line {
  display: block;
  width: 2px;
  flex: 1;
  background-color: var(--color-cyan, #00BCD4);
  min-height: 20px;
  margin-bottom: -10px;
}

/* --------------------------------------------------------------------------
   Entry Content
   -------------------------------------------------------------------------- */

.content-slide__entry-content {
  flex: 1;
  padding-bottom: var(--space-4, 1rem);
  min-width: 0;
}

.content-slide__entry--last .content-slide__entry-content {
  padding-bottom: 0;
}

.content-slide__entry-title {
  color: var(--color-navy, #003A70);
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  font-feature-settings: 'liga' off, 'clig' off;
  margin-bottom: var(--space-1, 0.25rem);
}

.content-slide__entry-body {
  color: var(--color-text-body, #313131);
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Mobile-only inline entry images (non-DTC mode)
   Hidden on desktop; shown on mobile to interleave image → text per entry.
   -------------------------------------------------------------------------- */

.content-slide__entry-image-mobile {
  display: none;
}

@media (max-width: 767px) {
  .content-slide__entry-image-mobile {
    display: block;
    width: 100%;
    margin-bottom: 16px;
  }

  .content-slide__entry-image-mobile img {
    width: 100%;
    height: auto;
    display: block;
  }

  .content-slide__entry-content {
    padding-bottom: 36px;
  }

  /* Non-DTC mobile: hide the image column (images are inline per entry) */
  .content-slide__image-col {
    display: none;
  }

  /* Hide timeline connector (dots + lines) */
  .content-slide__entry-connector {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   DTC mobile: start image only, stacked text, no entry images.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  /* DTC: show the image column (for start image) */
  .content-slide--dtc .content-slide__image-col {
    display: flex;
  }

  /* DTC: hide entry images — only the start image is shown */
  .content-slide--dtc .content-slide__image[data-entry-image] {
    display: none;
  }

  /* DTC: start image visible */
  .content-slide--dtc .content-slide__image[data-start-image] {
    opacity: 1;
    pointer-events: auto;
  }

  /* DTC: hide inline mobile images (not used in DTC mode) */
  .content-slide--dtc .content-slide__entry-image-mobile {
    display: none;
  }
}

/* Prevent CSS transitions from fighting GSAP scrub animation (standalone) */
[data-content-slide-init] .content-slide__image {
  transition: none !important;
}
