/* Case study — ciągły tekst (jeden blok tekstu pod zdjęciem głównym). */

.wl-case-study {
  --case-pad-y: clamp(56px, 5.2083vw, 100px);
  --case-gap: clamp(24px, 1.5625vw, 30px);
  --case-body-size: clamp(14px, 0.9375vw, 18px);
  --case-rule: rgba(var(--color-text-rgb), 0.4);
  --case-measure: 74ch;

  position: relative;
  isolation: isolate;
  padding-block: var(--case-pad-y);
  color: var(--color-dark);
}

.wl-case-study__inner {
  display: flex;
  flex-direction: column;
  gap: var(--case-gap);
}

.wl-case-study__title {
  position: relative;
  margin: 0;
  padding-bottom: var(--case-gap);
  max-width: var(--case-measure);
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-h2);
  line-height: 1.3;
  letter-spacing: 0.06em;
}

.wl-case-study__title::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--case-rule);
  pointer-events: none;
}

.wl-case-study__body {
  max-width: var(--case-measure);
  font-size: var(--case-body-size);
  line-height: 1.55;
  letter-spacing: 0.015em;
}

.wl-case-study__body :is(h3, h4) {
  margin: clamp(32px, 2.6vw, 48px) 0 var(--case-gap);
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-h3);
  line-height: 1.3;
  letter-spacing: 0.05em;
}

.wl-case-study__body > :first-child { margin-top: 0; }

.wl-case-study__body p { margin: 0 0 1em; }
.wl-case-study__body :is(ul, ol) { margin: 0 0 1em; padding-left: 1.1em; }
.wl-case-study__body li::marker { color: currentColor; }
.wl-case-study__body > :last-child { margin-bottom: 0; }

.wl-case-study__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wl-case-study__body table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-block: 1.5em;
  overflow-x: auto;
  border: 1px solid rgba(var(--color-text-rgb), 0.2);
  border-collapse: collapse;
  color: var(--color-dark);
  background: rgba(var(--color-text-rgb), 0.025);
  letter-spacing: normal;
}

.wl-case-study__body :is(th, td) {
  min-width: 10rem;
  padding: 0.75em 0.85em;
  border: 1px solid rgba(var(--color-text-rgb), 0.2);
  text-align: start;
  vertical-align: top;
}

.wl-case-study__body th {
  font-weight: 600;
  background: rgba(var(--color-text-rgb), 0.08);
}

.wl-case-study__body tbody tr:nth-child(even) {
  background: rgba(var(--color-text-rgb), 0.035);
}

@media (max-width: 767px) {
  .wl-case-study__body table {
    display: table;
    table-layout: fixed;
  }

  .wl-case-study__body :is(th, td) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
