/* WindshieldHUB Blog — page styles (homepage + search results).
   Container-query responsive: the .whb-page wrapper is the container, so the same
   markup adapts inside any width (production viewport, or a 390px preview frame).
   Class prefix: whb-. Requires global-header-footer-v2/design-tokens/tokens.css. */

.whb-page { container-type: inline-size; display: block; background: var(--whub-bg); font-family: var(--whub-font); color: var(--whub-text); }
.whb-page :focus-visible { outline: var(--whub-focus-ring); outline-offset: var(--whub-focus-offset); }
.whb-main { max-width: 1216px; margin: 0 auto; padding: 40px 32px 56px; }

/* Hero: H1 + intro + search + category pills */
.whb-hero { display: flex; flex-direction: column; gap: 14px; padding-bottom: 26px; border-bottom: 1px solid var(--whub-border); }
.whb-kicker { margin: 0; font-size: 12px; font-weight: var(--whub-weight-extrabold); letter-spacing: 0.1em; text-transform: uppercase; color: var(--whub-accent); }
.whb-h1 { margin: 0; font-size: 34px; line-height: 1.15; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); text-wrap: pretty; }
.whb-intro { margin: 0; font-size: 16px; line-height: 1.6; color: var(--whub-text-body); max-width: 640px; }
.whb-search { display: flex; gap: 10px; max-width: 560px; margin-top: 4px; }
.whb-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.whb-search input {
  flex: 1; height: 48px; padding: 0 16px;
  font-family: var(--whub-font); font-size: 15px; color: var(--whub-text);
  background: var(--whub-bg); border: 1.5px solid var(--whub-border-strong); border-radius: var(--whub-radius-pill);
}
.whb-search input::placeholder { color: var(--whub-text-faint); }
.whb-search button {
  height: 48px; padding: 0 24px;
  font-family: var(--whub-font); font-size: 14.5px; font-weight: var(--whub-weight-bold);
  color: #ffffff; background: var(--whub-action); border: none; border-radius: var(--whub-radius-pill); cursor: pointer;
}
.whb-search button:hover { background: var(--whub-action-hover); }
.whb-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.whb-pills a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 10px 16px;
  font-size: 13.5px; font-weight: var(--whub-weight-bold);
  color: var(--whub-navy); text-decoration: none;
  background: var(--whub-bg-tint); border: 1px solid var(--whub-border-chip); border-radius: var(--whub-radius-pill);
}
.whb-pills a:hover { color: var(--whub-accent); border-color: var(--whub-border-strong); }
.whb-pills a[aria-current="true"] { background: var(--whub-navy); border-color: var(--whub-navy); color: #ffffff; }

/* Section headings */
.whb-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 30px 0 16px; }
.whb-sechead h2 { margin: 0; font-size: 20px; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); }
.whb-sechead a { font-size: 13.5px; font-weight: var(--whub-weight-bold); color: var(--whub-accent); text-decoration: none; }
.whb-sechead a:hover { color: var(--whub-link-hover); }

/* Featured article */
.whb-featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  background: var(--whub-bg-tint); border: 1px solid var(--whub-border); border-radius: var(--whub-radius-2xl);
  padding: 22px; margin-top: 26px;
}
.whb-featured .whb-thumb { aspect-ratio: 16 / 9; }
.whb-featured-body { display: flex; flex-direction: column; gap: 10px; }
.whb-featured-body h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.whb-featured-body p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--whub-text-body); }

/* Thumbnails: placeholder blocks — production swaps in local WebP/AVIF with explicit
   width/height (aspect-ratio reserved here, so no layout shift either way). */
.whb-thumb {
  aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--whub-radius-lg);
  background: linear-gradient(135deg, var(--whub-bg-ice), var(--whub-border-strong));
  display: flex; align-items: flex-end; padding: 10px 12px;
  font-size: 10.5px; font-weight: var(--whub-weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--whub-text-muted);
}

/* Article cards */
.whb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.whb-card { display: flex; flex-direction: column; gap: 10px; }
.whb-cat {
  align-self: flex-start;
  font-size: 11px; font-weight: var(--whub-weight-extrabold); letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--whub-accent); background: var(--whub-bg-ice);
  padding: 4px 10px; border-radius: var(--whub-radius-pill);
}
.whb-card h3, .whb-featured-body h2 { font-weight: var(--whub-weight-extrabold); color: var(--whub-heading); text-wrap: pretty; }
.whb-card h3 { margin: 0; font-size: 16.5px; line-height: 1.35; }
.whb-card h3 a, .whb-featured-body h2 a { color: inherit; text-decoration: none; }
.whb-card h3 a:hover, .whb-featured-body h2 a:hover { color: var(--whub-accent); }
.whb-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--whub-text-body); }
.whb-meta { font-size: 12px; color: var(--whub-text-muted); }
.whb-meta strong { color: var(--whub-text-strong); font-weight: var(--whub-weight-bold); }

/* Load more (crawlable link) */
.whb-loadmore { display: flex; justify-content: center; margin: 34px 0 6px; }
.whb-loadmore a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 30px;
  font-size: 14.5px; font-weight: var(--whub-weight-bold);
  color: var(--whub-navy); text-decoration: none;
  border: 1.5px solid var(--whub-border-strong); border-radius: var(--whub-radius-pill);
}
.whb-loadmore a:hover { color: var(--whub-accent); border-color: var(--whub-accent); }

/* One end-of-content conversion section */
.whb-cta {
  margin-top: 40px;
  background: var(--whub-bg-tint); border: 1px solid var(--whub-border); border-radius: var(--whub-radius-2xl);
  border-top: 4px solid var(--whub-blue);
  padding: 30px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
}
.whb-cta-copy { display: flex; flex-direction: column; gap: 6px; }
.whb-cta-copy .whb-tagline { margin: 0; font-size: 22px; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); }
.whb-cta-copy .whb-tagline .b { color: var(--whub-blue); }
.whb-cta-copy .whb-tagline span { white-space: nowrap; }
.whb-cta-copy p { margin: 0; font-size: 14px; color: var(--whub-text-muted); }
.whb-cta-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.whb-cta-quote {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 155px; height: 46px; padding: 0 26px;
  background: var(--whub-action); color: #ffffff;
  font-size: 15px; font-weight: var(--whub-weight-bold);
  border-radius: var(--whub-radius-pill);
  box-shadow: 0 3px 10px rgba(8, 153, 205, 0.28);
  text-decoration: none;
}
.whb-cta-quote:hover { background: var(--whub-action-hover); }
.whb-cta-call { font-size: 13.5px; color: var(--whub-text-muted); }
.whb-cta-call a { font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); text-decoration: none; }
.whb-cta-call a:hover { color: var(--whub-accent); }

/* ---- Search results ---- */
.whb-results { display: flex; flex-direction: column; gap: 22px; margin-top: 26px; }
.whb-result { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--whub-border); }
.whb-result:last-child { border-bottom: none; }
.whb-count { margin: 10px 0 0; font-size: 14px; color: var(--whub-text-muted); }
.whb-count strong { color: var(--whub-heading); }
.whb-clear { font-size: 13.5px; font-weight: var(--whub-weight-bold); color: var(--whub-accent); background: none; border: none; cursor: pointer; font-family: var(--whub-font); padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.whb-clear:hover { color: var(--whub-link-hover); }
.whb-state { margin-top: 30px; background: var(--whub-bg-tint); border: 1px solid var(--whub-border); border-radius: var(--whub-radius-2xl); padding: 30px 32px; }
.whb-state h2 { margin: 0 0 8px; font-size: 19px; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); }
.whb-state p { margin: 0 0 14px; font-size: 14px; color: var(--whub-text-body); }
.whb-state-links { display: flex; flex-direction: column; gap: 8px; }
.whb-state-links a { font-size: 14px; font-weight: var(--whub-weight-bold); color: var(--whub-accent); text-decoration: none; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.whb-state-links a:hover { color: var(--whub-link-hover); }
.whb-skel { border-radius: var(--whub-radius-lg); background: var(--whub-bg-shell); animation: whbPulse 1.2s ease-in-out infinite; }
@keyframes whbPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .whb-skel { animation: none; } }

/* Article imagery + pending (non-clickable) titles */
.whb-thumb-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--whub-radius-lg); display: block; }
.whb-card h3 span, .whb-featured-body h2 span { color: inherit; }
.whb-result-title { margin: 0; font-size: 17px; line-height: 1.35; font-weight: var(--whub-weight-extrabold); color: var(--whub-heading); }
.whb-result-title a { color: inherit; text-decoration: none; }
.whb-result-title a:hover { color: var(--whub-accent); }

/* ---- Responsive ---- */
@container (max-width: 1023px) {
  .whb-main { padding: 32px 26px 48px; }
  .whb-grid { grid-template-columns: repeat(2, 1fr); }
}
@container (max-width: 767px) {
  .whb-main { padding: 24px 18px 40px; }
  .whb-h1 { font-size: 27px; }
  .whb-search { max-width: none; }
  .whb-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .whb-pills a { white-space: nowrap; }
  .whb-featured { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .whb-featured-body h2 { font-size: 20px; }
  .whb-grid { grid-template-columns: 1fr; gap: 26px; }
  .whb-cta { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .whb-cta-quote { width: 100%; }
  .whb-result { grid-template-columns: 1fr; gap: 12px; }
}
@container (max-width: 389px) {
  .whb-h1 { font-size: 24px; }
}

/* Staging category filter pills — real buttons carrying the approved pill design */
.whb-pill {
  appearance: none; -webkit-appearance: none;
  font-family: var(--whub-font); font-size: 13.5px; font-weight: var(--whub-weight-bold);
  color: var(--whub-text-strong);
  background: var(--whub-bg); border: 1px solid var(--whub-border-strong);
  border-radius: var(--whub-radius-pill);
  min-height: 44px; padding: 10px 18px; cursor: pointer; white-space: nowrap;
}
.whb-pill:hover { border-color: var(--whub-blue); color: var(--whub-accent); }
.whb-pill[aria-pressed="true"] { background: var(--whub-navy); color: #ffffff; border-color: var(--whub-navy); }
.whb-card[hidden] { display: none !important; }
.whb-filter-status { margin: 6px 0 0; font-size: 12.5px; color: var(--whub-text-muted); }
