/*
Theme Name: Kadence Child
Template: kadence
Description: Fosbas Designs rebuild — child theme of Kadence. All custom styling/template overrides for the site rebuild live here so parent theme updates never overwrite site-specific changes.
Version: 1.0.0
Text Domain: kadence-child
*/

/* ==========================================================================
   Design tokens — mirrors the site's existing Kadence/Elementor global
   palette (kadence1-9) and font pairing (Roboto / Roboto Slab), so nothing
   here introduces a second, competing system.
   ========================================================================== */
:root {
	--fosbas-accent: #2B6CB0;
	--fosbas-accent-alt: #215387;
	--fosbas-text-strongest: #1A202C;
	--fosbas-text-strong: #2D3748;
	--fosbas-text-medium: #4A5568;
	--fosbas-text-subtle: #718096;
	--fosbas-bg-subtle: #EDF2F7;
	--fosbas-bg-lighter: #F7FAFC;
	--fosbas-bg-cream: #FAF6F0;
	--fosbas-white: #ffffff;
	--fosbas-font-heading: 'Roboto', sans-serif;
	--fosbas-font-accent: 'Playfair Display', serif;
	--fosbas-radius-card: 28px;
	--fosbas-radius-card-inner: 20px;
	--fosbas-radius-pill: 9999px;
	--fosbas-shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--fosbas-shadow-lift: 0 4px 24px rgba(0, 0, 0, 0.12);
	--fosbas-shadow-accent: 0 4px 24px rgba(43, 108, 176, 0.34);
	--fosbas-tracking-tight: -0.02em;
	--fosbas-radius-button: 8px;
	--fosbas-button-tracking: 0.04em;
	/* Live height of Raptive's bottom sticky ad, measured by
	   assets/js/ad-clearance.js — 0 whenever no such ad is present/filled. */
	--fosbas-ad-clearance: 0px;
}

/* ==========================================================================
   Shared button typography token — applied to every real button/CTA
   across the site (hero, buy-links, save button, forms, About section)
   ========================================================================== */
.fosbas-hero__cta-primary,
.fosbas-hero__cta-secondary,
.wp-block-button__link,
.fosbas-buy-link,
.fosbas-save-button,
.mailerlite-subscribe-submit {
	text-transform: none;
	letter-spacing: normal;
	font-size: 0.8rem;
}

/* ==========================================================================
   Header — cap the logo (Kadence has no default max-height, so a large
   source file like this 917x936 logo renders at full size otherwise),
   force sticky (Kadence's own sticky-header markup is present but not
   reliably engaging), and trim the generous default row padding.
   ========================================================================== */
.site-header {
	position: -webkit-sticky !important;
	position: sticky !important;
	top: 0 !important;
	z-index: 999 !important;
	background: var(--fosbas-white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Kadence's sticky-header JS toggles an .item-is-fixed state with its own
   (customizer-driven) nav link color, which was resolving to invisible
   against our white sticky background. Force it visible unconditionally. */
.site-header .header-menu-container > ul > li > a,
.site-header .kadence-sticky-header.item-is-fixed .header-menu-container > ul > li > a {
	color: var(--fosbas-text-strongest) !important;
}

html,
body {
	overflow-x: clip !important;
}

.site-main-header-inner-wrap {
	padding-top: 0.35rem !important;
	padding-bottom: 0.35rem !important;
}

.header-menu-container > ul > li > a {
	font-size: 0.9rem !important;
}

.site-title {
	font-size: 18px !important;
}

/* ==========================================================================
   Archive hero (Kadence's own "CROCHET PATTERNS" title band) — compact it
   ========================================================================== */
.entry-hero.post-archive-hero-section {
	padding: 0.85rem 1rem !important;
}

.content-area {
	margin: 1rem 0 !important;
}

/* Homepage: hero should sit flush against the sticky nav, no gap above it */
.home .content-area {
	margin-top: 0 !important;
}

.archive-title {
	font-size: 1.5rem !important;
	margin-bottom: 0.5rem !important;
}

.archive-description {
	font-size: 0.9rem !important;
}

.archive-description p {
	margin: 0 !important;
}

.site-header .custom-logo-link img,
.site-header img.custom-logo {
	max-height: 40px;
	width: auto;
}

@media (max-width: 767px) {
	.site-header .custom-logo-link img,
	.site-header img.custom-logo {
		max-height: 34px;
	}

	.site-mobile-header-wrap .site-main-header-inner-wrap {
		min-height: 60px !important;
		padding-top: 0.25rem !important;
		padding-bottom: 0.25rem !important;
	}

	.site-mobile-header-wrap #mobile-toggle {
		padding: 0.35rem !important;
	}

	.site-mobile-header-wrap .menu-toggle-icon svg {
		width: 20px !important;
		height: 20px !important;
	}
}

/* ==========================================================================
   Footer — Kadence's own footer markup is minimal (just the copyright
   line); the real bloat was the unstyled MailerLite form above it, below.
   ========================================================================== */
.site-bottom-footer-inner-wrap {
	padding-top: 0.75rem !important;
	padding-bottom: 0.75rem !important;
}

/* ==========================================================================
   MailerLite newsletter form — the plugin ships unstyled/left-aligned
   markup, plus its own title/description that duplicates our section
   heading, plus a response placeholder that adds phantom height when empty
   ========================================================================== */
.mailerlite-form {
	max-width: 420px;
	margin: 0 auto;
}

.mailerlite-form-title,
.mailerlite-form-description {
	display: none;
}

.mailerlite-form-inputs {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mailerlite-form-field {
	text-align: left;
}

.mailerlite-form-field label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--fosbas-text-medium);
	margin-bottom: 0.3em;
}

.mailerlite-form-field input {
	width: 100%;
	padding: 0.7em 1em;
	border: 1px solid var(--fosbas-bg-subtle);
	border-radius: 8px;
	font-size: 0.95rem;
}

.mailerlite-form-loader:empty,
.mailerlite-form-response:empty {
	display: none;
}

.mailerlite-subscribe-button-container {
	margin-top: 0.5rem;
	text-align: center;
}

.mailerlite-subscribe-submit {
	padding: 0.75em 2em;
	border: none;
	border-radius: var(--fosbas-radius-button);
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	font-weight: 600;
	cursor: pointer;
}

.mailerlite-subscribe-submit:hover {
	background: var(--fosbas-accent-alt);
}

/* ==========================================================================
   Core WP button block — style to match the design system (Kadence's
   default button styling was rendering the primary button invisible
   against its surrounding background)
   ========================================================================== */
.wp-block-button__link {
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
	border-radius: var(--fosbas-radius-button);
	padding: 0.6em 1.5em;
	font-weight: 600;
	border: 2px solid var(--fosbas-accent);
	text-decoration: none !important;
}

.wp-block-button__link:hover {
	background: var(--fosbas-accent-alt);
	border-color: var(--fosbas-accent-alt);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: var(--fosbas-bg-subtle) !important;
	border: none !important;
	color: var(--fosbas-accent) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--fosbas-accent) !important;
	color: var(--fosbas-white) !important;
}

/* ==========================================================================
   Pattern content typography — dense round-by-round crochet instructions
   need more breathing room and clearer hierarchy than default prose.
   ========================================================================== */
.single-content.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--fosbas-text-strong);
}

/* rem, not em — WordPress's has-medium/large/huge-font-size classes are
   used on hundreds of these posts' paragraphs and bump the paragraph's
   own font-size well above body text (confirmed by measuring computed
   styles: 17px plain vs 28px "large" vs 42px "huge"), so an em-based
   margin was scaling up right along with it — a "huge" paragraph got a
   57px gap after it instead of the intended ~23px. */
.single-content.entry-content p {
	margin-bottom: 1.4rem;
}

.single-content.entry-content strong,
.single-content.entry-content b {
	color: var(--fosbas-text-strongest);
	font-weight: 700;
}

.single-content.entry-content a {
	color: var(--fosbas-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	word-break: break-word;
}

.single-content.entry-content a:hover,
.single-content.entry-content a:focus {
	color: var(--fosbas-accent-alt);
}

/* "Pin it for later" links to a Pinterest pin, scattered through older
   posts as plain text — turn them into a proper branded button */
.single-content.entry-content a[href*="pinterest."][href*="/pin/"] {
	display: inline-flex;
	margin-right: 0.4em;
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0.55em 1.1em;
	border-radius: var(--fosbas-radius-pill);
}

.single-content.entry-content a[href*="pinterest."][href*="/pin/"]:hover {
	background: var(--fosbas-accent-alt);
	color: var(--fosbas-white) !important;
}

/* Margins here are deliberately in rem, not em: em is relative to each
   heading's OWN font-size (h2 renders at 28px, h3 at 24px, vs. ~17px body
   text), so a "2em" top margin was actually computing to 56px — measured
   directly in a real browser (Playwright) against the live DOM, not
   assumed — which is what produced the large gaps reported throughout
   the site's posts. rem is relative to the root font-size instead, so it
   stays predictable regardless of which heading level is used. */
.single-content.entry-content h2,
.single-content.entry-content h3 {
	font-family: var(--fosbas-font-heading);
	font-weight: 600;
	color: var(--fosbas-text-strongest);
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

/* h3 is often used here as a short list item (e.g. "1. Cozy Crochet
   Sweaters", "2. Warm Cardigans"...) rather than a true section break —
   give it a lighter margin, and collapse it further when h3s are stacked
   back to back so they read as one tight list instead of separate
   sections each carrying full heading spacing. */
.single-content.entry-content h3 {
	margin-top: 1.6rem;
	margin-bottom: 0.75rem;
}

.single-content.entry-content h3 + h3 {
	margin-top: 0.5rem;
}

/* Same collapse for any other heading directly followed by another
   heading (h2+h2, h2+h3, h3+h2) — stacked headings with nothing between
   them are consistently used as a list in this content, never a real
   back-to-back section break. */
.single-content.entry-content h2 + h2,
.single-content.entry-content h2 + h3,
.single-content.entry-content h3 + h2 {
	margin-top: 0.75rem;
}

.single-content.entry-content ul,
.single-content.entry-content ol {
	margin: 0 0 1rem;
	padding-left: 1.4em;
}

/* Many older posts authored each bullet as its own separate list block
   instead of one list with multiple items — collapse the resulting stacked
   block margins so they still read as one tight list. */
.single-content.entry-content ul + ul,
.single-content.entry-content ol + ol,
.single-content.entry-content ul + ol,
.single-content.entry-content ol + ul {
	margin-top: -0.6rem;
}

.single-content.entry-content li {
	margin-bottom: 0.4rem;
}

/* Empty paragraphs left over from copy-pasted content (stray line breaks) */
.single-content.entry-content p:empty {
	display: none;
}

/* WordPress core gives every pullquote `padding: 4em 0`, computed against
   the pullquote's own font-size (measured at 25.5px here) — 102px top and
   bottom, 204px total. Trimmed to a fixed rem value so it can't scale up
   the same way the heading/paragraph margins did. */
.single-content.entry-content .wp-block-pullquote {
	padding: 1.5rem 0;
}

/* Embedded in-post images (progress photos, stitch diagrams) */
.single-content.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5em 0;
	display: block;
}

/* rem, not em — same reasoning as headings/paragraphs above. This also
   matters more than usual for figures specifically: a floated figure
   (pullquotes/images set to alignleft/alignright) doesn't margin-collapse
   with the preceding element the way normal block flow does, so an
   inflated em-based margin here fully stacks instead of merging — that's
   what was producing the residual gap before a floated pullquote even
   after its own padding was trimmed. */
.single-content.entry-content figure {
	margin: 1.5rem 0;
}

/* Legacy "Download on Ravelry/Etsy" badge graphics embedded directly in
   older posts — cap their size so they read as a small badge, not a
   full-width banner (targeted by link destination, not filename, so it
   catches every post regardless of how the image was named) */
.single-content.entry-content figure a[href*="ravelry.com"] img,
.single-content.entry-content figure a[href*="etsy.com"] img {
	max-width: 220px;
	margin: 0 auto;
}

.single-content.entry-content figcaption {
	font-size: 0.875rem;
	color: var(--fosbas-text-subtle);
	margin-top: 0.5em;
	text-align: center;
}

/* ==========================================================================
   Buy links block
   ========================================================================== */
.fosbas-buy-links {
	margin: 2em 0;
	padding: 1.5em;
	background: var(--fosbas-bg-cream);
	border-radius: var(--fosbas-radius-card);
}

.fosbas-buy-links__label {
	font-family: var(--fosbas-font-accent);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fosbas-text-subtle);
	margin-bottom: 0.75em;
}

.fosbas-buy-links__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

.fosbas-buy-link {
	display: inline-block;
	padding: 0.85em 1.75em;
	border-radius: var(--fosbas-radius-button);
	font-weight: 600;
	text-decoration: none;
	color: var(--fosbas-white);
	background: var(--fosbas-accent);
	transition: background-color 0.15s ease;
}

.fosbas-buy-link:hover,
.fosbas-buy-link:focus {
	background: var(--fosbas-accent-alt);
	color: var(--fosbas-white);
}

/* ==========================================================================
   Save to Library button
   ========================================================================== */
.fosbas-save-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 1em 0;
	padding: 0.65em 1.25em;
	border: 2px solid var(--fosbas-accent);
	border-radius: var(--fosbas-radius-button);
	background: transparent;
	color: var(--fosbas-accent);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fosbas-save-button:hover {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
}

.fosbas-save-button.is-saved {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
}

/* ==========================================================================
   Pattern card (archive grid + My Library grid)
   ========================================================================== */
.fosbas-library-grid,
.fosbas-pattern-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem 1.75rem;
	align-items: start;
}

#fosbas-discover-grid {
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem 0.6rem;
}

@media (max-width: 639px) {
	.fosbas-related-patterns .fosbas-pattern-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem 0.6rem;
	}
}

@media (min-width: 640px) {
	.fosbas-library-grid,
	.fosbas-pattern-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.fosbas-library-grid,
	.fosbas-pattern-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	#fosbas-discover-grid {
		grid-template-columns: repeat(5, 1fr) !important;
	}

	/* Query fetches 16 (mobile's count) per batch; hide the 16th of each
	   batch on desktop so it shows 15 (3 full rows of 5) instead. */
	#fosbas-discover-grid > .fosbas-pattern-card:nth-child(16n) {
		display: none;
	}
}

.fosbas-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

.fosbas-load-more {
	padding: 0.7em 2em;
	border: none;
	border-radius: var(--fosbas-radius-button);
	background: var(--fosbas-bg-subtle);
	color: var(--fosbas-text-strongest);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: var(--fosbas-button-tracking);
	font-size: 0.8rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.fosbas-load-more:hover {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
}

.fosbas-load-more:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ==========================================================================
   Pagination — a normal inline bar under the results.

   This used to be a fixed pill floating against the right edge, collapsed on
   mobile to just the current page plus a faint "…" toggle. Two problems in
   real use: it overlapped the pattern links it sat on top of, and it hid the
   one thing people actually want from pagination — how many pages there are.
   ========================================================================== */
.navigation.pagination {
	position: static;
	width: auto;
	max-width: none;
	margin: 2.5rem auto calc(1rem + var(--fosbas-ad-clearance, 0px));
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	transform: none;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.35rem;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.6rem;
	border-radius: var(--fosbas-radius-button);
	border: 1px solid var(--fosbas-bg-subtle);
	background: var(--fosbas-white);
	text-decoration: none !important;
	color: var(--fosbas-text-strong);
	font-weight: 600;
	font-size: 0.9rem;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.navigation.pagination .page-numbers.current {
	background: var(--fosbas-accent);
	border-color: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
}

/* The gap marker is not a control — no border or box, just spacing. */
.navigation.pagination .page-numbers.dots {
	min-width: 1.5rem;
	border: 0;
	background: none;
	color: var(--fosbas-text-subtle);
}

.navigation.pagination .page-numbers:not(.current):not(.dots):hover {
	background: var(--fosbas-bg-lighter);
	border-color: var(--fosbas-accent);
}

@media (max-width: 600px) {
	.navigation.pagination .page-numbers {
		min-width: 36px;
		height: 36px;
		padding: 0 0.45rem;
		font-size: 0.85rem;
	}
}


/* ==========================================================================
   Back to top button
   ========================================================================== */
.fosbas-back-to-top {
	position: fixed;
	right: 1rem;
	bottom: auto;
	top: 220px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--fosbas-shadow-soft);
	z-index: 95;
	transition: background-color 0.15s ease;
}

.fosbas-back-to-top:hover {
	background: var(--fosbas-accent-alt);
}

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

/* ==========================================================================
   Always-visible search FAB
   ========================================================================== */
.fosbas-search-fab {
	position: fixed;
	right: 1rem;
	top: 268px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--fosbas-shadow-soft);
	z-index: 90;
	transition: background-color 0.15s ease;
}

.fosbas-search-fab:hover {
	background: var(--fosbas-accent-alt);
}

.fosbas-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 1001;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 15vh;
}

.fosbas-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 32, 44, 0.5);
}

.fosbas-search-overlay__panel {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	width: 90%;
	max-width: 520px;
	background: var(--fosbas-white);
	border-radius: 999px;
	padding: 0.4rem 0.4rem 0.4rem 1.5rem;
	box-shadow: var(--fosbas-shadow-lift);
}

.fosbas-search-overlay__panel input[type="search"] {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 1.1rem;
	padding: 0.6em 0;
	color: var(--fosbas-text-strongest);
	outline: none;
}

.fosbas-search-overlay__panel button[type="submit"] {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
	cursor: pointer;
	flex-shrink: 0;
}

.fosbas-floating-dock {
	position: fixed;
	right: 1rem;
	top: 316px;
	z-index: 90;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fosbas-floating-dock__btn {
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: var(--fosbas-white);
	color: var(--fosbas-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--fosbas-shadow-soft);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fosbas-back-to-top svg,
.fosbas-search-fab svg,
.fosbas-floating-dock__btn svg {
	width: 18px !important;
	height: 18px !important;
	stroke-width: 2.75px !important;
	overflow: visible;
}

.fosbas-back-to-top,
.fosbas-search-fab {
	color: var(--fosbas-white) !important;
}

.fosbas-floating-dock__btn {
	color: var(--fosbas-accent) !important;
}

.fosbas-floating-dock__btn:hover {
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
}

.fosbas-floating-save.is-saved {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
}

/* ==========================================================================
   Mobile bottom tab bar — Pinterest-inspired persistent nav, replaces the
   search FAB on small screens (still complements back-to-top/save/share,
   which serve different purposes than the tab bar's static links)
   ========================================================================== */
.fosbas-mobile-tabbar {
	display: none;
}

@media (max-width: 767px) {
	body {
		padding-bottom: calc(60px + var(--fosbas-ad-clearance, 0px));
	}

	/* Never hides Raptive's sticky ad — sits flush to true bottom (0) when
	   no such ad is filled, and rises to sit just above it (read live via
	   assets/js/ad-clearance.js) whenever one is actually rendered, so the
	   two never overlap without touching the ad itself. */
	.fosbas-mobile-tabbar {
		display: flex;
		position: fixed;
		bottom: var(--fosbas-ad-clearance, 0px);
		left: 0;
		right: 0;
		z-index: 500;
		background: var(--fosbas-white);
		border-top: 1px solid var(--fosbas-bg-subtle);
		padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
		transition: bottom 0.2s ease;
	}

	.fosbas-search-fab {
		display: none;
	}

	/* One-handed reach: move the utility buttons down near the tab bar
	   instead of the upper half of a tall phone screen. Sits just above
	   the tab bar, wherever the tab bar itself currently sits. */
	.fosbas-back-to-top {
		top: auto !important;
		bottom: calc(72px + var(--fosbas-ad-clearance, 0px)) !important;
		right: 0.75rem !important;
	}

	.fosbas-floating-dock {
		top: auto !important;
		bottom: calc(72px + var(--fosbas-ad-clearance, 0px)) !important;
		right: 0.75rem !important;
		flex-direction: column-reverse !important;
	}

}

.fosbas-mobile-tabbar__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
	border: none;
	background: none;
	color: var(--fosbas-text-subtle);
	text-decoration: none !important;
	cursor: pointer;
	padding: 0.25rem 0;
}

.fosbas-mobile-tabbar__item span {
	font-size: 0.65rem;
	font-weight: 600;
}

.fosbas-mobile-tabbar__item.is-active {
	color: var(--fosbas-accent);
}

/* ==========================================================================
   My Account page
   ========================================================================== */
.fosbas-account {
	max-width: 380px;
	margin: 2rem auto;
	padding: 2rem;
	background: var(--fosbas-bg-lighter);
	border-radius: var(--fosbas-radius-card);
}

.fosbas-account input[type="text"],
.fosbas-account input[type="password"] {
	width: 100%;
	padding: 0.6em 0.75em;
	margin-bottom: 1rem;
	border: 1px solid var(--fosbas-bg-subtle);
	border-radius: 6px;
}

.fosbas-account .login-submit input[type="submit"] {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	border: none;
	border-radius: var(--fosbas-radius-button);
	padding: 0.6em 1.5em;
	font-weight: 600;
	cursor: pointer;
}

.fosbas-account__welcome {
	font-weight: 600;
	margin-bottom: 1rem;
}

.fosbas-account__link {
	display: block;
	margin-bottom: 0.75rem;
	color: var(--fosbas-accent);
	font-weight: 600;
}

.fosbas-account__register {
	margin-top: 1rem;
	font-size: 0.9rem;
	color: var(--fosbas-text-medium);
}

.fosbas-search-overlay__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--fosbas-text-subtle);
	cursor: pointer;
	padding: 0 0 0 0.5rem;
	flex-shrink: 0;
}

.fosbas-pattern-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
	box-shadow: none;
	transition: opacity 0.15s ease;
}

.fosbas-pattern-card:hover .fosbas-pattern-card__title {
	color: var(--fosbas-accent);
}

.fosbas-pattern-card__image {
	position: relative;
}

.fosbas-pattern-card__image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	border-radius: 4px !important;
}

.fosbas-pattern-card__img--hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.fosbas-pattern-card:hover .fosbas-pattern-card__img--hover {
	opacity: 1;
}

/* Fallback for patterns with no featured image — keeps card heights/looks
   consistent in the grid instead of an empty gap next to photo cards */
.fosbas-pattern-card__image--empty {
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--fosbas-bg-cream), var(--fosbas-bg-subtle));
	border-radius: 4px !important;
}

.fosbas-masonry .fosbas-pattern-card__image--empty {
	aspect-ratio: 1 / 1;
}

.fosbas-pattern-card__image,
.fosbas-pattern-card__image img {
	margin: 0 !important;
	display: block !important;
}

.fosbas-pattern-card__body {
	padding: 0.4rem 0.5rem 0 !important;
	margin: 0 !important;
}

.fosbas-pattern-card__title {
	font-family: var(--fosbas-font-heading) !important;
	font-size: 0.95rem;
	font-weight: 300 !important;
	font-style: normal;
	color: var(--fosbas-text-strongest);
	margin: 0;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
}

.fosbas-pattern-card {
	text-decoration: none !important;
}

/* The only badge left on a card is the difficulty overlay, so what used to be
   shared base styling is folded into it rather than left as a dangling rule. */
.fosbas-pattern-card__badge--difficulty {
	border-radius: 999px;
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	font-size: 0.6rem;
	font-weight: 400;
	padding: 0.2em 0.55em;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(2px);
	color: var(--fosbas-text-strong);
}

.fosbas-pattern-card__badge--beginner {
	background: rgba(198, 246, 213, 0.9);
	color: #22543D;
}

.fosbas-pattern-card__badge--easy {
	background: rgba(190, 227, 248, 0.9);
	color: #1A4971;
}

.fosbas-pattern-card__badge--intermediate {
	background: rgba(254, 235, 200, 0.9);
	color: #7B4B0A;
}

.fosbas-pattern-card__badge--advanced {
	background: rgba(251, 211, 211, 0.9);
	color: #822727;
}

/* ==========================================================================
   Archive loop grid (Kadence's default #archive-container list)
   ========================================================================== */
#archive-container.fosbas-pattern-grid,
#archive-container {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 1.25rem !important;
}

@media (min-width: 640px) {
	#archive-container {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (min-width: 1024px) {
	#archive-container {
		grid-template-columns: repeat(5, 1fr) !important;
	}
}

.fosbas-pattern-grid__item {
	list-style: none;
}

/* ==========================================================================
   Browse & filter bar
   ========================================================================== */
.fosbas-pattern-filters-band {
	position: sticky;
	top: 78px;
	z-index: 50;
	background: var(--fosbas-white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	padding: 0.6rem 1rem;
	margin-bottom: 1.5rem;
}

.fosbas-pattern-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: center;
	gap: 0.75rem;
	max-width: 640px;
	margin: 0 auto;
}

.fosbas-pattern-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	flex: 1 1 160px;
}

.fosbas-pattern-filters__field label {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--fosbas-text-medium);
}

.fosbas-pattern-filters__field select {
	padding: 0.4em 0.6em;
	border-radius: 6px;
	border: 1px solid var(--fosbas-bg-subtle);
	background: var(--fosbas-white);
	font-size: 0.85rem;
}

.fosbas-pattern-filters__submit {
	padding: 0.4em 1.1em;
	border: none;
	border-radius: 6px;
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
}

.fosbas-pattern-filters__submit:hover {
	background: var(--fosbas-accent-alt);
}

.fosbas-pattern-filters__clear {
	align-self: center;
	font-size: 0.9rem;
	color: var(--fosbas-text-subtle);
	text-decoration: underline;
}

/* ==========================================================================
   Related patterns ("More Like This")
   ========================================================================== */
.fosbas-related-patterns {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--fosbas-bg-subtle);
}

.fosbas-related-patterns__heading {
	font-family: var(--fosbas-font-heading);
	font-size: 18px;
	font-weight: 600;
	color: var(--fosbas-text-strongest);
	margin-bottom: 1rem;
}

/* ==========================================================================
   Homepage pattern showcase — Pinterest-inspired: search, pill nav, masonry
   ========================================================================== */
.fosbas-showcase {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

@media (max-width: 767px) {
	.fosbas-showcase {
		padding-top: 0.75rem;
	}

	.fosbas-stat-bar {
		margin-bottom: 1rem !important;
	}
}

.fosbas-showcase__search {
	display: flex;
	align-items: center;
	max-width: 480px;
	margin: 0 auto 1.5rem;
	background: var(--fosbas-white);
	border: 2px solid var(--fosbas-text-strongest);
	border-radius: var(--fosbas-radius-pill);
	padding: 0.25rem 0.25rem 0.25rem 1.25rem;
	box-shadow: var(--fosbas-shadow-lift);
}

.fosbas-showcase__search input[type="search"] {
	flex: 1;
	border: none;
	background: transparent;
	padding: 0.6em 0;
	font-size: 1rem;
	color: var(--fosbas-text-strongest);
	outline: none;
}

.fosbas-showcase__search input[type="search"]::placeholder {
	color: var(--fosbas-text-medium);
}

.fosbas-showcase__search button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: var(--fosbas-shadow-accent);
}

.fosbas-showcase__search button svg {
	width: 14px !important;
	height: 14px !important;
}

.fosbas-showcase__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin-bottom: 2rem;
}

.fosbas-pill {
	display: inline-block;
	padding: 0.5em 1.1em;
	border-radius: 999px;
	background: var(--fosbas-bg-lighter);
	color: var(--fosbas-text-strong);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--fosbas-bg-subtle);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fosbas-pill:hover,
.fosbas-pill--active {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	border-color: var(--fosbas-accent);
}

/* Masonry via CSS columns — staggered card heights, Pinterest-style */
.fosbas-masonry {
	column-count: 2;
	column-gap: 1.1rem;
}

.fosbas-masonry .fosbas-pattern-card {
	break-inside: avoid;
	margin-bottom: 1.1rem;
	display: inline-block;
	width: 100%;
}

.fosbas-masonry .fosbas-pattern-card__image img {
	aspect-ratio: auto;
}

@media (min-width: 640px) {
	.fosbas-masonry {
		column-count: 3;
	}
}

@media (min-width: 1024px) {
	.fosbas-masonry {
		column-count: 4;
	}
}

/* ==========================================================================
   Homepage hero — warm/editorial tone, serif display headline, floating
   stat card overlapping the section below it
   ========================================================================== */
.fosbas-hero {
	background-color: var(--fosbas-bg-cream);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 34vh;
	display: flex;
	align-items: center;
	padding: 2rem 1.5rem;
}

@media (min-width: 900px) {
	.fosbas-hero {
		min-height: 38vh;
		padding: 2rem 3rem;
	}
}

.fosbas-hero__text {
	text-align: center;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
	background: rgba(250, 246, 240, 0.9);
	backdrop-filter: blur(3px);
	border-radius: var(--fosbas-radius-card);
	padding: 1.5rem 1.25rem;
}

@media (min-width: 900px) {
	.fosbas-hero__text {
		text-align: left;
		max-width: 640px;
		margin: 0;
		background: rgba(250, 246, 240, 0.85);
		padding: 2rem;
	}
}

.fosbas-hero__eyebrow {
	font-family: var(--fosbas-font-accent);
	font-style: italic;
	color: var(--fosbas-accent);
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

.fosbas-hero__title {
	font-family: var(--fosbas-font-accent);
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	font-weight: 400;
	color: var(--fosbas-text-strongest);
	line-height: 1.15;
	margin: 0 0 1rem;
}

.fosbas-hero__title em {
	font-style: italic;
	color: var(--fosbas-accent);
}

.fosbas-hero__subtitle {
	color: var(--fosbas-text-strong);
	font-size: 1.05rem;
	max-width: 44ch;
	margin: 0 auto 1.75rem;
}

@media (min-width: 900px) {
	.fosbas-hero__subtitle {
		margin: 0 0 1.75rem;
	}
}

.fosbas-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

@media (min-width: 900px) {
	.fosbas-hero__ctas {
		justify-content: flex-start;
	}
}

.fosbas-hero__cta-primary,
.fosbas-hero__cta-secondary {
	display: inline-block;
	padding: 0.55em 1.25em;
	border-radius: var(--fosbas-radius-button);
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fosbas-hero__cta-primary {
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
}

.fosbas-hero__cta-primary:hover {
	background: var(--fosbas-accent-alt);
	color: var(--fosbas-white) !important;
}

.fosbas-hero__cta-secondary {
	border: none;
	color: var(--fosbas-accent) !important;
	background: var(--fosbas-bg-subtle);
}

.fosbas-hero__cta-secondary:hover {
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
}

/* ==========================================================================
   Category carousel
   ========================================================================== */
.fosbas-cat-carousel-wrap {
	margin: 2.5rem 0;
}

.fosbas-cat-carousel-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.fosbas-cat-carousel-heading h2 {
	font-family: var(--fosbas-font-accent);
	font-weight: 400;
	font-size: 18px;
	color: var(--fosbas-text-strongest);
	margin: 0;
}

.fosbas-cat-carousel-heading h2 em {
	font-style: italic;
	color: var(--fosbas-accent);
}

.fosbas-cat-carousel-viewall {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: var(--fosbas-accent) !important;
	font-family: var(--fosbas-font-heading);
	font-style: normal !important;
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none !important;
	white-space: nowrap;
	padding: 0.5em 0.95em;
	border: 1.5px solid var(--fosbas-accent);
	border-radius: var(--fosbas-radius-pill);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fosbas-cat-carousel-viewall:hover,
.fosbas-cat-carousel-viewall:focus {
	background: var(--fosbas-accent);
	color: var(--fosbas-white) !important;
}

.fosbas-cat-carousel-track-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fosbas-cat-carousel {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 0.5rem;
	scrollbar-width: none;
}

.fosbas-cat-carousel::-webkit-scrollbar {
	display: none;
}

.fosbas-cat-card {
	flex: 0 0 180px;
	scroll-snap-align: start;
	text-decoration: none;
	color: inherit;
}

.fosbas-cat-card__image {
	position: relative;
	aspect-ratio: 3 / 4;
	border-radius: 4px !important;
	overflow: hidden;
	background: var(--fosbas-bg-subtle);
	margin-bottom: 0.6rem;
}

.fosbas-cat-card__image img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	display: block !important;
}

.fosbas-cat-card__label {
	font-weight: 600;
	color: var(--fosbas-text-strongest);
	font-size: 0.95rem;
	text-align: center;
	text-decoration: none !important;
}

.fosbas-cat-card {
	text-decoration: none !important;
}

.fosbas-cat-card__label span {
	display: block;
	font-weight: 400;
	font-size: 0.8rem;
	color: var(--fosbas-text-subtle);
}

.fosbas-cat-carousel-arrow {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: var(--fosbas-white);
	box-shadow: var(--fosbas-shadow-lift);
	cursor: pointer;
	font-size: 1.1rem;
	color: var(--fosbas-text-strongest);
	display: none;
}

@media (min-width: 640px) {
	.fosbas-cat-carousel-arrow {
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

.fosbas-cat-carousel-arrow:hover {
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	border-color: var(--fosbas-accent);
}

.fosbas-showcase-heading {
	margin: 3rem 0 1.25rem;
}

.fosbas-showcase-heading h2 {
	font-family: var(--fosbas-font-accent);
	font-weight: 400;
	font-size: 18px;
	color: var(--fosbas-text-strongest);
	margin: 0;
}

.fosbas-showcase-heading h2 em {
	font-style: italic;
	color: var(--fosbas-accent);
}

/* ==========================================================================
   Site footer (multi-column, added before Kadence's own copyright row)
   ========================================================================== */
.fosbas-footer {
	background: var(--fosbas-text-strongest);
	padding: 3rem 1.5rem;
}

.fosbas-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem 1.5rem;
}

@media (min-width: 768px) {
	.fosbas-footer__inner {
		grid-template-columns: 1.5fr 1fr 1fr 1fr;
	}
}

.fosbas-footer__col--brand img,
.fosbas-footer__col--brand .custom-logo {
	max-height: 44px;
	width: auto;
	margin-bottom: 1rem;
	filter: brightness(0) invert(1);
}

.fosbas-footer__col--brand p {
	color: #A0AEC0;
	font-size: 0.9rem;
	line-height: 1.6;
}

.fosbas-footer__social {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}

.fosbas-footer__social a {
	color: var(--fosbas-white);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.fosbas-footer__social a:hover {
	border-bottom-color: var(--fosbas-white);
}

.fosbas-footer__col h3 {
	color: var(--fosbas-white);
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 1rem;
}

.fosbas-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fosbas-footer__col li {
	margin-bottom: 0.6rem;
}

.fosbas-footer__col a {
	color: #CBD5E0;
	text-decoration: none;
	font-size: 0.9rem;
}

.fosbas-footer__col a:hover {
	color: var(--fosbas-white);
}

/* ==========================================================================
   Newsletter popup
   ========================================================================== */
.fosbas-popup__overlay {
	position: fixed;
	inset: 0;
	background: rgba(26, 32, 44, 0.6);
	z-index: 9998;
}

.fosbas-popup__panel {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--fosbas-white);
	border-radius: var(--fosbas-radius-card);
	box-shadow: var(--fosbas-shadow-lift);
	padding: 2.5rem 2rem;
	max-width: 420px;
	width: calc(100% - 2rem);
	z-index: 9999;
	text-align: center;
}

.fosbas-popup__panel h2 {
	font-family: var(--fosbas-font-accent);
	font-weight: 400;
	color: var(--fosbas-text-strongest);
	margin: 0 0 0.5rem;
}

.fosbas-popup__panel p {
	color: var(--fosbas-text-medium);
	margin-bottom: 1.25rem;
}

.fosbas-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--fosbas-text-subtle);
}

.fosbas-stat-bar {
	max-width: 560px;
	margin: -1.25rem auto 2rem;
	background: var(--fosbas-white);
	border-radius: var(--fosbas-radius-card);
	box-shadow: var(--fosbas-shadow-lift);
	padding: 0.75rem 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.5rem;
	position: relative;
	z-index: 2;
}

.fosbas-stat-bar__item {
	text-align: center;
}

.fosbas-stat-bar__number {
	display: block;
	font-family: var(--fosbas-font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--fosbas-text-strongest);
}

.fosbas-stat-bar__label {
	font-size: 0.7rem;
	color: var(--fosbas-text-subtle);
}

/* ==========================================================================
   Homepage "About Fosbas Designs" section
   ========================================================================== */
.fosbas-about > .wp-block-group__inner-container,
.fosbas-about .wp-block-heading,
.fosbas-about > p,
.fosbas-about .wp-block-buttons {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.fosbas-about .wp-block-heading {
	font-family: var(--fosbas-font-accent);
	font-weight: 400;
	font-size: 18px;
	color: var(--fosbas-text-strongest);
	margin-bottom: 0.85rem;
}

.fosbas-about .wp-block-button__link {
	font-size: 0.8rem !important;
}

.fosbas-about > p {
	font-family: var(--fosbas-font-heading);
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--fosbas-text-strong);
	margin-bottom: 1.5rem;
}

.fosbas-about .wp-block-buttons {
	margin-top: 0;
}

/* ==========================================================================
   404 — routes back into the patterns rather than dead-ending on a search box
   ========================================================================== */
.fosbas-404 {
	margin-top: 2rem;
}

.fosbas-404__heading {
	font-family: var(--fosbas-font-heading);
	font-size: 18px;
	font-weight: 600;
	color: var(--fosbas-text-strongest);
	margin: 2rem 0 1rem;
}

.fosbas-404__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

/* ==========================================================================
   Pattern Collection pages (the rebuilt Elementor category landing pages)
   ========================================================================== */
.fosbas-collection {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 3rem;
	/* Clears Raptive's bottom sticky ad when one is present. */
	padding-bottom: calc(3rem + var(--fosbas-ad-clearance, 0px));
}

.fosbas-collection__header {
	text-align: center;
	margin-bottom: 1rem;
}

.fosbas-collection__title {
	margin: 0;
	font-family: var(--fosbas-font-heading, sans-serif);
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: var(--fosbas-tracking-tight, -0.02em);
	color: var(--fosbas-text-strongest);
}

/* The intro keeps the single-post content classes so it inherits the site's
   body typography — and so Raptive's in-content ad injection still applies. */
.fosbas-collection__intro {
	max-width: 720px;
	margin: 0 auto 2.5rem;
	text-align: center;
}

.fosbas-collection__intro p:last-child {
	margin-bottom: 0;
}

.fosbas-collection .fosbas-pattern-grid {
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem 1rem;
}

@media (min-width: 768px) {
	.fosbas-collection .fosbas-pattern-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem 1.5rem;
	}
}

@media (max-width: 600px) {
	.fosbas-collection {
		padding-top: 1.5rem;
	}

	.fosbas-collection__title {
		font-size: 1.5rem;
	}

	.fosbas-collection__intro {
		margin-bottom: 1.75rem;
		text-align: left;
	}
}

/* The contact form on the pattern-download page sits inside the collection
   intro, which is centred — that centred the labels while leaving the inputs
   left, so the form opts out of the inherited alignment and fills the column. */
.fosbas-collection .wpforms-container {
	max-width: 560px;
	margin: 0 auto;
	text-align: left;
}

.fosbas-collection .wpforms-container input[type="text"],
.fosbas-collection .wpforms-container input[type="email"],
.fosbas-collection .wpforms-container textarea {
	width: 100%;
	max-width: 100%;
}

.fosbas-collection .wpforms-container .wpforms-submit {
	padding: 0.8rem 1.8rem;
	font-weight: 600;
	border: 0;
	border-radius: var(--fosbas-radius-button, 8px);
	background: var(--fosbas-accent, #2B6CB0);
	color: #fff;
	cursor: pointer;
}

.fosbas-collection .wpforms-container .wpforms-submit:hover {
	background: var(--fosbas-accent-alt, #215387);
}

/* Archive intro — one clean line under the title, never a wall of links. */
.fosbas-archive-intro {
	max-width: 46rem;
	margin: 0.75rem auto 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--fosbas-text-medium);
	text-align: center;
}

/* ==========================================================================
   Header — navigation on the left, brand on the right

   Kadence puts the logo left and the menu (hamburger on mobile) right. Swapped
   here with flex `order` rather than by rewriting the header layout in the
   customizer, so the markup, its accessibility attributes and Kadence's own
   sticky/transparent header logic all keep working untouched.
   ========================================================================== */
.site-header-row .site-header-main-section-left {
	order: 2;
	justify-content: flex-end;
}

.site-header-row .site-header-main-section-right {
	order: 1;
	justify-content: flex-start;
}

/* ==========================================================================
   Pattern-page sidebar

   Its first job is to give Raptive a column to place a sticky unit in, so the
   blocks below stay short on purpose — filling the column with our own content
   would push the ad out of view.
   ========================================================================== */
.fosbas-side {
	margin-bottom: 1.75rem;
}

.fosbas-side__title {
	margin: 0 0 0.9rem;
	font-family: var(--fosbas-font-heading);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fosbas-text-strongest);
}

/* --- author --- */
.fosbas-side--author {
	padding: 1.5rem 1.25rem;
	text-align: center;
	background: var(--fosbas-bg-lighter);
	border-radius: var(--fosbas-radius-card-inner);
}

.fosbas-side__portrait,
.fosbas-side__portrait img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
}

.fosbas-side__portrait {
	display: inline-block;
	margin-bottom: 0.9rem;
	border: 3px solid var(--fosbas-white);
	box-shadow: var(--fosbas-shadow-soft);
	overflow: hidden;
}

.fosbas-side__hello {
	margin: 0 0 0.5rem;
	font-family: var(--fosbas-font-heading);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fosbas-text-strongest);
}

.fosbas-side__bio {
	margin: 0 0 1.1rem;
	font-size: 14px;
	line-height: 1.6;
	color: var(--fosbas-text-medium);
}

.fosbas-side__btn {
	display: inline-block;
	padding: 0.6rem 1.4rem;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: var(--fosbas-button-tracking);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--fosbas-white);
	background: var(--fosbas-accent);
	border-radius: var(--fosbas-radius-button);
	transition: background 0.15s ease;
}

.fosbas-side__btn:hover { background: var(--fosbas-accent-alt); color: var(--fosbas-white); }

/* --- search --- */
.fosbas-side__search {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.3rem 0.3rem 0.9rem;
	background: var(--fosbas-white);
	border: 1px solid var(--fosbas-bg-subtle);
	border-radius: var(--fosbas-radius-pill);
}

.fosbas-side__search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	font-size: 14px;
	color: var(--fosbas-text-strong);
	padding: 0.45rem 0;
}

.fosbas-side__search input:focus { outline: none; }

.fosbas-side__search button {
	flex: none;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--fosbas-accent);
	color: var(--fosbas-white);
	cursor: pointer;
}

/* --- featured patterns --- */
.fosbas-side__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.fosbas-side__list a {
	display: grid;
	grid-template-columns: 62px 1fr;
	gap: 0.75rem;
	align-items: center;
	text-decoration: none !important;
}

.fosbas-side__list img {
	width: 62px;
	height: 62px;
	object-fit: cover;
	border-radius: var(--fosbas-radius-button);
}

.fosbas-side__list span {
	font-size: 13.5px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--fosbas-text-strong);
}

.fosbas-side__list a:hover span { color: var(--fosbas-accent); }

/* Below 1025px Kadence stacks the sidebar under the article, which on a long
   pattern lands ~96% down the page. So the author card is shown inline after
   the article instead, and the sidebar copy is hidden — the reverse above.

   The sidebar container itself is never hidden: Raptive may place an ad in it,
   and hiding a container holding an ad is not something we do. */
.fosbas-author-inline { display: none; }

@media (max-width: 1024px) {
	.fosbas-author-inline {
		display: block;
		max-width: 34rem;
		margin: 2.5rem auto 0;
	}

	/* the stacked-sidebar copies — the inline one above replaces them */
	.primary-sidebar .fosbas-side--author,
	.fosbas-side--picks,
	.fosbas-side--search { display: none; }
}

@media (min-width: 1025px) {
	.fosbas-side--inline { display: none; }
}

/* ==========================================================================
   About page — reads as a page, not an old blog entry
   ========================================================================== */
.fosbas-about {
	max-width: 46rem;
	margin: 0 auto;
}

.fosbas-about__intro {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 2rem;
	align-items: center;
	margin-bottom: 3rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid var(--fosbas-bg-subtle);
}

/* The theme forces `height: auto` on content images, which turns the circle
   into a rounded rectangle — hence the specificity and the !important here. */
.fosbas-about .fosbas-about__portrait {
	width: 200px !important;
	height: 200px !important;
	max-width: 200px;
	object-fit: cover;
	/* Her face sits in the upper part of a tall portrait, so bias the crop up. */
	object-position: center 15%;
	border-radius: 50% !important;
	box-shadow: var(--fosbas-shadow-lift);
}

.fosbas-about__kicker {
	margin: 0 0 0.15rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fosbas-text-subtle);
}

.fosbas-about__name {
	margin: 0 0 0.9rem !important;
	font-family: var(--fosbas-font-accent);
	font-size: 2.6rem;
	line-height: 1.05;
	letter-spacing: var(--fosbas-tracking-tight);
	color: var(--fosbas-text-strongest);
}

.fosbas-about__lead {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--fosbas-text-medium);
}

.fosbas-about__where {
	margin: 0;
	font-size: 0.9rem;
	color: var(--fosbas-text-subtle);
}

.fosbas-about__section {
	margin-bottom: 2.5rem;
}

.fosbas-about__section h2 {
	margin: 0 0 0.9rem !important;
	font-family: var(--fosbas-font-heading);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: var(--fosbas-tracking-tight);
	color: var(--fosbas-text-strongest);
}

.fosbas-about__section p {
	margin: 0 0 1.1rem;
	line-height: 1.75;
	color: var(--fosbas-text-medium);
}

/* Magazines are a credential list, so they read as a row of names rather
   than a bulleted list of tasks. */
.fosbas-about__press ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.fosbas-about__press li {
	padding: 0.4rem 0.9rem;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--fosbas-text-strong);
	background: var(--fosbas-bg-lighter);
	border-radius: var(--fosbas-radius-pill);
}

.fosbas-about__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.fosbas-about__link {
	padding: 0.55rem 1.2rem;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none !important;
	color: var(--fosbas-accent);
	background: var(--fosbas-white);
	border: 1px solid var(--fosbas-bg-subtle);
	border-radius: var(--fosbas-radius-pill);
	transition: border-color 0.15s ease, color 0.15s ease;
}

.fosbas-about__link:hover {
	border-color: var(--fosbas-accent);
	color: var(--fosbas-accent-alt);
}

.fosbas-about__cta {
	margin-top: 3rem;
	padding: 2rem 1.5rem;
	text-align: center;
	background: var(--fosbas-bg-lighter);
	border-radius: var(--fosbas-radius-card-inner);
}

.fosbas-about__cta p {
	margin: 0 0 1rem;
	font-family: var(--fosbas-font-accent);
	font-size: 1.4rem;
	color: var(--fosbas-text-strongest);
}

.fosbas-about__button {
	display: inline-block;
	padding: 0.85rem 2rem;
	font-family: var(--fosbas-font-heading);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: var(--fosbas-button-tracking);
	text-decoration: none !important;
	color: var(--fosbas-white) !important;
	background: var(--fosbas-accent);
	border-radius: var(--fosbas-radius-button);
	transition: background 0.15s ease;
}

.fosbas-about__button:hover { background: var(--fosbas-accent-alt); }

@media (max-width: 600px) {
	.fosbas-about__intro {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		gap: 1.25rem;
	}

	.fosbas-about .fosbas-about__portrait { width: 160px !important; height: 160px !important; }
	.fosbas-about__name { font-size: 2.1rem; }
	.fosbas-about__press ul,
	.fosbas-about__links { justify-content: center; }
}

/* ---------------------------------------------------------- membership note
   One line under the buy links on a pattern page. Deliberately not a card:
   the buy links are the loud thing there, and this sits beneath them. */

.fosbas-member-note {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0.75rem 0 1.5rem;
	padding: 0.85rem 1rem;
	border-left: 3px solid var(--fosbas-accent, #2B6CB0);
	background: var(--fosbas-accent-wash, #E8F0F9);
	border-radius: 0 8px 8px 0;
}

.fosbas-member-note__text { margin: 0; color: var(--fosbas-ink-2, #465569); }

.single-content.entry-content .fosbas-member-note__link,
.fosbas-member-note__link {
	font-weight: 600;
	color: var(--fosbas-accent-ink, #1B4B80);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* --------------------------------------------- sticky pattern-page sidebar
   The column is tall and the article is taller, so the author card, search and
   pattern list used to scroll away and leave a long empty gutter for the rest
   of the page. Sticking the inner wrap keeps them beside the reader instead.

   `align-self: flex-start` on the aside is the part that makes it work: a flex
   item stretches to the row height by default, so the inner wrap is already as
   tall as the column and has nothing to stick within.

   Only from 1025px up — below that Kadence stacks the sidebar under the
   article, where sticky would pin it over the content. */
@media (min-width: 1025px) {
	.single-post .content-container .primary-sidebar {
		align-self: flex-start;
	}

	.single-post .primary-sidebar .sidebar-inner-wrap {
		position: sticky;
		/* clears the header, and leaves the sidebar ad slot room to load above */
		top: 2rem;
	}
}

/* A sticky child cannot escape an ancestor that clips, and Kadence sets
   overflow on the content row for its grid layouts. */
@media (min-width: 1025px) {
	.single-post .content-container,
	.single-post .content-wrap {
		overflow: visible;
	}
}
