/* Related guides – SEO internal-link block (inc/related.php). Links stay plain <a href> for crawlers. */
.related-guides {
  --rg-brand: var(--brand-default, #2C63A8);
  --rg-action: var(--brand-strong, #217DCE);
  --rg-soft: var(--brand-faint, #E8F1FA);
  background: var(--surface-hero, linear-gradient(180deg, #fff, #f3f8fd));
  padding-block: clamp(48px, 6vw, 80px);
}
.related-guides .section-header { text-align: center; margin-bottom: clamp(24px, 3vw, 40px); }
.related-guides .section-header h2 { margin: 0; }
.related-guides__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.related-guides__list li { margin: 0; padding: 0; min-width: 0; }
.related-guides__list li::marker { content: none; }
.related-guides__list a {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 76px; height: 100%; box-sizing: border-box;
  padding: 16px 48px 16px 16px;
  background: var(--surface-default, #fff);
  border: 1px solid var(--border-subtle, #e5eaf0);
  border-radius: var(--card-radius, 12px);
  box-shadow: var(--shadow-card, 0 1px 3px rgb(15 23 42 / .06));
  color: var(--text-strong, #1f2937);
  font-size: var(--font-size-base, 15px); font-weight: 600; line-height: 1.45;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, color .25s ease;
}
.related-guides__list a > span, .related-guides__list a {
  overflow-wrap: anywhere;
}
/* doc icon in soft brand circle */
.related-guides__list a::before {
  content: ""; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C63A8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") center / 20px no-repeat,
    var(--rg-soft);
  transition: background-color .25s ease;
}
/* arrow */
.related-guides__list a::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23217DCE' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .55; transition: transform .25s ease, opacity .25s ease;
}
/* 2-line clamp on the text node (whole <a> text kept in DOM) */
.related-guides__list a {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  padding-left: 72px; /* room for icon */
}
.related-guides__list a::before { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.related-guides__list a { align-content: center; }
.related-guides__list a:hover,
.related-guides__list a:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-brand-soft, #c9dcf1);
  box-shadow: var(--shadow-card-hover, 0 10px 24px rgb(44 99 168 / .14));
  color: var(--rg-brand);
}
.related-guides__list a:hover::after,
.related-guides__list a:focus-visible::after { transform: translate(4px, -50%); opacity: 1; }
.related-guides__list a:focus-visible { outline: 2px solid var(--rg-action); outline-offset: 2px; }
@media (max-width: 991px) { .related-guides__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) {
  .related-guides__list { grid-template-columns: 1fr; gap: 12px; }
  .related-guides__list a { min-height: 64px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .related-guides__list a, .related-guides__list a::after { transition: none; }
  .related-guides__list a:hover { transform: none; }
}
