/* ============================================================
   RESOURCES — archive + single resource pages
   Scoped to resource CPT views via functions.php.
   ============================================================ */

.resource-back-link {
  display: inline-flex;
  margin-bottom: 2.25rem;
  color: rgba(248,250,252,0.58);
  font-size: 0.85rem;
  font-weight: 700;
  transition: color var(--ease);
}
.resource-back-link:hover { color: #fff; }

/* Archive */
.resource-archive-hero {
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(3.5rem, 6vw, 5rem);
  background: var(--slate);
  color: #fff;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(16,185,129,0.14) 0%, transparent 56%),
    radial-gradient(rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: auto, 28px 28px;
}

.resource-archive-hero__inner { max-width: 820px; }
.resource-archive-hero .label { color: var(--teal); }

.resource-archive-hero__title {
  color: #fff;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.048em;
  margin-bottom: 1.35rem;
}

.resource-archive-hero__sub {
  max-width: 660px;
  color: rgba(248,250,252,0.72);
  font-size: 1.05rem;
  line-height: 1.8;
}

.resource-archive-section {
  padding-block: clamp(4rem, 7vw, 6rem);
  background: var(--bg);
}

.resource-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.resource-index-card,
.resource-related-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 1.75rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-md), box-shadow var(--ease-md), border-color var(--ease-md);
}

.resource-index-card:hover,
.resource-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16,185,129,0.25);
}

.resource-index-card__type,
.resource-related-card__type {
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(16,185,129,0.1);
  color: #065f46;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.resource-index-card__title,
.resource-related-card__title {
  color: var(--slate);
  font-size: 1.35rem;
  line-height: 1.16;
  margin-bottom: 0.85rem;
}

.resource-index-card__excerpt,
.resource-related-card__excerpt {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

.resource-index-card__cta,
.resource-related-card__cta {
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.9rem;
}

.resource-pagination {
  margin-top: 3rem;
}
.resource-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.resource-pagination a,
.resource-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.resource-pagination .current {
  color: #fff;
  background: var(--slate);
}

.resource-empty-state {
  max-width: 620px;
  margin-inline: auto;
  padding: 3rem;
  text-align: center;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
}
.resource-empty-state h2 { margin-bottom: 1rem; }
.resource-empty-state p { color: var(--text-muted); }

/* Single resource */
.resource-single-hero {
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(3.75rem, 6vw, 5.5rem);
  background: var(--slate);
  color: #fff;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(16,185,129,0.15) 0%, transparent 56%),
    radial-gradient(ellipse at 100% 90%, rgba(56,189,248,0.1) 0%, transparent 50%),
    radial-gradient(rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
}

.resource-single-hero__inner { position: relative; }
.resource-single-hero .label { color: var(--teal); }

.resource-single-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: end;
}

.resource-single-hero__content { max-width: 760px; }

.resource-single-hero__title {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.048em;
  margin-bottom: 1.25rem;
}

.resource-single-hero__sub {
  max-width: 660px;
  color: rgba(248,250,252,0.72);
  font-size: 1.06rem;
  line-height: 1.82;
}

.resource-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

.resource-single-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(248,250,252,0.72);
  font-size: 0.76rem;
  font-weight: 700;
}

.resource-download-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.055);
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

.resource-download-card__eyebrow,
.resource-sidebar-card__label {
  margin-bottom: 0.8rem;
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resource-download-card__title {
  color: #fff;
  font-size: 1.45rem;
  line-height: 1.12;
  margin-bottom: 0.9rem;
}

.resource-download-card__body {
  color: rgba(248,250,252,0.68);
  font-size: 0.94rem;
  line-height: 1.75;
  margin-bottom: 1.35rem;
}

.resource-download-card__btn { width: 100%; justify-content: center; }

.resource-single-body {
  padding-block: clamp(4rem, 7vw, 6rem);
  background: var(--bg);
}

.resource-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.resource-single-content { min-width: 0; }

.resource-featured-image {
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--border);
  background: var(--white);
}
.resource-featured-image img { width: 100%; height: auto; }

.resource-prose {
  max-width: 720px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: 1.03rem;
  line-height: 1.9;
}

.resource-prose > * + * { margin-top: 1.15rem; }
.resource-prose h2 { margin-top: 2.5rem; font-size: 1.65rem; }
.resource-prose h3 { margin-top: 2rem; font-size: 1.25rem; }
.resource-prose p { color: var(--text); }
.resource-prose a { color: var(--teal-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.resource-prose ul,
.resource-prose ol { padding-left: 1.25rem; }
.resource-prose li + li { margin-top: 0.5rem; }
.resource-prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--teal);
  background: rgba(16,185,129,0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--slate);
  font-weight: 600;
}

.resource-single-sidebar {
  position: sticky;
  top: 100px;
}

.resource-sidebar-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 0.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.resource-sidebar-card__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 0.5px solid var(--border);
  font-size: 0.86rem;
}
.resource-sidebar-card__row span { color: var(--text-muted); }
.resource-sidebar-card__row strong { color: var(--slate); text-align: right; }
.resource-sidebar-card__button { width: 100%; justify-content: center; margin-top: 1.25rem; }

.resource-bottom-cta { background: var(--bg); }

.resource-related {
  background: var(--bg-alt);
  border-top: 0.5px solid var(--border);
}

.resource-related__header { margin-bottom: 2rem; }
.resource-related__title { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.resource-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 980px) {
  .resource-archive-grid,
  .resource-single-hero__grid,
  .resource-single-layout,
  .resource-related__grid {
    grid-template-columns: 1fr;
  }
  .resource-single-sidebar { position: static; }
  .resource-download-card { max-width: 460px; }
}

@media (max-width: 640px) {
  .resource-prose { padding: 1.5rem; }
  .resource-single-meta { gap: 0.5rem; }
  .resource-download-card { max-width: none; }
}
