/* ── Textblock ── */
.textblock {
  padding-block: 2.5rem;
}

.textblock__container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
}

.textblock__body {
  grid-column: 1 / 8;
  display: flex;
  flex-direction: column;
}

.textblock__body p + h2,
.textblock__body p + h3,
.textblock__body p + h4,
.textblock__body p + h5,
.textblock__body p + h6 {
    margin-block-start: 1rem;
}

.textblock__body p:first-of-type {
  margin-block-start: 0;
}

.textblock__body p:last-of-type {
  margin-block-end: 0;
}

.textblock__body p {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-body);
  line-height: var(--line-height-relaxed);
}

.textblock__body p:has( strong ):has( + ul ) {
  margin-block: 0;
}

.textblock__body p:has( strong ) + ul {
  margin-block: 0;
}

.textblock__body img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
}

.textblock--compact .textblock__body {
  gap: 0;
}

.textblock--compact .textblock__body h2:has( + p) {
  margin-block-end: 1.5rem;
}

.textblock--compact .textblock__body h3:has( + p) {
  margin-block-end: 0.75rem;
}

.textblock--compact .textblock__body p {
  margin: 0;
}

.textblock__btn {
  grid-column: 1 / 8;
  justify-self: start;
}

/* ── Standalone Textblock section ── */
.textblock > .container {
  max-width: calc(100% - 2.5rem);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
  margin: 0 auto;
}

.textblock__heading,
.textblock__content,
.textblock__button {
  grid-column: 1 / -1;
}

.textblock__button {
  width: fit-content;
}

@media ( min-width: 48rem ) {

  .textblock {
    padding-block: 5rem;
  }

  .textblock > .container {
    max-width: var( --container-max-width );
  }

  .textblock__heading,
  .textblock__content,
  .textblock__button {
    grid-column: 3 / -3;
  }
}