// ---------------------------------------
// Wrapper section paragraph + included view fields
// ---
// Related: paragraph.scss (generic classes/behaviours), views.scss
// ---------------------------------------

// View mode grid ("side by side" sets header, intro text + more link inline

.paragraph--type--wrapper-section {
  margin-block: var(--row-gap);
  padding-block: var(--row-gap);
}

.paragraph--type--wrapper-section.paragraph--view-mode--grid {
  display: grid;
  grid-template-columns: auto;
  grid-column-gap: var(--grid-gutter);
}

.paragraph--type--wrapper-section.paragraph--view-mode--grid:has(.intro) {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-column-gap: var(--grid-gutter);

  .field--name-field-content-paragraphs {
    grid-column: 1 / -1;

    @include breakpoint(l) {
      grid-column: 2 / -1;
      grid-row: 1 / span 2;
    }
  }

  .intro {
    grid-column: 1;
    grid-row: 1;
    padding-block-start: var(--grid-row);
  }

  .more-link {
    grid-column: 1;
    align-self: end;

    @include breakpoint(l) {
      grid-row: 2;
      padding-block-end: var(--grid-row);
    }
  }

  .field--name-field-content-paragraphs,
  .field--name-field-view,
  .paragraph--type--view,
  .frontpage {
    margin-block: 0;
  }
}

// Hide View redundant header/more link

.paragraph--type--wrapper-section {
  .view-header,
  .view .more-link,
  .block--title {
    display: none;
  }
}

// ---
// Adjust headline margin

.paragraph--type--wrapper-section.paragraph--view-mode--grid {
  &:has(.view.locations, .view.profiles) h2 {
    margin-block-start: 0;
    padding-block-start: 0;
  }
}



