/* ── Problem Section ── */
.problem {
  background-color: #fbfbfd;
  padding: calc(var(--space-2xl) + 0.5rem) var(--space-md)
    calc(var(--space-2xl) + 0.75rem);
}

.problem__inner {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.problem__title {
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
  font-size: clamp(1.5rem, 5.5vw, 2.125rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--color-text);
}

/* ── Cards ── */
.problem__cards {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.problem__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 1.25rem 1.25rem 1.75rem;
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 30px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    0 1px 6px rgba(0, 0, 0, 0.02);
  transition:
    transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    border-color 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.problem__card-media {
  width: 100%;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 18px;
}

.problem__card-image {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.3s ease;
}

.problem__card-title {
  margin-bottom: 0.875rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.problem__card-text {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--color-text-secondary);
}

.problem__note {
  margin-top: var(--space-xl);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  text-align: center;
  color: #a1a1a6;
}

@media (hover: hover) {
  .problem__card:hover {
    transform: translateY(-6px);
    border-color: rgba(29, 29, 31, 0.06);
    box-shadow:
      0 24px 56px rgba(0, 0, 0, 0.09),
      0 8px 20px rgba(0, 0, 0, 0.04);
  }

  .problem__card:hover .problem__card-image {
    transform: scale(1.03);
  }
}

/* ── Scroll fade-up (unified) ── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }

/* ── Tablet+ ── */
@media (min-width: 48rem) {
  .problem {
    padding: calc(var(--space-2xl) + 3.5rem) var(--space-lg)
      calc(var(--space-2xl) + 2.5rem);
  }

  .problem__inner {
    max-width: 62rem;
  }

  .problem__title {
    max-width: 20rem;
    margin-bottom: calc(var(--space-2xl) + 0.5rem);
    line-height: 1.4;
  }

  .problem__cards {
    flex-direction: row;
    gap: 2rem;
  }

  .problem__card {
    flex: 1;
    padding: 1.35rem 1.35rem 2rem;
  }

  .problem__card-media {
    margin-bottom: 1.5rem;
  }

  .problem__card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .problem__note {
    margin-top: calc(var(--space-xl) + 0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .problem__card,
  .problem__card-image {
    transition: none;
  }
}
