/* ==========================================================================
   RESOURCE LIBRARY STYLES — The Unemployment Advocate
   --------------------------------------------------------------------------
   Load this AFTER styles.css on resource pages:
     <link rel="stylesheet" href="styles.css">
     <link rel="stylesheet" href="resource-library.css">

   This file only styles NEW components (cards, article layout, callouts,
   byline, TOC, CTA band). Typography (font families, base h1–h6, body)
   is intentionally NOT set here so it inherits from styles.css.

   The color variables below were sampled from the live site's screenshots.
   If styles.css already defines brand variables, swap these values for
   your existing tokens so there is one source of truth.
   ========================================================================== */

:root {
  --res-navy: #1c2b4a;
  --res-navy-deep: #16233c;
  --res-gold: #c08a3e;
  --res-gold-dark: #a87732;
  --res-cream: #f7f3ec;
  --res-paper: #fdfbf7;
  --res-ink: #1c2b4a;
  --res-body: #4b586e;
  --res-muted: #74809a;
  --res-line: #e7e1d5;
  --res-amber-bg: #faf1e2;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--res-muted);
  padding: 1.25rem 0 0;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.35rem;
  color: var(--res-line);
}
.breadcrumbs a {
  color: var(--res-muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--res-gold-dark); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--res-ink); }

/* --------------------------------------------------------------------------
   Library hero
   -------------------------------------------------------------------------- */
.res-hero {
  background: linear-gradient(115deg, #f6efe4 0%, #f9f5ee 55%, #eef0f4 100%);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.res-hero h1 {
  max-width: 18ch;
  margin: 0 auto 1rem;
}
.res-hero p {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--res-body);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Featured ("Start here") guide
   -------------------------------------------------------------------------- */
.res-featured {
  display: block;
  background: #fff;
  border: 1px solid var(--res-line);
  border-left: 5px solid var(--res-gold);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  max-width: 860px;
  margin: -2.25rem auto 0;      /* overlaps hero edge */
  position: relative;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(28, 43, 74, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.res-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(28, 43, 74, 0.12);
}
.res-featured .res-eyebrow { margin-bottom: 0.5rem; }
.res-featured h2 {
  margin: 0 0 0.5rem;
  color: var(--res-ink);
}
.res-featured p { margin: 0; color: var(--res-body); }
.res-featured .res-readmore {
  display: inline-block;
  margin-top: 1rem;
  color: var(--res-gold-dark);
  font-weight: 600;
}

.res-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--res-gold-dark);
}

/* --------------------------------------------------------------------------
   Topic clusters + cards
   -------------------------------------------------------------------------- */
.res-cluster { padding: 3rem 0 0.5rem; }
.res-cluster:last-of-type { padding-bottom: 3rem; }
.res-cluster-head { max-width: 760px; margin-bottom: 1.5rem; }
.res-cluster-head h2 { margin: 0 0 0.4rem; }
.res-cluster-head p { margin: 0; color: var(--res-body); }

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

.res-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--res-line);
  border-top: 4px solid var(--res-gold);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.4rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.res-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(28, 43, 74, 0.1);
}
.res-card h3 { margin: 0; color: var(--res-ink); font-size: 1.1rem; }
.res-card p { margin: 0; color: var(--res-body); font-size: 0.95rem; }
.res-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--res-muted);
}

/* Unpublished placeholder cards — swap <div> for <a> when the article ships */
.res-card.is-coming {
  background: var(--res-paper);
  border-style: dashed;
  border-top-style: solid;
  border-top-color: var(--res-line);
  opacity: 0.85;
}
.res-card.is-coming .res-card-tag { color: var(--res-gold-dark); }

/* --------------------------------------------------------------------------
   Article layout
   -------------------------------------------------------------------------- */
.article-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}
.article-head { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--res-line); margin-bottom: 2rem; }
.article-head h1 { margin: 0.5rem 0 1.25rem; }

.byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--res-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  overflow: hidden;
}
.byline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-name { color: var(--res-ink); font-weight: 600; }
.byline-name a { color: inherit; }
.byline-meta { color: var(--res-muted); font-size: 0.85rem; }

.article-body { color: var(--res-body); }
.article-body h2 { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.article-body h3 { margin-top: 1.75rem; }
.article-body a { color: var(--res-gold-dark); }
.article-body a:hover { color: var(--res-navy); }
.article-body ul, .article-body ol { padding-left: 1.35rem; }
.article-body li { margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */
.toc {
  background: var(--res-cream);
  border: 1px solid var(--res-line);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc h2 { margin: 0 0 0.75rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: 0.4rem; break-inside: avoid; }
.toc a { color: var(--res-navy); text-decoration: none; }
.toc a:hover { color: var(--res-gold-dark); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Callouts — the deadline callout is the signature element of the library
   -------------------------------------------------------------------------- */
.callout {
  background: var(--res-cream);
  border-left: 4px solid var(--res-gold);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.callout--deadline {
  background: var(--res-amber-bg);
  border-left: 6px solid var(--res-navy);
}
.callout--deadline .callout-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--res-navy);
  margin-bottom: 0.5rem;
}
.callout--deadline strong { color: var(--res-navy); }

.key-takeaways {
  background: #fff;
  border: 1px solid var(--res-line);
  border-top: 4px solid var(--res-gold);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.key-takeaways h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.key-takeaways ul { margin: 0; }

/* --------------------------------------------------------------------------
   In-article CTA band (mirrors the site's navy sections)
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--res-navy);
  color: #fff;
  border-radius: 12px;
  padding: 2rem 2.25rem;
  margin: 2.75rem 0;
}
.cta-band h2, .cta-band h3 { color: #fff; margin: 0 0 0.6rem; }
.cta-band p { color: #d8dde8; margin: 0 0 1.25rem; }
.cta-band .btn { margin-right: 0.75rem; margin-bottom: 0.5rem; }

/* Fallback button styles — DELETE if styles.css already defines .btn */
.cta-band .btn,
.res-cta .btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.btn-gold { background: var(--res-gold); color: #fff; }
.btn-gold:hover { background: var(--res-gold-dark); }
.btn-ghost { border: 1.5px solid #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Hub-page CTA band (full-width section variant) */
.res-cta {
  background: var(--res-navy);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.25rem;
  margin-top: 3rem;
}
.res-cta h2 { color: #fff; margin: 0 0 0.6rem; }
.res-cta p { color: #d8dde8; max-width: 54ch; margin: 0 auto 1.5rem; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq h3 { color: var(--res-ink); }

/* --------------------------------------------------------------------------
   Author box
   -------------------------------------------------------------------------- */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--res-cream);
  border: 1px solid var(--res-line);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 3rem 0 0;
}
.author-box .byline-avatar { width: 64px; height: 64px; font-size: 1.1rem; }
.author-box h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.author-box p { margin: 0 0 0.5rem; font-size: 0.95rem; }
.author-box a { color: var(--res-gold-dark); font-weight: 600; }

/* --------------------------------------------------------------------------
   Related articles
   -------------------------------------------------------------------------- */
.related { margin-top: 3rem; }
.related h2 { font-size: 1.15rem; margin-bottom: 1rem; }

/* --------------------------------------------------------------------------
   Article disclaimer
   -------------------------------------------------------------------------- */
.article-disclaimer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--res-line);
  font-size: 0.85rem;
  color: var(--res-muted);
}

/* --------------------------------------------------------------------------
   Accessibility + responsive
   -------------------------------------------------------------------------- */
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--res-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .res-featured, a.res-card { transition: none; }
  .res-featured:hover, a.res-card:hover { transform: none; }
}

@media (max-width: 720px) {
  .res-hero { padding: 3rem 0 2.5rem; }
  .res-featured { margin: -1.5rem 1rem 0; padding: 1.5rem; }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
  .cta-band { padding: 1.5rem; }
}
