/**
 * Related Reading — page builder layout (template-parts/blocks/related-reading.php)
 *
 * Styles: feature (large card + list rows), list (rows only), thumbs.
 * List rows come from fc-ledger.css. Narrow layouts follow the
 * .fc-ledger container, so they stack in sidebars as well as on phones.
 */

.fc-related {
  max-width: 100%;
  margin: 3.5rem auto;
}
/* Same column as .main-content, so it lines up with the body text */
@media (min-width: 992px) {
  .fc-related {
    max-width: 90%;
  }
}

.fc-related .fc-related__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fc-related a {
  border: 0;
  text-decoration: none;
}
.fc-related a:focus {
  outline: none;
}
.fc-related a:focus-visible {
  outline: 2px solid #0056f7;
  outline-offset: 4px;
}

/* ---------- Feature card ---------- */
.fc-related .fc-related__feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  margin-top: 24px;
  border-radius: 20px;
  overflow: hidden;
  background: #f2f4f9;
  color: #3e4352;
  transition: box-shadow 0.25s ease;
}
.fc-related .fc-related__feature--no-image {
  grid-template-columns: minmax(0, 1fr);
}
.fc-related .fc-related__feature-media {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: #dfe4f0;
}
.fc-related .fc-related__feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 36px 40px;
}
.fc-related .fc-related__feature-meta {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0056f7;
}
.fc-related .fc-related__feature-title {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #041670;
  text-wrap: balance;
  transition: color 0.2s ease;
}
.fc-related .fc-related__feature-sum {
  max-width: 48ch;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
}
.fc-related .fc-related__feature-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #041670;
}
.fc-related .fc-related__feature-go svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}
.fc-related .fc-related__feature:hover {
  box-shadow: inset 0 0 0 1px #c9d2ea, 0 16px 36px -22px rgba(4, 22, 112, 0.45);
}
.fc-related .fc-related__feature:hover .fc-related__feature-title {
  color: #0056f7;
}
.fc-related .fc-related__feature:hover .fc-related__feature-go svg {
  transform: translateX(4px);
}
.fc-related .fc-related__feature:hover .fc-related__img {
  transform: scale(1.04);
}
.fc-related .fc-related__after {
  margin-top: 20px;
}

/* ---------- Thumbnails ---------- */
.fc-related .fc-related__thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}
.fc-related--single .fc-related__thumbs {
  grid-template-columns: minmax(0, 1fr);
}
.fc-related .fc-related__thumb {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #dde2ee;
  color: #3e4352;
}
.fc-related--single .fc-related__thumb {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
}
.fc-related .fc-related__thumb-media {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  overflow: hidden;
  background: #dfe4f0;
}
.fc-related .fc-related__thumb-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fc-related .fc-related__thumb-meta {
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.3;
  color: #6b7080;
}
.fc-related .fc-related__thumb-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #041670;
  text-wrap: balance;
  transition: color 0.2s ease;
}
.fc-related--single .fc-related__thumb-title {
  font-size: 1.35rem;
}
.fc-related .fc-related__thumb-sum {
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.5;
}
.fc-related .fc-related__thumb:hover .fc-related__thumb-title {
  color: #0056f7;
}
.fc-related .fc-related__thumb:hover .fc-related__img {
  transform: scale(1.05);
}

/* ---------- Narrow ---------- */
@container fc-ledger (max-width: 700px) {
  .fc-related .fc-related__feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .fc-related .fc-related__feature-media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .fc-related .fc-related__feature-body {
    padding: 22px 20px 24px;
  }
  .fc-related .fc-related__feature-title {
    font-size: 1.3rem;
  }
  .fc-related .fc-related__thumbs {
    grid-template-columns: minmax(0, 1fr);
  }
  .fc-related .fc-related__thumb,
  .fc-related--single .fc-related__thumb {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }
  .fc-related--single .fc-related__thumb-title {
    font-size: 1.1rem;
  }
  .fc-related--single .fc-related__thumb-sum {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-related .fc-related__img,
  .fc-related .fc-related__feature-title,
  .fc-related .fc-related__feature-go svg,
  .fc-related .fc-related__thumb-title {
    transition: none;
  }
  .fc-related .fc-related__feature:hover .fc-related__img,
  .fc-related .fc-related__thumb:hover .fc-related__img,
  .fc-related .fc-related__feature:hover .fc-related__feature-go svg {
    transform: none;
  }
}
