/**
 * Success story section: full-width card with 3:1 image, title, 2-line teaser, read-more expand.
 */
.success-story {
  width: 100%;
  padding: var(--space-3xl) 0;
  background: var(--color-bg);
}

.success-story__section-title {
  max-width: var(--container-max);
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--container-padding);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  text-align: center;
}

.success-story__case {
  width: 100%;
  margin: 0;
  background: var(--color-bg-header);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border-radius: var(--radius-xl);
}

/* 3:1 full-width image */
.success-story__case-image-wrap {
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: var(--color-border);
}

.success-story__case-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.success-story__case-image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-secondary-light) 100%);
  opacity: 0.9;
}

/* Content: constrained width, padding */
.success-story__case-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--container-padding);
}

.success-story__case-title {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

/* Body: 2 lines when collapsed, full when expanded */
.success-story__case-body-wrap {
  --success-story-line-height: var(--line-height-relaxed);
  --success-story-font-size: var(--font-size-base);
  max-height: calc(2 * 1em * var(--line-height-relaxed));
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.success-story__case.is-expanded .success-story__case-body-wrap {
  /* max-height set by JS to scrollHeight for smooth expand animation */
}

.success-story__case-body {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.success-story__case.is-expanded .success-story__case-body {
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  display: block;
  overflow: visible;
}

/* Read more button */
.success-story__read-more {
  margin-top: var(--space-lg);
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color 0.2s;
}

.success-story__read-more:hover {
  color: var(--color-primary-dark);
}

.success-story__read-more:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.success-story__read-more i {
  transition: transform 0.3s ease;
}

.success-story__case.is-expanded .success-story__read-more i {
  transform: rotate(180deg);
}

@media (max-width: 48rem) {
  .success-story {
    padding: var(--space-2xl) 0;
  }

  .success-story__section-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-xl);
  }

  .success-story__case-content {
    padding: var(--space-xl) var(--container-padding);
  }

  .success-story__case-title {
    font-size: var(--font-size-xl);
  }
}
