/*
 * A photo in a pale frame beside a yellow text card with a heading and
 * an asterisk mark (/projektid/ "Miks valida meid?").
 *
 *   <section class="yb-why yb-container">
 *     <div class="yb-why__photo"><img …></div>
 *     <div class="yb-why__card"><div class="yb-why__head"><h2>…</h2>…</div><p>…</p></div>
 *   </section>
 */
.yb-why {
  display: grid;
  grid-template-columns: 600fr 520fr;
  gap: 20px;
  align-items: start;
  margin-top: 55px;
  margin-bottom: 105px;
}

.yb-why__photo {
  padding: 30px;
  border-radius: var(--yb-radius-panel);
  background: var(--yb-color-surface);
}

.yb-why__photo img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.yb-why__card {
  position: relative;
  overflow: hidden;
  padding: 30px 37px;
  border-radius: var(--yb-radius-panel);
  background: var(--yb-color-accent);
  line-height: 1.4;
}

/* The lighter diagonal band across the top right of the card. */
.yb-why__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 0 46%, rgb(255 255 255 / 18%) 46% 72%, transparent 72%);
  pointer-events: none;
}

.yb-why__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 35px;
}

.yb-why__head h2 {
  margin: 0;
  color: var(--yb-color-primary);
  font-size: 28px;
  font-weight: var(--yb-weight-medium);
  letter-spacing: 0;
}

.yb-why__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgb(255 255 255 / 25%);
  color: var(--yb-color-primary);
  font-size: 22px;
}

.yb-why__card p {
  position: relative;
  max-width: 360px;
  margin: 0 0 18px;
}

.yb-why__card p:last-child {
  margin-bottom: 0;
}

/* Two link boxes side by side, each in an outer frame. */
.yb-link-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.yb-link-boxes .yb-link-box {
  max-width: none;
  outline: 1px solid var(--yb-color-border);
  outline-offset: 12px;
  margin: 13px;
}

@media (max-width: 1024px) {
  .yb-why {
    grid-template-columns: 1fr 1fr;
  }

  .yb-why__photo img {
    height: 300px;
  }
}

@media (max-width: 767px) {
  .yb-why,
  .yb-link-boxes {
    grid-template-columns: 1fr;
  }

  .yb-why__photo {
    padding: 15px;
  }

  .yb-why__photo img {
    height: 220px;
  }
}
