/*
Theme Name:  Hello Elementor Child - JFFD
Description: Hello Elementor child theme for the JFFD blog. Carries the blog redesign design system (tokens + typography, per the Graphite design spec), and the author-component shortcodes (see functions.php).
Template:    hello-elementor
Version:     1.4.2
*/

/* =============================================================
   JFFD DESIGN TOKENS — from the Graphite design spec
   ("JFFD Blog Redesign — Design Framework & Style Reference")
   ============================================================= */
:root {
  --jffd-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --jffd-ink: #00263E;         /* headings (ink navy) */
  --jffd-teal: #013E4E;        /* deep teal — subheads, eyebrows, accents */
  --jffd-body: #212121;        /* article body copy */
  --jffd-text-2: #333333;      /* secondary body (author bio) */
  --jffd-muted: #6B7A80;       /* meta, captions, muted labels */
  --jffd-link: #3498DB;        /* link blue */
  --jffd-green: #1A8A5C;       /* green accent */
  --jffd-gold: #C1A01F;        /* gold accent (CTA) */
  --jffd-border: #E0E0E0;      /* card / rule borders */
  --jffd-border-2: #CDD8DD;    /* pagination borders */
  --jffd-teal-tint: #EAF4F6;   /* teal tint surfaces */
  --jffd-chip: #E6EDF0;        /* chip tint */
  --jffd-rule: #F0F3F5;        /* heading underline rule */
  --jffd-radius: 12px;         /* cards / TOC / callouts */
}

/* =============================================================
   BASE — one family does all the work (all pages)
   ============================================================= */
body {
  font-family: var(--jffd-font);
}
body h1, body h2, body h3, body h4 {
  font-family: var(--jffd-font);
  color: var(--jffd-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* =============================================================
   ARTICLE CONTENT — Elementor post-content widget AND
   Gutenberg block markup (.entry-content), on any page.
   ============================================================= */
.elementor-widget-theme-post-content,
.elementor-widget-theme-post-content p,
.elementor-widget-theme-post-content li,
.entry-content,
.entry-content p,
.entry-content li {
  font-family: var(--jffd-font);
}
.elementor-widget-theme-post-title h1,
h1.entry-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--jffd-ink);
}
.elementor-widget-theme-post-content h2,
.entry-content h2 {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--jffd-ink);
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--jffd-rule);
}
.elementor-widget-theme-post-content h3,
.entry-content h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--jffd-teal);
  margin: 30px 0 12px;
}
.elementor-widget-theme-post-content p,
.entry-content p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--jffd-body);
  margin: 0 0 22px;
}
.elementor-widget-theme-post-content li,
.entry-content li,
.elementor-widget-theme-post-content .wp-block-list li {
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--jffd-body);
}
.elementor-widget-theme-post-content p a,
.elementor-widget-theme-post-content li a,
.entry-content p a,
.entry-content li a {
  color: var(--jffd-link);
  font-weight: 400;
  text-decoration: underline;
}
.elementor-widget-theme-post-content strong,
.elementor-widget-theme-post-content b,
.entry-content strong,
.entry-content b {
  font-weight: 700;
  color: var(--jffd-body);
}
.elementor-widget-theme-post-content figcaption,
.entry-content figcaption,
.elementor-widget-theme-post-content .wp-element-caption,
.entry-content .wp-element-caption {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--jffd-muted);
}
/* Neutralize Gutenberg preset font-size classes inside articles */
.entry-content p[class*="-font-size"],
.elementor-widget-theme-post-content p[class*="-font-size"] {
  font-size: 18px !important;
}

/* =============================================================
   AUTHOR PAGES — Layout B (author archive / bio pages)
   Works with the Elementor Archive template built from
   [publishpress_authors_data] widgets (see handoff brief).
   All colors reference the :root tokens above.
   ============================================================= */
body.author h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--jffd-ink);
}
body.author .entry-content p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--jffd-text-2);
}

/* Avatar — circular, teal-tint ring (spec: 168px, 10px #EAF4F6 ring),
   white gap between photo and ring, centered */
.jffd-avatar img {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: 0 0 0 10px var(--jffd-teal-tint), 0 10px 24px rgba(1, 62, 78, .18);
}

/* Role line — green, uppercase, wide-tracked, centered (spec: 12/700 +0.13em) */
.jffd-role {
  color: var(--jffd-green);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

/* Name — sole H1; inherits the global author-H1 scale set above */
.jffd-name,
h1.jffd-name {
  color: var(--jffd-ink);
  text-align: center;
  line-height: 1.1;
  margin: 0;
}

/* Social icons — PublishPress-rendered; circular light-gray chips,
   brand glyphs, centered. Selectors cover PublishPress's social
   markup; verify class names on the live template. */
body.author .pp-author-boxes-social a,
body.author [class*="ppma"] a[class*="social"],
body.author .pp-author-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--jffd-chip);
  color: var(--jffd-teal);
  text-decoration: none;
  margin: 0 4px;
}

/* Bio — left-aligned, redesign body treatment for author pages */
.jffd-bio,
.jffd-bio p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--jffd-text-2);
  text-align: left;
}

/* Section headings (Education / Experience & focus) — deep teal,
   bold, just above body scale */
.jffd-section-heading,
h3.jffd-section-heading,
h4.jffd-section-heading {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--jffd-teal);
  margin: 1.25em 0 .5em;
}

/* List items — gold bullets, left-aligned */
.jffd-item {
  position: relative;
  padding-left: 1.25em;
  margin-bottom: .5em;
  font-size: 16px;
  line-height: 1.65;
  color: var(--jffd-text-2);
  text-align: left;
}
.jffd-item::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--jffd-gold);
}

/* =============================================================
   REUSABLE UTILITIES — from the spec's component library.
   Add these classes to Elementor containers / Gutenberg groups.
   ============================================================= */
/* Post card: white, bordered, hover lift */
.jffd-card {
  background: #fff;
  border: 1px solid var(--jffd-border);
  border-radius: var(--jffd-radius);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.jffd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(1, 62, 78, .14);
}
.jffd-card:hover .jffd-card__title,
.jffd-card:hover h3 {
  color: var(--jffd-link);
}
/* Primary button */
.jffd-btn,
a.jffd-btn {
  display: inline-block;
  background: var(--jffd-gold);
  color: var(--jffd-ink) !important;
  font-family: var(--jffd-font);
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
}
.jffd-btn:hover { background: #D1B02F; }
/* Sticky TOC card */
.jffd-toc {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid var(--jffd-border);
  border-radius: var(--jffd-radius);
  padding: 20px;
}
/* 3-column posts grid */
.jffd-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* Author avatar ring */
.jffd-avatar-ring {
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--jffd-teal-tint), 0 10px 24px rgba(1, 62, 78, .18);
}
/* Section eyebrow */
.jffd-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--jffd-teal);
}

/* =============================================================
   RESPONSIVE — breakpoints from the spec
   ============================================================= */
@media (max-width: 900px) {
  .jffd-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .jffd-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .elementor-widget-theme-post-title h1,
  h1.entry-title { font-size: 29px; }
  .elementor-widget-theme-post-content h2,
  .entry-content h2 { font-size: 25px; margin: 34px 0 12px; }
  .elementor-widget-theme-post-content h3,
  .entry-content h3 { font-size: 19px; }
  .elementor-widget-theme-post-content p,
  .entry-content p { font-size: 17px; }
}
@media (max-width: 620px) {
  body.author h1 { font-size: 30px; }
}

/* =============================================================
   BREADCRUMBS — Yoast (#breadcrumbs), styled per the redesign:
   13.5px, blue links, light-gray "/" separators, muted current page.
   The separator text nodes inherit from the container, so the
   container carries the separator color.
   ============================================================= */
#breadcrumbs {
  font-family: var(--jffd-font);
  font-size: 13.5px;
  font-weight: 400;
  color: #B8C4C8; /* separator "/" color */
}
#breadcrumbs a {
  color: var(--jffd-link);
  text-decoration: none;
  font-weight: 400;
}
#breadcrumbs a:hover { text-decoration: underline; }
#breadcrumbs .breadcrumb_last { color: var(--jffd-muted); }

/* =============================================================
   "IN THIS ARTICLE" — Elementor Pro Table of Contents widget,
   restyled as the redesign's sticky TOC card (white, 1px border,
   12px radius, 12/800 uppercase teal title, quiet 14.5px links).
   ============================================================= */
/* !important is deliberate: the live TOC widget carries per-widget
   Elementor styles (.elementor-element-xxxx …) that outrank clean
   selectors — these normalize every TOC to the design system. */
.elementor-widget-table-of-contents > .elementor-widget-container {
  background: #fff !important;
  border: 1px solid var(--jffd-border) !important;
  border-radius: var(--jffd-radius) !important;
  padding: 0 !important;
  font-family: var(--jffd-font);
}
.elementor-widget-table-of-contents { position: sticky; top: 24px; }
.elementor-widget-table-of-contents .elementor-toc__header {
  border-bottom: none !important;
  padding: 20px 20px 12px !important;
  margin: 0 !important;
  background: none !important;
}
.elementor-widget-table-of-contents .elementor-toc__header-title {
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--jffd-teal) !important;
}
.elementor-widget-table-of-contents .elementor-toc__body {
  padding: 0 12px 16px !important;
  background: none !important;
  max-height: none !important;
}
.elementor-widget-table-of-contents .elementor-toc__list-wrapper { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.elementor-widget-table-of-contents .elementor-toc__list-item { margin: 0 !important; }
.elementor-widget-table-of-contents .elementor-toc__number,
.elementor-widget-table-of-contents .elementor-toc__list-item i,
.elementor-widget-table-of-contents .elementor-toc__list-item svg { display: none !important; }
.elementor-widget-table-of-contents a.elementor-toc__list-item-text {
  font-size: 14.5px !important;
  font-weight: 400 !important;
  color: #26424A !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  display: block;
  padding: 6px 8px !important;
  border-radius: 6px;
}
.elementor-widget-table-of-contents a.elementor-toc__list-item-text:hover {
  background: var(--jffd-teal-tint);
  color: var(--jffd-teal) !important;
  text-decoration: none !important;
}
.elementor-widget-table-of-contents a.elementor-toc__list-item-text.elementor-item-active {
  background: var(--jffd-teal-tint);
  color: var(--jffd-teal) !important;
  font-weight: 600 !important;
}
/* Demo shows the TOC expanded on desktop — neutralize "minimize on
   desktop" above the tablet breakpoint and hide the toggle there. */
@media (min-width: 1025px) {
  .elementor-toc--minimized-on-desktop .elementor-toc__body { display: block !important; }
  .elementor-widget-table-of-contents .elementor-toc__toggle-button { display: none !important; }
}

/* =============================================================
   RELATED POSTS — Graphite AEO snippet (.graphite-related-posts),
   styled as the redesign's post-card grid. Applies site-wide.
   Card = a.gp-link (whole card is the link); the separate
   "Read More" sublinks are hidden as redundant.
   ============================================================= */
.graphite-related-posts {
  font-family: var(--jffd-font);
  margin: 34px 0;
}
.graphite-related-posts .title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--jffd-ink);
  margin: 0 0 20px;
}
.graphite-related-posts .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.graphite-related-posts a.gp-link {
  display: block;
  background: #fff;
  border: 1px solid var(--jffd-border);
  border-radius: var(--jffd-radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.graphite-related-posts a.gp-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(1, 62, 78, .14);
}
.graphite-related-posts a.gp-link:hover .label { color: var(--jffd-link); }
.graphite-related-posts .gp-link .parent { margin: 0; }
.graphite-related-posts .gp-link .img {
  aspect-ratio: 1.45;
  background-size: cover;
  background-position: center;
  display: block;
}
.graphite-related-posts .gp-link .label {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #1C2B30;
  padding: 16px 18px 20px;
  margin: 0;
}
/* The card itself is the link — the standalone "Read More" is redundant */
.graphite-related-posts a.gp-sublink { display: none; }
@media (max-width: 900px) {
  .graphite-related-posts .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .graphite-related-posts .grid { grid-template-columns: 1fr; }
}

/* =============================================================
   LEGACY TEMPLATE SAFETY NET — posts rendered by older single
   templates output the title as a Heading widget, not the
   theme-post-title widget. Normalize it to the redesign H1.
   ============================================================= */
body.single-post h1.elementor-heading-title {
  font-family: var(--jffd-font) !important;
  font-size: 42px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em !important;
  color: var(--jffd-ink) !important;
}
@media (max-width: 640px) {
  body.single-post h1.elementor-heading-title { font-size: 29px !important; }
}
