/*
 * Page hero: the first section of a page. It sits on the pale rounded
 * panel that fades to white down the page (the old site's page shells).
 *
 *   <section class="yb-page-hero yb-page-hero--center">
 *     <h1>Võta ühendust</h1>
 *     <p class="yb-page-hero__lead">…</p>
 *   </section>
 *
 * Without --center the text is left-aligned. Content is kept to the
 * 1140px column by the section's own padding, so no inner wrapper is needed.
 */
.yb-page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-m);
  padding: 63px max(var(--yb-gutter), (100% - var(--yb-width-content)) / 2);
}

.yb-page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: var(--yb-edge);
  right: var(--yb-edge);
  height: max(100%, 50vh);
  border-radius: var(--yb-radius-panel) var(--yb-radius-panel) 0 0;
  background: linear-gradient(var(--yb-color-surface), var(--yb-color-white));
}

.yb-page-hero__lead {
  margin: 0;
  color: var(--yb-color-primary);
  font-size: var(--yb-size-lead);
  line-height: var(--yb-leading-lead);
}

/* Only a tag on the pale panel (the registration pages); the h1 is for screen readers. */
.yb-page-hero--tag-only {
  min-height: 420px;
  margin-bottom: 140px;
}

.yb-page-hero--tag-only .yb-tag {
  align-self: flex-start;
  margin: 0;
  color: var(--yb-color-primary);
}

.yb-page-hero--center {
  align-items: center;
  text-align: center;
}

/* The old centred page titles sat in a 730 px column. */
.yb-page-hero--center h1 {
  max-width: 730px;
}

@media (max-width: 1024px) {
  .yb-page-hero {
    padding-top: 60px;
  }

  .yb-page-hero::before {
    left: 0;
    right: 0;
  }

  .yb-page-hero--tag-only {
    min-height: 330px;
  }
}

@media (max-width: 767px) {
  .yb-page-hero {
    padding-top: 40px;
  }

  .yb-page-hero--tag-only {
    min-height: 150px;
    margin-bottom: 50px;
  }

  .yb-page-hero--tag-only::before {
    height: 100%;
  }

  .yb-page-hero--center {
    align-items: flex-start;
    text-align: left;
  }
}
