/*
 * Home (templates/front-page.html, parts/home-latest.html): the newest Blogi post large, two more in
 * a grid, the archive link. Loaded on the front page only. Tokens come from theme.json; breakpoint 782px.
 */

/* ---- Main column ---- */

/* The part's wrapper takes the main column's own gap (40px, 32px on desktop) between its blocks. */
.rv-main > .wp-block-template-part {
  display: flex;
  flex-direction: column;
  gap: inherit;
}

.rv-home-feature,
.rv-home-grid {
  display: flex;
  flex-direction: column;
}

.rv-home-feature .wp-block-post-template,
.rv-home-grid .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The pieces of an article stack with the gap the design gives each kind. */
.rv-feature,
.rv-teaser {
  display: flex;
  flex-direction: column;
}

.rv-feature > *,
.rv-teaser > * {
  margin: 0;
}

.rv-feature__image img,
.rv-teaser__image img {
  display: block;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--wp--preset--color--surface-border);
  box-sizing: border-box;
}

.rv-feature__date,
.rv-teaser__date {
  color: var(--wp--preset--color--muted);
}

.rv-feature__title a,
.rv-teaser__title a {
  text-decoration: none;
}

.rv-feature__title a:hover,
.rv-teaser__title a:hover {
  text-decoration: underline;
}

/* Mobile (the design's 390px column) */

.rv-home-grid .wp-block-post-template {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.rv-feature {
  gap: 12px;
}

.rv-feature__image img {
  height: 220px;
}

.rv-feature__date {
  margin-top: 8px;
  font-size: 16px;
}

.rv-feature__title {
  font-size: 30px;
  line-height: 36px;
}

.rv-feature__excerpt {
  font-size: 18px;
  line-height: 28px;
}

.rv-feature__excerpt p {
  margin: 0;
}

.rv-feature__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 48px;
  padding: 0 22px;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.rv-feature__more:hover {
  background: var(--wp--preset--color--link-hover);
  color: var(--wp--preset--color--white);
}

.rv-feature__more:focus-visible {
  outline-offset: 3px;
}

.rv-teaser {
  gap: 10px;
  padding-top: 16px;
  border-top: 3px solid var(--wp--preset--color--primary);
}

.rv-teaser__image img {
  height: 190px;
}

.rv-teaser__date {
  font-size: 15px;
}

.rv-teaser__title {
  font-size: 24px;
  line-height: 30px;
}

.rv-teaser__excerpt {
  font-size: 18px;
  line-height: 27px;
}

.rv-teaser__excerpt p {
  margin: 0;
}

.rv-home-archive {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  font-size: 18px;
  font-weight: 600;
}

.rv-home-feature .rv-empty {
  font-size: 17px;
  line-height: 25px;
  margin: 0;
}

@media (min-width: 782px) {
  .rv-home-grid .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
    row-gap: 36px;
  }

  .rv-feature {
    gap: 14px;
  }

  .rv-feature__image img {
    height: 320px;
  }

  .rv-feature__title {
    font-size: 38px;
    line-height: 44px;
  }

  .rv-feature__excerpt {
    max-width: 62ch;
    font-size: 19px;
    line-height: 30px;
  }

  .rv-feature__more {
    min-height: 46px;
    margin-top: 4px;
    font-size: 17px;
  }

  .rv-teaser {
    gap: 8px;
  }

  .rv-teaser__image img {
    height: 168px;
  }

  .rv-teaser__excerpt {
    font-size: 17px;
    line-height: 26px;
  }
}
