/* ══════════════════════════════════════════════════
   BLOG ARTICLE PAGE — STANDALONE STYLESHEET
   Brand tokens mirror blogs.css / privacy-policy.css.
   Nav = shared custom-nav-v3.css (loaded after this).
   Footer = shared custom-footer-v2.css.
   ══════════════════════════════════════════════════ */

/* ── FONT FACE ────────────────────────────── */
@font-face {
  font-family: 'Century Gothic';
  src: url('../fonts/CenturyGothic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Century Gothic';
  src: url('../fonts/CenturyGothic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── RESET & BASE ──────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --navy: rgba(15, 26, 12, 1);
  --green: rgba(68, 214, 44, 1);
  --green-dark: #38b824;
  --dark-text: rgba(26, 31, 23, 1);
  --muted: rgba(107, 127, 101, 1);
  --border: #E2E8F4;
  --cream: #F9F6EF;
  --card-border: rgba(15, 26, 12, 0.10);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
}

body {
  /*
   * MUST be explicit. hello-elementor's reset.css sets
   * `-webkit-font-smoothing: antialiased` on body, which renders Century Gothic
   * visibly THINNER than VERISafe at the identical family/size/weight.
   * VERISafe never hits this because its template dequeues the theme stylesheets;
   * the blog templates deliberately can't (block content needs wp-block-library),
   * so the reset has to be undone here instead. See CLAUDE.md — this is the #1
   * cause of "same font, looks different".
   */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
  background: var(--bg);
  color: var(--navy);
  overflow-x: hidden;
  font-size: 17px;
  font-weight: 500;
}

/* NAV: fully styled by the shared custom-nav-v3.css (loaded after this
   file, same as VERISafe) — no nav rules here on purpose. */


/*
 * NAV COLOUR REPAIR — required only on these blog pages.
 *
 * The top-level dropdown parents ("Our Services", "About Us", "Help") are <a> with no
 * href. hello-elementor's reset.css carries
 *     a:not([href]):not([tabindex]) { color: inherit }
 * at specificity (0,2,1), which outranks custom-nav-v3.css's `.nav-links > li > a`
 * at (0,1,2) — so those three inherit body colour and render dark on the green bar.
 * Dropdown children have hrefs and stay white, which is what makes it look so odd.
 *
 * WHY THIS LIVES HERE AND NOT IN custom-nav-v3.css:
 * every other page using that nav dequeues the theme stylesheets, so reset.css never
 * reaches them — verified on /individual-background-checks/, which has the identical
 * hrefless markup and a correctly white nav. These blog templates are the only ones
 * that keep theme CSS (block content needs wp-block-library), so they are the only
 * ones that can hit this. Patching the shared file would put ~20 working pages
 * through a redeploy for no benefit.
 *
 * This is a repair of the shared nav's own intended value, not a restyle — see
 * CLAUDE.md "don't re-style the nav in page CSS". Don't change the colour here.
 */
.nav-links > li > a:not([href]),
.nav-links > li > a:not([href]):not([tabindex]) {
  color: white;
}

/* ══════════════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════════════ */
/*
 * Positioned by CSS, NOT by JS.
 *
 * It used to be position:fixed with JS writing `top` from the nav's measured bottom on
 * every scroll. That silently breaks: the nav is position:sticky, and a fixed element
 * cannot track a sticky one. During macOS rubber-band overscroll at the end of the page
 * the document (and the sticky nav with it) is dragged, while the fixed bar stays welded
 * to the viewport — so the bar visibly detaches and floats over the content. Fast scroll
 * and browser zoom produce the same lag for the same reason.
 *
 * Now the bar lives INSIDE <nav> and is absolutely positioned against it, so it is part
 * of the same layout box and cannot drift under any scroll condition. JS only sets the
 * width. `bottom: -4px` hangs it just past the nav's edge onto the white content —
 * flush with the nav but not green-on-green, which is why it can't simply sit at top: 0.
 *
 * Requires the nav to be a positioned ancestor: it is (position: sticky) and its
 * overflow is visible, both verified on staging.
 */
.article-progress {
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 4px;
  width: 0%;
  background: var(--green);
  /* Must stay BELOW the nav dropdown (custom-nav-v3.css: .nav-dropdown = 200,
     sub-dropdown = 210). Now that the bar lives inside <nav> it shares the nav's
     stacking context, so the old z-index: 2000 painted the bar straight across the
     open "Our Services" menu. 1 is enough to sit above the nav background. */
  z-index: 1;
}

/* ══════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════ */
.article-breadcrumb {
  background: #fff;
  padding: 14px 52px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-breadcrumb a:hover { color: var(--navy); }

.crumb-sep { color: var(--card-border); }

.crumb-current {
  color: var(--navy);
  /* Real post titles run long (100+ chars). Truncate at every width — the
     <=576 rule alone left the full title spanning the whole row on desktop. */
  display: inline-block;
  max-width: 52ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* ══════════════════════════════════════════════════
   ARTICLE HERO (green band)
   ══════════════════════════════════════════════════ */
.article-hero {
  background: var(--green);
  padding: 72px 24px 88px;
}

.article-hero-inner {
  max-width: 880px;
  margin: 0 auto;
}

.article-hero h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 28px;
}

.article-hero-intro {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.7;
  color: #fff;
  max-width: 760px;
}

/* ══════════════════════════════════════════════════
   ARTICLE BODY
   ══════════════════════════════════════════════════ */
.article-main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-category,
.article-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-dark);
}

.article-meta-sep { color: var(--muted); }

/* Featured image, when the post has one (skipped entirely when it doesn't) */
.article-featured-image {
  margin: 0 0 32px;
}

.article-featured-image img {
  display: block;
  width: 100%;
  /* Cap the height: real uploads include portrait images, which rendered
     1140px tall on staging and pushed the article below the fold. */
  height: auto;
  max-height: 460px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* Default image (Verity logo) when the post has no featured image: whole logo on a
   light panel, not a cropped photo. */
.article-featured-image.is-default img {
  height: 300px;
  object-fit: contain;
  padding: 48px;
  box-sizing: border-box;
  background: #F9F6EF;
}

.article-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 48px 56px;
  box-shadow: var(--shadow);
}

/* ══════════════════════════════════════════════════
   CONTENT ZONE — marketing's area (the_content)
   ──────────────────────────────────────────────────
   Every rule below is wrapped in :where(), which has ZERO specificity. So:
     • a post nobody styles renders in full VERISafe type automatically
     • the moment an editor sets anything, theirs wins — no !important needed
   NEVER raise the specificity of these rules and never add !important; that
   would take the override away from marketing, which is the whole point.
   Frame rules (.article-hero, .article-breadcrumb, .article-meta, …) stay at
   normal specificity and are NOT overridable.
   ══════════════════════════════════════════════════ */

.article-content :where(h2) {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
}

.article-content :where(h3) {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  margin: 32px 0 14px;
}

.article-content :where(h4, h5, h6) {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  margin: 24px 0 12px;
}

/* Body copy: 16px regular at every width, like the old live posts (marketing,
   2026-11-17). Only headings and explicit <strong> are bold. No large-screen upsizing. */
.article-content :where(p, li) {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark-text);
}

.article-content :where(p) { margin-bottom: 14px; }

.article-content :where(ul, ol) { margin: 0 0 18px 22px; }
.article-content :where(li)     { margin-bottom: 4px; }

.article-content :where(a) {
  color: var(--green-dark);
  text-decoration: underline;
}

.article-content :where(strong, b) { font-weight: 900; }

/* ── Figures, captions, images (Gutenberg + Classic) ── */
.article-content :where(figure) { margin: 0 0 24px; }

.article-content :where(figure img) {
  display: block;
  height: auto;
  border-radius: 8px;
}

.article-content :where(figcaption) {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.article-content :where(blockquote) {
  border-left: 4px solid var(--green);
  padding: 4px 0 4px 20px;
  margin: 0 0 24px;
}

.article-content :where(blockquote p) {
  font-size: 20px;
  font-style: italic;
  color: var(--navy);
}

.article-content :where(hr) {
  border: 0;
  border-top: 1px solid var(--card-border);
  margin: 32px 0;
}

.article-content :where(table) {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 16px;
}

.article-content :where(th, td) {
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  text-align: left;
}

.article-content :where(th) { font-weight: 900; background: var(--cream, #F9F6EF); }

/* ── Editor alignment — text and images ──────────
   The editor's align buttons emit classes, not inline styles, and we had rules
   for none of them: a centred image or paragraph rendered flush left.
   Two class families, both handled below:
     text   → .has-text-align-center / -left / -right   (paragraphs, headings)
     media  → .aligncenter / .alignleft / .alignright / .alignnone
   All :where(), so anything the editor sets explicitly still wins.
   DON'T add `display: block` to .aligncenter — core centres <figure> with
   `display: table` + auto margins, and block would undo it. text-align centres
   the <img> inside the figure and doubles as the rule for centred text. */

/* <img> outside a <figure> */
.article-content :where(img) {
  height: auto;
  border-radius: 8px;
}

/* Text alignment */
.article-content :where(.has-text-align-center) { text-align: center; }
.article-content :where(.has-text-align-right)  { text-align: right; }
.article-content :where(.has-text-align-left)   { text-align: left; }

/* Media alignment */
.article-content :where(.aligncenter) {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* The <img> is display:block (rule above), so text-align can't centre it —
   it needs its own auto margins. Without this a centred image sits flush left. */
.article-content :where(.aligncenter img) {
  margin-left: auto;
  margin-right: auto;
}

.article-content :where(.alignnone) {
  margin-bottom: 24px;
}

.article-content :where(.alignleft) {
  float: left;
  margin: 4px 24px 16px 0;
}

.article-content :where(.alignright) {
  float: right;
  margin: 4px 0 16px 24px;
}

/* Floats must not escape into You Might Also Like */
.article-content::after {
  content: "";
  display: table;
  clear: both;
}

.article-content :where(.wp-block-button__link) {
  display: inline-block;
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
}

/* ── Containment: the frame's only real escape routes ──
   These are the one place we DON'T use :where() — an over-wide element or a
   Canvas-style breakout is a broken page, not a style preference. See §3a of
   BLOG-TEMPLATE-PLAN.md. */
.article-content {
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content img,
.article-content video,
.article-content iframe,
.article-content figure,
.article-content .wp-block-image { max-width: 100%; }

.article-content img,
.article-content video { height: auto; }

/* Wide content scrolls inside itself rather than pushing the page sideways */
.article-content table,
.article-content pre,
.article-content .wp-block-table { display: block; max-width: 100%; overflow-x: auto; }

/* Elementor containers assume they own the full page width — keep them inside the card */
.article-content .elementor-section,
.article-content .elementor-container,
.article-content .e-con,
.article-content .e-con-inner { max-width: 100%; }

/* ══════════════════════════════════════════════════
   YOU MIGHT ALSO LIKE (reuses .blog-card component)
   ══════════════════════════════════════════════════ */
.article-related {
  margin-top: 72px;
}

.article-related-heading {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--navy);
  margin-bottom: 28px;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--cream);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.blog-card-media {
  height: 220px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  /* Needed for the <img> fill below — without a positioned, clipping parent a real
     featured image renders at its natural size and spills over the card title.
     The gradient placeholders hid this: they are backgrounds, so nothing overflowed. */
  position: relative;
  overflow: hidden;
}

/* Real featured images are <img> (so the Media Library alt text survives), unlike the
   gradient stand-ins which are pure background. The image is cropped to fill the fixed
   220px window rather than dictating its own height.
   `object-position: center` centre-crops; change to `top` if faces sit too low. */
.blog-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-card-media.is-default { background: #F9F6EF; }
.blog-card-media.is-default img {
  object-fit: contain;
  padding: 12%;
  box-sizing: border-box;
}

.blog-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card-category {
  display: block;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-card-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--green-dark);
}

.blog-card-excerpt {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════
   IMAGE PLACEHOLDERS (same set as blogs.css)
   ══════════════════════════════════════════════════ */
.media-degree  { background: linear-gradient(135deg, #f2a541 0%, #e07b39 70%, #b23a48 100%); }
.media-phone   { background: linear-gradient(135deg, #7fb5d5 0%, #4b86ad 100%); }
.media-signing { background: linear-gradient(135deg, #d9c8b4 0%, #a98f72 100%); }

/* ══════════════════════════════════════════════════
   RESPONSIVE (project breakpoints: 992 / 768 / 576)
   ══════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .article-related-grid { grid-template-columns: repeat(2, 1fr); }

  .article-breadcrumb { padding: 14px 32px; }
}

@media (max-width: 768px) {
  .article-card { padding: 36px 32px; }

}

@media (max-width: 576px) {
  .article-hero { padding: 56px 20px 64px; }

  .article-main { padding: 32px 16px 64px; }

  .article-card { padding: 28px 20px; }

  .article-related-grid { grid-template-columns: 1fr; }

  .crumb-current { max-width: 100%; }
}

/* ══════════════════════════════════════════════════
   TYPOGRAPHY SCALE — mirrors VERISafe
   Same roles and breakpoints as blogs.css — see the
   header on that block. Kept in step with
   verisafe-v2-font-upsize.css.
   ══════════════════════════════════════════════════ */

/* ── Tablet / mobile ── */
@media (max-width: 960px) {
  .article-related-heading { font-size: clamp(26px, 6vw, 36px); }

  .article-hero-intro { font-size: 16px; }
}

@media (max-width: 480px) {
  /* the base clamp bottoms out at 34px; narrow phones need one more step */
  .article-hero h1 { font-size: 30px; }
}

/* ── Full HD ── */
@media (min-width: 1920px) {
  body { font-size: 19px; }

  .article-hero h1 { font-size: 64px; }

  .article-hero-intro { font-size: 26px; }

  .article-related-heading { font-size: 64px; }

  .article-content :where(h2) { font-size: 26px; }
  .article-content :where(h3) { font-size: 22px; }

  .blog-card-title { font-size: 20px; }
  .blog-card-excerpt { font-size: 17px; }

  .article-breadcrumb,
  .article-date,
  .article-category,
  .blog-card-category { font-size: 13px; }
}

/* ── 1440p / 2K ── */
@media (min-width: 2560px) {
  body { font-size: 21px; }

  .article-hero h1 { font-size: 78px; }

  .article-hero-intro { font-size: 32px; }

  .article-related-heading { font-size: 78px; }

  .article-content :where(h2) { font-size: 32px; }
  .article-content :where(h3) { font-size: 26px; }

  .blog-card-title { font-size: 24px; }
  .blog-card-excerpt { font-size: 20px; }

  .article-breadcrumb,
  .article-date,
  .article-category,
  .blog-card-category { font-size: 15px; }
}

/* ── 4K ── */
@media (min-width: 3840px) {
  body { font-size: 24px; }

  .article-hero h1 { font-size: 112px; }

  .article-hero-intro { font-size: 42px; }

  .article-related-heading { font-size: 112px; }

  .article-content :where(h2) { font-size: 42px; }
  .article-content :where(h3) { font-size: 34px; }

  .blog-card-title { font-size: 30px; }
  .blog-card-excerpt { font-size: 26px; }

  .article-breadcrumb,
  .article-date,
  .article-category,
  .blog-card-category { font-size: 18px; }
}
