/* ==========================================================================
   Learn / Blog archive — fidelity: mockups/pages/editorial-listing/
   ========================================================================== */

.drc-learn {
  padding: 0 0 calc(48px + env(safe-area-inset-bottom, 0px));
}

.drc-learn .drc-crumbs {
  margin: 0 0 18px;
  padding: 0;
}

.drc-learn .drc-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.drc-learn .drc-crumbs li {
  display: flex;
  align-items: center;
}

.drc-learn .drc-crumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--line-strong, var(--stone));
}

.drc-learn .drc-crumbs a {
  color: inherit;
  text-decoration: none;
}

.drc-learn .drc-crumbs a:hover {
  text-decoration: underline;
}

.drc-learn .drc-crumbs [aria-current] {
  color: var(--ink, var(--espresso));
  font-weight: 500;
}

/* ---- Hero ---- */
.drc-learn__hero {
  padding: 28px 0 var(--s7, 48px);
}

.drc-learn__eyebrow {
  display: block;
  margin: 0 0 10px;
  font: 600 12.5px / 1 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust-deep, var(--forest));
}

.drc-learn__h1 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08;
  max-width: 18ch;
  color: var(--forest);
  letter-spacing: -0.015em;
}

.drc-learn__lede {
  margin: 16px 0 0;
  max-width: 66ch;
  font-size: 18px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--espresso) 88%, var(--muted));
}

/* ---- Topic pills ---- */
.drc-learn__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: var(--s4, 16px) 0;
  border-top: 1px solid var(--line, var(--stone));
  border-bottom: 1px solid var(--line, var(--stone));
}

.drc-learn__topics a {
  font: 600 14px / 1 var(--font-ui);
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--ink, var(--espresso));
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong, var(--stone));
  transition: color 0.15s, box-shadow 0.15s, background 0.15s;
}

.drc-learn__topics a:hover {
  color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}

.drc-learn__topics a[aria-current="page"] {
  background: var(--forest);
  color: var(--milk, #fff);
  box-shadow: none;
}

/* ---- Section heads ---- */
.drc-learn__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: var(--s8, 64px) 0 var(--s5, 24px);
}

.drc-learn__section-head h2 {
  margin: 0;
  font-size: 22px;
  color: var(--forest);
}

.drc-learn__count {
  margin: 0 0 var(--s5, 24px);
  font-size: 13.5px;
  color: var(--muted);
}

.drc-learn__empty {
  margin: 0;
  font: 400 15px / 1.55 var(--font-ui);
  color: var(--muted);
}

/* ---- Cards ---- */
.drc-ecard {
  display: flex;
  flex-direction: column;
  color: var(--ink, var(--espresso));
  height: 100%;
}

.drc-ecard__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card, 14px);
  background:
    radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--cream) 70%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--forest) 8%, var(--milk)), var(--tile, var(--milk)));
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.drc-ecard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drc-ecard__ph {
  width: 56%;
  height: 56%;
  display: grid;
  place-items: center;
  color: var(--cocoa, #624536);
  opacity: 0.45;
}

.drc-ecard__ph svg {
  width: 100%;
  height: 100%;
}

.drc-ecard__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font: 600 11px / 1.4 var(--font-ui);
  background: color-mix(in srgb, var(--milk) 92%, transparent);
  color: var(--cocoa, #624536);
  box-shadow: inset 0 0 0 1px var(--line-strong, var(--stone));
  backdrop-filter: blur(6px);
}

.drc-ecard__cat {
  font: 600 12px / 1 var(--font-ui);
  color: var(--rust-deep, var(--forest));
  margin: 14px 0 8px;
  letter-spacing: 0.02em;
}

.drc-ecard__title {
  margin: 0 0 8px;
  font: 600 18px / 1.32 var(--font-ui);
  letter-spacing: -0.01em;
}

/* Lead typography only when the featured grid has a true hero (3 cards). */
.drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) .drc-ecard--lead .drc-ecard__title {
  font-size: 24px;
  font-family: var(--font-display);
  color: var(--forest);
  line-height: 1.2;
}

.drc-ecard__title a {
  color: var(--ink, var(--espresso));
  text-decoration: none;
}

.drc-ecard__title a:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drc-ecard__excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) .drc-ecard--lead .drc-ecard__excerpt {
  font-size: 15px;
}

.drc-ecard__meta {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

/* ---- Featured grid ----
   2 cards → equal twins (aligned tops + bottoms).
   3 cards → mockup hero: wide lead spanning two rows, two stacked beside it. */
.drc-learn__feat-grid {
  display: grid;
  gap: var(--s6, 32px);
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) .drc-ecard--lead {
  grid-row: 1 / 3;
}

@media (max-width: 900px) {
  .drc-learn__feat-grid,
  .drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) {
    grid-template-columns: 1fr 1fr;
  }

  .drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) .drc-ecard--lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .drc-learn__feat-grid,
  .drc-learn__feat-grid:has(.drc-ecard:nth-child(3)) {
    grid-template-columns: 1fr;
  }
}

/* ---- Latest grid ---- */
.drc-learn__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s7, 48px) var(--s6, 32px);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 980px) {
  .drc-learn__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .drc-learn__grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Pagination ---- */
.drc-learn .navigation.pagination,
.drc-learn__pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: var(--s7, 48px) 0 var(--s2, 8px);
  margin: 0;
}

.drc-learn .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.drc-learn .page-numbers {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: var(--r-btn, 8px);
  color: var(--ink, var(--espresso));
  font: 600 14px / 1 var(--font-ui);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong, var(--stone));
}

.drc-learn .page-numbers.current,
.drc-learn .page-numbers[aria-current="page"] {
  background: var(--forest);
  color: var(--milk, #fff);
  box-shadow: none;
}

.drc-learn .page-numbers:hover:not(.current):not([aria-current="page"]) {
  box-shadow: inset 0 0 0 1px var(--forest);
}

/* ---- Related ---- */
.drc-learn__related {
  background: var(--warm, var(--cream));
  padding: var(--s7, 48px) 0;
  margin-top: var(--s7, 48px);
}

.drc-learn__related h2 {
  margin: 0 0 var(--s4, 16px);
  font-size: 20px;
  color: var(--forest);
}

.drc-learn__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drc-learn__related a {
  background: var(--milk, #fff);
  color: var(--ink, var(--espresso));
  font: 600 13.5px / 1 var(--font-ui);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong, var(--stone));
  transition: color 0.15s, box-shadow 0.15s;
}

.drc-learn__related a:hover {
  color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}
