/* =========================================================
   "Resources" hub + per-type archives + Blogs index.
   Shared by template-resources.php, archive.php and home.php.
   Original design for this theme (no supplied draft) — built
   dark-mode-first: every rule below states its light-mode value
   and, directly under it, its html[data-theme="dark"] counterpart.
   ========================================================= */

/* ---------- 1. Hero / intro ---------- */
.rlhero { padding: 96px 0 48px; text-align: center; background: var(--warm); }
.rlhero .eyebrow { justify-content: center; }
.rlhero h1 { margin-top: 14px; }
.rlhero__lede { max-width: 640px; margin: 16px auto 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); }

/* ---------- 2. Filter bar (no JS: each pill is a real link) ---------- */
.rlnav { position: sticky; top: 84px; z-index: 10; background: var(--white); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .rlnav { background: #0B0F1E; border-bottom-color: rgba(255,255,255,.1); }
.rlnav ul { display: flex; gap: 6px; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; width: min(100% - 48px, var(--container)); margin-inline: auto; padding: 14px 0; }
.rlnav ul::-webkit-scrollbar { display: none; }
.rlnav li { flex: none; }
.rlnav a { display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.rlnav a:hover { background: var(--warm); color: var(--ink); }
.rlnav a.is-active { background: var(--violet); color: var(--white); }
html[data-theme="dark"] .rlnav a:hover { background: rgba(255,255,255,.06); color: var(--ink); }
html[data-theme="dark"] .rlnav a.is-active { color: #fff; }

@media (max-width: 1024px) { .rlnav { top: 70px; } }

/* ---------- 3. Grid + cards ---------- */
.rlgrid-wrap { padding: 56px 0 96px; }
.rlgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.rlgrid__empty { text-align: center; padding: 64px 0; font-size: 17px; color: var(--muted); }

.rlcard { display: flex; flex-direction: column; height: 100%; border-radius: 24px; overflow: hidden; background: var(--white); border: 1px solid var(--border); box-shadow: 0 24px 48px -36px rgba(16,24,40,.35); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.rlcard:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -32px rgba(16,24,40,.4); border-color: rgba(112,52,196,.3); }
html[data-theme="dark"] .rlcard { background: #1D2939; border-color: rgba(255,255,255,.1); box-shadow: 0 24px 48px -36px rgba(0,0,0,.5); }
html[data-theme="dark"] .rlcard:hover { box-shadow: 0 34px 60px -32px rgba(0,0,0,.6); border-color: rgba(112,52,196,.4); }

.rlcard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--warm); }
.rlcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rlcard:hover .rlcard__media img { transform: scale(1.05); }
.rlcard__ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--violet-tint), var(--warm)); }
html[data-theme="dark"] .rlcard__media { background: #141A2A; }
html[data-theme="dark"] .rlcard__ph { background: linear-gradient(135deg, rgba(112,52,196,.22), #161C2C); }

.rlcard__badge { position: absolute; left: 16px; top: 16px; padding: 5px 12px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }

.rlcard__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 26px; flex: 1; }
.rlcard__date { font-size: 13px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.rlcard__t { font-family: var(--font-heading); font-size: 19px; line-height: 1.3; font-weight: 500; color: var(--ink); }
.rlcard__x { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

@media (max-width: 1024px) { .rlgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .rlgrid { grid-template-columns: minmax(0, 1fr); } .rlhero { padding: 64px 0 36px; } }

/* ---------- 4. Pagination ----------
   Covers both this theme's own paginate_links() ( .page-numbers inside a
   custom <nav class="rlpage">, template-resources.php ) and WordPress's
   default the_posts_pagination() markup ( <nav class="navigation
   pagination"><div class="nav-links">, archive.php / home.php ), since
   both render plain <a>/<span class="page-numbers"> links. */
.rlpage, .rlpage .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 56px; list-style: none; padding: 0; }
.rlpage .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
a.page-numbers:hover { background: var(--warm); color: var(--ink); }
.rlpage .page-numbers.current { background: var(--violet); color: #fff; }
.rlpage .page-numbers.dots { background: none; }
html[data-theme="dark"] a.page-numbers:hover { background: rgba(255,255,255,.06); color: var(--ink); }
html[data-theme="dark"] .rlpage .page-numbers.current { color: #fff; }

/* ===== Dark mode: safe-token recap =====
   --ink/--ink-2/--muted/--warm/--border/--violet-tint already flip via
   shared/base.css's global html[data-theme="dark"] block — the rules
   above only add the explicit pins this file's own literal #fff / white
   surfaces need (.rlnav, .rlcard, .rlcard__ph), per this theme's
   established dark-mode convention. */
