/* ============================================================
 * Blog (Connecticut Cellar Doors)
 * Loaded on:
 *   - Single posts in category "blog"
 *   - The blog archive (/blog/, home.php)
 *   - Category archive for "blog"
 *
 * Inherits site typography (DM Sans) via salient-child/style.css.
 * Brand colors mirror the live site:
 *   --ccd-red:      #C91C1F  (Salient nectar accent)
 *   --ccd-red-dark: #A91518  (hover)
 *   --ccd-red-pale: #FFE4E4  (soft surface)
 *   --ccd-navy:     #324B72  (heading + body emphasis)
 *   --ccd-ink:      #1F2937  (body copy)
 *   --ccd-gray:     #F4F5F7  (neutral surface)
 *   --ccd-border:   #E2E5EC
 * ============================================================ */

.ccd-blog,
.ccd-blog-archive {
  --ccd-red:      #C91C1F;
  --ccd-red-dark: #A91518;
  --ccd-red-pale: #FFE4E4;
  --ccd-navy:     #324B72;
  --ccd-ink:      #1F2937;
  --ccd-muted:    #6B7280;
  --ccd-gray:     #F4F5F7;
  --ccd-border:   #E2E5EC;
  color: var(--ccd-ink);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.ccd-blog,
.ccd-blog-archive { font-family: "DM Sans", Arial, sans-serif; }

/* ---------- Headings ---------- */
.ccd-blog h1,
.ccd-blog h2,
.ccd-blog h3,
.ccd-blog-archive h1,
.ccd-blog-archive h2,
.ccd-blog-archive h3 { color: var(--ccd-navy); font-weight: 700; letter-spacing: -0.01em; }
.ccd-blog h1 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; margin: 0 0 0.5em; }
.ccd-blog h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; margin: 1em 0 0.6em; }
.ccd-blog h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.5em 0 0.4em; }
/* Anchor jumps from the TOC land above the fixed Salient header.
 * Header is visible at viewport y=[0,100] (or [32,132] with admin bar). */
.ccd-blog .ccd-article-body h2,
.ccd-blog .ccd-article-body h3 { scroll-margin-top: 120px; }
body.admin-bar .ccd-blog .ccd-article-body h2,
body.admin-bar .ccd-blog .ccd-article-body h3 { scroll-margin-top: 152px; }
.ccd-blog p, .ccd-blog ul, .ccd-blog ol, .ccd-blog dl { margin: 0 0 1em; padding-bottom: 0; }

/* Consistent body-link style: in-flow links inside the article body + callouts
 * read as proper links (red, underlined, darker on hover).
 * Buttons (.ccd-btn), cards (.ccd-card), and the TOC keep their own styling
 * thanks to selector specificity or :not() exclusions below. */
.ccd-blog .ccd-article-body a:not(.ccd-btn):not(.ccd-card),
.ccd-blog .ccd-callout a:not(.ccd-btn):not(.ccd-card) {
  color: var(--ccd-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-thickness 0.15s ease;
}
.ccd-blog .ccd-article-body a:not(.ccd-btn):not(.ccd-card):hover,
.ccd-blog .ccd-article-body a:not(.ccd-btn):not(.ccd-card):focus-visible,
.ccd-blog .ccd-callout a:not(.ccd-btn):not(.ccd-card):hover,
.ccd-blog .ccd-callout a:not(.ccd-btn):not(.ccd-card):focus-visible {
  color: var(--ccd-red-dark);
  text-decoration-thickness: 2px;
}
/* Restore native bullets in post body lists (Salient resets ul/ol to no marker
 * + no padding). Scoped to the article body so it doesn't affect the sidebar,
 * TOC, red-flags, FAQ, or other custom-styled lists. */
.ccd-blog .ccd-article-body ul {
  list-style: disc outside;
  padding-left: 1.5em;
  margin-left: 0.25em;
}
.ccd-blog .ccd-article-body ol {
  list-style: decimal outside;
  padding-left: 1.5em;
  margin-left: 0.25em;
}
.ccd-blog .ccd-article-body ul ul { list-style: circle outside; }
.ccd-blog .ccd-article-body ul ul ul { list-style: square outside; }
.ccd-blog .ccd-article-body li { padding: 0.1em 0; }
.ccd-blog .ccd-article-body li::marker { color: var(--ccd-red); }

/* Lists inside callouts also get bullets (same as body). */
.ccd-blog .ccd-callout ul {
  list-style: disc outside;
  padding-left: 1.4em;
  margin-left: 0.25em;
}
.ccd-blog .ccd-callout ol {
  list-style: decimal outside;
  padding-left: 1.4em;
  margin-left: 0.25em;
}
.ccd-blog .ccd-callout li::marker { color: var(--ccd-red); }

/* Higher specificity than `.ccd-blog p { margin: 0 0 1em }` so the small red
 * kicker keeps its tight 0.4em margin-bottom in every context (hero, guarantees,
 * related, sidebar). */
.ccd-blog .ccd-subheading,
.ccd-blog-archive .ccd-subheading,
p.ccd-subheading,
.ccd-subheading {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ccd-red);
  font-weight: 700;
  margin: 0 0 0.4em;
  padding: 0;
}
/* Heading immediately following a subheading hugs it (no margin-top), so the
 * red kicker→title pair has identical spacing everywhere. */
.ccd-blog .ccd-subheading + h1,
.ccd-blog .ccd-subheading + h2,
.ccd-blog .ccd-subheading + h3,
.ccd-blog-archive .ccd-subheading + h1,
.ccd-blog-archive .ccd-subheading + h2,
.ccd-blog-archive .ccd-subheading + h3 { margin-top: 0; }

/* ----- Fix Salient's `body { overflow: hidden }` so sticky can work on single posts.
 * Salient sets `body { overflow:hidden }` sitewide which kills position:sticky on
 * descendants (body becomes the sticky scroll container but it never actually
 * scrolls). `overflow: clip` retains the clipping behavior without establishing
 * a scrolling context, so html remains the scroll container and sticky engages. */
body.single {
  overflow: clip !important;
}

/* ---------- Two-column article layout (sticky sidebar on desktop) ---------- */
.ccd-blog .ccd-article-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1024px) {
  .ccd-blog .ccd-article-wrap {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    align-items: start; /* required so the sidebar doesn't stretch to row height — sticky needs travel space */
  }
}
.ccd-blog .ccd-article-main { min-width: 0; }

.ccd-blog .ccd-article-sidebar { width: 100%; }
@media (min-width: 1024px) {
  .ccd-blog .ccd-article-sidebar {
    position: -webkit-sticky;
    position: sticky;
    /* Salient's primary nav stays fixed at viewport y=[0,100] after scroll.
     * Use a 24px buffer so the card's top border + box-shadow clear the header. */
    top: 124px;
    align-self: start;
  }
  /* When the WP admin bar is shown (logged-in users), Salient's fixed header
   * is shifted down by the 32px admin bar height, so the sticky offset must
   * grow to match. */
  body.admin-bar .ccd-blog .ccd-article-sidebar { top: 156px; }
}

.ccd-blog .ccd-sidebar-card {
  background: #fff;
  border: 1px solid var(--ccd-border);
  border-top: 4px solid var(--ccd-red);
  border-radius: 6px;
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: 0 6px 18px rgba(50, 75, 114, 0.08);
}
.ccd-blog .ccd-sidebar-heading {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 0.4em;
  color: var(--ccd-navy);
}
.ccd-blog .ccd-sidebar-sub {
  font-size: 0.92rem;
  color: var(--ccd-muted);
  margin: 0 0 1.1em;
}
.ccd-blog .ccd-btn-block {
  display: block;
  text-align: center;
  margin: 0 0 0.55em;
}
.ccd-blog .ccd-sidebar-trust,
.ccd-blog .ccd-sidebar-trust li {
  list-style: none !important; /* override Salient's .container-wrap ul li defaults */
}
.ccd-blog .ccd-sidebar-trust {
  padding: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--ccd-border);
  padding-top: 0.85rem;
}
.ccd-blog .ccd-sidebar-trust li {
  position: relative;
  padding: 0.18em 0 0.18em 1.5em;
  font-size: 0.86rem;
  color: var(--ccd-ink);
  line-height: 1.4;
  background-image: none !important; /* prevent Salient from injecting a list-marker background */
}
/* SVG checkmark — self-contained so it never depends on system font availability */
.ccd-blog .ccd-sidebar-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.95em;
  height: 0.95em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23C91C1F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.5 3.5L13 4.5'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* Hide the sidebar entirely on narrow viewports */
@media (max-width: 699px) {
  .ccd-blog .ccd-article-sidebar { display: none; }
}

/* Constrain reading width inside the main column (not the wrap) */
.ccd-blog .ccd-article-main .ccd-article-hero,
.ccd-blog .ccd-article-main .ccd-article-body {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Archive page: all sections share the same container width as post pages. */
.ccd-blog-archive {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
}
/* After-content sections (guarantees, CTA) live below the 2-col wrap — span the
 * full Salient container width (matches the .ccd-article-wrap container above). */
.ccd-blog .ccd-after-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
}
.ccd-blog .ccd-guarantees,
.ccd-blog .ccd-cta { max-width: none; margin-left: 0; margin-right: 0; }

/* ---------- Hero (single post) ---------- */
.ccd-article-hero { padding: 3.5rem 0 1.5rem; }
.ccd-article-hero .ccd-meta {
  color: var(--ccd-muted);
  font-size: 0.92rem;
  margin: 0.3em 0 1em;
}
.ccd-article-hero .ccd-meta a { color: var(--ccd-navy); text-decoration: none; border-bottom: 1px dotted var(--ccd-navy); }
.ccd-article-hero .ccd-meta a:hover { color: var(--ccd-red); border-bottom-color: var(--ccd-red); }

/* ---------- Author bio card ---------- */
.ccd-author-bio {
  background: var(--ccd-gray);
  border: 1px solid var(--ccd-border);
  border-left: 4px solid var(--ccd-navy);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2.25rem;
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.ccd-author-bio .ccd-author-photo {
  flex: 0 0 64px; width: 64px; height: 64px;
  background: var(--ccd-navy);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.ccd-author-bio .ccd-author-body { flex: 1; }
.ccd-author-bio .ccd-author-name { font-weight: 700; color: var(--ccd-navy); margin-bottom: 0.1em; }
.ccd-author-bio .ccd-author-role { color: var(--ccd-red); font-weight: 700; }
.ccd-author-bio .ccd-author-title { color: var(--ccd-muted); font-size: 0.92rem; margin-bottom: 0.5em; }
.ccd-author-bio p { margin: 0; font-size: 0.97rem; }

/* ---------- Generic callouts ---------- */
.ccd-callout {
  padding: 1rem 1.35rem;
  margin: 1.25rem 0;
  border-radius: 4px;
  background: var(--ccd-gray);
  border-left: 4px solid var(--ccd-navy);
}
.ccd-callout-red {
  background: var(--ccd-red-pale);
  border-left-color: var(--ccd-red);
}
.ccd-callout-navy { background: var(--ccd-gray); border-left-color: var(--ccd-navy); }
.ccd-callout p:last-child { margin-bottom: 0; }
.ccd-callout strong { color: var(--ccd-red); }
.ccd-callout-navy strong { color: var(--ccd-navy); }

/* ---------- Review pull-quote ---------- */
.ccd-review {
  background: #fff;
  border: 1px solid var(--ccd-border);
  border-left: 4px solid var(--ccd-red);
  border-radius: 4px;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.ccd-review-quote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ccd-ink);
  line-height: 1.6;
  /* Suppress Salient's default blockquote treatment (left bar, big quote glyph) */
  quotes: none;
}
.ccd-review-quote::before,
.ccd-review-quote::after { content: none; display: none; }
.ccd-review-quote > p { margin: 0; padding: 0; }
.ccd-review-attr {
  display: block;
  margin-top: 0.55em;
  font-style: normal;
  font-weight: 700;
  color: var(--ccd-navy);
  font-size: 0.93rem;
}
.ccd-review-photo-note {
  margin-top: 0.4em;
  color: var(--ccd-muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* ---------- Red Flags — matches .ccd-callout-red visual treatment ---------- */
.ccd-red-flags {
  background: var(--ccd-red-pale);
  border-left: 4px solid var(--ccd-red);
  border-radius: 4px;
  padding: 1rem 1.35rem;
  margin: 1.5rem 0;
  color: var(--ccd-ink);
}
.ccd-blog .ccd-red-flags-title,
.ccd-red-flags .ccd-red-flags-title {
  color: var(--ccd-red);
  margin: 0 0 0.5em;
  font-size: 1.05rem;
  font-weight: 700;
}
.ccd-red-flags ul {
  list-style: disc outside;
  padding-left: 1.4em;
  margin: 0;
}
.ccd-red-flags li {
  padding: 0.18em 0;
}
.ccd-red-flags li::marker { color: var(--ccd-red); }

/* ---------- Guarantees (template section) ---------- */
.ccd-guarantees {
  padding: 2.5rem 1.5rem;
  margin: 2.5rem auto;
  background: var(--ccd-gray);
  border-radius: 8px;
  text-align: center;
}
.ccd-guarantees-heading { margin-top: 0; }
.ccd-guarantees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0 1rem;
}
.ccd-guarantee {
  background: #fff;
  border: 1px solid var(--ccd-border);
  border-radius: 6px;
  padding: 1.5rem 1.25rem;
  text-align: left;
}
.ccd-guarantee-mark {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85em;
}
.ccd-guarantee-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ccd-guarantee h3 { margin: 0 0 0.4em; font-size: 1.05rem; }
.ccd-guarantee p { margin: 0; font-size: 0.95rem; color: var(--ccd-ink); }
.ccd-guarantees-link { margin-top: 1.25rem; }
.ccd-guarantees-link a { color: var(--ccd-red); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ccd-red); }
.ccd-guarantees-link a:hover { color: var(--ccd-red-dark); border-bottom-color: var(--ccd-red-dark); }

@media (max-width: 720px) {
  .ccd-guarantees-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA (template section + shortcode) ---------- */
.ccd-cta {
  background: linear-gradient(135deg, var(--ccd-navy), #243456);
  color: #fff;
  border-radius: 8px;
  padding: 2.25rem 1.75rem;
  margin: 2.5rem auto;
  text-align: center;
}
/* Higher specificity than `.ccd-blog h2 { color: var(--ccd-navy) }` and
 * `.ccd-blog p { margin: 0 0 1em }` so the CTA section's heading stays white
 * and its subtext stays centered on its 620px box. */
.ccd-blog .ccd-cta .ccd-cta-heading,
.ccd-cta .ccd-cta-heading { color: #fff; margin: 0 0 0.5em; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.ccd-blog .ccd-cta .ccd-cta-sub,
.ccd-cta .ccd-cta-sub {
  color: rgba(255,255,255,0.88);
  margin: 0 auto 1.2em;
  max-width: 620px;
  text-align: center;
}
.ccd-cta-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Button styles modeled on Salient .nectar-button.regular */
.ccd-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: 4px;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.ccd-btn-primary {
  background: var(--ccd-red);
  color: #fff !important;
}
.ccd-btn-primary:hover { background: var(--ccd-red-dark); color: #fff !important; }
.ccd-btn-secondary {
  background: var(--ccd-red-pale);
  color: var(--ccd-red) !important;
}
.ccd-btn-secondary:hover { background: #ffd0d0; color: var(--ccd-red-dark) !important; }

/* ---------- Comparison table ---------- */
.ccd-blog table.ccd-table,
.ccd-blog .ccd-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  border: 1px solid var(--ccd-border);
  border-radius: 4px;
  overflow: hidden;
}
.ccd-blog .ccd-article-body table thead th,
.ccd-blog table.ccd-table thead th {
  background: var(--ccd-navy);
  color: #fff;
  text-align: left;
  padding: 0.75rem 0.9rem;
  font-weight: 700;
}
.ccd-blog .ccd-article-body table tbody td,
.ccd-blog .ccd-article-body table tbody th,
.ccd-blog table.ccd-table tbody td,
.ccd-blog table.ccd-table tbody th {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--ccd-border);
  vertical-align: top;
  text-align: left;
}
.ccd-blog .ccd-article-body table tbody tr:nth-child(even) td,
.ccd-blog .ccd-article-body table tbody tr:nth-child(even) th,
.ccd-blog table.ccd-table tbody tr:nth-child(even) td,
.ccd-blog table.ccd-table tbody tr:nth-child(even) th {
  background: var(--ccd-gray);
}
.ccd-blog .ccd-article-body table tbody th,
.ccd-blog table.ccd-table tbody th {
  font-weight: 700;
  color: var(--ccd-navy);
  width: 28%;
}

/* ---------- Inline FAQ list ---------- */
.ccd-blog .ccd-faq dt,
.ccd-blog dl dt {
  font-weight: 700;
  color: var(--ccd-navy);
  margin-top: 1.25em;
}
.ccd-blog .ccd-faq dd,
.ccd-blog dl dd {
  margin: 0.25em 0 0.8em;
  padding-left: 0;
}

/* ---------- Table of Contents (auto-injected) ---------- */
.ccd-blog .ccd-toc {
  background: var(--ccd-gray);
  border: 1px solid var(--ccd-border);
  border-left: 4px solid var(--ccd-red);
  border-radius: 4px;
  padding: 1rem 1.4rem 1.1rem;
  margin: 0 0 2rem;
}
.ccd-blog .ccd-toc-title {
  margin: 0 0 0.45em;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ccd-red);
}
.ccd-blog .ccd-toc-list {
  margin: 0;
  padding-left: 1.4em;
  list-style: decimal;
}
.ccd-blog .ccd-toc-list li {
  padding: 0.18em 0;
  font-size: 0.95rem;
}
/* TOC keeps its own navy/dotted style — higher specificity than the body-link
 * rule above so the kicker→red treatment doesn't bleed into the TOC. */
.ccd-blog .ccd-article-body .ccd-toc a:not(.ccd-btn):not(.ccd-card) {
  color: var(--ccd-navy);
  text-decoration: none;
  border-bottom: 1px dotted var(--ccd-navy);
}
.ccd-blog .ccd-article-body .ccd-toc a:not(.ccd-btn):not(.ccd-card):hover,
.ccd-blog .ccd-article-body .ccd-toc a:not(.ccd-btn):not(.ccd-card):focus-visible {
  color: var(--ccd-red);
  border-bottom-color: var(--ccd-red);
}
.ccd-blog .ccd-toc-sublist {
  list-style: disc;
  margin: 0.15em 0 0.4em 0.4em;
  padding-left: 1.1em;
}
.ccd-blog .ccd-toc-sublist li {
  font-size: 0.9rem;
  padding: 0.1em 0;
}

/* ---------- PDF download (mid-article CTA) ---------- */
.ccd-pdf-download {
  background: var(--ccd-gray);
  border: 1px solid var(--ccd-border);
  border-left: 4px solid var(--ccd-red);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.ccd-pdf-download .ccd-pdf-icon {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  background: var(--ccd-red-pale);
  color: var(--ccd-red);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.ccd-pdf-download .ccd-pdf-text { flex: 1; }
.ccd-pdf-download h4 { margin: 0 0 0.15em; color: var(--ccd-navy); font-size: 1.05rem; }
.ccd-pdf-download p { margin: 0; font-size: 0.92rem; color: var(--ccd-ink); }
.ccd-pdf-download .ccd-btn { white-space: nowrap; }
@media (max-width: 720px) {
  .ccd-pdf-download { flex-direction: column; align-items: flex-start; }
}

/* ---------- Video placeholder ---------- */
.ccd-video-placeholder {
  aspect-ratio: 16/9;
  background: var(--ccd-gray);
  border: 1px dashed var(--ccd-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.25rem 0;
  color: var(--ccd-muted);
}
.ccd-video-icon { font-size: 2.4rem; color: var(--ccd-red); }
.ccd-video-label { font-size: 0.9rem; }

/* ============================================================
 * Archive (/blog/) – matches site card patterns
 * ============================================================ */

.ccd-blog-archive .ccd-archive-hero {
  background: var(--ccd-gray);
  padding: 3rem 1.5rem 2.5rem;
  border-radius: 8px;
  margin: 0 0 2.5rem;
  text-align: center;
}
.ccd-blog-archive .ccd-archive-hero h1 {
  color: var(--ccd-navy);
  margin: 0 0 0.4em;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
}
.ccd-blog-archive .ccd-archive-hero .ccd-archive-lede {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.07rem;
  color: var(--ccd-ink);
}

.ccd-cards-wrap { padding: 0 0 2rem; }
.ccd-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 720px) {
  .ccd-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .ccd-cards { grid-template-columns: repeat(3, 1fr); }
}

.ccd-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ccd-border);
  border-radius: 8px;
  padding: 1.6rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ccd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(50, 75, 114, 0.10);
  border-color: var(--ccd-red);
}
.ccd-card .ccd-card-tag {
  display: inline-block;
  background: var(--ccd-red-pale);
  color: var(--ccd-red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.85em;
  align-self: flex-start;
}
.ccd-card h2 {
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ccd-navy);
  margin: 0 0 0.5em;
}
.ccd-card p { color: var(--ccd-ink); font-size: 0.95rem; margin: 0 0 1em; }
.ccd-card .ccd-card-cta {
  margin-top: auto;
  font-weight: 700;
  color: var(--ccd-red);
}
.ccd-card .ccd-card-cta::after { content: " →"; }

.ccd-blog-archive .ccd-archive-extra {
  margin: 3.5rem auto 1.5rem;
  /* width + padding inherited from .ccd-blog-archive wrapper */
}
.ccd-blog-archive .ccd-archive-extra h2 { margin-top: 2em; }
.ccd-blog-archive .ccd-archive-extra .ccd-pdf-box {
  background: var(--ccd-gray);
  border: 1px dashed var(--ccd-navy);
  padding: 1.4rem 1.6rem;
  border-radius: 6px;
}

/* ---------- Related posts (single-post footer) ---------- */
.ccd-related {
  margin: 3rem auto 1.5rem;
  max-width: 1180px;   /* match .ccd-article-wrap so it spans both columns */
  padding: 0 1rem;
}
.ccd-related h2 { text-align: center; margin-bottom: 1.5rem; }
.ccd-related .ccd-cards { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .ccd-related .ccd-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 700px) {
  .ccd-author-bio { flex-direction: column; gap: 0.85rem; }
  .ccd-blog .ccd-article-body table { font-size: 0.88rem; }
  .ccd-blog .ccd-article-body table th,
  .ccd-blog .ccd-article-body table td { padding: 0.5rem 0.55rem; }
  .ccd-cta { padding: 1.75rem 1.1rem; }
}

/* ============================================================
 * Lead-capture popup (blog single + archive)
 * ============================================================ */
.ccd-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: "DM Sans", Arial, sans-serif;
}
.ccd-popup.is-open { display: flex; }

.ccd-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.ccd-popup-dialog {
  position: relative;
  background: #fff;
  width: min(560px, 96vw);
  height: min(860px, 92vh);
  max-height: 92vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  animation: ccd-popup-in 0.22s ease-out;
}
@keyframes ccd-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.ccd-popup-close {
  position: absolute;
  top: 6px; right: 10px;
  width: 36px; height: 36px;
  background: transparent;
  border: 0;
  color: #1F2937;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  border-radius: 4px;
}
.ccd-popup-close:hover { color: #C91C1F; background: #F4F5F7; }

.ccd-popup-header {
  padding: 1.5rem 1.75rem 0.5rem;
  text-align: center;
}
.ccd-popup-header .ccd-subheading {
  color: #C91C1F;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 0.35em;
}
.ccd-popup-header h2 {
  color: #324B72;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}
.ccd-popup-header .ccd-popup-sub {
  margin: 0 0 0.4em;
  color: #1F2937;
  font-size: 0.95rem;
  line-height: 1.45;
}
.ccd-popup-header .ccd-popup-sub strong { color: #C91C1F; }

.ccd-popup-form {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
}
.ccd-popup-form iframe {
  display: block;
  width: 100%;
  max-height: 687px;
}

/* Lock the page scroll while the popup is open */
html.ccd-popup-open,
html.ccd-popup-open body {
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .ccd-popup-header { padding: 1.25rem 1.25rem 0.25rem; }
  .ccd-popup-header h2 { font-size: 1.2rem; }
}
