.slides-section {
  padding-bottom: var(--block-space-lg);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ease: linear;
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-slides__active-body.is-entering {
  animation: panel-enter 0.35s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .feature-slides__active-body.is-entering {
    animation: none;
  }
}

/* =========================================================
   Component
   ========================================================= */
.feature-slides__stack {
  display: flex;
  flex-direction: column;
}

.feature-slides__active {
  border: 1px solid var(--neutral-300);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background-color: #fff;
  min-height: 470px;
  z-index: 40;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
}

.feature-slides__active-body {
  display: grid;
  gap: 60px;
  z-index: 10;

  @media (min-width: 860px) {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-slide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 60px;
}

.feature-slide-content__title {
  font-size: clamp(26px, 3.2vw, 40px);
  margin-bottom: 18px;
}

.feature-slide-content__description {
  max-width: 42ch;
}

.feature-slide-content__visual {
  position: relative;
  border-left: 1px solid var(--neutral-300);
  overflow: hidden;
}

.feature-slide-content__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 860px) {
  .feature-slides__active-body {
    flex-direction: row;
    min-height: inherit;
  }

  .feature-slide-content {
    flex: 1;
    justify-content: space-between;
    padding: 60px;
  }

  .feature-slide-content__visual {
    flex: 1.15;
  }
}

.feature-slides__list {
  display: flex;
  flex-direction: column;
}

.feature-slide-item {
  position: relative;
  border: 1px solid var(--neutral-300);
  border-top: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  margin-top: calc(-1 * var(--block-space-md));
  overflow: hidden;
  background-color: #fff;
  transition: background-color 0.2s var(--ease);
}

/* z-index is assigned dynamically in slides.js based on item count */

.feature-slide-item__header {
  appearance: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: calc(var(--block-space-sm) + 10px) 60px 10px;
}

.feature-slide-item:hover {
  background-color: var(--neutral-75);
}

/* .feature-slide-item__header:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: -2px;
} */

.feature-slide-item.is-current {
  background-color: var(--neutral-100);
}

.feature-slide-item__title {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full content lives here for SEO. Note: no <img src> tags — image
   URLs are on data-image attributes so the browser never fetches
   them until an item is actually shown. A <noscript><img></noscript>
   fallback keeps things visible to no-JS visitors and crawlers that
   don't run JS. */
.feature-slide-item__seo-body {
  display: none;
}

@media (min-width: 860px) {
  .feature-slide-item__header {
    padding: calc(var(--block-space-sm) + 20px) 60px 18px;
  }

  .feature-slide-item__title {
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .page {
    padding: 40px 14px 80px;
  }

  .feature-slide-content {
    padding: 22px 18px 26px;
  }

  .feature-slide-item__header {
    padding: calc(var(--block-space-sm) + 10px) 60px 10px;
  }
}
