/*
 * Supplete — Article Cards (shared)
 *
 * Self-contained CSS for the JS-rendered .acard family. Currently scoped to
 * the bottom-of-article "Related reading" carousel rendered by article-cards.js
 * (data-acard-mode="related"). Other surfaces (home page Latest, Featured)
 * reuse pre-existing page-local classes (.guide-card, .feature-main,
 * .side-article) so this stylesheet does not need to define them.
 *
 * Visual design ported verbatim from the inline .misc-related-* block in
 * Creative_freedom_articles_template.html (lines 782-885 of the original
 * template at time of extraction). Class names are renamed to .acard* so the
 * styles work on every template, not just the misc-page surface.
 */

/* ── Shelf wrapper ──────────────────────────────────────────────── */
.acard-shelf {
  margin: 32px 0 0;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  font-family: 'Inter', 'Nunito', sans-serif;
  color: #1f2937;
}

.acard-shelf > h2 {
  font-family: 'Inter', 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: #1f2937;
}

.acard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.acard-loading {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}

/* ── Related card variant ───────────────────────────────────────── */
.acard {
  text-decoration: none;
  color: inherit;
  display: block;
}

.acard--related {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 12px;
  align-items: stretch;
  background: #f7f9fc;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  padding: 10px 12px;
  color: #1f2937;
  text-decoration: none;
  overflow: hidden;
  transition: 0.18s ease;
}

a.acard--related,
a.acard--related:hover,
a.acard--related:focus,
a.acard--related:visited {
  text-decoration: none;
}

.acard--related:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  transform: translateY(-1px);
}

.acard--related .acard__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.acard--related .acard__thumb {
  width: 92px;
  height: 92px;
  align-self: stretch;
  border-radius: 8px;
  overflow: hidden;
  background: #e6e8ec;
  flex-shrink: 0;
}

.acard--related .acard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acard--related .acard__eyebrow {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 3px;
}

.acard--related .acard__title {
  margin: 0 0 2px;
  font-family: 'Inter', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.22;
  color: #1f2937;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.acard--related:hover .acard__title {
  text-decoration-color: #2563eb;
}

.acard--related .acard__desc {
  margin: 0;
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .acard-shelf {
    padding: 18px 18px;
    border-radius: 18px;
  }
}
