/*
 * Front page opening: big heading with a button, a full-width photo, and
 * the stat cards (.yb-stats) overlapping the photo's bottom edge.
 */
.yb-home-hero {
  padding-bottom: 100px;
  background: linear-gradient(var(--yb-color-white) 0, var(--yb-color-white) 841px, var(--yb-color-surface) 841px, var(--yb-color-white) 100%);
}

.yb-home-hero__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 45px;
  margin-bottom: 40px;
}

.yb-home-hero__head h1 {
  max-width: 1040px;
  margin: 0;
  font-size: 58px;
  font-weight: var(--yb-weight-medium);
  line-height: 1;
}

.yb-home-hero__head .yb-button {
  flex: none;
}

.yb-home-hero__image {
  display: block;
  width: 100%;
  height: 540px;
  object-fit: cover;
}

.yb-stats {
  display: grid;
  grid-template-columns: 297fr 505fr 297fr;
  gap: 20px;
  margin-top: -80px;
  position: relative;
}

.yb-stats__card {
  display: flex;
  min-width: 0;
  gap: 20px;
  padding: 20px;
  border-radius: var(--yb-radius-panel);
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(1.8) blur(40px);
  backdrop-filter: saturate(1.8) blur(40px);
}

.yb-stats__card--pale {
  background: var(--yb-color-surface);
}

.yb-stats__box {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 208px;
  padding: 20px 20px 15px;
  background: var(--yb-color-white);
}

.yb-stats__card--pale .yb-stats__box {
  background: rgba(255, 255, 255, 0.8);
}

.yb-stats__box .yb-icon {
  color: var(--yb-color-primary);
  font-size: 24px;
}

.yb-stats__box p {
  margin: 0;
}

.yb-stats__box .yb-h3 {
  margin-top: auto;
}

.yb-stats__label {
  font-size: var(--yb-size-button);
  font-weight: var(--yb-weight-medium);
  line-height: 1;
}

.yb-stats__label:first-of-type {
  margin-top: auto !important;
}

.yb-stats__number {
  color: var(--yb-color-primary);
  font-size: var(--yb-size-h2);
  line-height: 1.2;
}

.yb-stats__box--image {
  flex: 0 0 155px;
  justify-content: center;
  padding: 20px 0;
}

.yb-stats__box--image img {
  width: 100%;
  height: auto;
}

.yb-stats__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.yb-stats__title {
  font-size: var(--yb-size-h5);
  font-weight: var(--yb-weight-medium);
  line-height: 1.15;
}

.yb-stats__note {
  margin-top: 12px !important;
  color: var(--yb-color-primary);
  font-size: var(--yb-size-button);
  font-weight: var(--yb-weight-medium);
}

/* Three round flags overlapping each other. */
.yb-stats__flags {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.yb-stats__flags img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.yb-stats__flags img + img {
  margin-right: -12px;
}

@media (max-width: 1024px) {
  .yb-home-hero__head h1 {
    font-size: var(--yb-size-h1);
  }

  .yb-home-hero__image {
    height: 400px;
  }

  .yb-home-hero__head {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
  }

  .yb-stats {
    grid-template-columns: 1fr 1fr;
  }

  .yb-stats__card--wide {
    grid-column: 1 / -1;
  }

  .yb-stats__box {
    min-height: 150px;
  }

  .yb-stats__box--image {
    flex-basis: 140px;
    padding-block: 0;
  }
}

@media (max-width: 767px) {
  .yb-home-hero {
    padding-bottom: 60px;
  }

  .yb-home-hero__image {
    height: 300px;
  }

  .yb-stats {
    grid-template-columns: 1fr;
  }

  .yb-stats__card {
    padding: 12px;
  }

  .yb-stats__box {
    min-width: 0;
    min-height: 0;
  }

  .yb-stats__box--image {
    flex-basis: 110px;
  }
}
