/*
Theme Name: Pumping Brief 2
Theme URI: https://pumpingbrief.com/
Author: PumpingBrief
Description: Calm editorial theme for PumpingBrief, built from the owner's design brief: deep navy structure, warm cream surfaces, muted sage details and soft terracotta actions.
Version: 2.4.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pumping-brief-2
*/

/* ---------- Design tokens (palette from theme.json, brief colors) ---------- */
:root {
	--pb-navy: var(--wp--preset--color--navy);            /* #233449 */
	--pb-navy-dark: var(--wp--preset--color--navy-dark);
	--pb-cream: var(--wp--preset--color--cream);          /* #F7F3EC */
	--pb-sage: var(--wp--preset--color--sage);            /* #829487, accents only */
	--pb-sage-text: var(--wp--preset--color--sage-text);  /* #616F65, small text */
	--pb-sage-tint: var(--wp--preset--color--sage-tint);
	--pb-terracotta: var(--wp--preset--color--terracotta);           /* #C4775A, accents only */
	--pb-terracotta-text: var(--wp--preset--color--terracotta-text); /* #985C46, text and buttons */
	--pb-terracotta-dark: var(--wp--preset--color--terracotta-dark);
	--pb-terracotta-light: var(--wp--preset--color--terracotta-light);
	--pb-charcoal: var(--wp--preset--color--charcoal);    /* #343A40 */
	--pb-border: var(--wp--preset--color--border);
	--pb-radius: 8px;
	--pb-radius-sm: 6px;
	--pb-gap: 24px;
	--pb-focus: 3px solid var(--pb-terracotta-text);
}

h1, h2, h3, h4, .pb-wordmark { font-variation-settings: "SOFT" 50; }

/* ---------- Focus, links, buttons ---------- */
:where(a, button, input, select, summary):focus-visible { outline: var(--pb-focus); outline-offset: 2px; }
.wp-element-button, .wp-block-button__link { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.wp-element-button:active, .wp-block-button__link:active { transform: translateY(1px); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--pb-navy); border: 2px solid var(--pb-navy); }
.is-style-outline > .wp-block-button__link:hover { background: var(--pb-navy); color: #fff; }

/* ---------- Header ---------- */
.pb-topbar { background: #fff; }
.pb-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.pb-mark { width: 40px; height: 40px; flex: none; }
.pb-wordmark { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.7rem; line-height: 1; letter-spacing: -0.015em; }
.pb-wordmark .pb-w { color: var(--pb-navy); }
.pb-wordmark .pb-b { color: var(--pb-terracotta-text); }
.pb-search .wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; background: transparent; }
.pb-search .wp-block-search__input { border: 1px solid #C8C0B3; border-radius: var(--pb-radius-sm) 0 0 var(--pb-radius-sm); padding: 10px 14px; min-width: 280px; font-size: .95rem; background: #fff; color: var(--pb-charcoal); }
.pb-search .wp-block-search__button { background: var(--pb-navy); color: #fff; border: 0; border-radius: 0 var(--pb-radius-sm) var(--pb-radius-sm) 0; padding: 0 14px; margin-left: 0; min-height: 44px; }
.pb-search .wp-block-search__button:hover { background: var(--pb-navy-dark); }
.pb-search .wp-block-search__button svg { fill: #fff; }

.pb-navbar { background: var(--pb-navy); }
.pb-navbar .wp-block-navigation, .pb-navbar .wp-block-navigation a, .pb-navbar .wp-block-navigation-item__content { color: #fff; }
.pb-navbar .wp-block-navigation-item__content { padding: 14px 0; display: inline-block; text-decoration: none; }
.pb-navbar .wp-block-navigation a:hover, .pb-navbar .wp-block-navigation a:focus-visible { color: var(--pb-terracotta-light); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pb-navbar .current-menu-item > .wp-block-navigation-item__content { color: var(--pb-terracotta-light); }
.pb-navbar :where(a, button):focus-visible { outline-color: var(--pb-terracotta-light); }
.pb-navbar .wp-block-navigation__responsive-container-open { color: #fff; min-width: 44px; min-height: 44px; }
.pb-navbar .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; fill: #fff; }
.pb-navbar .wp-block-navigation__responsive-container.is-menu-open { background: var(--pb-navy); padding: 24px; }
.pb-navbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 12px 0; font-size: 1.15rem; }
.pb-navbar .wp-block-navigation__responsive-container-close { color: #fff; }

@media (max-width: 781px) {
	.pb-search { display: none; }
	.pb-wordmark { font-size: 1.45rem; }
	.pb-mark { width: 34px; height: 34px; }
}

/* ---------- Hero ---------- */
.pb-hero { background: var(--pb-cream); border-bottom: 1px solid var(--pb-border); }
.pb-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.pb-hero__grid--text-only { grid-template-columns: minmax(0, 760px); }
.pb-eyebrow { color: var(--pb-sage-text); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: var(--wp--preset--font-size--label); margin: 0 0 14px; }
.pb-hero h1 { font-size: var(--wp--preset--font-size--hero); line-height: 1.08; margin: 0 0 18px; }
.pb-hero__lede { font-size: 1.2rem; color: var(--pb-charcoal); max-width: 600px; margin: 0 0 28px; }
.pb-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.pb-hero__trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--pb-sage-text); font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.pb-hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.pb-hero__trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pb-terracotta); }
.pb-hero__media { margin: 0; border-radius: var(--pb-radius); overflow: hidden; border: 1px solid var(--pb-border); }
.pb-hero__media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 900px) { .pb-hero__grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 600px) { .pb-hero { padding-top: 44px !important; padding-bottom: 44px !important; } }

/* ---------- Category cards ---------- */
.pb-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pb-gap); }
@media (max-width: 1000px) { .pb-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pb-cat-grid { grid-template-columns: 1fr; } }
.pb-cat { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius); overflow: hidden; transition: border-color .15s ease; }
.pb-cat:hover, .pb-cat:focus-within { border-color: var(--pb-terracotta); }
.pb-cat__media { aspect-ratio: 3 / 2; background: var(--pb-sage-tint); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--pb-border); }
.pb-cat__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-cat__media svg { width: 64px; height: 64px; }
.pb-cat__body { padding: 18px 20px 22px; border-top: 3px solid var(--pb-sage); }
.pb-cat__title { margin: 0 0 6px; font-size: var(--wp--preset--font-size--card-title); }
.pb-cat__title a { color: var(--pb-navy); text-decoration: none; }
.pb-cat__title a::after { content: ""; position: absolute; inset: 0; }
.pb-cat:hover .pb-cat__title a { text-decoration: underline; text-underline-offset: 4px; }
.pb-cat__desc { margin: 0; color: var(--pb-charcoal); font-size: .95rem; line-height: 1.5; }

/* ---------- Article cards (query loops) ---------- */
.pb-cards .wp-block-post-template { gap: var(--pb-gap); }
.pb-cards .wp-block-post { background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease; }
.pb-cards .wp-block-post:hover, .pb-cards .wp-block-post:focus-within { border-color: var(--pb-terracotta); }
.pb-cards .wp-block-post-featured-image { margin: 0; }
.pb-cards .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.pb-cards .wp-block-post > *:not(.wp-block-post-featured-image) { margin-left: 18px; margin-right: 18px; }
.pb-cards .wp-block-post > *:last-child { margin-bottom: 20px; }
.pb-cards .wp-block-post-terms { margin-top: 14px; font-size: var(--wp--preset--font-size--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pb-cards .wp-block-post-terms a { color: var(--pb-sage-text); text-decoration: none; }
.pb-cards .wp-block-post-title { font-size: var(--wp--preset--font-size--card-title); margin-top: 6px; }
.pb-cards .wp-block-post-title a { color: var(--pb-navy); text-decoration: none; }
.pb-cards .wp-block-post-title a:hover { text-decoration: underline; }
.pb-empty { background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius); padding: 20px 22px; color: var(--pb-charcoal); }

/* Hide a guides section entirely when there are no published guides in it (no empty sections). */
.pb-latest:not(:has(.wp-block-post)) { display: none; }

/* ---------- Editorial approach ---------- */
.pb-approach { background: #fff; border-top: 1px solid var(--pb-border); border-bottom: 1px solid var(--pb-border); }
.pb-approach__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
.pb-approach__intro h2 { margin: 0 0 12px; }
.pb-approach__intro p { margin: 0 0 12px; color: var(--pb-charcoal); }
.pb-approach__list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.pb-approach__list > div { border-top: 3px solid var(--pb-terracotta); padding-top: 14px; }
.pb-approach__list dt { font-weight: 700; color: var(--pb-navy); margin: 0 0 4px; }
.pb-approach__list dd { margin: 0; color: var(--pb-charcoal); font-size: .95rem; line-height: 1.55; }
@media (max-width: 900px) { .pb-approach__grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) { .pb-approach__list { grid-template-columns: 1fr; } }

/* ---------- Category page ---------- */
.pb-cathero { background: #fff; border-bottom: 1px solid var(--pb-border); }
.pb-cathero h1 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 12px; }
.pb-cathero .wp-block-term-description, .pb-cathero__intro { font-size: 1.15rem; color: var(--pb-charcoal); max-width: 660px; }
.pb-health { background: var(--pb-sage-tint); }
.pb-medical-band { margin: 0; max-width: 820px; color: var(--pb-charcoal); }

/* ---------- Article and page layout ---------- */
.pb-article { background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius); }
.pb-article .wp-block-post-terms a { color: var(--pb-sage-text); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: var(--wp--preset--font-size--label); }
.pb-meta { color: var(--pb-sage-text); }
.entry-content > * { max-width: 720px; }
.entry-content h2 { margin-top: 2.2em; }
.entry-content h3 { margin-top: 1.6em; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--pb-border); padding: 9px 11px; text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--pb-cream); color: var(--pb-navy); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content figcaption { color: var(--pb-sage-text); }
.entry-content .wp-block-image img { border-radius: var(--pb-radius-sm); }
.pb-article-note { max-width: 720px; margin-top: 40px !important; padding: 14px 18px; background: var(--pb-sage-tint); border-left: 4px solid var(--pb-sage); border-radius: var(--pb-radius-sm); font-size: .9rem; color: var(--pb-charcoal); }
.pb-related h2 { font-size: 1.6rem; }

/* Rank Math TOC and FAQ */
.wp-block-rank-math-toc-block { background: var(--pb-cream); border: 1px solid var(--pb-border); border-radius: var(--pb-radius); padding: 18px 22px; }
.rank-math-block .rank-math-list { display: flex; flex-direction: column; gap: 14px; }
.rank-math-block .rank-math-list-item { background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius-sm); padding: 20px 24px; }
.rank-math-block .rank-math-question { color: var(--pb-navy); }

/* Product pick boxes (guides) */
.entry-content > .pb-pick { max-width: 860px; }
.pb-pick { background: #fff; border: 1px solid var(--pb-border); border-top: 4px solid var(--pb-terracotta); border-radius: var(--pb-radius); padding: 26px 26px 18px !important; margin-top: 44px !important; margin-bottom: 44px !important; }
.pb-pick > * { max-width: none !important; }
.pb-pick h3 { margin-top: 0 !important; }
@media (max-width: 640px) { .pb-pick { padding: 20px 16px 14px !important; } }

/* ---------- Footer ---------- */
.pb-footer { background: var(--pb-navy); color: #DCE1E8; }
.pb-footer a { color: #fff; }
.pb-footer a:hover { color: var(--pb-terracotta-light); }
.pb-footer :where(a):focus-visible { outline-color: var(--pb-terracotta-light); }
.pb-footer .pb-wordmark .pb-w { color: #fff; }
.pb-footer .pb-wordmark .pb-b { color: var(--pb-terracotta-light); }
.pb-footer-label { color: var(--pb-terracotta-light); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: .8rem; margin: 0 0 10px; }
.pb-footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pb-footer-links a { text-decoration: none; }
.pb-footer-links a:hover { text-decoration: underline; }
.pb-footer .pb-copy, .pb-footer .pb-medical-note { color: #C3CBD6 !important; }

img { height: auto; max-width: 100%; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

/* ---------- Full-bleed bands with a shared side gutter ---------- */
.pb-topbar, .pb-navbar, .pb-approach, .pb-footer, .pb-hero, .pb-cathero, .pb-health,
main.wp-block-group.is-layout-constrained, main.wp-block-group > .wp-block-group { padding-left: 20px !important; padding-right: 20px !important; }
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }

/* ---------- v2.1: hero with photo, card photos and links ---------- */
.pb-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.pb-hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.05rem); }
.pb-hero__lede { font-size: 1.15rem; margin-bottom: 24px; }
.pb-hero__trust { margin-top: 22px; }
.pb-hero__media { border: 0; border-radius: var(--pb-radius); background: transparent; }
.pb-hero__media img, .pb-hero__media .pb-photo-slot { aspect-ratio: 3 / 2; width: 100%; border-radius: var(--pb-radius); }
.pb-photo-slot { display: grid; place-items: center; text-align: center; background: var(--pb-sage-tint); border: 2px dashed var(--pb-sage); color: var(--pb-sage-text); font-weight: 600; font-size: .95rem; padding: 12px; }
.pb-photo-slot small { font-weight: 400; font-size: .8rem; }
.pb-photo-slot--card { width: 100%; height: 100%; border-width: 0 0 2px; border-radius: 0; }
.pb-cat__body { display: flex; flex-direction: column; flex: 1; }
.pb-cat__desc { flex: 1; margin-bottom: 14px; }
.pb-cat__cta { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 700; font-size: .95rem; color: var(--pb-terracotta-text); border-bottom: 2px solid var(--pb-terracotta); padding-bottom: 2px; }
.pb-cat__arrow { transition: transform .15s ease; }
.pb-cat:hover .pb-cat__arrow, .pb-cat:focus-within .pb-cat__arrow { transform: translateX(3px); }
.pb-cat:hover .pb-cat__title a { text-decoration: none; }
.pb-cat:focus-within { outline: 3px solid var(--pb-terracotta-text); outline-offset: 2px; }
.pb-cat__title a:focus-visible { outline: none; }
@media (max-width: 900px) {
	.pb-hero__grid { grid-template-columns: 1fr; gap: 28px; }
	.pb-hero__media { order: -1; }
}
@media (max-width: 600px) { .pb-hero__btns .wp-block-button { flex: 1 1 100%; } .pb-hero__btns .wp-block-button__link { width: 100%; text-align: center; } }

/* ---------- v2.2: no placeholder sections ---------- */
/* Guide grids with no published posts are hidden instead of showing a placeholder message. */
.pb-grid:not(:has(.wp-block-post)) { display: none; }

/* ---------- v2.3: category page alignment, hide empty grid wrapper ---------- */
.wp-block-group.pb-grid-wrap:not(:has(.wp-block-post)) { display: none; }
.pb-cathero > .wp-block-term-description { max-width: 1200px !important; }
.pb-cathero .wp-block-term-description p { max-width: 660px; margin: 0; }
.pb-health > .pb-medical-band { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; padding-right: min(380px, 30%); box-sizing: border-box; }
@media (max-width: 700px) { .pb-health > .pb-medical-band { padding-right: 0; } }

/* 2.4.0 real photos */
.pb-hero__media{margin:0}
.pb-hero__media img{display:block;height:auto;object-fit:cover;box-shadow:0 1px 3px rgba(35,52,73,.08)}
.pb-cat__media img{display:block}

/* 2.4.1 article width on small phones */
@media (max-width: 600px) {
	main.wp-block-group:has(> .pb-article) { padding-left: 10px !important; padding-right: 10px !important; }
	.pb-article { padding-left: 14px !important; padding-right: 14px !important; }
}
