/* "From the Library" homepage section. Fonts, heading sizes and the button come from the CE layout. */
.stlblog-home {
  --stlh-navy: #1A2A44;
  --stlh-muted: #6b6b6b;
  --stlh-soft: #f6f5f2;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 4.5rem) 15px;
  text-align: left;
}

.stlblog-home *,
.stlblog-home *::before,
.stlblog-home *::after {
  box-sizing: border-box;
}

.stlblog-home__head {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.stlblog-home__head .elementor-heading-title {
  margin: 0 0 .5rem;
}

.stlblog-home .stlblog-home__lead {
  margin: .25rem auto 0;
  max-width: 40em;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--stlh-muted);
}

.stlblog-home__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 576px) {
  .stlblog-home__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .stlblog-home__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .stlblog-home__card:nth-child(3) { display: none; }
}

.stlblog-home__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stlblog-home__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--stlh-soft);
}

.stlblog-home__media picture {
  display: block;
}

/* Absolute so the theme's img height rules can't stretch it past 16:9 */
.stlblog-home .stlblog-home__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.stlblog-home__media img {
  object-fit: cover;
  transition: transform .4s ease;
}

.stlblog-home__card:hover .stlblog-home__media img { transform: scale(1.03); }

.stlblog-home__media.is-contain,
.stlblog-home__media.is-empty { background: var(--stlh-navy); }
.stlblog-home__media.is-contain img { object-fit: contain; }
.stlblog-home__card:hover .stlblog-home__media.is-contain img { transform: none; }

.stlblog-home__media.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stlblog-home__placeholder {
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
}

.stlblog-home__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 38px;
  margin: -19px 0 0 -27px;
  border-radius: 9px;
  background: rgba(26, 42, 68, .88);
  transition: background .2s;
}

.stlblog-home__play::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 11px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.stlblog-home__card:hover .stlblog-home__play { background: #c4302b; }

.stlblog-home__body { padding-top: .9rem; }

.stlblog-home .stlblog-home__meta {
  margin: 0 0 .35rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--stlh-muted);
}

.stlblog-home__meta a {
  color: var(--stlh-navy);
  text-decoration: none;
}

.stlblog-home__meta a:hover { text-decoration: underline; }

.stlblog-home .stlblog-home__title {
  margin: 0 0 .45rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  text-transform: none;
}

.stlblog-home__title a {
  color: var(--stlh-navy);
  text-decoration: none;
}

.stlblog-home__title a:hover,
.stlblog-home__title a:focus-visible { text-decoration: underline; }

.stlblog-home .stlblog-home__excerpt {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #4a4a4a;
}

.stlblog-home__cta {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}

.stlblog-home a:focus-visible {
  outline: 2px solid var(--stlh-navy);
  outline-offset: 3px;
}
