/* Single Resource Page */

.resource-single-page {
  background: var(--bg);
}

/* ── Reading progress bar (NEW) ──────────────────── */
.resource-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--yellow), var(--purple));
  transition: width 0.08s linear;
}

.resource-single-hero {
  padding: 44px 0 38px;
  background:
    radial-gradient(ellipse 70% 90% at -5% 0%, rgba(252, 210, 6, 0.18), transparent 50%),
    radial-gradient(ellipse 55% 75% at 108% 0%, rgba(117, 32, 146, 0.11), transparent 50%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.resource-single-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
  color: var(--purple);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: gap 0.15s;
}

.resource-single-back:hover {
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.resource-single-title {
  margin-top: 14px;
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.97;
  letter-spacing: -2px;
  color: var(--charcoal);
}

.resource-single-excerpt {
  margin-top: 16px;
  max-width: 780px;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.resource-single-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-single-tags a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(117, 32, 146, 0.08);
  color: var(--purple);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.resource-single-tags a:hover {
  background: var(--purple);
  color: var(--white);
}

.resource-single-image-section {
  padding: 20px 0 0;
}

.resource-single-featured-image {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.resource-single-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.resource-single-content-section {
  padding: 36px 0 70px;
}

.resource-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 34px;
  align-items: start;
}

.resource-single-content,
.resource-single-cta,
.resource-sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.resource-single-content {
  padding: 40px;
}

.resource-single-content h2,
.resource-single-content h3,
.resource-single-content h4 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-family: var(--font-main);
  color: var(--charcoal);
}

.resource-single-content h2:first-child,
.resource-single-content h3:first-child,
.resource-single-content h4:first-child {
  margin-top: 0;
}

.resource-single-content p,
.resource-single-content li {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-muted);
}

.resource-single-content p {
  margin-bottom: 20px;
}

.resource-single-content ul,
.resource-single-content ol {
  padding-left: 24px;
  margin: 18px 0;
}

.resource-single-content a {
  color: var(--purple);
  font-weight: 800;
}

.resource-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.resource-single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--border);
}

.resource-single-content th,
.resource-single-content td {
  padding: 14px 16px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.resource-single-content th {
  background: var(--charcoal);
  color: var(--white);
  font-weight: 900;
}

.resource-single-content td {
  color: var(--text-muted);
}

.resource-single-content tr:nth-child(even) td {
  background: var(--bg);
}

.resource-single-content blockquote {
  margin: 28px 0;
  padding: 24px;
  border-left: 5px solid var(--yellow);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.resource-single-content blockquote p {
  margin-bottom: 0;
  color: var(--charcoal);
  font-weight: 700;
}

.resource-single-cta {
  margin-top: 28px;
  padding: 32px 32px 32px 36px;
  background: var(--charcoal);
  border-left: 5px solid var(--yellow);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.resource-single-cta::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(252, 210, 6, 0.05);
  pointer-events: none;
}

.resource-single-cta h2 {
  font-family: var(--font-main);
  font-size: 30px;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 8px;
}

.resource-single-cta p {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  max-width: 700px;
}

.resource-single-cta .btn-primary {
  flex-shrink: 0;
}

.resource-single-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
}

.resource-sidebar-card {
  padding: 28px;
}

.resource-sidebar-card-dark {
  background: var(--charcoal);
  color: var(--white);
  border-top: 4px solid var(--yellow);
  position: relative;
  overflow: hidden;
}

.resource-sidebar-card-dark::before {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(252, 210, 6, 0.06);
  pointer-events: none;
}

.resource-sidebar-card h2 {
  font-family: var(--font-main);
  font-size: 28px;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.resource-sidebar-card-dark h2 {
  color: var(--white);
}

.resource-sidebar-card p {
  margin-bottom: 22px;
  font-family: var(--font-body);
  color: var(--text-muted);
  line-height: 1.7;
}

.resource-sidebar-card-dark p {
  color: rgba(255, 255, 255, 0.72);
}

.resource-sidebar-links {
  display: grid;
  gap: 10px;
}

.resource-sidebar-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.resource-sidebar-links a::after {
  content: "→";
  color: var(--purple);
  transition: transform 0.15s ease;
}

.resource-sidebar-links a:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
  border-left-color: var(--yellow);
  color: var(--white);
}

.resource-sidebar-links a:hover::after {
  color: var(--yellow);
  transform: translateX(3px);
}

/* ── Table of contents (NEW) ─────────────────────── */
.resource-toc-card {
  padding: 22px 24px;
}

.resource-toc-card h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font-body);
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 14px;
}

.resource-toc-list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.resource-toc-list li { margin: 0; }

.resource-toc-list a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}

.resource-toc-list a.lvl-3 {
  padding-left: 24px;
  font-size: 13px;
  font-weight: 600;
}

.resource-toc-list a:hover,
.resource-toc-list a.is-active {
  color: var(--charcoal);
  border-left-color: var(--yellow);
  background: var(--bg);
}

/* ── "What you'll get" checklist (NEW) ───────────── */
.resource-checklist {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.resource-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.resource-checklist li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--charcoal);
  font-weight: 900;
  font-size: 12px;
}

/* ── WhatsApp button in sidebar (NEW) ────────────── */
.resource-sidebar-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border-radius: 999px;
  background: #25d366;
  color: #07351c;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.resource-sidebar-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.32);
}

.resource-sidebar-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.resource-related-section {
  padding: 0 0 72px;
}

.resource-related-header {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.resource-related-header h2 {
  font-family: var(--font-main);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  color: var(--charcoal);
}

.resource-related-header a {
  color: var(--purple);
  font-family: var(--font-body);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.resource-related-header a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.resource-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.resource-related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: rsg-fade-up 0.45s ease both;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.resource-related-card:nth-child(2) { animation-delay: 0.08s; }
.resource-related-card:nth-child(3) { animation-delay: 0.16s; }

.resource-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@keyframes rsg-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.resource-related-media {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.resource-related-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.resource-related-card:hover .resource-related-media img {
  transform: scale(1.05);
}

.resource-related-placeholder {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(117, 32, 146, 0.16), rgba(252, 210, 6, 0.26));
}

.resource-related-placeholder span {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  color: var(--yellow);
  font-weight: 900;
  font-size: 22px;
}

.resource-related-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.resource-related-body h3 {
  font-family: var(--font-main);
  font-size: 22px;
  line-height: 1.2;
}

.resource-related-body h3 a {
  color: var(--charcoal);
  text-decoration: none;
}

.resource-related-body h3 a:hover {
  color: var(--purple);
}

.resource-related-body p {
  font-family: var(--font-body);
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 15px;
  flex: 1;
}

.resource-related-link {
  margin-top: auto;
  color: var(--purple);
  text-decoration: none;
  font-weight: 800;
}

.resource-related-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .resource-single-layout {
    grid-template-columns: 1fr;
  }

  .resource-single-sidebar {
    position: static;
  }

  .resource-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .resource-single-hero {
    padding: 32px 0 26px;
  }

  .resource-single-content-section {
    padding: 28px 0 56px;
  }

  .resource-single-content,
  .resource-single-cta,
  .resource-sidebar-card {
    padding: 24px;
  }

  .resource-single-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .resource-related-header {
    display: block;
  }

  .resource-related-header h2 {
    margin-bottom: 10px;
  }

  .resource-related-grid {
    grid-template-columns: 1fr;
  }

  .resource-single-content {
    overflow-x: auto;
  }

  .resource-single-content table {
    min-width: 640px;
  }
}