/*
Theme Name: Fin DynamicIndustriesLLC v1
Template: fin
Author: Andrii Khimich
Version: 1.0.0
Description: Dark, sharp-edged "editorial-tech" skin for the Fin skeleton theme — near-black surfaces, an electric lime/violet accent pair, zero border-radius, and one consistent card treatment reused everywhere (hero, feed, archive grids) instead of per-section variants.
Text Domain: fin
*/

/* Colors here are variables only (--primary-color, --secondary-color,
   --text-color, --bg-color, --surface-color, --border-color, plus shades
   derived from them via color-mix()) — never a hardcoded value, per
   THEME-DEV.md in the parent theme. Fallback values below match the
   defaults functions.php seeds on activation; the Customizer's own inline
   <style> (printed after this file) always wins in practice.

   Extra brand tokens this theme adds beyond the parent's 8 — follow the same
   rule: they're Customizer mods, not literals.
   --positive-color/--negative-color (the newsletter form's success/error
   feedback, "Dynamic: Brand Extras") derive --positive-on-dark/
   --negative-on-dark via color-mix() below, same pattern as the parent's
   --crimson-dark etc. --dyn-footer-bg/--dyn-form-bg (footer and
   newsletter-form panel backgrounds, "Dynamic: Footer") are plain standalone
   colors — nothing derives from them.

   This theme is dark by default, so --positive-on-dark/--negative-on-dark
   apply everywhere (not just one dark section like the light Sparks skins) —
   there's no separate "light" variant of these two colors to fall back to. */
:root {
  --primary-color: #b4ff39;
  --secondary-color: #8b5cf6;
  --text-color: #f4f4f5;
  --text-muted: #a1a1aa;
  --bg-color: #0a0a0f;
  --surface-color: #14141b;
  --bg-light: #1c1c24;
  --border-color: #27272e;

  --positive-color: #16a34a;
  --negative-color: #dc2626;

  --dyn-footer-bg: #0f0f14;
  --dyn-form-bg: #0f0f14;

  --positive-on-dark: color-mix(in srgb, var(--positive-color) 65%, white);
  --negative-on-dark: color-mix(in srgb, var(--negative-color) 55%, white);

  /* No box-shadow system here — shadows barely read against a near-black
     background. Every card/surface instead defines itself with a 1px
     --border-color edge and shifts that border to --primary-color on
     hover; see "Shared card component" below for the one rule every card
     variant inherits, instead of each variant carrying its own shadow. */
  --dyn-radius: 0px;
}
form {
  position: relative;
}
/* ─── Accessibility helper (not defined by the parent theme) ─────────────── */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

.dyn-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.dyn-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-md);
  margin-bottom: var(--gap-md);
  flex-wrap: wrap;
}

.dyn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
  transition: gap 0.2s ease;
}

.dyn-view-all:hover {
  gap: 10px;
}

/* ─── Header: text logo fallback (no image uploaded in the Customizer) ────── */
.dyn-header__brand-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.01em;
}

/* ─── Header: Subscribe CTA ───────────────────────────────────────────────── */
.dyn-subscribe-btn {
  display: none;
  background: var(--primary-color);
  /* Lime is a light accent — needs dark (not white) text to stay readable,
     unlike Sparks' blue/navy where white-on-accent always worked. Same fix
     everywhere else a fill uses --primary-color as a background below. */
  color: var(--bg-color);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: var(--dyn-radius);
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.dyn-subscribe-btn:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
  transform: translateY(-1px);
}

@media only screen and (min-width: 768px) {
  .dyn-subscribe-btn {
    display: inline-flex;
  }
}

/* ─── Landing Hero — a brand statement, not a post (see front-page.php).
   Dark base + a violet radial glow + a faint blueprint-style grid line
   pattern instead of a photo, since this block isn't tied to any single
   story. */
.dyn-landing-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--secondary-color) 35%, transparent), transparent 55%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--primary-color) 12%, transparent), transparent 45%),
    linear-gradient(color-mix(in srgb, var(--border-color) 40%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border-color) 40%, transparent) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    40px 40px,
    40px 40px;
}

@media only screen and (min-width: 992px) {
  .dyn-landing-hero {
    padding: 96px 0;
  }
}

.dyn-landing-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 62ch;
}

.dyn-landing-hero__headline {
  margin: 12px 0 16px;
  color: var(--text-color);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
}

.dyn-landing-hero__subheadline {
  color: var(--text-muted);
  font-size: var(--text-md);
  max-width: 52ch;
  margin-bottom: 28px;
}

.dyn-landing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.dyn-landing-hero__cta-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-color);
}

.dyn-landing-hero__cta-primary:hover {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.dyn-landing-hero__cta-secondary {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-color);
}

.dyn-landing-hero__cta-secondary:hover {
  border-color: var(--text-color);
}

/* ─── Stats strip ─────────────────────────────────────────────────────────── */
.dyn-stats {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
  padding: 32px 0;
}

.dyn-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}

@media only screen and (min-width: 768px) {
  .dyn-stats__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dyn-stats__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dyn-stats__number {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
}

.dyn-stats__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ─── Coverage Areas — real categories as a landing-style tile grid, each
   tile doubling as navigation into that category's archive. ─────────────── */
.dyn-coverage__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
}

@media only screen and (min-wid th: 640px) {
  .dyn-coverage__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (min-width: 1200px) {
  .dyn-coverage__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dyn-coverage__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.dyn-coverage__tile:hover {
  border-color: var(--primary-color);
}

.dyn-coverage__icon {
  color: var(--primary-color);
  margin-bottom: 6px;
}

.dyn-coverage__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-color);
}

.dyn-coverage__count {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.dyn-coverage__link {
  margin-top: 10px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-color);
}

/* ─── Mission band — the "about us" half of this landing/news hybrid,
   between the news feed and the Newsletter CTA. */
.dyn-mission {
  background: var(--secondary-color);
  padding: 56px 0;
}

.dyn-mission__inner {
  max-width: 68ch;
}

.dyn-mission .dyn-eyebrow {
  color: color-mix(in srgb, var(--white) 65%, var(--primary-color));
}

.dyn-mission__statement {
  color: var(--white);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  margin: 8px 0 0;
}

/* ─── Shared card component ────────────────────────────────────────────────── */
/* One border+hover rule for every "boxed tile" variant (grid/featured/tech)
   instead of each carrying its own shadow or accent-bar treatment — cards
   read the same everywhere on the site. .dyn-card--compact/--trend (list
   rows, not tiles) opt out of the box below and keep their own
   border-bottom divider instead, since a full border box around an inline
   list row would look like a mistake, not a variant. */
.dyn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 12px;
  transition: border-color 0.2s ease;
}

.dyn-card:hover {
  border-color: var(--primary-color);
}

.dyn-card__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--dyn-radius);
  aspect-ratio: 16 / 10;
  background: var(--bg-light);
}

.dyn-card__thumb--sm {
  aspect-ratio: 1 / 1;
  width: 92px;
  flex: 0 0 92px;
  border-radius: var(--dyn-radius);
}

.dyn-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.dyn-card:hover .dyn-card__image {
  transform: scale(1.05);
}

.dyn-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--dyn-radius);
}

.dyn-card__body {
  padding-top: 14px;
}

.dyn-card__eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.dyn-card__title {
  margin: 0 0 8px;
  font-size: var(--text-lg);
  line-height: 1.3;
}

.dyn-card__title a:hover {
  color: var(--primary-color);
}

.dyn-card__excerpt {
  color: var(--text-muted);
  font-size: var(--text-base);
  margin-bottom: 10px;
}

.dyn-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.dyn-card__dot {
  opacity: 0.6;
}

/* Featured card — large image + title (Business / Technology spotlight) */
.dyn-card--featured .dyn-card__thumb {
  aspect-ratio: 16 / 11;
}

.dyn-card--featured .dyn-card__title {
  font-size: clamp(20px, 2.6vw, 28px);
}

/* Compact card — small side-list items. Opts out of the boxed .dyn-card
   border/padding above — a list row, not a tile — and keeps only its own
   bottom divider. */
.dyn-card--compact {
  flex-direction: row;
  gap: 14px;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
}

.dyn-card--compact:last-child {
  border-bottom: none;
}

.dyn-card--compact .dyn-card__body {
  padding-top: 0;
  flex: 1;
}

.dyn-card--compact .dyn-card__title {
  font-size: var(--text-base);
  margin-bottom: 6px;
}

/* Tech card — same boxed .dyn-card border/hover as grid and featured now;
   v1 (Sparks) gave this a colored accent bar of its own, which is exactly
   the kind of per-variant one-off "картки різні" was meant to end. */
.dyn-card--tech .dyn-card__title {
  font-size: var(--text-xl);
}

/* Trend card — numbered editor's-picks list, same border reset as compact */
.dyn-card--trend {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
}

.dyn-card--trend:last-child {
  border-bottom: none;
}

.dyn-card__index {
  flex: 0 0 auto;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1;
  color: var(--border-color);
  font-variant-numeric: tabular-nums;
}

.dyn-card--trend .dyn-card__body {
  padding-top: 0;
  flex: 1;
}

.dyn-card--trend .dyn-card__title {
  font-size: var(--text-base);
  margin-bottom: 4px;
}

/* ─── Latest News ──────────────────────────────────────────────────────────── */
.dyn-news__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--gap-md);
}

@media only screen and (min-width: 768px) {
  .dyn-news__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (min-width: 1200px) {
  .dyn-news__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Business ─────────────────────────────────────────────────────────────── */
.dyn-business__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-lg);
}

@media only screen and (min-width: 992px) {
  .dyn-business__layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.dyn-business__list {
  display: flex;
  flex-direction: column;
}

/* ─── Markets & Finance ────────────────────────────────────────────────────── */
.dyn-markets {
  background: var(--bg-light);
}

.dyn-markets__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
}

@media only screen and (min-width: 640px) {
  .dyn-markets__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Technology & Innovation ──────────────────────────────────────────────── */
.dyn-tech__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-lg);
}

@media only screen and (min-width: 992px) {
  .dyn-tech__layout {
    grid-template-columns: 1fr 1.3fr;
    align-items: start;
  }
}

.dyn-tech__list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* ─── Newsletter ───────────────────────────────────────────────────────────── */
.dyn-newsletter {
  background: var(--dyn-form-bg);
  padding: 48px 0;
}

@media only screen and (min-width: 992px) {
  .dyn-newsletter {
    padding: 72px 0;
  }
}

.dyn-newsletter__inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
  align-items: flex-start;
}

@media only screen and (min-width: 992px) {
  .dyn-newsletter__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.dyn-newsletter__copy {
  max-width: 520px;
}

.dyn-newsletter__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--white) 65%, var(--primary-color));
  margin-bottom: 10px;
}

.dyn-newsletter__title {
  color: var(--white);
  font-size: clamp(24px, 3.4vw, 34px);
  margin-bottom: 10px;
}

.dyn-newsletter__subtitle {
  color: color-mix(in srgb, var(--white) 78%, transparent);
  font-size: var(--text-md);
}

.dyn-newsletter__form-wrap {
  width: 100%;
}

@media only screen and (min-width: 992px) {
  .dyn-newsletter__form-wrap {
    max-width: 420px;
  }
}

.dyn-newsletter__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media only screen and (min-width: 480px) {
  .dyn-newsletter__field {
    flex-direction: row;
  }
}

.dyn-newsletter__input {
  flex: 1;
  min-width: 0;
  /* A literal white fill (like Sparks uses) would swallow this theme's own
     light text color — this is a dark-surfaced input, not a light one. */
  background: var(--surface-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: var(--dyn-radius);
  padding: 13px 16px;
  font-size: var(--text-base);
}

.dyn-newsletter__input:focus {
  border-color: var(--primary-color);
}

.dyn-newsletter__input[aria-invalid="true"] {
  border-color: var(--negative-color);
}

.dyn-newsletter__submit {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-color);
  border-radius: var(--dyn-radius);
  white-space: nowrap;
}

.dyn-newsletter__submit:hover {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.dyn-newsletter__msg {
  margin-top: 12px;
  font-size: var(--text-sm);
  min-height: 1.4em;
  color: color-mix(in srgb, var(--white) 85%, transparent);
}

.dyn-newsletter__form.is-error .dyn-newsletter__msg {
  color: var(--negative-on-dark);
}

.dyn-newsletter__form.is-success .dyn-newsletter__msg {
  color: var(--positive-on-dark);
}

/* Sidebar variant (single.php) — same dark card, but always stacked
   vertically since the column it sits in is never wide enough for the home
   page's side-by-side copy+form row. */
.dyn-newsletter--sidebar {
  padding: 28px 24px;
  border-radius: var(--dyn-radius);
  border: 1px solid var(--border-color);
}

.dyn-newsletter--sidebar .dyn-newsletter__inner {
  flex-direction: column;
  align-items: stretch;
  gap: var(--gap-md);
}

.dyn-newsletter--sidebar .dyn-newsletter__copy,
.dyn-newsletter--sidebar .dyn-newsletter__form-wrap {
  max-width: none;
}

.dyn-newsletter--sidebar .dyn-newsletter__field {
  flex-direction: column;
}

.dyn-newsletter--sidebar .dyn-newsletter__submit {
  width: 100%;
  justify-content: center;
}

/* Contact Form 7 compatibility — lets a real CF7 form (set via Customizer →
   Dynamic: Newsletter → Shortcode) sit inside .dyn-newsletter__field and
   pick up the same input/button look as the demo form, instead of CF7's
   unstyled defaults. Only the form-tags' own `class:`/`id:` options need to
   match .dyn-newsletter__input/__submit — everything below is just
   making CF7's wrapper markup get out of the way. */
.dyn-newsletter .wpcf7-form-control-wrap {
  flex: 1;
  min-width: 0;
}

.dyn-newsletter .wpcf7-form-control-wrap .dyn-newsletter__input {
  width: 100%;
}

.dyn-newsletter .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--negative-on-dark);
}

.dyn-newsletter .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 0;
  border: none;
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--white) 85%, transparent);
}

.dyn-newsletter .wpcf7-form.sent .wpcf7-response-output {
  color: var(--positive-on-dark);
}

.dyn-newsletter .wpcf7-form.invalid .wpcf7-response-output,
.dyn-newsletter .wpcf7-form.failed .wpcf7-response-output,
.dyn-newsletter .wpcf7-form.spam .wpcf7-response-output {
  color: var(--negative-on-dark);
}

.dyn-newsletter .wpcf7-spinner {
  margin: 8px auto 0;
}

/* ─── Trending / Editor's Picks ────────────────────────────────────────────── */
.dyn-trending__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--gap-lg);
}

@media only screen and (min-width: 768px) {
  .dyn-trending__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Footer ─────────────────────────────────────────────────────────────────
   No column grid this time — a giant outline wordmark "sign-off" band
   (same blueprint-grid background as the landing hero, so the page
   bookends on the same motif), one flat uncolumned link row, and a slim
   copyright bar. No socials by design. */
.dyn-footer {
  background: var(--dyn-footer-bg);
  color: color-mix(in srgb, var(--white) 82%, transparent);
}

.dyn-footer a {
  color: inherit;
}

.dyn-footer__signoff {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  background-image:
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--secondary-color) 30%, transparent), transparent 55%),
    linear-gradient(color-mix(in srgb, var(--white) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--white) 6%, transparent) 1px, transparent 1px);
  background-size:
    auto,
    40px 40px,
    40px 40px;
}

.dyn-footer__wordmark {
  margin: 0;
  /* Faint fill as the baseline (every browser gets a visible ghost
     headline); -webkit-text-stroke layers a crisper outline on top in
     Chrome/Safari, which don't support text-stroke without also keeping
     a real fill color — Firefox has no text-stroke at all, so the fill
     alone has to carry it there. */
  color: color-mix(in srgb, var(--white) 8%, transparent);
  -webkit-text-stroke: 1px color-mix(in srgb, var(--white) 35%, transparent);
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  word-break: break-word;
}

/* Same "always white regardless of the uploaded file's own colors" trick
   the parent theme's own footer.php uses for header_logo — a dark-panel
   sign-off band can't assume the uploaded logo is already light. */
.dyn-footer__logo {
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  margin-bottom: 16px;
}

.dyn-footer__tagline {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: color-mix(in srgb, var(--white) 65%, transparent);
  font-size: var(--text-md);
  max-width: 46ch;
}

/* The giant text wordmark's line-height leaves extra descender space the
   uploaded-logo case doesn't have, so only pull the tagline up when it
   follows the text version. */
.dyn-footer__wordmark + .dyn-footer__tagline {
  margin-top: -0.6em;
}

.dyn-footer__nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 28px 0;
  border-top: 1px solid color-mix(in srgb, var(--white) 14%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--white) 14%, transparent);
  font-size: var(--text-sm);
}

.dyn-footer__nav-row a {
  color: color-mix(in srgb, var(--white) 75%, transparent);
}

.dyn-footer__nav-row a:hover {
  color: var(--primary-color);
}

.dyn-footer__nav-divider {
  width: 1px;
  height: 14px;
  background: color-mix(in srgb, var(--white) 20%, transparent);
}

.dyn-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: var(--text-xs);
  color: color-mix(in srgb, var(--white) 60%, transparent);
}

.dyn-footer__back-to-top {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dyn-footer__back-to-top:hover {
  color: var(--white);
}

/* ─── Breadcrumbs (single post / page) ─────────────────────────────────────
   The parent renders the trail as bare uppercase links with a bottom rule —
   fits its newspaper look, but reads flat against Sparks' rounded/soft-shadow
   surfaces. Restyled as a light pill chip using the same --bg-light/
   --border-color pairing as the pagination buttons, with the parent's own
   chevron SVGs (markup unchanged) recolored to sit inside it. */
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--dyn-radius);
  padding: 10px 20px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

@media only screen and (min-width: 992px) {
  .breadcrumbs {
    margin-bottom: 32px;
  }
}

.breadcrumbs svg {
  width: 10px;
  height: 10px;
  margin: 0 10px;
  stroke: var(--border-color);
  flex-shrink: 0;
}

.breadcrumbs__link {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.breadcrumbs__link:hover {
  color: var(--primary-color);
}

.breadcrumbs__current {
  color: var(--text-color);
}

/* ─── Single post meta (date / category) ───────────────────────────────────
   The parent centers an all-caps date + category pair between two rules.
   Left-aligned here, the date de-capitalized to plain text, and the
   category recolored into the same tinted rounded badge as
   .dyn-card__badge instead of a second all-caps label — so a post's own
   header reads consistently with how its category already looks on every
   card that links to it. */
.single__meta {
  justify-content: flex-start;
  border-top: none;
  padding: 0 0 20px;
}

.single__meta-item {
  letter-spacing: normal;
  text-transform: none;
  font-weight: 700;
}

.single__meta-item_category {
  background: color-mix(in srgb, var(--primary-color) 10%, var(--surface-color));
  padding: 5px 12px;
  border-radius: var(--dyn-radius);
}

.single__meta-item_category svg {
  stroke: var(--primary-color);
}

/* ─── Single post layout (article + sidebar) ───────────────────────────────
   single.php (child override) wraps .single__content and a new
   .single__sidebar — currently just the newsletter signup card — in this
   grid. Single column until there's room for a fixed-width sidebar.

   The sidebar is sticky on desktop, which needs `overflow: visible` on the
   parent's .main-wrapper — its default `overflow: hidden` (a horizontal-
   overflow safety net, not load-bearing for anything on this template)
   becomes position:sticky's containing block instead of the viewport,
   which breaks it. Scoped to single posts only so the home page's
   full-bleed slider keeps its clipping. */
body.single-post .main-wrapper {
  overflow: visible;
}

.single__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

@media only screen and (min-width: 992px) {
  .single__layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.single__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

@media only screen and (min-width: 992px) {
  .single__sidebar {
    position: sticky;
    top: 24px;
  }
}

/* ─── Page headers (category/search archives) ──────────────────────────────
   The same blueprint-grid + glow background as the landing hero and the
   footer sign-off band, so a category/search page opens on the same motif
   as the home page instead of a plain violet box. When the category itself
   has a real image (get_term_meta 'category-image-id', set via archive.php's
   inline style="") that inline background-image wins over this one outright
   — same element, same property, inline always beats the stylesheet — so
   the grid pattern is strictly the "no photo" default, not a permanent
   overlay. The parent's own dark ::before scrim still sits on top either
   way (it's what keeps the title readable over a real photo). */
.page__header-content {
  border-bottom: 4px solid var(--primary-color);
}

.page__header-content::before {
  background: linear-gradient(
    0deg,
    color-mix(in srgb, var(--bg-color) 85%, black) 0%,
    color-mix(in srgb, var(--bg-color) 55%, transparent) 60%,
    transparent 100%
  );
}

.page__title {
  position: relative;
  z-index: 2;
  /* The parent sets color: var(--paper-light), its own alias for
     --surface-color — white in a light theme, which is why this worked
     for Sparks. Here --surface-color is near-black, so that alias reads
     as near-invisible text; it has to be overridden directly. */
  color: var(--white);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page__title__highlight {
  color: var(--primary-color);
}

/* ─── Pagination ────────────────────────────────────────────────────────────
   Rounded pill buttons instead of the parent's square ink/paper boxes, using
   the same radius/shadow/hover language as the home page's cards and CTAs. */
.pagination {
  border-top: 1px solid var(--border-color);
  padding: var(--gap-md) 0 0;
}

.nav-links {
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  width: 40px;
  height: 40px;
  border-radius: var(--dyn-radius);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-color);
  font-size: var(--text-sm);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.page-numbers:hover {
  background: var(--bg-light);
  border-color: color-mix(in srgb, var(--primary-color) 30%, var(--border-color));
  color: var(--primary-color);
}

.dots {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.current,
.current:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-color);
}

.next,
.prev {
  border-radius: var(--dyn-radius);
  border-color: var(--border-color);
  font-family: inherit;
  width: auto;
}

.next:hover,
.prev:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-color);
}

/* ─── Archive/search card grid ─────────────────────────────────────────────
   Matches the home page's Latest News breakpoints (1 / 2 / 3 columns) instead
   of the parent's denser 1 / 2 / 4 — a dyn-card--grid carries a title,
   excerpt and meta row that need the extra width to stay readable. */
.posts-list {
  grid-template-columns: repeat(1, 1fr);
}

@media only screen and (min-width: 768px) {
  .posts-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (min-width: 1200px) {
  .posts-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.posts-list--list {
  grid-template-columns: repeat(1, 1fr);
}

@media only screen and (min-width: 992px) {
  .posts-list--list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Search form (header overlay + the standalone /search page + 404) ────
   Restyled from the parent's hard-edged 2px ink borders to the same rounded,
   soft-shadow language as the Newsletter form and cards. */
.search__wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--dyn-radius);
  padding: 40px 32px 32px;
}

.search__title {
  border-bottom: 1px solid var(--border-color);
}

.search__title h3 {
  color: var(--text-color);
  font-weight: 700;
}

.search__title p {
  color: var(--text-muted);
}

.search__form {
  border: none;
  gap: 10px;
}

.search__input {
  height: 52px;
  border: 2px solid var(--border-color);
  border-radius: var(--dyn-radius);
  background: var(--bg-light);
  color: var(--text-color);
}

.search__input:focus {
  border-color: var(--primary-color);
  box-shadow: none;
}

.search__input::placeholder {
  color: var(--text-muted);
  font-style: normal;
}

.search__button_submit {
  height: 52px;
  padding: 0 28px;
  border-radius: var(--dyn-radius);
  background: var(--primary-color);
  color: var(--bg-color);
  letter-spacing: 0.06em;
}

.search__button_submit:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

.search__button_close {
  border-radius: var(--dyn-radius);
  border-color: var(--border-color);
  color: var(--text-muted);
}

.search__button_close:hover {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.inline-search {
  max-width: 480px;
}

.wpcf7-not-valid-tip {
  position: absolute;
  left: 0;
  top: -22px;
  font-size: 12px;
  color: var(--negative-color);
  width: 100%;
}
.screen-reader-response,
.hidden-fields-container {
  display: none;
}

.wpcf7-response-output {
  position: absolute;
  font-size: 12px;
  left: 0;
}
