/* Homepage fallbacks until Vite outDir is writable. */

/* Lenis: keep smooth vertical scroll over the events rail (no data-lenis-prevent). */
.home-events.reveal-fx--is-visible {
  transform: none !important;
  will-change: auto !important;
}

/* Below lg: teal flush above stacked podcasts (no grey/reveal band). */
.home-intro {
  padding-top: 0 !important;
}

@media (max-width: 991px) {
  .home-intro {
    background: #004c52 !important;
    padding-bottom: 0 !important;
  }

  .home-intro .podcasts-panel.reveal-fx--translate-up {
    transform: none !important;
  }

  /* Podcasts: 2-up Splide rail — keep rail at viewport width (not image intrinsic) */
  .home-intro .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-intro .stories-col,
  .home-intro .podcasts-panel {
    min-width: 0;
    max-width: 100%;
  }

  .home-intro .podcasts-panel {
    width: 100%;
    box-sizing: border-box;
  }

  .home-intro .podcasts-panel .list.rail.splide {
    visibility: visible !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .home-intro .podcasts-panel .list .splide__track {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .home-intro .podcasts-panel .list .splide__list,
  .home-intro .podcasts-panel .list.splide.is-initialized .splide__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .home-intro .podcasts-panel .list .slide {
    min-width: 0 !important;
    max-width: 100%;
    height: auto;
    margin: 0;
    display: block !important;
    box-sizing: border-box;
  }

  .home-intro .podcasts-panel .list .podcast-card,
  .home-intro .podcasts-panel .list .podcast-card .media,
  .home-intro .podcasts-panel .list .podcast-card img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .home-intro .stories-col,
  .home-intro .more {
    background: #f5f5f5;
  }

  /* Grey covers space above/below ALL STORIES (no teal margin/section pad). */
  .home-intro .more {
    margin-top: 0 !important;
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .home-intro .more {
    padding-top: 5rem;
    padding-bottom: 8.5rem;
  }
}

@media (min-width: 992px) {
  .home-intro {
    padding-top: 8rem !important;
    padding-bottom: 8.5rem;
    background: #f5f5f5 !important;
  }

  .home-intro .more {
    margin-top: 5rem !important;
    padding: 0 !important;
  }

  /* Podcasts sidebar sticks within .layout until stories end.
     top clears sticky nav; tucks up when nav is .is-hidden (same 0.35s ease).
     margin-top offsets past Latest Stories heading so panel aligns with featured image. */
  .home-intro .podcasts-panel {
    position: sticky;
    top: calc(12.2rem + 1.5rem);
    margin-top: calc(1.8rem + 2.4rem);
    align-self: start;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: none !important;
    gap: 3.8rem;
  }

  body:has([data-nav].is-hidden) .home-intro .podcasts-panel {
    top: 2rem;
  }

  /* Desktop stack: Figma 38px between cards (override Splide destroyed display:block) */
  .home-intro .podcasts-panel .list.splide.is-initialized:not(.is-active) .splide__list,
  .home-intro .podcasts-panel .list .splide__list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 3.8rem !important;
    width: 100% !important;
    transform: none !important;
  }

  .home-intro .podcasts-panel .list .slide {
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
  }
}

/* Latest Stories heading: match Podcast Episodes size/caps below lg. */
.home-intro .section-heading {
  font-weight: 400 !important;
  font-size: 1.2rem !important;
  line-height: 1.8rem !important;
  letter-spacing: 0.1rem !important;
  text-transform: uppercase !important;
}

.home-intro .stories-col {
  padding-top: 3.5rem;
}

@media (min-width: 768px) and (max-width: 991px) {
  .home-intro .stories-col {
    padding-top: 2.4rem;
  }
}

@media (min-width: 992px) {
  .home-intro .stories-col {
    padding-top: 0;
  }

  .home-intro .section-heading {
    font-weight: 500 !important;
    font-size: 1.8rem !important;
    line-height: 1.8rem !important;
    letter-spacing: 0.1rem !important;
    text-transform: uppercase !important;
  }
}

/* Event hero matches story split layout (padding handled in theme SCSS). */
.home-hero.is-event .copy {
  min-height: 0;
}

/* Upcoming events: side-by-side + slider from lg (same as podcasts). */
@media (min-width: 992px) {
  .home-events {
    background: #e6e6e6;
    padding: 4rem 0 5.2rem;
  }

  .home-events .inner {
    display: grid !important;
    grid-template-columns: 34.4rem minmax(0, 1fr);
    gap: 3rem;
    /* Left matches site gutters; right flush for slider bleed */
    padding-inline: 6rem 0 !important;
    align-items: stretch;
    overflow-x: clip;
  }

  .home-events .intro {
    justify-content: space-between;
    min-height: 15.7rem;
  }

  .home-events .btn.is-desktop {
    display: inline-flex !important;
    margin-top: auto;
  }

  .home-events .btn.is-mobile {
    display: none !important;
  }

  .home-events .rail .splide__list,
  .home-events .rail.splide.is-initialized .splide__list,
  .home-events .rail.splide.is-initialized:not(.is-active) .splide__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  .home-events .slide {
    display: block !important;
    flex-shrink: 0;
    width: 52.6rem;
  }

  /* Keep Splide right padding (6rem) so the last card aligns with page gutters */
  .home-events .rail.splide .splide__track {
    padding-right: 6rem !important;
  }
}

/* Match other section gutters (equal L/R) below lg only. */
@media (max-width: 991px) {
  .home-events .inner {
    padding-inline: 2.6rem;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .home-events .inner {
    padding-inline: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .home-events .inner {
    padding-inline: 6rem;
  }
}

/* Below lg: 2-up Splide rail (up to 4 slides). */
@media (max-width: 991px) {
  .home-events {
    background: #e6e6e6;
  }

  .home-events .rail.splide {
    visibility: visible !important;
  }

  .home-events .inner {
    display: flex !important;
    flex-direction: column;
    gap: 3.5rem;
  }

  .home-events .btn.is-desktop {
    display: none !important;
  }

  .home-events .btn.is-mobile {
    display: inline-flex !important;
  }

  .home-events .rail .splide__track {
    overflow: hidden;
  }

  .home-events .rail .splide__list,
  .home-events .rail.splide.is-initialized .splide__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin: 0;
    padding: 0;
  }

  .home-events .slide {
    width: auto;
    height: auto;
    margin: 0;
    min-width: 0;
    display: block !important;
  }

  .home-events .slide .event-card-small {
    width: 100%;
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.6rem !important;
  }

  .home-events .event-card-small .media {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }

  .home-events .event-card-small .date-badge {
    width: 4.15rem;
    height: 5.2rem;
  }

  .home-events .event-card-small .title {
    font-size: 1.5rem !important;
    line-height: 1.9rem !important;
  }

  .home-events .event-card-small .tag {
    font-weight: 400 !important;
    font-size: 1rem !important;
  }

  .home-events .event-card-small .detail {
    font-size: 0.8rem !important;
  }

  .home-events .event-card-small .icon {
    width: 1.4rem !important;
    height: 1.4rem !important;
  }
}

/* Members: phone 1-col, tablet 2-col (desktop ≥md keeps 3 flex columns). */
@media (max-width: 767px) {
  .members .list {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .members .column {
    display: contents;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .members .list {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.4rem;
    row-gap: 1.4rem;
  }
}
