/* ================================================================
   bb-components.css — BBULL Design System · Reusable Components
   Load order: 2 of 3 (after bb-global.css, before bb-pages.css)
   Source sections from bb-style.css: 2, 5, 11, 14, FAQ, article modules
   ================================================================ */

/* ════════════════════════════════════════════════════════════════
   BACK TO TOP
   ════════════════════════════════════════════════════════════════ */
.bb-back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--bb-text) 18%, transparent);
  border-radius: 50%;
  background: var(--bb-surface);
  color: var(--bb-text);
  box-shadow: var(--bb-shadow-card);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.bb-back-to-top[hidden] {
  display: none;
}

.bb-back-to-top:hover {
  box-shadow: var(--bb-shadow-hover);
  transform: translateY(-2px);
}

.bb-back-to-top:active {
  background: var(--bb-surface);
  color: var(--bb-text);
}

.bb-back-to-top:focus-visible {
  outline: 2px solid var(--bb-red);
  outline-offset: 3px;
}

.bb-back-to-top svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 600px) {
  .bb-back-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-back-to-top {
    transition: none;
  }

  .bb-back-to-top:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   0. VIEWPORT ANIMATION PRIMITIVES
   Progressive enhancement only: uninitialized content remains visible.
   ════════════════════════════════════════════════════════════════ */
.bbull-animate-reveal {
  opacity: 1;
  transform: none;
}

.bbull-animate-reveal.bbull-animate-reveal--ready {
  opacity: 0;
  transform: translate3d(0, var(--bbull-reveal-distance, 32px), 0);
  transition:
    opacity var(--bbull-reveal-duration, 0.85s) var(--bbull-reveal-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform var(--bbull-reveal-duration, 0.85s) var(--bbull-reveal-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.bbull-animate-reveal.bbull-animate-reveal--ready.bbull-animate-reveal--visible {
  opacity: 1;
  transform: none;
}

.bbull-animate-image-reveal {
  clip-path: inset(0);
}

/* Image-only horizontal wipe with a brief BBULL-red scan line. */
.bbull-animate-image-curtain {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--bbull-image-curtain-radius, var(--bb-radius-pill));
}

.bbull-animate-image-curtain > img {
  display: block;
}

.bbull-animate-image-curtain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  background: linear-gradient(90deg, var(--bb-red) 0 2px, transparent 2px);
  opacity: 0;
  pointer-events: none;
}

.bbull-animate-image-curtain--active::after {
  opacity: 1;
  animation: bbull-image-curtain-line var(--bbull-image-curtain-duration, 0.9s) var(--bbull-image-curtain-ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

@keyframes bbull-image-curtain-line {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .bbull-animate-reveal,
  .bbull-animate-reveal.bbull-animate-reveal--ready,
  .bbull-animate-reveal.bbull-animate-reveal--ready.bbull-animate-reveal--visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bbull-animate-image-reveal {
    clip-path: inset(0);
    transition: none;
  }

  .bbull-animate-image-curtain::after {
    display: none;
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   1. BUTTONS  (.bb-btn + variants)
   Wrapper class on any container, with <a> or <button> inside.
   ════════════════════════════════════════════════════════════════ */
.bb-btn a,
.bb-btn button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: var(--padding-s) var(--bb-btn-padding-inline);
  border-radius: var(--bb-radius-pill);
  border: 2px solid var(--bb-btn-border-color);

  background: transparent;  /* gradient rendered in ::before */
  color: var(--bb-btn-text-color);

  font-size: 1rem;
  line-height: 1.1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin: 0.35rem 0.45rem;

  box-shadow: var(--bb-btn-shadow-base);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

/* Gradient rendered in a separate layer so the border doesn't bleed red */
.bb-btn a::before,
.bb-btn button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(
    to bottom right,
    var(--bb-btn-bg-color1),
    var(--bb-btn-bg-color2)
  );
}

/* ── Variants ─────────────────────────────────────────────── */
.bb-btn.bb-btn--primary a {
  --bb-btn-bg-color1: #5F0018;
  --bb-btn-bg-color2: #D92C2C;
  --bb-btn-text-color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
}

.bb-btn.bb-btn--secondary a {
  --bb-btn-bg-color1: #07122D;
  --bb-btn-bg-color2: #4E6584;
  --bb-btn-text-color: #ffffff;
}

.bb-btn.bb-btn--green a {
  --bb-btn-bg-color1: #03686D;
  --bb-btn-bg-color2: #008C6E;
  --bb-btn-text-color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
}

.bb-btn.bb-btn--amber a {
  --bb-btn-bg-color1: #B6610C;
  --bb-btn-bg-color2: #FFB300;
  --bb-btn-text-color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
}

/* Neutral buttons remain distinct from the red CTA section background. */
.bb-bg-cta .bb-btn a,
.bb-bg-cta .bb-btn button {
  --bb-btn-bg-color1: var(--bb-cta-section-button-start);
  --bb-btn-bg-color2: var(--bb-cta-section-button-end);
  --bb-btn-text-color: var(--bb-cta-section-button-text);
  text-shadow: none;
}

.bb-bg-cta .wp-block-button__link {
  background: linear-gradient(135deg, var(--bb-cta-section-button-start), var(--bb-cta-section-button-end));
  color: var(--bb-cta-section-button-text);
}

/* ── Button States ────────────────────────────────────────── */
.bb-btn a:hover,
.bb-btn a:focus-visible,
.bb-btn button:hover,
.bb-btn button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--bb-btn-shadow-hover);
  outline: none;
}

.bb-btn a:focus-visible,
.bb-btn button:focus-visible {
  box-shadow: var(--bb-btn-shadow-focus);
}

.bb-btn a:active,
.bb-btn button:active {
  transform: translateY(0);
  box-shadow: var(--bb-btn-shadow-active);
  filter: brightness(0.98) saturate(0.98);
}

.bb-btn a[aria-disabled="true"],
.bb-btn a[disabled],
.bb-btn.is-disabled a {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.58;
  filter: saturate(0.9) brightness(0.97);
  box-shadow: var(--bb-btn-shadow-disabled);
}

@media (max-width: 640px) {
  .bb-btn {
    min-width: 0;
    max-width: 100%;
  }

  .bb-btn a,
  .bb-btn button {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════════════
   2. CARDS  (.bb-card + modifiers)
   Optik (radius/shadow/padding) on the card only;
   layout (columns, gap) set by the section wrapper.
   ════════════════════════════════════════════════════════════════ */
.bb-card {
  background: var(--bb-surface);
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-md);
  box-shadow: var(--bb-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: clip;
  padding: var(--padding-s);
}

.bb-card p,
.bb-card h3 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ── Hover edge effect ──────────────────────────────────── */
.bb-card.bb-edge {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bb-card.bb-edge:hover,
.bb-card.bb-edge:focus-within {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: var(--bb-shadow-hover), inset 4px 0 0 var(--bb-red);
}

/* ── Neomorphic variant ─────────────────────────────────── */
.bb-card.bb-card--neo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: var(--bb-card-neo-border, 1px solid #ffffff);
  background: var(--bb-card-neo-bg, linear-gradient(145deg, #f2f6fb 0%, #ffffff 100%));
  box-shadow: var(--bb-card-neo-shadow);
  margin: 20px;
  gap: var(--padding-s, 1rem);
}

.bb-card.bb-card--neo::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: calc(var(--bb-radius-md) - 10px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.bb-card.bb-card--neo .bb-card__body,
.bb-card.bb-card--neo .bb-card__media {
  position: relative;
  z-index: 2;
}

.bb-card.bb-card--neo.bb-edge:hover,
.bb-card.bb-card--neo.bb-edge:focus-within {
  transform: translateY(-4px);
  border-color: var(--bb-border-strong);
  box-shadow: var(--bb-shadow-hover), inset 4px 0 0 var(--bb-red);
}

.bb-card.bb-card--neo.bb-edge:hover::before,
.bb-card.bb-card--neo.bb-edge:focus-within::before { opacity: 0.9; }

/* List override inside neo cards */
.bb-card--neo ul { position: relative; overflow: visible; }

/* ── Glass variant ──────────────────────────────────────── */
.bb-card.bb-card--glass {
  position: relative;
  background: var(--bb-card-overlay, rgba(255,255,255,0.5));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--bb-card-shadow-glass);
  overflow: hidden;
}

.bb-card.bb-card--glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    ellipse at bottom center,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0.15) 30%,
    rgba(255,255,255,0.05) 60%,
    rgba(255,255,255,0) 100%
  );
  mix-blend-mode: screen;
}

/* ── Simple modifiers ───────────────────────────────────── */
.bb-card--accent { background: var(--bb-surface-muted); }
.bb-card--hero   { border-radius: max(var(--bb-radius-md), 28px); box-shadow: var(--bb-shadow-card); }
.bb-card--flat   { box-shadow: none; }

/* ── Media + body slots ─────────────────────────────────── */
.bb-card__media img,
.bb-card__media video { display: block; width: 100%; height: auto; }
.bb-card__body { padding: var(--padding-m); }

/* ── Product hero card fill ─────────────────────────────── */
.bb-section-hero .bb-card--neo.bb-card--hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 30px;
  width: 100%;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════
   3. HERO TYPOGRAPHY COMPONENTS
   Big, clear heading + lead for any hero section.
   ════════════════════════════════════════════════════════════════ */
.bb-hero-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.2rem;
  align-items: flex-start;
  max-width: 50ch;
}

.bb-hero-heading {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--fs-h1);
  line-height: 1.1;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
  color: var(--bb-text);
  margin: 0 0 0.4em !important;
  max-width: 25ch;
}

.bb-hero-lead {
  font-size: clamp(1.125rem, 0.8vw + 1rem, 1.5rem);
  line-height: 1.65;
  color: var(--bb-text-muted);
  max-width: 70ch;
  margin: 0 !important;
}

/* Light-on-dark variant */
.bb-hero--light .bb-hero-heading { color: var(--text-light); }
.bb-hero--light .bb-hero-lead    { color: rgba(255, 255, 255, 0.9); }

/* Vertical stack helper for hero copy blocks */
.bb-hero-stack { display: grid; gap: clamp(10px, 1.6vw, 16px); }

/* Compact page identity for finder and other utility-led pages. */
.bb-page-intro {
  display: grid;
  gap: 0.4rem;
  padding-block: 2rem 1.5rem;
}

.bb-page-intro .bb-eyebrow {
  margin: 0;
}

.bb-page-intro .bb-page-title {
  max-width: 30ch;
  margin: 0;
  color: var(--bb-text);
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: var(--weight-heading);
  letter-spacing: 0;
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
}

@media (max-width: 640px) {
  .bb-page-intro {
    gap: 0.3rem;
    padding-block: 1.25rem 1rem;
  }

  .bb-page-intro .bb-page-title {
    font-size: 2rem;
    line-height: 1.12;
  }
}

/* ── Section head (eyebrow + h2 combo) ───────────────────── */
.bb-section-head {
  display: grid;
  gap: 0.2rem;
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
}

.bb-section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 2.2vw, 3.6rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

/* ════════════════════════════════════════════════════════════════
   4. BENEFIT / FEATURE LISTS  (.bb-benefit-list, .bb-feature-list)
   ════════════════════════════════════════════════════════════════ */
.bb-benefit-list__heading,
.bb-feature-list__heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--bb-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bb-benefit-list,
.bb-feature-list {
  list-style: none;
  margin: 0 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bb-benefit-list > li {
  background: var(--bg-dark, #e9eff6);
  border-left: 4px solid var(--bb-success, #2b8a3e);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  transition: background 0.2s;
  cursor: default;
  position: relative;
}

.bb-benefit-list > li:hover { background: var(--bb-blue-soft, #eaeaea); }

.bb-feature-list > li {
  background: var(--bg-dark, #e9eff6);
  border-left: 4px solid var(--secondary, #4E6584);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  transition: background 0.2s;
  cursor: default;
}

.bb-feature-list > li:hover { background: var(--bb-blue-soft, #eaeaea); }

/* ── Tooltip (used inside benefit list items) ─────────────── */
.tooltip { position: relative; display: inline-block; line-height: 1.2; }

.tooltip::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translate(-50%, 8px);
  width: 260px;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  background: var(--bb-success-strong, rgba(43,138,62,0.9));
  color: var(--text-light);
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  white-space: normal;
}

.tooltip:hover::after,
.tooltip:focus::after { opacity: 1; transform: translate(-50%, 0); }
.tooltip > strong { position: relative; z-index: 1; }

/* ════════════════════════════════════════════════════════════════
   5. FAQ COMPONENT  (.bb-faq-item uses <details>/<summary>)
   ════════════════════════════════════════════════════════════════ */
.bb-faq { padding: var(--bb-section-padding, 3rem 2rem); }

.bb-faq__header { margin-bottom: 2.5rem; }
.bb-faq__eyebrow { margin-bottom: 0.4rem; }

.bb-faq__title {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  font-weight: 700;
  color: var(--bb-text);
  margin: 0;
}

.bb-faq__subtitle {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--bb-muted);
}

/* ── Collapsible toggle variant (JS-driven) ───────────────── */
.bb-faq__panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.bb-faq--open .bb-faq__panel {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
}

.bb-faq .bb-faq__toggle {
  padding: 0.55rem 1.3rem 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bb-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.bb-faq__toggle::after {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  border-right: 2px solid var(--bb-text);
  border-bottom: 2px solid var(--bb-text);
  transform: rotate(45deg);
  transition: transform 0.25s;
}

.bb-faq--open .bb-faq__toggle::after { transform: rotate(-135deg); }
.bb-faq__toggle:hover { border-color: var(--bb-red); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); }

/* ── FAQ list + items (<details>) ────────────────────────── */
.bb-faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  width: min(800px, 100%);
  margin: 0 auto 2.5rem;
}

.bb-faq-item {
  border-radius: 0.75rem;
  background: var(--bb-surface, #fff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.bb-faq-item:hover {
  border-color: var(--bb-red);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.bb-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1.1rem 1.4rem;
  list-style: none;
  position: relative;
  transition: background 0.25s;
}

.bb-faq-item summary:hover { background: rgba(0, 0, 0, 0.015); }

.bb-faq-item summary::after {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-right: 2px solid var(--bb-text);
  border-bottom: 2px solid var(--bb-text);
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.25s;
}

.bb-faq-item[open] summary::after { transform: translateY(-50%) rotate(-135deg); }

.bb-faq-item p {
  padding: 0 1.4rem 1.4rem;
  margin: 0;
  color: var(--bb-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.bb-faq-cta { text-align: center; }

@media (max-width: 600px) {
  .bb-faq-list { gap: 0.75rem; }
  .bb-faq-item summary { padding-right: 2.5rem; }
}

/* ════════════════════════════════════════════════════════════════
   6. ARTICLE CARDS  (.bb-article-card, .bb-featured-article)
   ════════════════════════════════════════════════════════════════ */

/* ── Featured Article ─────────────────────────────────────── */
.bb-featured-article { padding-block: var(--padding-xl); }

.bb-featured-article__inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.bb-featured-article__card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  overflow: hidden;
  background: var(--bb-surface);
  border: 1px solid var(--bb-border-strong);
  border-radius: 8px;
  box-shadow: var(--bb-shadow-soft);
}

.bb-featured-article__media {
  position: relative;
  display: block;
  min-height: clamp(260px, 32vw, 430px);
  overflow: hidden;
  background: var(--bb-surface-muted);
}

.bb-featured-article__image,
.bb-featured-article__image-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.bb-featured-article__image-placeholder {
  background:
    linear-gradient(135deg, rgba(208,25,32,.16), transparent 38%),
    linear-gradient(180deg, var(--bb-neutral-200), var(--bb-surface-muted));
}

.bb-featured-article__card:hover .bb-featured-article__image {
  transform: scale(1.045);
  filter: saturate(0.95) contrast(1.04);
}

.bb-featured-article__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.8rem, 1.4vw, 1.15rem);
  padding: clamp(1.4rem, 3vw, 3rem);
}

.bb-featured-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  color: var(--bb-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bb-featured-article__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  margin-right: 0.85rem;
  vertical-align: middle;
  background: var(--bb-red);
}

.bb-featured-article__content h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.35rem);
  line-height: 1.15;
}

.bb-featured-article__content h3 a {
  color: var(--bb-text);
  font-weight: inherit;
}

.bb-featured-article__content p {
  max-width: 56ch;
  font-size: clamp(1rem, 0.3vw + 1rem, 1.12rem);
  line-height: 1.65;
}

.bb-featured-article__actions { margin-top: 0.35rem; }

.bb-featured-article__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--bb-red);
  font-family: var(--font-body);
  font-weight: 700;
}

.bb-featured-article__link span { transition: transform 0.2s ease; }
.bb-featured-article__link:hover span,
.bb-featured-article__link:focus-visible span { transform: translateX(3px); }

@media (max-width: 760px) {
  .bb-featured-article__card { grid-template-columns: 1fr; }
  .bb-featured-article__media { min-height: 230px; }
}

/* ── Article Grid + Cards ─────────────────────────────────── */
.bb-article-grid { padding-block: var(--padding-xl); }

.bb-article-grid__inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.bb-article-grid__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.bb-article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bb-surface);
  border: 1px solid var(--bb-border-strong);
  border-radius: var(--bb-radius-md);
  box-shadow: var(--bb-shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bb-article-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--bb-red) 28%, var(--bb-border-strong));
  box-shadow: var(--bb-shadow-hover);
}

.bb-article-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bb-surface-muted);
}

.bb-article-card__image,
.bb-article-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.bb-article-card__image-placeholder {
  background:
    linear-gradient(135deg, rgba(208,25,32,.16), transparent 38%),
    linear-gradient(180deg, var(--bb-neutral-200), var(--bb-surface-muted));
}

.bb-article-card:hover .bb-article-card__image {
  transform: scale(1.045);
  filter: saturate(0.95) contrast(1.04);
}

.bb-article-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1rem, 1.8vw, 1.35rem);
}

.bb-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--bb-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bb-article-card__meta span:first-child { color: var(--bb-red); }

.bb-article-card__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 2px;
  margin-right: 0.75rem;
  vertical-align: middle;
  background: var(--bb-red);
}

.bb-article-card__title {
  margin: 0;
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.45rem);
  line-height: 1.18;
}

.bb-article-card__title a { color: var(--bb-text); font-weight: inherit; }
.bb-article-card__excerpt { line-height: 1.58; }

.bb-article-grid--press .bb-article-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-article-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin-top: auto;
  color: var(--bb-red);
  font-family: var(--font-body);
  font-weight: 700;
}

.bb-article-card__link span { transition: transform 0.2s ease; }
.bb-article-card__link:hover span,
.bb-article-card__link:focus-visible span { transform: translateX(3px); }

@media (max-width: 960px) {
  .bb-article-grid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .bb-article-grid__items { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   7. ARTICLE MODULES  (intro-card, facts, source, download, CTA)
   Used inside long-form posts and press articles.
   ════════════════════════════════════════════════════════════════ */
.bb-article-intro-card,
.bb-article-facts,
.bb-article-source,
.bb-article-download,
.bb-article-cta {
  width: min(100%, 980px);
  margin-inline: auto;
}

/* Intro Card */
.bb-article-intro-card {
  position: relative;
  margin-block: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--bb-radius-md);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,246,251,.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--bb-shadow-soft);
  overflow: hidden;
}

.bb-article-intro-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--bb-red);
}

.bb-article-intro-card::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -36%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(78, 101, 132, 0.14);
  box-shadow:
    inset 0 0 0 22px rgba(255,255,255,.35),
    inset 0 0 0 44px rgba(78,101,132,.05);
  pointer-events: none;
}

.bb-article-intro-card > * { position: relative; z-index: 1; }

.bb-article-intro-card h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--bb-text);
}

.bb-article-intro-card h2::after {
  content: "";
  display: block;
  width: clamp(64px, 7vw, 110px);
  height: 4px;
  margin-top: clamp(16px, 2vw, 24px);
  background: var(--bb-red);
  border-radius: 999px;
}

.bb-article-intro-card p:not(.bb-eyebrow) {
  max-width: 68ch;
  margin-top: clamp(18px, 2vw, 28px);
  font-size: clamp(1rem, 0.45vw + 0.95rem, 1.16rem);
  line-height: 1.65;
  color: var(--bb-muted);
}

/* Key Facts Grid */
.bb-article-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  margin-block: clamp(28px, 5vw, 56px);
}

.bb-article-fact {
  position: relative;
  min-height: 132px;
  padding: 1.25rem;
  border-radius: calc(var(--bb-radius-md) - 8px);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,246,251,.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.bb-article-fact::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 1rem;
  background: var(--bb-red);
  border-radius: 999px;
}

.bb-article-fact span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--bb-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.bb-article-fact strong {
  display: block;
  color: var(--bb-text);
  font-family: var(--font-heading);
  font-size: clamp(1rem, 0.3vw + 0.95rem, 1.18rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

/* Source Box */
.bb-article-source {
  margin-block: clamp(32px, 5vw, 64px);
  padding: 1.15rem 1.35rem;
  border-left: 5px solid var(--bb-red);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--bb-border);
  border-right: 1px solid var(--bb-border);
  border-bottom: 1px solid var(--bb-border);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  color: var(--bb-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.bb-article-source strong { color: var(--bb-text); }

/* PDF Download link */
.bb-article-download { margin-block: clamp(24px, 4vw, 48px); }

.bb-article-download a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  background: var(--bb-red);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(208, 25, 32, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bb-article-download a:visited { color: #fff; }

.bb-article-download a:hover,
.bb-article-download a:focus-visible {
  transform: translateY(-1px);
  background: var(--bb-primary-hover, #a31319);
  box-shadow: 0 18px 34px rgba(208, 25, 32, 0.3);
}

.bb-article-download span { font-size: 1.15em; line-height: 1; }

/* Bottom CTA block */
.bb-article-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-block: clamp(48px, 7vw, 88px);
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--bb-radius-md);
  background:
    radial-gradient(circle at 100% 0%, rgba(208,25,32,.11), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,246,251,.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--bb-shadow-card);
}

.bb-article-cta h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 2.8vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--bb-text);
}

.bb-article-cta p:not(.bb-eyebrow) {
  max-width: 62ch;
  margin-top: 1.1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bb-muted);
}

.bb-article-cta__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  white-space: nowrap;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--bb-red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(208, 25, 32, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bb-article-cta__link:visited { color: #fff; }

.bb-article-cta__link:hover,
.bb-article-cta__link:focus-visible {
  transform: translateY(-1px);
  background: var(--bb-primary-hover, #a31319);
  box-shadow: 0 18px 34px rgba(208, 25, 32, 0.3);
}

@media (max-width: 900px) {
  .bb-article-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-article-cta { grid-template-columns: 1fr; }
  .bb-article-cta__link { justify-self: start; }
}

@media (max-width: 640px) {
  .bb-article-intro-card,
  .bb-article-cta { padding: 26px; }
  .bb-article-facts { grid-template-columns: 1fr; }
  .bb-article-fact { min-height: auto; }
  .bb-article-download a,
  .bb-article-cta__link { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════
   8. APP ICON GRID  (.bb-app-icons)
   ════════════════════════════════════════════════════════════════ */
.bb-app-wrap > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.bb-align-left  .bb-app-icons { justify-items: start; }
.bb-align-center .bb-app-icons { justify-items: center; }

.bb-app-iconstack { width: 100%; }

.bb-app-icons {
  --bb-min: 100px;
  --bb-gap: 24px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--bb-min), 1fr));
  gap: var(--bb-gap);
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
}

.bb-app {
  width: auto;
  min-width: var(--bb-min);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bb-labels-below .bb-app {
  flex-direction: column;
  text-align: center;
  gap: 0.3rem;
  font-size: var(--fs-s);
}

.bb-icon {
  --bb-size: 40px;
  width: var(--bb-size);
  height: var(--bb-size);
}

@media (prefers-color-scheme: dark) {
  .bb-variant-card .bb-app {
    background: color-mix(in oklab, var(--bb-surface, #121417) 90%, var(--text-light) 10%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  }
  .bb-label { opacity: 0.92; }
}

/* ════════════════════════════════════════════════════════════════
   9. BENEFIT ICONS  (.bb-benefit)
   ════════════════════════════════════════════════════════════════ */
.bb-benefit-img {
  width: clamp(4rem, 7vw, 10rem);
  height: auto;
}

.bb-benefit {
  display: grid;
  align-items: start;
  gap: 0.75rem;
  padding: 1.4rem;
  border-radius: 14px;
  background: var(--bb-surface, #fff);
  box-shadow: var(--bb-shadow-soft);
}

.bb-benefit__icon svg {
  width: 42px;
  height: 42px;
  color: var(--bb-red);
}

.bb-benefit__title {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.bb-benefit__text {
  margin: 0;
  opacity: 0.82;
}

/* ════════════════════════════════════════════════════════════════
   10. SHINE EFFECT  (.bb-shine)
   Add class to the clickable element wrapper.
   ════════════════════════════════════════════════════════════════ */
.bb-shine * {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.bb-shine *::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -60%;
  width: 40%;
  height: 160%;
  background: linear-gradient(
    115deg,
    rgba(var(--bb-shine-highlight), 0)    0%,
    rgba(var(--bb-shine-highlight), 0.28) 45%,
    rgba(var(--bb-shine-highlight), 0.55) 50%,
    rgba(var(--bb-shine-highlight), 0.28) 55%,
    rgba(var(--bb-shine-highlight), 0)    100%
  );
  transform: translateX(-120%) rotate(12deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.bb-shine *:hover::after,
.bb-shine *:focus-visible::after {
  opacity: 0.85;
  animation: bb-shine-sweep 0.25s ease-out 1;
}

@keyframes bb-shine-sweep {
  from { transform: translateX(50%) rotate(12deg); }
  to   { transform: translateX(350%) rotate(12deg); }
}

/* ════════════════════════════════════════════════════════════════
   11. WP SEARCH BUTTON  (custom neomorphic style)
   ════════════════════════════════════════════════════════════════ */
.wp-block-search .wp-block-search__button.wp-element-button.has-icon {
  appearance: none;
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  min-height: 2.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--bb-search-bg);
  color: var(--bb-text);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--bb-search-shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.06s ease;
}

.wp-block-search__inside-wrapper { background: transparent; }

.wp-block-search .wp-block-search__button.wp-element-button.has-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bb-red) 65%, transparent) 0%, transparent 42%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wp-block-search .wp-block-search__button.wp-element-button.has-icon:hover,
.wp-block-search .wp-block-search__button.wp-element-button.has-icon:focus-visible {
  box-shadow: var(--bb-search-shadow-hover);
  border-color: rgba(15, 23, 42, 0.18);
}

.wp-block-search .wp-block-search__button.wp-element-button.has-icon:hover::before,
.wp-block-search .wp-block-search__button.wp-element-button.has-icon:focus-visible::before { opacity: 0.6; }

.wp-block-search .wp-block-search__button.wp-element-button.has-icon:active {
  transform: translateY(1px);
  background: var(--bb-cta-bg);
  color: var(--text-light);
  border-color: rgba(155, 18, 27, 1);
  box-shadow: var(--bb-search-shadow-active);
}

.wp-block-search .wp-block-search__button.wp-element-button.has-icon[disabled],
.wp-block-search .wp-block-search__button.wp-element-button.has-icon:disabled {
  cursor: not-allowed;
  background: var(--bb-search-disabled-bg);
  color: color-mix(in srgb, var(--bb-text) 40%, var(--text-light) 60%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: var(--bb-search-shadow-disabled);
}

.wp-block-search .wp-block-search__button.wp-element-button.has-icon svg {
  width: 1.1em;
  height: 1.1em;
  display: block;
}

.wp-block-search .wp-block-search__button.wp-element-button.has-icon svg path,
.wp-block-search .wp-block-search__button.wp-element-button.has-icon svg circle,
.wp-block-search .wp-block-search__button.wp-element-button.has-icon svg line,
.wp-block-search .wp-block-search__button.wp-element-button.has-icon svg polyline {
  fill: currentColor;
  stroke: currentColor;
}

/* ════════════════════════════════════════════════════════════════
   12. LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════════ */

/* ── Overlay helper ───────────────────────────────────────── */
.has-overlay { position: relative; z-index: 0; }

.has-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3)  0%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0)    100%
  );
}

.has-overlay--white::before {
  background: linear-gradient(
    to bottom,
    rgba(253,254,254,0.4) 0%,
    rgba(229,231,236,0.9) 100%
  );
}

/* ── AI-generated image marker ──────────────────────────────
   Apply .ai-generated to a figure or other image wrapper.
   The shared script adds the badge element, avoiding conflicts with
   existing ::before and ::after decorations on the container. */
.ai-generated {
  --bb-ai-generated-badge: url("../assets/icons/LABEL_AI%20GENERATED_white%20transparent.svg");
  position: relative;
  isolation: isolate;
}

.ai-generated__badge {
  position: absolute;
  bottom: clamp(8px, 1.5vw, 16px);
  left: clamp(8px, 1.5vw, 16px);
  z-index: 3;
  box-sizing: border-box;
  width: 128px;
  aspect-ratio: 1789.84 / 566.93;
  pointer-events: none;
  background: var(--bb-ai-generated-badge) center / contain no-repeat;
}

html.bb-dark-mode .ai-generated,
html.wp-dark-mode-active .ai-generated {
  --bb-ai-generated-badge: url("../assets/icons/LABEL_AI%20GENERATED_black%20transparent.svg");
}

/* ── Grid auto-fit ────────────────────────────────────────── */
.bb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bb-grid--tight { gap: clamp(14px, 2.4vw, 22px); }
.bb-grid--specs { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); height: min-content; }
