.patient-stories {
  padding: 52px 0 44px;
  background:
    radial-gradient(circle at 10% 8%, rgba(20, 184, 166, 0.1), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f3faf8 100%);
  scroll-margin-top: 96px;
}

.patient-stories-header {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.patient-stories-header h2 {
  margin: 0;
  color: #103532;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

#patientStoriesTitle {
  scroll-margin-top: 108px;
}

.patient-stories-header p {
  margin: 16px 0 0;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.patient-stories-carousel {
  position: relative;
  margin-top: 32px;
  outline: none;
}

.patient-stories-carousel:focus-visible {
  border-radius: var(--radius-md);
  outline: 3px solid rgba(13, 148, 136, 0.28);
  outline-offset: 6px;
}

.patient-stories-stage {
  position: relative;
}

.patient-stories-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: height 0.35s ease;
}

.patient-stories-track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  transition: transform 0.42s ease;
  will-change: transform;
  touch-action: pan-y;
}

.patient-story-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.patient-story-card {
  display: grid;
  grid-template-columns: minmax(270px, 0.33fr) minmax(0, 0.67fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 118, 110, 0.1);
}

.patient-story-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 24px 20px;
  background: #f3faf8;
}

.patient-story-media picture {
  display: block;
  width: 100%;
}

.patient-story-media img {
  display: block;
  width: min(100%, 232px);
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 0 auto;
}

.patient-story-body {
  min-width: 0;
  padding: clamp(26px, 2.7vw, 36px);
}

.patient-story-body h3 {
  margin: 0 0 18px;
  color: #103532;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.2;
}

.patient-story-copy {
  display: grid;
  gap: 14px;
}

.patient-story-copy p {
  margin: 0;
  color: #385452;
  font-size: 15.5px;
  line-height: 1.58;
}

.patient-story-intro {
  display: contents;
}

.patient-story-mobile-portrait,
.patient-story-mobile-results {
  display: none;
}

.patient-stories-controls {
  position: absolute;
  inset: 0 -32px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.patient-stories-arrow {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 118, 110, 0.28);
  pointer-events: auto;
  transition: background 0.2s ease, box-shadow 0.2s ease, scale 0.2s ease;
}

.patient-stories-arrow svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.patient-stories-arrow:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.34);
  scale: 1.04;
}

.patient-stories-arrow:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 3px;
}

.patient-stories-cta {
  max-width: 980px;
  margin: 24px auto 0;
  padding: 0;
  text-align: center;
}

.patient-stories-cta h3 {
  margin: 0 0 12px;
  color: #103532;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.patient-stories-cta p {
  margin: 0;
  color: #385452;
  font-size: 15.5px;
  line-height: 1.58;
}

.patient-stories-cta-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
}

.patient-stories-cta-button {
  flex: 0 0 auto;
}

.patient-stories-cta-button:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 4px;
}

.patient-stories-cta-note {
  max-width: 440px;
  text-align: left;
}

#dentalCalculatorForm {
  scroll-margin-top: 108px;
}

@media (max-width: 899px) {
  .patient-stories {
    padding: 48px 0 38px;
  }

  .patient-story-slide {
    scroll-margin-top: 96px;
  }

  .patient-story-card {
    display: block;
  }

  .patient-story-media {
    display: none;
  }

  .patient-story-body {
    padding: 30px 32px;
  }

  .patient-story-copy {
    display: block;
  }

  .patient-story-intro {
    display: block;
  }

  .patient-story-intro::after {
    display: block;
    clear: both;
    content: "";
  }

  .patient-story-mobile-portrait {
    display: block;
    float: right;
    width: 44%;
    max-width: 260px;
    margin: 0 0 12px 18px;
  }

  .patient-story-mobile-portrait img,
  .patient-story-mobile-results img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .patient-story-mobile-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
  }

  .patient-story-mobile-results figure {
    min-width: 0;
    margin: 0;
  }

  .patient-story-mobile-results figcaption {
    margin-top: 6px;
    color: #385452;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
  }

  .patient-story-mobile-results + p,
  .patient-story-copy > p + p {
    margin-top: 14px;
  }

  .patient-stories-controls {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 50%;
    right: auto;
    width: calc(100% + 60px);
    height: 1px;
    margin: 0;
    transform: translate(-50%, -50%);
  }

  .patient-stories-controls.is-mobile-fixed {
    position: fixed;
    top: var(--patient-stories-controls-top, 50vh);
    width: calc(100vw - 20px);
  }

  .patient-stories-controls.is-mobile-after {
    top: auto;
    bottom: 0;
    transform: translate(-50%, 50%);
  }

  .patient-stories-arrow {
    width: 58px;
    height: 58px;
  }

  .patient-stories-arrow svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 599px) {
  .patient-stories {
    padding: 42px 0 32px;
  }

  .patient-stories-header h2 {
    font-size: 28px;
    line-height: 1.16;
  }

  .patient-stories-header p {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.55;
  }

  .patient-stories-carousel {
    margin-top: 24px;
  }

  .patient-stories-viewport {
    border-radius: var(--radius-sm);
  }

  .patient-story-card {
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 26px rgba(15, 118, 110, 0.09);
  }

  .patient-story-body {
    padding: 22px 28px 24px;
  }

  .patient-story-body h3 {
    margin-bottom: 14px;
    font-size: 23px;
  }

  .patient-story-copy {
    gap: 12px;
  }

  .patient-story-copy p {
    font-size: 15px;
    line-height: 1.55;
  }

  .patient-story-mobile-portrait {
    width: 44%;
    margin: 0 0 10px 14px;
  }

  .patient-story-mobile-results {
    gap: 10px;
    margin: 16px 0;
  }

  .patient-story-mobile-results figcaption {
    margin-top: 5px;
    font-size: 12px;
  }

  .patient-stories-arrow {
    width: 54px;
    height: 54px;
  }

  .patient-stories-arrow svg {
    width: 26px;
    height: 26px;
  }

  .patient-stories-cta {
    margin-top: 20px;
  }

  .patient-stories-cta h3 {
    font-size: 21px;
  }

  .patient-stories-cta p {
    font-size: 15px;
    line-height: 1.55;
  }

  .patient-stories-cta-action {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
  }

  .patient-stories-cta-button {
    width: 100%;
    white-space: normal;
  }

  .patient-stories-cta-note {
    max-width: none;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .patient-stories-viewport,
  .patient-stories-track,
  .patient-stories-arrow {
    transition-duration: 0.01ms;
  }
}
