/* "Related resources" — template-parts/sections/related-resources/related-resources.php
   Uses only the theme's existing tokens (--se-*, --radius-*, --font-*).
   Base rules first, responsive overrides last (later rules win at equal specificity). */

/* ---------- Section ---------- */
.se-related {
  padding: 80px 0;                 /* same rhythm as .faq-section */
  background: #fff;                /* alternates with the grey FAQ band above */
}
.se-related__head {
  max-width: 640px;
  margin: 0 0 36px;
}
.se-related__head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--se-ink, #111);
  margin: 0 0 12px;
}
.se-related__lead {
  margin: 0;
  font-size: 17.6px;
  font-weight: 500;
  line-height: 1.6;
  color: #555;
}

/* ---------- Grid: 3 in one row ---------- */
.se-related__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* 1 post = one-third width */
  gap: 24px;
}
.se-related__card {
  margin: 0;
  padding: 0;
}
.se-related__card::marker {
  content: none;
}

/* ---------- Card ---------- */
.se-related__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--se-purple-light, #dad0ec);
  border-radius: var(--radius-lg, 22px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.se-related__link:hover,
.se-related__link:focus-visible {
  transform: translateY(-4px);
  border-color: var(--se-purple, #6b62ac);
  box-shadow: 0 18px 40px -18px rgba(43, 40, 104, .35);
}
.se-related__link:focus-visible {
  outline: 2px solid var(--se-purple, #6b62ac);
  outline-offset: 3px;
}
.se-related__media {
  display: block;
  aspect-ratio: 40 / 21;
  background: var(--se-surface-tint, #f3f1f8);
  overflow: hidden;
}
.se-related__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.se-related__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}
.se-related__cat {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--se-purple, #6b62ac);
}
.se-related__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--se-ink, #111);
}
.se-related__excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--se-muted, #737373);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.se-related__more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--se-purple, #6b62ac);
}

/* ---------- "All resources" button ---------- */
.se-related__all {
  display: inline-block;
  margin-top: 32px;
  padding: 11px 22px;
  border: 1px solid var(--se-purple, #6b62ac);
  border-radius: 999px;
  font-weight: 600;
  color: var(--se-purple, #6b62ac);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.se-related__all:hover,
.se-related__all:focus-visible {
  background: var(--se-purple, #6b62ac);
  color: #fff;
}

/* ---------- Tablet: still 3 in a row, tighter card text ---------- */
@media (max-width: 1023px) {
  .se-related__grid { gap: 16px; }
  .se-related__body { padding: 16px 16px 18px; gap: 8px; }
  .se-related__title { font-size: 17px; }
  .se-related__excerpt { font-size: 14px; -webkit-line-clamp: 2; }
  .se-related__more { font-size: 14px; }
}

/* ---------- Phone: three columns would be ~100px each, so stack ---------- */
@media (max-width: 767px) {
  .se-related { padding: 56px 0; }
  .se-related__head { margin-bottom: 24px; }
  .se-related__grid { grid-template-columns: 1fr; }
  .se-related__body { padding: 20px 20px 22px; }
  .se-related__title { font-size: 19px; }
  .se-related__excerpt { -webkit-line-clamp: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .se-related__link,
  .se-related__all { transition: none; }
  .se-related__link:hover { transform: none; }
}
