/* Homepage story carousel */
#way-story {
  scroll-margin-top: 72px;
}

.way-story-carousel {
  position: relative;
  width: 100%;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, #FEFBF6 0%, #FBF8F1 100%);
  color: #2C1810;
}

.way-story-carousel__header {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
  text-align: center;
}

.way-story-carousel__title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #2C1810;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.way-story-carousel__subtitle {
  margin: 0;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  line-height: 1.5;
  color: #6B5B4F;
}

.way-story-carousel__container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
}

.way-story-carousel__viewport {
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(44, 24, 16, 0.08);
}

.way-story-carousel__track {
  display: flex;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.way-story-carousel__track::-webkit-scrollbar {
  display: none;
}

.way-story-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  align-items: start;
  min-height: 0;
  box-sizing: border-box;
}

.way-story-slide__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #F5EFE1 0%, #EAE2D3 100%);
}

.way-story-slide__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.way-story-slide__caption {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  line-height: 1.3;
}

.way-story-slide__content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.way-story-slide__headline {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  font-weight: 700;
  color: #2C1810;
  line-height: 1.2;
  margin: 0;
}

.way-story-slide__body p {
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  line-height: 1.6;
  color: #555;
  margin: 0 0 0.65rem;
}

.way-story-slide__body p:last-child {
  margin-bottom: 0;
}

.way-story-slide__body em {
  font-style: italic;
  color: #2C1810;
}

.way-story-slide__body strong {
  font-weight: 600;
  color: #C9A227;
}

.way-story-slide__cta-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  width: auto;
  max-width: 100%;
}

/* Pagination: small circles, 44px touch area (overrides global button min-height) */
.way-story-carousel__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

.way-story-carousel__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #8B7355;
  letter-spacing: 0.02em;
}

.way-story-carousel__dots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.way-story-carousel__dot {
  /* Reset global touch rule (min-height: 44px on all buttons) */
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
}

.way-story-carousel__dot::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #C4B59A;
  background: transparent;
  box-sizing: border-box;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.way-story-carousel__dot:hover::before,
.way-story-carousel__dot:focus-visible::before {
  border-color: #C9A227;
  transform: scale(1.1);
}

.way-story-carousel__dot.is-active::before {
  background: #C9A227;
  border-color: #C9A227;
  transform: scale(1.15);
}

.way-story-carousel__dot:focus-visible {
  outline: 2px solid #C9A227;
  outline-offset: 2px;
  border-radius: 50%;
}

.way-story-carousel__arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #D4C5A9;
  color: #2C1810;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0;
}

.way-story-carousel__arrow:hover {
  background: #C9A227;
  border-color: #C9A227;
  color: #fff;
}

.way-story-carousel__arrow--prev { left: 0.5rem; }
.way-story-carousel__arrow--next { right: 0.5rem; }

@media (min-width: 768px) {
  .way-story-carousel__hint {
    display: none;
  }

  .way-story-carousel__header {
    margin-bottom: 1.75rem;
  }

  .way-story-carousel__container {
    padding: 0 3rem;
  }

  .way-story-slide {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 2.25rem;
    align-items: center;
    min-height: 380px;
  }

  .way-story-slide__image {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .way-story-slide:nth-child(even) .way-story-slide__image {
    order: 2;
  }

  .way-story-slide:nth-child(even) .way-story-slide__content {
    order: 1;
  }

  .way-story-slide__headline {
    font-size: 2rem;
  }

  .way-story-slide__caption {
    font-size: 0.72rem;
    padding: 0.45rem 0.65rem;
  }

  .way-story-carousel__nav {
    margin-top: 1.25rem;
  }

  .way-story-carousel__dot {
    width: 40px;
    height: 40px;
  }

  .way-story-carousel__dot::before {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .way-story-carousel__dots {
    gap: 0.35rem;
  }

  .way-story-carousel__arrow {
    display: flex;
  }

  .way-story-carousel__arrow--prev { left: 0.75rem; }
  .way-story-carousel__arrow--next { right: 0.75rem; }
}

@media (min-width: 1024px) {
  .way-story-slide {
    padding: 2.5rem 3rem;
    gap: 2.5rem;
    min-height: 420px;
  }

  .way-story-slide__headline {
    font-size: 2.25rem;
  }

  .way-story-carousel__arrow {
    width: 48px;
    height: 48px;
    min-height: 48px;
  }
}
