/* =============================================================================
   Wine Brew and You — Core Stylesheet
   Table of contents:
     1. CSS Custom Properties (Design Tokens)
     2. Reset & Base
     3. Typography
     4. Layout & Utilities
     5. Buttons
     6. Header & Navigation
     7. Footer
     8. Homepage: Featured Categories
     9. Homepage: About / Value Props
     10. Homepage: Latest Posts / Post Grid
     11. Animations
     12. Responsive
   ========================================================================== */

/* -----------------------------------------------------------------------
   0. Local Fonts
   -------------------------------------------------------------------- */
@font-face {
	font-family: 'Feeling Passionate';
	src: url('../fonts/feeling-passionate.woff2') format('woff2'),
		url('../fonts/Feeling Passionate Personal Use Only.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* -----------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------- */
:root {
	/* Brand palette */
	--color-primary: #bf1a2c;       /* Deep Wine Red */
	--color-primary-dark: #971521;  /* Hover/active state for primary */
	--color-secondary: #845232;     /* Rich Earth Brown */
	--color-accent: #b2b0b0;        /* Sleek Gray */
	--color-white: #ffffff;
	--color-dark: #1f1f1f;          /* Deep dark gray for text */
	--color-dark-soft: #3a3a3a;
	--color-bg-light: #f9f6f5;      /* Subtle warm off-white for section backgrounds */
	--color-border: #e6e1e0;

	/* Typography */
	--font-heading: 'Feeling Passionate', 'Playfair Display', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Layout */
	--container-width: 1280px;
	--container-padding: clamp(1.25rem, 4vw, 3rem);
	--radius: 6px;
	--radius-lg: 14px;

	/* Motion */
	--transition-fast: 0.2s ease;
	--transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	/* Defensive backstop against horizontal scroll — content this theme
	   doesn't fully control (e.g. the Campaign Monitor newsletter embed
	   in the footer) has already caused this once by rendering wider
	   than the viewport. This doesn't fix an overflow's root cause on
	   its own — that's still handled per-component — it just stops any
	   future one from making the whole page scroll sideways. Set here on
	   <html> specifically, not <body>: overflow on <body> turns it into
	   its own scroll container, which is a well-known way to break
	   .site-header's position: sticky.
	*/
	overflow-x: hidden;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--color-dark);
	background-color: var(--color-white);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	/* Sticky footer: ensures the footer always sits at the bottom */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

#page.site {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.site-main {
	flex: 1;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition-fast);
}

ul,
ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* Accessibility helpers */
.screen-reader-text {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	background: var(--color-dark);
	color: var(--color-white);
	padding: 0.75rem 1.25rem;
	border-radius: var(--radius);
	z-index: 10000;
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: 1rem;
	left: -9999px;
	left: 1rem;
}

/* -----------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	/* Feeling Passionate only ships a single (regular) weight — 600 here would
	   make the browser synthesize a fake bold, which distorts decorative/
	   display faces like this one. */
	font-weight: 400;
	line-height: 1.2;
	color: var(--color-dark);
	margin: 0 0 0.6em;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.75rem); }

p {
	margin: 0 0 1.25em;
}

.section-heading {
	margin-bottom: 1.5rem;
}

.section-heading--center {
	text-align: center;
	margin-inline: auto;
	margin-bottom: 3rem;
}

.section-heading-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}

.section-heading-row .section-heading {
	margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   4. Layout & Utilities
   -------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-padding);
}

.container--narrow {
	max-width: 800px;
}

/* Generic page header (index, archives, search, content pages) */
.page-header {
	margin-bottom: clamp(2rem, 5vw, 3rem);
}

.page-title {
	margin-bottom: 0;
}

.archive-description {
	max-width: 65ch;
	margin-top: 0.75rem;
	color: var(--color-dark-soft);
}

.page-links {
	margin-top: 2rem;
	font-weight: 600;
}

section {
	padding-block: clamp(3rem, 8vw, 6rem);
}

.site-main.front-page > section:first-of-type {
	padding-top: 0;
	padding-bottom: 0;
}

/* -----------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------- */
.wby-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	padding: 0.95rem 2.25rem;
	border: 1.5px solid transparent;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background-color var(--transition-base), color var(--transition-base),
		border-color var(--transition-base), transform var(--transition-fast),
		box-shadow var(--transition-base);
	white-space: nowrap;
}

.wby-button:hover,
.wby-button:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px -8px rgba(31, 31, 31, 0.35);
}

.wby-button--primary {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
}

.wby-button--primary:hover {
	background-color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
	color: var(--color-white);
}

.wby-button--outline {
	background-color: transparent;
	border-color: currentColor;
	color: var(--color-dark);
}

.wby-button--outline:hover {
	background-color: var(--color-dark);
	border-color: var(--color-dark);
	color: var(--color-white);
}

.wby-button--small {
	padding: 0.55rem 1.4rem;
	font-size: 0.85rem;
}

/* -----------------------------------------------------------------------
   6. Header & Navigation
   -------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
}

/* `filter`/`backdrop-filter` on an ancestor quietly makes that ancestor
   the containing block for any `position: fixed` descendant, instead of
   the viewport — which was silently confining the mobile slide-out menu
   (a fixed-position element inside this header) to the header bar's own
   ~150px height rather than the full screen. Drop the blur while the menu
   is open so the drawer is fixed to the viewport as intended; the header
   bar is fully covered by the drawer/backdrop at that point anyway, so
   losing the blur for that moment is invisible. */
body.wby-nav-open .site-header {
	backdrop-filter: none;
}

/* Utility bar — search toggle, social icons, phone number, edge to edge */
.site-header__bar {
	background-color: var(--color-dark);
	color: rgba(255, 255, 255, 0.85);
}

.site-header__bar-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 1.25rem;
	width: 100%;
	padding-block: 0.5rem;
	padding-left: clamp(5rem, 10vw, 8rem);
	padding-right: clamp(2.5rem, 5vw, 5rem);
	font-size: 0.85rem;
}

.site-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 600;
	transition: color var(--transition-fast);
}

.site-header__phone:hover {
	color: var(--color-white);
}

.site-header__phone svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.site-header__social {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.site-header__social a {
	display: inline-flex;
	color: rgba(255, 255, 255, 0.75);
	transition: color var(--transition-fast);
}

.site-header__social a:hover {
	color: var(--color-white);
}

.site-header__social svg {
	width: 18px;
	height: 18px;
}

/* Main row — full width, padded to align the logo with the hero slide heading.
   Desktop: the logo is taken out of flow and centered absolutely on the
   full bar width (see .site-branding below), so it's genuinely centered
   regardless of what's in the side groups. The two nav halves are
   `flex: 1` — each claims exactly half of the row, so their shared inner
   edge sits at the same true center the logo is pinned to, with each
   half's own items pushed to hug that edge (menu items end up right next
   to the logo, "spanning out" from it). Actions (cart/inquire — search
   lives in the utility bar above, see .site-header__search-toggle) is
   ALSO taken out of flow and pinned to the right edge — if it stayed a
   normal flex item, its width would eat into the right nav's `flex: 1`
   share only, shifting the nav's center-split left of the logo's true
   center. The mobile-only nav (#site-navigation, full unsplit menu behind
   the hamburger toggle) collapses this back to a simple two-item row —
   see the ≤768px rules below, which also put actions back in normal flow. */
.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 84px;
	width: 100%;
	/* Symmetric — this used to be left-heavy (clamp(5rem,10vw,8rem) vs
	   clamp(2.5rem,5vw,5rem)) to line the left-aligned logo up with the
	   hero heading's indent. Now that the logo is centered, that asymmetry
	   actively breaks the centering: flex layout splits space based on
	   the CONTENT box (i.e., after this padding is subtracted), so unequal
	   left/right padding shifts the nav-halves' shared boundary away from
	   the logo's true (padding-independent) center — which is exactly why
	   the two sides looked uneven. */
	padding-inline: clamp(1.25rem, 2.5vw, 2.5rem);
}

.site-header__split-nav {
	display: flex;
	align-items: center;
	flex: 1 1 0;
	min-width: 0;
}

.site-header__split-nav--left {
	justify-content: flex-end;
	/* Leaves clear room on each side of the centered logo (up to 264px /
	   16.5rem wide, see .site-branding img) — half that is 8.25rem, so
	   this needs to stay at least that much to avoid overlap. Fixed
	   rather than responsive: the logo itself doesn't shrink at any
	   desktop width, so scaling this down on narrower desktop/tablet
	   widths would just reintroduce the overlap it exists to prevent. */
	padding-right: 10rem;
}

.site-header__split-nav--right {
	justify-content: flex-start;
	padding-left: 10rem;
}

.site-header__actions {
	position: absolute;
	top: 50%;
	right: clamp(2.5rem, 5vw, 5rem);
	transform: translateY(-50%);
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* Lives in the dark utility bar (.site-header__bar) alongside the social
   icons and phone number — solid white plus its own translucent-white
   circle backdrop, deliberately more opaque than the muted
   rgba(255,255,255,.75/.85) used for those, so it reads as the one
   actionable button in that row rather than just another icon. */
.site-header__search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.site-header__search-toggle:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

.site-header__search-toggle svg {
	width: 16px;
	height: 16px;
}

.site-header__search {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	box-shadow: 0 16px 32px -16px rgba(31, 31, 31, 0.2);
	padding: 1.25rem clamp(2.5rem, 5vw, 5rem);
}

.site-header__search[hidden] {
	display: none;
}

.site-header__search .search-form {
	max-width: none;
	width: 100%;
}

/* Centered on the full width of .site-header__inner (its containing
   block), independent of the nav/actions content on either side — see
   the .site-header__inner comment above. Reverts to normal, in-flow
   left-aligned positioning on mobile (≤768px), where the layout is a
   simple two-item row instead. */
.site-branding {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}

.site-branding .site-title {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--color-dark);
	letter-spacing: 0.02em;
}

.site-branding img {
	max-height: 67px; /* 56px + 20% */
	width: auto;
	/* Safety cap so an unusually wide uploaded logo can't grow past the
	   buffer the nav halves leave clear for it (see
	   .site-header__split-nav--left/--right padding). Also scaled +20%. */
	max-width: 264px;
}

/* #site-navigation (the full, unsplit menu behind the hamburger toggle) is
   mobile-only — hidden by default, shown at ≤1300px below alongside the
   split-nav halves being hidden. */
.main-navigation {
	display: none;
	align-items: center;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 1.5rem; /* reduced back down after the menu grew significantly */
}

.primary-menu a {
	position: relative;
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-dark);
	padding: 0.4rem 0;
}

.primary-menu a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 2px;
	background-color: var(--color-primary);
	transition: width var(--transition-base);
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
	color: var(--color-primary);
}

.primary-menu a:hover::after,
.primary-menu a:focus-visible::after {
	width: 100%;
}

.primary-menu .current-menu-item > a {
	color: var(--color-primary);
}

.primary-menu .current-menu-item > a::after {
	width: 100%;
}

/* Submenu indicator — small chevron on items with children */
.primary-menu .menu-item-has-children > a {
	padding-right: 1.2em;
}

.primary-menu .menu-item-has-children > a::before {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform var(--transition-fast);
}

.primary-menu .menu-item-has-children:hover > a::before,
.primary-menu .menu-item-has-children:focus-within > a::before {
	transform: translateY(-30%) rotate(-135deg);
}

/* Sub-menus */
.primary-menu li {
	position: relative;
}

.primary-menu ul {
	position: absolute;
	top: calc(100% + 14px);
	left: 0;
	min-width: 220px;
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 16px 40px -16px rgba(31, 31, 31, 0.2);
	padding: 0.5rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	z-index: 100;
}

/* Shown state is driven by JS (see main.js) rather than raw :hover — the
   14px gap above is empty space with no element in it, so plain :hover on
   the <li> is lost the instant the pointer leaves the parent link, well
   before it reaches the submenu below. main.js debounces the close with a
   real timer instead, which reliably survives crossing that gap.
   :focus-within is kept as-is for keyboard users tabbing between links,
   since that has no equivalent "gap" problem. */
.primary-menu li.is-open > ul,
.primary-menu li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

.primary-menu ul a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: var(--radius);
}

.primary-menu ul a::after {
	display: none;
}

.primary-menu ul a:hover {
	background-color: var(--color-bg-light);
}

/* Mobile menu toggle */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	border: none;
	background: transparent;
	padding: 0;
}

.menu-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--color-dark);
	transition: transform var(--transition-base), opacity var(--transition-base);
	margin-inline: auto;
}

/* Locks background scroll while the mobile slide-out menu is open (see
   main.js, which toggles this on <body> alongside .is-open on the nav). */
body.wby-nav-open {
	overflow: hidden;
}

/* Header cart / inquire */
.site-header__cart {
	display: flex;
	align-items: center;
}

/* The header "Inquire" button reuses .wby-button--outline (shared with
   other outline buttons elsewhere), but scoped to this specific spot it
   should default to solid black/white and invert on hover — the opposite
   of that shared class's own default. */
.site-header__cart .wby-button--outline {
	background-color: var(--color-dark);
	border-color: var(--color-dark);
	color: var(--color-white);
}

.site-header__cart .wby-button--outline:hover {
	background-color: var(--color-white);
	border-color: var(--color-dark);
	color: var(--color-dark);
}

.cart-icon {
	position: relative;
	display: inline-flex;
	color: var(--color-dark);
	transition: color var(--transition-fast);
}

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

.cart-icon__count {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--color-white);
	background-color: var(--color-primary);
	border-radius: 50%;
	padding: 0 4px;
}

/* -----------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------- */
/* Background image lives directly on .site-footer itself (rather than a
   separate absolutely-positioned inset:0 div tracking its height) so it's
   structurally guaranteed to always cover the element's full, actual
   height — including .site-footer__bottom — no matter how tall the
   content above it grows (e.g. after the newsletter form was added).
   Only the color overlay (which needs its own opacity, independent of
   the image beneath it) remains a separate div. */
.site-footer {
	position: relative;
	background-color: var(--color-dark);
	background-image: var(--footer-bg-url, none);
	background-size: cover;
	background-position: center;
	color: var(--color-white);
	margin-top: clamp(3rem, 8vw, 6rem);
	overflow: hidden;
}

/* Fixed-85%-opacity color overlay on top of the background image (Site
   Settings → Footer Information → Footer Background Image / Footer
   Overlay Color) — only rendered in the markup when an image is set.
   Overlay opacity is intentionally fixed (not editable) per spec — only
   its color is. */
.site-footer__overlay {
	position: absolute;
	inset: 0;
	background-color: var(--footer-overlay-color, var(--color-dark));
	opacity: 0.85;
	z-index: 0;
	pointer-events: none;
}

.site-footer__top {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
	padding-block: clamp(2.5rem, 6vw, 4rem);
}

.footer-brand {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.footer-site-title {
	font-family: var(--font-heading);
	color: var(--color-white);
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	margin: 0;
}

.footer-logo img {
	max-height: 105px;
	width: auto;
}

.site-footer a {
	color: var(--color-white);
}

.site-footer a:hover {
	color: var(--color-white);
}

.footer-menu {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Social icons row in footer brand column */
.footer-social {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.footer-social a {
	display: inline-flex;
	color: var(--color-white);
	transition: color var(--transition-fast);
}

.footer-social a:hover {
	color: var(--color-white);
}

.footer-social svg {
	width: 20px;
	height: 20px;
}

/* Address + hours column */
.footer-info {
	display: grid;
	grid-template-columns: repeat(2, minmax(max-content, 1fr));
	gap: 2rem;
	align-items: start;
}

.footer-info__label {
	/* Rendered as <h3> in footer.php, so it inherits font-family:
	   var(--font-heading) from the global heading rule unless overridden
	   here — body font reads better at this size/weight than the
	   decorative Feeling Passionate heading face. */
	font-family: var(--font-body);
	font-size: 1.2rem; /* 0.75rem + 60% */
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-white);
	margin: 0 0 0.75rem;
}

.footer-info__address {
	font-style: normal;
	line-height: 1.8;
	color: var(--color-white);
	margin: 0;
}

.footer-hours {
	margin: 0;
}

.footer-hours__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.35rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	font-size: 0.875rem;
}

.footer-hours__row:last-child {
	border-bottom: none;
}

.footer-hours__day {
	font-weight: 600;
	color: var(--color-white);
	white-space: nowrap;
}

.footer-hours__time {
	color: var(--color-white);
	margin: 0;
	text-align: right;
	white-space: nowrap;
}

/* Newsletter signup — full-width row, below the brand/info columns.
   Campaign Monitor's "unstyled" embed still ships its own nested
   <form><div><div><label>+<input></div>...</div><button></form>
   structure with no classes to hook into, so these rules target bare
   element selectors scoped to .footer-newsletter__form rather than
   theme-specific classes. Two things about that markup matter here:
   1. It nests the fields inside an extra unlabeled <div> below the
      <form> itself, so the form needs its child <div> flexed too (not
      just the form) to get everything sitting in one row.
   2. Its "Name" field has no type="text" attribute at all (relies on
      the browser's implicit default) — an input[type="text"] selector
      never matches an element with no type attribute in the markup at
      all, so that field was falling through to bare, unstyled browser
      defaults (a stark white box) instead of picking up the dark-theme
      styling below. Targeting bare `input` sidesteps that entirely. */
.footer-newsletter {
	position: relative;
	z-index: 1;
	grid-column: 1 / -1;
	padding-top: 3rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-newsletter__heading {
	font-family: var(--font-body);
	font-size: 1.2rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-white);
	margin: 0 0 0.5rem;
}

.footer-newsletter__text {
	color: rgba(255, 255, 255, 0.85);
	max-width: 520px;
	margin: 0 0 1.25rem;
}

.footer-newsletter__form form,
.footer-newsletter__form form > div {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	/* Same min-width:auto flex-item trap documented elsewhere in this
	   theme (.product-card, .term-card__link): flex items default to a
	   content-based minimum width, not their flex-basis, so a wide
	   min-content size on any field here (fonts/attributes Campaign
	   Monitor's markup sets, outside this theme's control) could hold
	   this row wider than the viewport even with flex-wrap — this was
	   the actual cause of the mobile horizontal scroll. */
	min-width: 0;
	max-width: 100%;
}

.footer-newsletter__form form > div {
	flex: 1 1 auto;
}

.footer-newsletter__form form > div > div {
	flex: 1 1 200px;
	min-width: 0;
}

.footer-newsletter__form label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 0.4rem;
}

.footer-newsletter__form input {
	width: 100%;
	max-width: 100%; /* hard cap regardless of any inline width Campaign Monitor's own markup might set */
	box-sizing: border-box;
	padding: 0.8rem 1rem;
	border: 1.5px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius);
	background-color: rgba(255, 255, 255, 0.05);
	color: var(--color-white);
	font-family: var(--font-body);
	font-size: 0.95rem;
}

.footer-newsletter__form input::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

.footer-newsletter__form button {
	flex: 0 0 auto;
	padding: 0.8rem 1.75rem;
	border: 1.5px solid var(--color-white);
	border-radius: var(--radius);
	background-color: var(--color-white);
	color: var(--color-dark);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background-color var(--transition-base), color var(--transition-base);
}

.footer-newsletter__form button:hover {
	background-color: transparent;
	color: var(--color-white);
}

.site-footer__bottom {
	position: relative;
	z-index: 1;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-block: 1.5rem;
}

.site-footer__copyright {
	margin: 0;
	font-size: 0.85rem;
	color: var(--color-white);
	text-align: center;
}

/* -----------------------------------------------------------------------
   CTA Banner (above footer, all pages)
   -------------------------------------------------------------------- */
.cta-section {
	background-color: var(--color-primary);
	color: var(--color-white);
	padding-block: clamp(3rem, 8vw, 5rem);
	text-align: center;
}

.cta-section__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.cta-section__heading {
	color: var(--color-white);
	margin: 0;
}

.cta-section__subheading {
	max-width: 60ch;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	font-size: 1.1rem;
}

.cta-section__button {
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--color-white);
	margin-top: 0.5rem;
}

.cta-section__button:hover {
	background-color: var(--color-white);
	border-color: var(--color-white);
	color: var(--color-primary);
}

/* Remove the footer's top margin when the CTA immediately precedes it */
.cta-section + .site-footer {
	margin-top: 0;
}

/* -----------------------------------------------------------------------
   Reviews / Testimonials section (homepage)
   -------------------------------------------------------------------- */
.reviews-section {
	position: relative;
	background-image: var(--reviews-bg-url, none);
	background-size: cover;
	background-position: center;
	padding-block: clamp(3rem, 8vw, 6rem);
}

.reviews-section__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(255, 255, 255, 0.88);
	pointer-events: none;
}

.reviews-section__inner {
	position: relative;
	z-index: 1;
}

.reviews-section__heading {
	text-align: center;
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Defensive: this embeds a third-party reviews widget via shortcode,
   whose own markup/CSS this theme doesn't control — same category of
   bug the Campaign Monitor newsletter embed caused in the footer (a
   fixed-width element forcing the page to scroll horizontally). Scopes
   any such overflow to a local scrollbar within this section instead. */
.reviews-section__embed {
	max-width: 100%;
	overflow-x: auto;
}

/* -----------------------------------------------------------------------
   Homepage: FAQ
   -------------------------------------------------------------------- */
.faq-section {
	background-color: var(--color-bg-light);
	padding-block: clamp(3rem, 8vw, 6rem);
}

/* Single centered column, capped for readability now that the text
   itself is center-aligned (unconstrained centered text at full container
   width reads poorly on wide screens). */
.faq-section__list {
	max-width: 760px;
	margin-inline: auto;
}

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

.faq-item:first-child {
	border-top: 1px solid var(--color-border);
}

.faq-item__heading {
	margin: 0;
	font-size: 1em;
}

.faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding-block: 1.25rem;
	background: none;
	border: none;
	text-align: left;
	font-family: var(--font-body);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--color-dark);
	cursor: pointer;
	transition: color var(--transition-fast);
}

.faq-item__question:hover,
.faq-item__question:focus-visible {
	color: var(--color-primary);
}

.faq-item__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--color-border);
	color: var(--color-primary);
	transition: background-color var(--transition-base), border-color var(--transition-base);
}

.faq-item__icon svg {
	width: 14px;
	height: 14px;
	transition: transform var(--transition-base);
}

.faq-item.is-open .faq-item__icon {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
}

.faq-item.is-open .faq-item__icon svg {
	transform: rotate(45deg); /* plus → close */
}

/* Smooth open/close via a grid-row transition — no JS height measurement
   needed, and it handles answers of any length cleanly. */
.faq-item__answer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.35s ease;
}

.faq-item.is-open .faq-item__answer {
	grid-template-rows: 1fr;
}

.faq-item__answer-inner {
	overflow: hidden;
}

.faq-item__answer-content {
	padding-bottom: 1.25rem;
	color: var(--color-dark-soft);
	line-height: 1.7;
	text-align: left;
}

.faq-item__answer-content > *:last-child {
	margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   Homepage: Instagram Feed
   Just a section wrapper — the embed's own contents are entirely
   rendered by whichever Instagram feed plugin is active, via shortcode.
   -------------------------------------------------------------------- */
.instagram-feed {
	padding-block: clamp(3rem, 8vw, 6rem);
}

.instagram-feed .section-heading--center {
	margin-bottom: 2.5rem;
}

/* Defensive: same reasoning as .reviews-section__embed above — this
   embeds a third-party Instagram feed plugin's own markup, whose fixed
   widths (if any) shouldn't be able to force the whole page to scroll
   horizontally. */
.instagram-feed__embed {
	max-width: 100%;
	overflow-x: auto;
}

/* -----------------------------------------------------------------------
   8. Homepage: Featured Categories
   -------------------------------------------------------------------- */
.featured-categories {
	background-color: var(--color-white);
}

.featured-categories__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.category-card {
	position: relative;
	display: block;
	border-radius: var(--radius-lg);
	overflow: hidden;
	aspect-ratio: 4 / 5;
	color: var(--color-white);
	box-shadow: 0 20px 40px -24px rgba(31, 31, 31, 0.35);
}

.category-card__media {
	position: absolute;
	inset: 0;
}

.category-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

.category-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(31, 31, 31, 0) 40%, rgba(20, 12, 12, 0.85) 100%);
	transition: opacity var(--transition-base);
}

.category-card:hover .category-card__image {
	transform: scale(1.06);
}

.category-card__content {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 2rem;
}

.category-card__title {
	color: var(--color-white);
	margin-bottom: 0.4rem;
}

.category-card__description {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.category-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: gap var(--transition-base);
}

.category-card:hover .category-card__cta {
	gap: 0.9rem;
}

/* -----------------------------------------------------------------------
   Homepage: Feature Rows (full-width, alternating image/content)
   -------------------------------------------------------------------- */
/* Overrides the global `section { padding-block: ... }` default — these
   rows are meant to sit flush against each other and the sections above/
   below, edge to edge, with no gap (the alternating colors/images provide
   the visual separation instead). */
.feature-rows {
	padding-block: 0;
}

.feature-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: clamp(420px, 45vw, 620px);
}

.feature-row__media {
	position: relative;
	overflow: hidden;
	order: 1;
}

.feature-row__content {
	order: 2;
	display: flex;
	align-items: center;
	background-color: var(--color-bg-light);
	padding: clamp(2.5rem, 6vw, 6rem);
}

.feature-row--reverse .feature-row__media {
	order: 2;
}

.feature-row--reverse .feature-row__content {
	order: 1;
}

.feature-row__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.feature-row__content-inner {
	max-width: 460px;
}

.feature-row__kicker {
	display: block;
	color: var(--color-primary);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 0.75rem;
}

.feature-row__heading {
	margin-bottom: 1rem;
}

.feature-row__body {
	color: var(--color-dark-soft);
	margin-bottom: 1.75rem;
}

.feature-row__body p:last-child {
	margin-bottom: 0;
}

.feature-row__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-primary);
	padding-bottom: 0.3rem;
	border-bottom: 1.5px solid var(--color-primary);
	transition: gap var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.feature-row__cta:hover,
.feature-row__cta:focus-visible {
	gap: 0.85rem;
	color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
}

.feature-row__cta svg {
	flex-shrink: 0;
}

/* -----------------------------------------------------------------------
   9. Homepage: About / Value Props
   -------------------------------------------------------------------- */
.about-intro {
	background-color: var(--color-bg-light);
}

.about-intro__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
}

.about-intro__media {
	position: relative;
}

/* Offset color block peeking out from behind the image — replaces the
   plain-rectangle look with a looser, layered treatment. */
.about-intro__media::before {
	content: '';
	position: absolute;
	top: -1.5rem;
	left: -1.5rem;
	width: 60%;
	height: 60%;
	background-color: var(--color-primary);
	border-radius: var(--radius-lg);
	transform: rotate(-4deg);
	z-index: 0;
}

.about-intro__image {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius-lg);
	box-shadow: 0 30px 60px -30px rgba(31, 31, 31, 0.4);
}

/* "Since [year]" badge, overlapping the image's bottom-right corner —
   opposite the offset color block above for visual balance. */
.about-intro__badge {
	position: absolute;
	right: -1.25rem;
	bottom: -1.25rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 108px;
	height: 108px;
	border-radius: 50%;
	background-color: var(--color-dark);
	color: var(--color-white);
	text-align: center;
	border: 3px solid var(--color-bg-light);
	box-shadow: 0 16px 32px -12px rgba(31, 31, 31, 0.45);
}

.about-intro__badge-label {
	font-family: var(--font-body);
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.7);
}

.about-intro__badge-year {
	font-family: var(--font-body);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.1;
	margin-top: 0.15rem;
}

.about-intro__text {
	color: var(--color-dark-soft);
}

.value-props {
	display: grid;
	gap: 1.5rem;
	margin-top: 2rem;
}

.value-props__item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.value-props__icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: rgba(191, 26, 44, 0.08);
}

.value-props__icon-image {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.value-props__copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.value-props__heading {
	font-family: var(--font-heading);
	font-size: 1.05rem;
	font-weight: 400; /* override <strong>'s default bold — avoids synthesized fake-bold */
	color: var(--color-dark);
}

.value-props__text {
	font-size: 0.95rem;
	color: var(--color-dark-soft);
}

/* -----------------------------------------------------------------------
   10. Homepage: Resources (Latest Posts) / Post Grid
   -------------------------------------------------------------------- */
.resources-section {
	padding-block: clamp(3rem, 8vw, 6rem);
	background-color: #faf8f6;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.post-card {
	display: flex;
	flex-direction: column;
	background-color: var(--color-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform var(--transition-base), box-shadow var(--transition-base);
	border: 1px solid var(--color-border);
}

.post-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 48px -28px rgba(31, 31, 31, 0.3);
}

.post-card__image {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

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

.post-card__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.post-card__title {
	font-family: var(--font-body);
	font-size: 1.25rem;
	margin-bottom: 0;
}

.post-card__title a {
	color: var(--color-dark);
}

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

.post-card__meta {
	font-size: 0.8rem;
	color: var(--color-accent);
	display: flex;
	gap: 0.5rem;
}

.post-card__excerpt {
	font-size: 0.95rem;
	color: var(--color-dark-soft);
	margin-bottom: 0;
}

.wby-read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--color-primary);
	margin-top: 0.5rem;
}

.pagination-wrapper {
	margin-top: 3rem;
	display: flex;
	justify-content: center;
}

/* -----------------------------------------------------------------------
   10b. Generic Page Content & Comments
   -------------------------------------------------------------------- */
/* Note: deliberately not named ".page-template" — WordPress core adds that
   exact class to <body> (not this element) on any page with an assigned
   custom template (e.g. Contact Page, About Page), which collided with
   this rule and added unwanted padding above the header/below the footer
   on every custom-template page. */
.page-content-wrap {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.page-thumbnail {
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: 2.5rem;
}

.page-content {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--color-dark-soft);
}

.page-content > * + * {
	margin-top: 1.25em;
}

.page-content h2,
.page-content h3,
.page-content h4 {
	color: var(--color-dark);
	margin-top: 2em;
}

.page-content ul,
.page-content ol {
	list-style: revert;
	padding-left: 1.5em;
}

.page-content a {
	text-decoration: underline;
	text-decoration-color: var(--color-accent);
}

.page-content a:hover {
	text-decoration-color: var(--color-primary);
}

/* Comments (shared by single posts and pages) */
.comments-area {
	margin-top: 3rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--color-border);
}

.comments-title {
	margin-bottom: 1.5rem;
}

.comment-list {
	display: grid;
	gap: 1.75rem;
	margin-bottom: 2rem;
}

.comment-list .children {
	margin-top: 1.75rem;
	margin-left: clamp(1rem, 4vw, 3rem);
	display: grid;
	gap: 1.75rem;
}

.comment-body {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 1rem;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .fn {
	font-family: var(--font-heading);
	font-style: normal;
	color: var(--color-dark);
}

.comment-metadata {
	font-size: 0.8rem;
	color: var(--color-accent);
}

.comment-content p {
	margin: 0.5em 0 0;
	color: var(--color-dark-soft);
}

.comment-reply-link {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--color-primary);
}

.comment-respond .comment-form {
	display: grid;
	gap: 1rem;
	margin-top: 1rem;
}

.comment-form p {
	margin: 0;
}

.comment-form label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 0.95rem;
	transition: border-color var(--transition-base);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.comment-form-cookies-consent label {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.comment-body {
		grid-template-columns: 44px 1fr;
	}
}

/* -----------------------------------------------------------------------
   10c. Search Form, Search Results & 404
   -------------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 0.75rem;
	max-width: 480px;
}

.search-form__label {
	flex: 1 1 auto;
	margin-bottom: 0;
}

.search-field {
	width: 100%;
	padding: 0.95rem 1.25rem;
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 0.95rem;
	background-color: var(--color-white);
	transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-field:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(191, 26, 44, 0.12);
}

.search-submit {
	flex-shrink: 0;
}

.search-submit svg {
	width: 18px;
	height: 18px;
}

/* Search results list */
.site-main.blog-index .container {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.search-results__list {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.search-result {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 1.5rem;
	padding: 1.5rem;
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

/* When a result has no featured image, collapse to a single column
   so content is not trapped in the narrow 160px image slot. */
.search-result:not(.has-post-thumbnail) {
	grid-template-columns: 1fr;
}

.search-result:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 48px -28px rgba(31, 31, 31, 0.3);
}

.search-result__image {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius);
	overflow: hidden;
}

.search-result__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.search-result__content {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.search-result__type {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-primary);
}

.search-result__title {
	margin-bottom: 0;
}

.search-result__title a {
	color: var(--color-dark);
}

.search-result__title a:hover {
	color: var(--color-primary);
}

.search-result__excerpt {
	color: var(--color-dark-soft);
}

.search-results__none {
	margin-bottom: 2.5rem;
	color: var(--color-dark-soft);
}

/* 404 page */
.error-404__content {
	text-align: center;
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.error-404__code {
	font-family: var(--font-heading);
	font-size: clamp(4rem, 12vw, 7rem);
	font-weight: 400;
	line-height: 1;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
}

.error-404__text {
	max-width: 50ch;
	margin: 1rem auto 2rem;
	color: var(--color-dark-soft);
}

.error-404__content .search-form {
	margin: 0 auto 2.5rem;
}

.error-404__links {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* -----------------------------------------------------------------------
   11. Animations
   -------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.fade-in-up {
		opacity: 0;
		transform: translateY(24px);
		transition: opacity 0.8s ease, transform 0.8s ease;
	}

	.fade-in-up.is-visible {
		opacity: 1;
		transform: translateY(0);
	}
}

/* -----------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.featured-categories__grid,
	.post-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Always stack image-on-top regardless of --reverse — left/right
	   alternation only makes sense in the two-column layout. */
	.feature-row,
	.feature-row--reverse {
		grid-template-columns: 1fr;
	}

	.feature-row__media,
	.feature-row--reverse .feature-row__media {
		order: -1;
		aspect-ratio: 4 / 3;
	}

	.feature-row__content,
	.feature-row--reverse .feature-row__content {
		order: 0;
	}

	.feature-row__content-inner {
		max-width: none;
	}

	.about-intro__grid {
		grid-template-columns: 1fr;
	}

	.about-intro__media {
		order: -1;
	}

	/* Slightly smaller badge and tighter offsets so neither crowds the
	   narrower single-column layout's edges. */
	.about-intro__media::before {
		top: -1rem;
		left: -1rem;
	}

	.about-intro__badge {
		right: -0.75rem;
		bottom: -0.75rem;
		width: 88px;
		height: 88px;
	}

	.about-intro__badge-year {
		font-size: 1.3rem;
	}
}

/* Tighten the header's side padding on smaller screens. */
@media (max-width: 900px) {
	.site-header__inner,
	.site-header__bar-inner,
	.site-header__search {
		padding-left: clamp(1.25rem, 5vw, 3rem);
		padding-right: clamp(1.25rem, 5vw, 3rem);
	}
}

/* Header / nav breakpoint — deliberately much wider than the general
   ≤768px "mobile content" breakpoint below: the primary menu has grown
   enough items that the split desktop layout runs out of room well
   before phone/tablet widths, so it switches to the hamburger drawer on
   its own, earlier threshold. */
@media (max-width: 1300px) {
	/* Collapse the desktop layout (absolutely-centered logo, nav split
	   left/right of it) back to a simple two-item row — the split-nav
	   halves are replaced by the full unsplit menu behind the hamburger
	   toggle, and the logo goes back to normal in-flow, left-aligned
	   positioning. */
	.site-header__inner {
		display: flex;
		justify-content: space-between;
	}

	.site-branding {
		position: static;
		transform: none;
	}

	.site-header__split-nav {
		display: none;
	}

	.site-header__actions {
		/* Back to a normal in-flow flex item — the desktop rule pins it
		   absolutely to the right edge, which doesn't apply here. */
		position: static;
		transform: none;
		margin-left: auto;
	}

	/* Hide the header "Inquire" button (Catalog Mode) on mobile — the
	   product page's own "Inquire About This Product" button remains the
	   primary call to action there instead. Scoped to this specific
	   modifier class, not .site-header__cart generally, so the WooCommerce
	   cart icon (rendered via the same wrapper when Catalog Mode is off)
	   stays visible on mobile if/when online ordering is turned on. */
	.site-header__cart--inquire {
		display: none;
	}

	.menu-toggle {
		display: flex;
	}

	.main-navigation {
		display: flex;
		position: relative;
	}

	/* Full-height off-canvas drawer, slides in from the right edge of the
	   viewport (rather than dropping down from the toggle button) —
	   fixed positioning so it isn't constrained by .main-navigation's own
	   (small) box.

	   Hidden via clip-path rather than `transform: translateX(100%)`
	   deliberately: this box sits at right:0 at all times (never actually
	   moved outside the viewport), so it can't inflate the page's
	   scrollable width. A transform-based slide previously did exactly
	   that — since this is `position: fixed`, it escapes every ancestor's
	   `overflow: hidden` except the true document root, and this theme's
	   root-level fix (see the `overflow-x: hidden` comment on <html>
	   above) is deliberately not duplicated onto <body> because that
	   breaks .site-header's position: sticky — so a transformed fixed
	   drawer had no ancestor left to clip it, and caused a real mobile/
	   tablet horizontal scrollbar while closed. clip-path only changes
	   what's painted, not the box's position, so it can't do that. */
	.primary-menu {
		position: fixed;
		top: 0;
		right: 0;
		left: auto;
		bottom: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: min(320px, 80vw);
		background-color: var(--color-white);
		border: none;
		border-left: 1px solid var(--color-border);
		border-radius: 0;
		box-shadow: -16px 0 40px -16px rgba(31, 31, 31, 0.25);
		min-width: 0;
		padding: 6rem 1.5rem 2rem;
		margin: 0;
		overflow-y: auto;
		opacity: 1;
		visibility: hidden;
		clip-path: inset(0 0 0 100%);
		transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
		z-index: 1200;
	}

	.primary-menu a {
		padding: 0.85rem 0.25rem;
	}

	.primary-menu a::after {
		display: none;
	}

	/* Dimmed backdrop behind the drawer, covering the full viewport.
	   Lives on .main-navigation itself (not the drawer) so tapping it —
	   anywhere outside the drawer/toggle — can close the menu; see the
	   click handler in main.js. */
	.main-navigation::before {
		content: '';
		position: fixed;
		inset: 0;
		background-color: rgba(20, 12, 12, 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0s linear 0.3s;
		z-index: 1100;
	}

	.main-navigation.is-open::before {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.3s ease, visibility 0s linear 0s;
	}

	.main-navigation.is-open .primary-menu {
		visibility: visible;
		clip-path: inset(0 0 0 0%);
		transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
	}

	.main-navigation.is-open .menu-toggle__bar:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.main-navigation.is-open .menu-toggle__bar:nth-child(2) {
		opacity: 0;
	}

	.main-navigation.is-open .menu-toggle__bar:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	/* The toggle button sits visually above the drawer/backdrop so it
	   stays clickable (and its "X" animation visible) while open. */
	.menu-toggle {
		position: relative;
		z-index: 1300;
	}

	.primary-menu ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		margin-left: 1rem;
	}
}

@media (max-width: 768px) {
	/* Shrink the header logo ~15% on phone widths — at its normal size
	   (see .site-branding img above) it was crowding the hamburger toggle
	   in the two-item mobile header row, pushing it toward/off the edge
	   of the viewport. Tablet widths (769–1300px) keep the full size. */
	.site-branding img {
		max-height: 57px; /* 67px - 15% */
		max-width: 224px; /* 264px - 15% */
	}

	.featured-categories__grid,
	.post-grid {
		grid-template-columns: 1fr;
	}

	.search-result {
		grid-template-columns: 1fr;
	}

	.search-form {
		max-width: none;
	}

	.error-404__links {
		flex-direction: column;
		align-items: stretch;
	}

	/* Footer: collapse 2-col grid to single column */
	.site-footer__top {
		grid-template-columns: 1fr;
	}

	.footer-info {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	/* CTA section: tighten text alignment on small screens */
	.cta-section__subheading {
		font-size: 1rem;
	}
}

@media (max-width: 540px) {
	/* Footer hours: allow day/time to stack on very narrow screens */
	.footer-hours__row {
		flex-direction: column;
		gap: 0.1rem;
	}

	.footer-hours__time {
		text-align: left;
	}
}
