/* ==========================================================================
   CrowdSource — Main Stylesheet
   Variables are injected by inc/dynamic-css.php at runtime.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base Reset & Root
   -------------------------------------------------------------------------- */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	/* Fallback values — overridden by dynamic-css.php */
	--color-primary:   #4F46E5;
	--color-secondary: #10B981;
	--color-tertiary:  #F59E0B;
	--color-bg:        #FFFFFF;
	--color-surface:   #F8FAFC;
	--color-text:      #374151;
	--color-heading:   #111827;

	--font-heading:    'Inter', system-ui, sans-serif;
	--font-secondary:  'Inter', system-ui, sans-serif;
	--font-body:       'Inter', system-ui, sans-serif;
	--font-size-base:  16px;
	--heading-weight:  700;
	--radius:          8px;

	--header-bg:       #FFFFFF;
	--header-text:     #111827;
	--footer-bg:       #111827;
	--footer-text:     #9CA3AF;
	--footer-heading:  #FFFFFF;
	--hero-min-height: 600px;

	--shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
	--shadow-md:   0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
	--shadow-lg:   0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
	--shadow-xl:   0 20px 60px rgba(0,0,0,.15);

	--transition:  0.2s ease;
	--transition-slow: 0.4s ease;

	--container-width:   1200px;
	--container-padding: clamp(1rem, 4vw, 2rem);

	--section-py: clamp(4rem, 8vw, 7rem);
}

html {
	font-size: var(--font-size-base);
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family:      var(--font-body);
	color:            var(--color-text);
	background-color: var(--color-bg);
	line-height:      1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	font-family:  var(--font-heading);
	font-weight:  var(--heading-weight);
	color:        var(--color-heading);
	line-height:  1.2;
	letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem,   5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem,3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-block-end: 1.25em; }
p:last-child { margin-block-end: 0; }

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition);
}
a:hover { color: var(--color-secondary); text-decoration: underline; }
a:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
	border-radius: 2px;
}

strong, b { font-weight: 600; }
em, i     { font-style: italic; }

small { font-size: 0.875rem; }

ul, ol { padding-inline-start: 1.5em; }
ul li, ol li { margin-block-end: 0.4em; }

blockquote {
	border-inline-start: 4px solid var(--color-primary);
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	background: var(--color-surface);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: italic;
	color: var(--color-heading);
}
blockquote cite { font-size: .875rem; font-style: normal; opacity: .7; }

pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 1.25rem 1.5rem;
	border-radius: var(--radius);
	overflow-x: auto;
	font-size: .875rem;
	line-height: 1.6;
}

code {
	background: var(--color-surface);
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	padding: .1em .4em;
	font-size: .875em;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

hr {
	border: none;
	border-block-start: 1px solid #e5e7eb;
	margin-block: 2rem;
}

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

figure { margin: 1.5rem 0; }
figcaption {
	font-size: .875rem;
	color: #6b7280;
	text-align: center;
	margin-block-start: .5rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9375rem;
}
th, td {
	padding: .75rem 1rem;
	border: 1px solid #e5e7eb;
	text-align: left;
}
th { background: var(--color-surface); font-weight: 600; }
tbody tr:nth-child(even) { background: var(--color-surface); }

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-padding);
}

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

.container--wide {
	max-width: 1400px;
}

.section {
	padding-block: var(--section-py);
}

.section-header {
	text-align: center;
	max-width: 680px;
	margin-inline: auto;
	margin-block-end: 3.5rem;
}

.section-title {
	margin-block-end: 1rem;
}

.section-subtitle {
	font-size: 1.125rem;
	color: #6b7280;
	line-height: 1.6;
}

.section-link {
	display: inline-block;
	font-weight: 500;
	margin-block-start: .5rem;
}

.section-header .section-link {
	margin-block-start: 1.25rem;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.75rem;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	border-radius: var(--radius);
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
	white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

.btn-sm {
	padding: .5rem 1.25rem;
	font-size: .875rem;
}

.btn-lg {
	padding: 1rem 2.5rem;
	font-size: 1.125rem;
}

.btn-primary {
	background-color: var(--color-primary);
	color: #fff;
}
.btn-primary:hover {
	background-color: #3730a3;
	color: #fff;
	box-shadow: 0 4px 20px rgba(79,70,229,.35);
}

.btn-secondary {
	background-color: var(--color-secondary);
	color: #fff;
}
.btn-secondary:hover {
	background-color: #059669;
	color: #fff;
}

.btn-outline {
	background-color: transparent;
	border-color: var(--color-primary);
	color: var(--color-primary);
}
.btn-outline:hover {
	background-color: var(--color-primary);
	color: #fff;
}

.btn-ghost {
	background-color: transparent;
	color: var(--color-heading);
}
.btn-ghost:hover {
	background-color: var(--color-surface);
}

/* Ghost button for use on dark/coloured backgrounds (hero, CTA bands) */
.btn-ghost-invert {
	background-color: transparent;
	color: #fff;
	border-color: rgba(255,255,255,.5);
}
.btn-ghost-invert:hover {
	background-color: rgba(255,255,255,.15);
	border-color: #fff;
	color: #fff;
}

/* Hero buttons */
.btn-hero-primary {
	background-color: #fff;
	color: var(--color-primary);
	box-shadow: var(--shadow-md);
}
.btn-hero-primary:hover {
	background-color: #f9fafb;
	color: var(--color-primary);
	box-shadow: var(--shadow-lg);
}

.btn-hero-secondary {
	background-color: transparent;
	border-color: rgba(255,255,255,.6);
	color: #fff;
}
.btn-hero-secondary:hover {
	background-color: rgba(255,255,255,.15);
	border-color: #fff;
	color: #fff;
}

.btn-cta {
	background-color: #fff;
	color: var(--color-primary);
	box-shadow: var(--shadow-md);
}
.btn-cta:hover {
	background-color: #f9fafb;
	color: var(--color-primary);
	box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   5. Cards
   -------------------------------------------------------------------------- */

.card {
	background: var(--color-bg);
	border: 1px solid #e5e7eb;
	border-radius: calc(var(--radius) * 1.5);
	box-shadow: var(--shadow-sm);
	transition: box-shadow var(--transition), transform var(--transition);
	overflow: hidden;
}

.card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.site-header {
	position: relative;
	z-index: 100;
	width: 100%;
	border-block-end: 1px solid rgba(0,0,0,.08);
}

.has-sticky-header .site-header {
	position: sticky;
	top: 0;
	transition: background var(--transition), box-shadow var(--transition);
}

.has-sticky-header .site-header.scrolled {
	box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Transparent header — overlays page content, becomes solid on scroll
   -------------------------------------------------------------------------- */

.header-transparent .site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: transparent !important;
	box-shadow: none !important;
	border-block-end-color: transparent;
	transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
	z-index: 200;
}

/* White text/icons when header is transparent */
.header-transparent .site-header:not(.scrolled) .nav-link,
.header-transparent .site-header:not(.scrolled) .site-title,
.header-transparent .site-header:not(.scrolled) .site-tagline,
.header-transparent .site-header:not(.scrolled) .hamburger,
.header-transparent .site-header:not(.scrolled) .hamburger__bar {
	color: #fff;
}
/* Submenus open on a white background — restore dark text regardless of header state */
.site-header .sub-menu .nav-link {
	color: var(--color-heading) !important;
}
.header-transparent .site-header:not(.scrolled) .hamburger span {
	background: #fff;
}
.header-transparent .site-header:not(.scrolled) .header-cta {
	color: #fff;
	border-color: rgba(255,255,255,.5);
	background: rgba(255,255,255,.1);
}

/* ── Logo colour swap on transparent header ──────────────────────────────── */

/* Light logo slot: hidden by default on all pages */
.logo--light { display: none; }

/* Fallback: auto-invert a dark/black logo to white over a dark background.
   This works with no configuration for logos that are dark-coloured. */
.header-transparent .site-header:not(.scrolled) .logo--default .custom-logo,
.header-transparent .site-header:not(.scrolled) .logo--default .site-logo-img {
	filter: brightness(0) invert(1);
	transition: filter .3s;
}

/* When a custom light logo is uploaded (has-light-logo body class):
   swap logos instead of relying on the invert filter. */
.has-light-logo.header-transparent .site-header:not(.scrolled) .logo--default {
	display: none;
}
.has-light-logo.header-transparent .site-header:not(.scrolled) .logo--light {
	display: flex;
	align-items: center;
}

/* On scroll, revert to default logo regardless of light logo setting */
.header-transparent .site-header.scrolled .logo--default { display: flex; align-items: center; }
.header-transparent .site-header.scrolled .logo--light   { display: none !important; }
.header-transparent .site-header.scrolled .logo--default .custom-logo,
.header-transparent .site-header.scrolled .logo--default .site-logo-img {
	filter: none;
}

/* Restore solid background on scroll */
.header-transparent .site-header.scrolled {
	background: var(--header-bg) !important;
	box-shadow: var(--shadow-sm) !important;
	border-block-end-color: rgba(0,0,0,.08);
}

/* Offset non-hero page content so it clears the fixed transparent header.
   single posts, archives etc. never get .header-transparent (see functions.php)
   so they use their own padding-block rule and are not affected here. */
.header-transparent .site-main {
	padding-block-start: calc(var(--header-height, 76px) + clamp(3rem, 6vw, 5rem));
}

/* Hero pages: zero out the extra offset — hero handles its own clearance */
.header-transparent .page-main:has(> .hero-section:first-child) {
	padding-block-start: 0;
}

/* Hero section: pull it up to fill behind the fixed header */
.header-transparent .hero-section:first-child {
	margin-block-start: calc(-1 * var(--header-height, 76px));
	padding-block-start: calc(var(--header-height, 76px) + 2rem);
}

/* Tertiary gradient along the top for header contrast */
.header-transparent .hero-section:first-child::before {
	content: '';
	position: absolute;
	inset: 0;
	height: 45%;
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--color-tertiary) 22%, transparent) 0%,
		transparent 100%
	);
	pointer-events: none;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   Mobile layout: 3-column grid — [call | brand | actions]
   Desktop layout (1024px+): flex row — [brand | nav | actions]
   -------------------------------------------------------------------------- */

.header-inner {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "brand actions";
	align-items: center;
	padding-block: .875rem;
	transition: padding-block var(--transition);
}

@media (min-width: 1024px) {
	.header-inner {
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas: "call brand actions";
	}
}

.has-sticky-header .site-header.scrolled .header-inner {
	padding-block: .375rem;
}

.header-call    { grid-area: call;    display: flex; align-items: center; }
.header-brand   { grid-area: brand;   display: flex; align-items: center; justify-content: flex-start; }
.header-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: .625rem; }

@media (min-width: 1024px) {
	.header-brand { justify-content: center; }
}

.site-logo-img  { display: block; max-width: 100%; width: auto; height: auto; transition: max-height var(--transition); }
.custom-logo    { display: block; transition: max-height var(--transition); }

.has-sticky-header .site-header.scrolled .site-logo-img,
.has-sticky-header .site-header.scrolled .custom-logo {
	max-height: 34px;
	width: auto !important;
}

/* ---- Mobile call button ---- */

.btn-call {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--color-primary);
	text-decoration: none;
	padding: .5rem .625rem;
	border-radius: var(--radius);
	border: 1.5px solid var(--color-primary);
	line-height: 1;
	transition: background var(--transition), color var(--transition);
	white-space: nowrap;
}

.btn-call:hover,
.btn-call:focus-visible {
	background: var(--color-primary);
	color: #fff;
	text-decoration: none;
}

/* ---- Sticky mobile call bar ---- */
.sticky-call-bar {
	display: none;
}

@media (max-width: 1023px) {
	.sticky-call-bar {
		display: block;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 150;
		background: var(--color-primary);
		box-shadow: 0 -2px 16px rgba(0,0,0,.18);
	}

	.sticky-call-bar__link {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .625rem;
		padding-block: .9375rem;
		padding-inline: 1rem;
		padding-bottom: calc(.9375rem + env(safe-area-inset-bottom, 0px));
		color: #fff;
		text-decoration: none;
		font-weight: 600;
		font-size: 1rem;
		letter-spacing: .01em;
	}

	.sticky-call-bar__link:hover,
	.sticky-call-bar__link:focus-visible {
		color: #fff;
		text-decoration: none;
		background: color-mix(in srgb, var(--color-primary) 85%, #000);
	}

	/* Push page content up so nothing hides behind the bar */
	body:has(.sticky-call-bar) {
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	/* Ensure the mobile nav overlay covers the sticky bar */
	.primary-nav.is-open {
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}
}

/* ---- Brand ---- */

.custom-logo-link { display: flex; align-items: center; }
.custom-logo      { max-height: 44px; width: auto; }

.site-title {
	font-family:  var(--font-heading);
	font-size:    1.375rem;
	font-weight:  700;
	color:        var(--header-text);
	text-decoration: none;
	letter-spacing: -.02em;
	white-space: nowrap;
}
.site-title:hover { color: var(--color-primary); text-decoration: none; }

/* Tagline hidden on mobile, shown on desktop */
.site-tagline {
	display: none;
	font-size: .8125rem;
	font-weight: 500;
	color: var(--header-text);
	opacity: .5;
	padding-inline-start: .75rem;
	margin-inline-start: .625rem;
	border-inline-start: 1px solid currentColor;
	white-space: nowrap;
}

/* ---- Nav — hidden on mobile ---- */

.primary-nav { display: none; }

.nav-menu {
	list-style: none;
	display: flex;
	align-items: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
}

.nav-menu li { position: relative; }

.nav-menu > li > a {
	display: block;
	padding: .5rem .875rem;
	border-radius: calc(var(--radius) / 2);
	transition: background var(--transition);
}

.nav-link {
	font-size: .9375rem;
	font-weight: 500;
	color: var(--header-text);
	text-decoration: none;
}

.nav-menu > li > a:hover { background: rgba(0,0,0,.05); text-decoration: none; }
.nav-menu > li.current-menu-item > a .nav-link,
.nav-menu > li.current_page_item > a .nav-link { color: var(--color-primary); }

/* Dropdown sub-menus */
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + .375rem);
	left: 0;
	min-width: 200px;
	background: var(--color-bg);
	border: 1px solid #e5e7eb;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: .5rem;
	list-style: none;
	z-index: 50;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu { display: block; }

.nav-menu .sub-menu li a {
	display: block;
	padding: .5rem .75rem;
	border-radius: calc(var(--radius) / 2);
	font-size: .9rem;
	color: var(--color-heading);
}
.nav-menu .sub-menu li a:hover { background: var(--color-surface); text-decoration: none; }

/* --------------------------------------------------------------------------
   Mega Menu — desktop panel + mobile inline columns
   -------------------------------------------------------------------------- */

/* ── Desktop (≥1024px) ── */
@media (min-width: 1024px) {

	/* Top-level item must not clip the absolutely-positioned panel */
	.nav-menu > li.mega-menu { position: static; }

	.mega-panel {
		position: fixed;
		top: var(--header-height, 70px);
		left: 0;
		right: 0;
		background: var(--color-bg);
		border-top: 3px solid var(--color-primary);
		box-shadow: 0 12px 40px rgba(0,0,0,.12);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(-6px);
		transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
		z-index: 120;
	}

	/* Show when .mega-open is set by JS (mouse, keyboard, or touch) */
	.nav-menu > li.mega-menu.mega-open > .mega-panel {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	.mega-panel__inner {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 2rem 3rem;
		padding: 2rem var(--container-gutter, 1.5rem);
		max-width: 1200px;
		margin-inline: auto;
	}

	.mega-col__heading {
		display: block;
		font-family: var(--font-heading);
		font-size: .8125rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: .06em;
		color: var(--color-heading);
		padding-bottom: .625rem;
		margin-bottom: .75rem;
		border-bottom: 2px solid var(--color-primary);
		text-decoration: none;
	}
	a.mega-col__heading:hover { color: var(--color-primary); }

	.mega-col__links {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: .125rem;
	}

	.mega-col__link {
		display: block;
		font-size: .9375rem;
		color: var(--color-text);
		padding: .375rem .5rem;
		border-radius: calc(var(--radius) / 2);
		text-decoration: none;
		transition: color .15s, background .15s, padding-left .15s;
	}
	.mega-col__link:hover {
		color: var(--color-primary);
		background: var(--color-surface);
		padding-left: .875rem;
	}
}

/* ── Mobile (≤1023px) — columns stack inline inside the nav drawer ── */
@media (max-width: 1023px) {

	.mega-panel {
		position: static;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
		background: none;
		border: none;
		box-shadow: none;
	}

	.mega-panel__inner {
		display: flex;
		flex-direction: column;
		gap: 0;
		padding: 0 1.5rem .5rem;
	}

	.mega-col {
		padding: .75rem 0 .75rem .875rem;
		border-left: 2px solid rgba(255,255,255,.2);
		margin-bottom: .25rem;
	}

	.mega-col__heading {
		display: block;
		font-size: .75rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: .06em;
		color: rgba(255,255,255,.5);
		margin-bottom: .5rem;
		text-decoration: none;
	}

	.mega-col__links { list-style: none; margin: 0; padding: 0; }

	.mega-col__link {
		display: block;
		font-size: .9rem;
		color: rgba(255,255,255,.82);
		padding: .3rem 0;
		text-decoration: none;
	}
	.mega-col__link:hover { color: #fff; }
}

/* ---- Header call — phone moves to sticky bottom bar, hidden everywhere in header ---- */
.header-call { display: none !important; }

/* ---- Header CTA — desktop only ---- */
.header-cta { display: none !important; }

/* ---- Hamburger — visible on mobile ---- */

.hamburger {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 28px;
	height: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.hamburger span {
	display: block;
	height: 2px;
	background: var(--header-text);
	border-radius: 2px;
	transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---- Desktop header (1024px+) ---- */

@media (min-width: 1024px) {
	.header-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.5rem;
		padding-block: 1rem;
	}

	.header-brand { justify-content: flex-start; }
	.site-tagline { display: inline; }

	/* Show and center the nav */
	.primary-nav {
		display: block;
		flex: 1;
	}
	.nav-menu { justify-content: center; }

	/* Show the CTA button */
	.header-cta { display: inline-flex !important; }

	/* Hide the hamburger */
	.hamburger { display: none; }
}

/* ---- Mobile nav overlay ---- */

@media (max-width: 1023px) {
	.primary-nav {
		display: none;
		position: fixed;
		inset: 0;
		height: 100dvh;
		background: color-mix(in srgb, var(--color-primary) 18%, #08101e);
		padding: 0;
		z-index: 90;
		overflow-y: auto;
		box-shadow: var(--shadow-xl);
	}

	.primary-nav.is-open {
		display: flex;
		flex-direction: column;
		z-index: 300;
	}

	/* Mobile nav: logo + close row */
	.nav-mobile-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 1.125rem 1.5rem;
		border-bottom: 1px solid rgba(255,255,255,.08);
		flex-shrink: 0;
	}

	.nav-mobile-logo { display: flex; align-items: center; }
	.nav-mobile-logo a { display: flex; align-items: center; text-decoration: none; }
	.nav-mobile-logo .site-logo-img,
	.nav-mobile-logo .custom-logo { max-height: 38px !important; width: auto !important; }
	.nav-mobile-logo .site-title {
		color: #fff;
		font-size: 1.125rem;
		font-weight: 700;
		text-decoration: none;
	}

	.nav-mobile-close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border-radius: 50%;
		background: rgba(255,255,255,.09);
		border: none;
		color: rgba(255,255,255,.8);
		cursor: pointer;
		flex-shrink: 0;
		transition: background var(--transition), color var(--transition);
	}
	.nav-mobile-close:hover { background: rgba(255,255,255,.16); color: #fff; }

	/* Nav items */
	.nav-menu {
		flex: 1;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: .625rem 0;
	}

	.nav-menu > li { width: 100%; }

	.nav-menu > li > a {
		padding: .9rem 1.5rem;
		font-size: 1.125rem;
		border-radius: 0;
	}
	.nav-menu > li > a:hover { background: rgba(255,255,255,.06); }

	.nav-link { color: rgba(255,255,255,.82) !important; }
	.nav-menu > li > a:hover .nav-link { color: #fff !important; }
	.nav-menu > li.current-menu-item > a .nav-link,
	.nav-menu > li.current_page_item > a .nav-link { color: var(--color-secondary) !important; }

	.nav-menu .sub-menu {
		position: static;
		box-shadow: none;
		border: none;
		padding-inline-start: 0;
		background: rgba(0,0,0,.22);
		display: block;
		margin: 0;
		border-radius: 0;
	}
	.nav-menu .sub-menu > li > a { padding: .65rem 2.25rem; }
	.nav-menu .sub-menu .nav-link { font-size: .9375rem; color: rgba(255,255,255,.6) !important; }
	.nav-menu .sub-menu > li > a:hover .nav-link { color: rgba(255,255,255,.9) !important; }

	/* Mobile nav: contact + CTA footer */
	.nav-mobile-footer {
		flex-shrink: 0;
		padding: 1.375rem 1.5rem 2rem;
		border-top: 1px solid rgba(255,255,255,.08);
		display: flex;
		flex-direction: column;
		gap: .875rem;
	}

	.nav-mobile-address,
	.nav-mobile-email {
		display: flex;
		align-items: flex-start;
		gap: .625rem;
		font-size: .875rem;
		line-height: 1.55;
		color: rgba(255,255,255,.48);
		margin: 0;
		text-decoration: none;
	}
	.nav-mobile-email:hover { color: rgba(255,255,255,.82); }
	.nav-mobile-address svg,
	.nav-mobile-email svg { flex-shrink: 0; margin-top: .1875rem; opacity: .7; }

	.nav-mobile-cta { width: 100%; justify-content: center; margin-top: .25rem; }
}

/* Hide mobile-only nav elements on desktop */
@media (min-width: 1024px) {
	.nav-mobile-header,
	.nav-mobile-footer,
	.nav-mobile-close { display: none; }
}

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */

.hero-section {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--hero-min-height);
	overflow: hidden;
}


.hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.35);
	pointer-events: none;
}

/* Remove overlay when no image (and no video) */
.hero-section:not([style*="background-image"]):not(.has-video-bg) .hero-overlay {
	display: none;
}

/* Video background */
.hero-video-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}

/* Local video: object-fit handles cover cleanly */
.hero-video-wrap video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

/* YouTube iframe must be an exact 16:9 rectangle larger than the container.
   Using viewport units ensures the ratio is always maintained:
   portrait  → height = 100vh, width = 100vh × 16/9
   landscape → width  = 100vw, height = 100vw × 9/16
   Both formulas are evaluated and the larger wins for each axis,
   which always produces a 16:9 result that covers the full viewport. */
.hero-video-wrap iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: max(100vw, calc(100vh * 16 / 9));
	height: max(100vh, calc(100vw * 9 / 16));
	border: 0;
}

/* Ensure overlay and content sit above video */
.has-video-bg .hero-overlay {
	z-index: 1;
}

.has-video-bg .container {
	z-index: 2;
}

.hero-section .container { position: relative; z-index: 1; }

.hero-content {
	max-width: 700px;
	padding-block: clamp(4rem, 10vw, 7rem);
	color: #fff;
}

/* Hero text is always white (gradient/dark bg) */
.hero-headline {
	color: #fff;
	font-size: clamp(2.25rem, 6vw, 4rem);
	line-height: 1.1;
	letter-spacing: -.03em;
	margin-block-end: 1.25rem;
}

.hero-subtext {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	color: rgba(255,255,255,.9);
	line-height: 1.65;
	margin-block-end: 2.5rem;
	max-width: 560px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

.hero-scroll-hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,.6);
	animation: bounce 2s infinite;
}

@keyframes bounce {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50%       { transform: translateX(-50%) translateY(6px); }
}

/* Hero: light background — dark text */
.hero-section--light .hero-content,
.hero-section--light .hero-headline,
.hero-section--light .hero-subtext {
	color: var(--color-heading);
}
.hero-section--light .hero-subtext { color: var(--color-text); }

/* Hero: centered text */
.hero-content--center {
	max-width: 800px;
	margin-inline: auto;
	text-align: center;
}
.hero-content--center .hero-actions {
	justify-content: center;
}

/* Hero: light background variant */
.hero-section[class*="--light"] .hero-content,
.hero-section[class*="--light"] .hero-headline,
.hero-section[class*="--light"] .hero-subtext {
	color: var(--color-heading);
}

/* --------------------------------------------------------------------------
   Section background image system
   -------------------------------------------------------------------------- */

[data-bg-src] {
	position: relative;
	overflow: hidden;
}

.section-bg-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--overlay-opacity, 0));
	pointer-events: none;
	z-index: 0;
}

/* Lift direct children above the overlay */
[data-bg-src] > *:not(.section-bg-overlay) {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   8. Services Section
   -------------------------------------------------------------------------- */

.services-section {
	background: var(--color-surface);
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.5rem;
}

.service-card {
	padding: 2rem;
	text-align: left;
	background: var(--color-bg);
}

.service-icon {
	font-size: 2.25rem;
	line-height: 1;
	margin-block-end: 1.25rem;
	display: block;
}

.service-title {
	font-size: 1.125rem;
	margin-block-end: .625rem;
	color: var(--color-heading);
}

.service-text {
	font-size: .9375rem;
	color: #6b7280;
	line-height: 1.65;
	margin-block-end: 0;
}

/* --------------------------------------------------------------------------
   9. CTA Section
   -------------------------------------------------------------------------- */

.cta-section {
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
	padding-block: var(--section-py);
}

.cta-inner {
	text-align: center;
	max-width: 640px;
	margin-inline: auto;
}

.cta-title {
	color: #fff;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-block-end: 1rem;
}

.cta-text {
	color: rgba(255,255,255,.9);
	font-size: 1.125rem;
	line-height: 1.6;
	margin-block-end: 2rem;
}

/* --------------------------------------------------------------------------
   10. Latest Posts / Posts Grid
   -------------------------------------------------------------------------- */

.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 1.5rem;
}

.blog-layout--list .posts-grid {
	grid-template-columns: 1fr;
	max-width: 760px;
}

.post-card {
	display: flex;
	flex-direction: column;
}

.post-card__thumb {
	display: block;
	aspect-ratio: 3/2;
	overflow: hidden;
	background: var(--color-surface);
}

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

.post-card:hover .post-card__thumb img {
	transform: scale(1.04);
}

.post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.5rem;
}

.post-card__meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-block-end: .75rem;
	font-size: .8125rem;
	font-weight: 500;
}

.post-card__cat {
	color: var(--color-primary);
	text-transform: uppercase;
	letter-spacing: .06em;
	font-size: .75rem;
	font-weight: 600;
}
.post-card__cat:empty { display: none; }

.post-card__date { color: #9ca3af; }

.post-card__title {
	font-size: 1.125rem;
	line-height: 1.35;
	margin-block-end: .75rem;
}

.post-card__title a {
	color: var(--color-heading);
	text-decoration: none;
}
.post-card__title a:hover { color: var(--color-primary); text-decoration: none; }

.post-card__excerpt {
	font-size: .9375rem;
	color: #6b7280;
	line-height: 1.65;
	margin-block-end: 1.25rem;
	flex: 1;
}

.post-card__read-more {
	font-size: .9rem;
	font-weight: 600;
	color: var(--color-primary);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: .25rem;
}
.post-card__read-more:hover { gap: .5rem; text-decoration: none; }

/* Blog layout: list mode */
.blog-layout--list .post-card {
	flex-direction: row;
}
.blog-layout--list .post-card__thumb {
	width: 220px;
	flex-shrink: 0;
	aspect-ratio: auto;
}

/* --------------------------------------------------------------------------
   11. Single Post
   -------------------------------------------------------------------------- */

.single-main, .page-main { padding-block: clamp(3rem, 6vw, 5rem); }

/* Remove top padding when a hero section leads the page */
.page-main:has(> .hero-section:first-child) { padding-block-start: 0; }

.entry-header { margin-block-end: 2rem; }

.entry-cats {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-block-end: 1rem;
}

.entry-cat {
	display: inline-block;
	background: var(--color-surface);
	color: var(--color-primary);
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: .25rem .625rem;
	border-radius: calc(var(--radius) / 2);
	text-decoration: none;
}
.entry-cat:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

.entry-title { margin-block-end: 1rem; }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	font-size: .875rem;
	color: #9ca3af;
}

.entry-meta a { color: #6b7280; }
.entry-meta a:hover { color: var(--color-primary); }

.entry-reading-time { font-weight: 500; }

.entry-thumbnail {
	margin-block: 1.5rem;
	border-radius: var(--radius);
	overflow: hidden;
}
.entry-thumbnail img { width: 100%; }

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.8;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
	margin-block: 2rem 1rem;
}

.entry-content ul,
.entry-content ol {
	margin-block-end: 1.25rem;
}

.entry-content img {
	border-radius: var(--radius);
	margin-block: 1.5rem;
}

.entry-footer { margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid #e5e7eb; }

.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a {
	display: inline-block;
	background: var(--color-surface);
	color: #374151;
	font-size: .8125rem;
	padding: .25rem .625rem;
	border-radius: var(--radius);
	text-decoration: none;
}
.entry-tags a:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* ── Reading progress bar ─────────────────────────────────────────────────── */
.reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 9999;
	pointer-events: none;
}
.reading-progress__fill {
	height: 100%;
	width: 0%;
	background: var(--color-primary);
	transition: width .1s linear;
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */
.breadcrumbs {
	margin-block-end: 1.5rem;
	font-size: .8125rem;
}
.breadcrumbs ol {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem;
}
.breadcrumbs li {
	display: flex;
	align-items: center;
	gap: .25rem;
	color: #9ca3af;
}
.breadcrumbs li:not(:last-child)::after {
	content: '/';
	color: #d1d5db;
	margin-left: .25rem;
}
.breadcrumbs a { color: #6b7280; text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs li[aria-current] { color: var(--color-text); font-weight: 500; }

/* ── Entry meta with author avatar ───────────────────────────────────────── */
.entry-meta__author {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
}
.entry-meta__author a,
.entry-meta__date,
.entry-meta__updated,
.entry-meta__reading-time { color: #6b7280; font-size: .875rem; }
.entry-meta__author a:hover { color: var(--color-primary); }
.entry-meta__avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

/* ── Table of Contents ────────────────────────────────────────────────────── */
.post-toc {
	background: var(--color-surface);
	border: 1px solid #e5e7eb;
	border-left: 4px solid var(--color-primary);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	margin-block: 2rem;
}
.post-toc__toggle {
	display: flex;
	align-items: center;
	gap: .5rem;
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-weight: 600;
	font-size: .9375rem;
	color: var(--color-heading);
	text-align: left;
}
.post-toc__toggle:hover { color: var(--color-primary); }
.post-toc__chevron { margin-left: auto; transition: transform .2s; }
.post-toc__toggle[aria-expanded="false"] .post-toc__chevron { transform: rotate(-90deg); }
.post-toc__nav { margin-top: .875rem; }
.post-toc__nav ol {
	list-style: decimal;
	padding-left: 1.25rem;
	margin: 0;
}
.post-toc__nav ol.toc-sub { list-style: lower-alpha; margin-top: .25rem; }
.post-toc__nav li { margin-block: .3rem; }
.post-toc__nav a {
	color: #6b7280;
	text-decoration: none;
	font-size: .875rem;
	line-height: 1.5;
	transition: color .15s;
}
.post-toc__nav a:hover,
.post-toc__nav a.is-active { color: var(--color-primary); }
.post-toc__nav a.is-active { font-weight: 600; }

/* ── Share buttons ────────────────────────────────────────────────────────── */
.share-buttons {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .5rem;
	margin-block: 1.5rem 0;
}
.share-buttons__label {
	font-size: .875rem;
	font-weight: 500;
	color: #6b7280;
	margin-right: .25rem;
}
.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--color-surface);
	color: #374151;
	border: 1px solid #e5e7eb;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
	flex-shrink: 0;
}
.share-btn:hover {
	background: var(--color-primary);
	color: #fff;
	border-color: var(--color-primary);
	text-decoration: none;
}
.share-btn--copy .icon-check { display: none; }
.share-btn--copy.copied .icon-copy { display: none; }
.share-btn--copy.copied .icon-check { display: block; }
.share-btn--copy.copied { background: #10b981; color: #fff; border-color: #10b981; }

/* ── Author bio ───────────────────────────────────────────────────────────── */
.author-bio {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin-block-start: 2rem;
	padding: 1.5rem;
	background: var(--color-surface);
	border-radius: var(--radius);
	border: 1px solid #e5e7eb;
}
.author-bio__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.author-bio__body { min-width: 0; }
.author-bio__name {
	font-weight: 600;
	margin: 0 0 .375rem;
	font-size: .9375rem;
}
.author-bio__name a { color: var(--color-heading); text-decoration: none; }
.author-bio__name a:hover { color: var(--color-primary); }
.author-bio__desc {
	font-size: .9375rem;
	color: #4b5563;
	margin: 0 0 .875rem;
	line-height: 1.65;
}
.author-bio__links { display: flex; gap: .5rem; }
.author-bio__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e5e7eb;
	color: #374151;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.author-bio__link:hover { background: var(--color-primary); color: #fff; }
@media (max-width: 480px) {
	.author-bio { flex-direction: column; align-items: center; text-align: center; }
	.author-bio__links { justify-content: center; }
}

/* ── Post navigation (with thumbnails) ───────────────────────────────────── */
.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-block: 3rem;
	padding-block-start: 2rem;
	border-block-start: 1px solid #e5e7eb;
}
.post-nav__link {
	display: flex;
	align-items: center;
	gap: .875rem;
	padding: 1rem 1.125rem;
	background: var(--color-surface);
	border: 1px solid #e5e7eb;
	border-radius: var(--radius);
	text-decoration: none;
	color: inherit;
	transition: border-color .2s, box-shadow .2s;
}
.post-nav__link:hover {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 1px var(--color-primary);
	text-decoration: none;
	color: inherit;
}
.post-nav__link--next { justify-content: flex-end; text-align: right; }
.post-nav__thumb {
	width: 60px;
	height: 60px;
	border-radius: calc(var(--radius) * .75);
	overflow: hidden;
	flex-shrink: 0;
}
.post-nav__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-nav__text { flex: 1; min-width: 0; }
.post-nav__direction {
	display: flex;
	align-items: center;
	gap: .2rem;
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--color-primary);
	margin-block-end: .3rem;
}
.post-nav__link--next .post-nav__direction { justify-content: flex-end; }
.post-nav__title {
	font-weight: 500;
	font-size: .9375rem;
	color: var(--color-heading);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
@media (max-width: 600px) {
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__thumb { display: none; }
}

/* ── Related posts ────────────────────────────────────────────────────────── */
.related-posts {
	background: var(--color-surface);
	padding-block: clamp(3rem, 6vw, 4.5rem);
	margin-block-start: 2rem;
}
.related-posts__heading {
	text-align: center;
	margin-block-end: 2rem;
}
.related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
@media (max-width: 900px) {
	.related-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.related-posts__grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   12. Archive / Search / Page Headers
   -------------------------------------------------------------------------- */

.page-header {
	margin-block-end: 2.5rem;
	padding-block-end: 1.5rem;
	border-block-end: 1px solid #e5e7eb;
}

.page-title { margin-block-end: .5rem; }

.archive-description { color: #6b7280; font-size: 1.0625rem; }
.archive-main { padding-block: clamp(3rem, 6vw, 5rem); }
.search-main  { padding-block: clamp(3rem, 6vw, 5rem); }

/* --------------------------------------------------------------------------
   13. Blog Sidebar
   -------------------------------------------------------------------------- */

.blog-main { padding-block: clamp(3rem, 6vw, 5rem); }

.blog-layout {
	display: grid;
	gap: 3rem;
}

@media (min-width: 1024px) {
	.blog-layout {
		grid-template-columns: 1fr 300px;
		align-items: start;
	}
}

.blog-sidebar { position: sticky; top: 5rem; }

.blog-sidebar .widget { margin-block-end: 2rem; }

.widget-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--color-heading);
	margin-block-end: 1rem;
	padding-block-end: .625rem;
	border-block-end: 2px solid var(--color-primary);
}

/* --------------------------------------------------------------------------
   14. Pagination
   -------------------------------------------------------------------------- */

.pagination,
.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	justify-content: center;
	margin-block-start: 3rem;
	font-size: .9375rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: .625rem;
	border-radius: var(--radius);
	border: 1px solid #e5e7eb;
	color: var(--color-heading);
	font-weight: 500;
	text-decoration: none;
	transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.page-numbers:hover {
	background: var(--color-surface);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* --------------------------------------------------------------------------
   15. Comments
   -------------------------------------------------------------------------- */

.comments-wrap {
	margin-block-start: 3rem;
	padding-block-start: 2rem;
	border-block-start: 1px solid #e5e7eb;
}

.comments-title {
	font-size: 1.5rem;
	margin-block-end: 1.5rem;
}

.comment {
	padding: 1.25rem 0;
	border-block-end: 1px solid #f3f4f6;
}

.comment-author img {
	border-radius: 50%;
	width: 44px;
	height: 44px;
}

.comment-meta { font-size: .875rem; color: #9ca3af; }
.comment-content { margin-block-start: .75rem; font-size: .9375rem; }

.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: .75rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 1rem;
	background: var(--color-bg);
	color: var(--color-text);
	transition: border-color var(--transition);
	margin-block-end: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

.comment-form .submit {
	display: inline-flex;
	padding: .75rem 1.75rem;
	background: var(--color-primary);
	color: #fff;
	font-weight: 600;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	font-family: var(--font-body);
	font-size: 1rem;
	transition: background var(--transition);
}
.comment-form .submit:hover { background: #3730a3; }

/* --------------------------------------------------------------------------
   16. Forms & Inputs (global)
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
	padding: .75rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--color-text);
	background: var(--color-bg);
	transition: border-color var(--transition), box-shadow var(--transition);
	width: 100%;
}

input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

/* Search form */
.search-form { display: flex; gap: .5rem; }
.search-form .search-field { flex: 1; }
.search-form .search-submit {
	flex-shrink: 0;
	padding: .75rem 1.25rem;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius);
	font-weight: 600;
	cursor: pointer;
	font-family: var(--font-body);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer { margin-block-start: auto; position: relative; }

.footer-widgets,
.footer-bottom { position: relative; z-index: 1; }

.footer-widgets {
	padding-block: clamp(3rem, 6vw, 5rem);
	border-block-end: 1px solid rgba(255,255,255,.08);
}

.footer-widgets-grid {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;
}
/* Desktop: first column expands to absorb any empty slots */
.footer-widgets-grid--4col { grid-template-columns: repeat(4, 1fr); }
.footer-widgets-grid--3col { grid-template-columns: 2fr 1fr 1fr; }
.footer-widgets-grid--2col { grid-template-columns: 2fr 1fr; }
.footer-widgets-grid--1col { grid-template-columns: 1fr; }

@media (max-width: 1023px) {
	.footer-widgets-grid--4col { grid-template-columns: repeat(2, 1fr); }
	.footer-widgets-grid--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
	.footer-widgets-grid--4col,
	.footer-widgets-grid--3col,
	.footer-widgets-grid--2col { grid-template-columns: 1fr; }
}

.site-footer .widget { color: var(--footer-text); }
.site-footer .widget a { color: var(--footer-text); }
.site-footer .widget a:hover { color: #fff; text-decoration: none; }

.footer-bottom { padding-block: 1.5rem; }

.footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.footer-copyright {
	font-size: .875rem;
	color: var(--footer-text);
	margin: 0;
}

.footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
}

.footer-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.footer-nav li a { font-size: .875rem; color: var(--footer-text); padding: .25rem .5rem; border-radius: calc(var(--radius)/2); }
.footer-nav li a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }

/* --------------------------------------------------------------------------
   18. Page Templates
   -------------------------------------------------------------------------- */

/* Error 404 */
.error-main { padding-block: clamp(4rem, 10vw, 8rem); }

.error-page { text-align: center; max-width: 500px; margin-inline: auto; }

.error-code {
	font-size: clamp(6rem, 15vw, 10rem);
	font-family: var(--font-heading);
	font-weight: 800;
	color: var(--color-primary);
	opacity: .15;
	line-height: 1;
	margin-block-end: 0;
}

.error-title { font-size: 2rem; margin-block-end: 1rem; }
.error-text  { color: #6b7280; margin-block-end: 2rem; }
.error-actions { margin-block-end: 2rem; }
.error-search p { color: #9ca3af; font-size: .875rem; margin-block-end: .75rem; }

/* Page with Gutenberg content */
.page-content-section { padding-block: var(--section-py); }

/* --------------------------------------------------------------------------
   19. Flexible Content Sections
   -------------------------------------------------------------------------- */

/* Shared: eyebrow label above section headings */
.section-eyebrow {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--color-primary);
	margin-block-end: .75rem;
}

/* Shared: card base */
.card {
	background: var(--color-bg);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: 2rem;
}

/* Shared: prose rich-text blocks */
.prose > * + * { margin-block-start: 1.25em; }
.prose > *:last-child { margin-block-end: 0; }

/* Shared: surface background variant */
.features-section--surface,
.text-columns-section--surface,
.image-text-section--surface {
	background: var(--color-surface);
}

/* ── Features ── */
.features-grid {
	display: grid;
	gap: 1.5rem;
}
.features-grid--2col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.features-grid--3col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.features-grid--4col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.feature-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--color-primary) 10%, transparent);
	color: var(--color-primary);
	margin-block-end: 1.25rem;
}

.feature-card__title {
	font-size: 1.125rem;
	margin-block-end: .625rem;
}

.feature-card__text {
	font-size: .9375rem;
	color: #6b7280;
	line-height: 1.65;
	margin-block-end: 0;
}

/* ── Feature card: image variant ── */

.feature-card--has-image {
	padding: 0;
}

.feature-card__image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

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

.feature-card--has-image:hover .feature-card__image-img {
	transform: scale(1.04);
}

.feature-card__body {
	padding: 1.5rem 2rem;
}

.feature-card__btn {
	margin-block-start: 1.25rem;
	align-self: flex-start;
}

/* ── Testimonials ── */
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 1.5rem;
}

.testimonial-card__quote {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--color-text);
	font-style: italic;
	border: none;
	background: none;
	padding: 0;
	margin: 0 0 1.5rem;
}

.testimonial-card__footer {
	display: flex;
	align-items: center;
	gap: .875rem;
}

.testimonial-card__avatar {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
}

.testimonial-card__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonial-card__avatar--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-surface);
	color: #9ca3af;
}

.testimonial-card__name {
	display: block;
	font-style: normal;
	font-weight: 600;
	font-size: .9375rem;
	color: var(--color-heading);
}

.testimonial-card__role {
	display: block;
	font-size: .8125rem;
	color: #9ca3af;
}

.testimonial-card__stars {
	display: flex;
	gap: .125rem;
	color: #f59e0b;
	margin-block-end: .875rem;
}

.testimonial-card__star { flex-shrink: 0; }

/* Column variants */
.testimonials-grid--2col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.testimonials-grid--3col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.testimonials-grid--4col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

/* Dark background variant */
.testimonials-section--dark {
	background: #0f172a;
}
.testimonials-section--dark .section-eyebrow { color: var(--color-primary); }
.testimonials-section--dark .section-title   { color: #fff; }
.testimonials-section--dark .testimonial-card__quote { color: #cbd5e1; }
.testimonials-section--dark .testimonial-card__name  { color: #f1f5f9; }
.testimonials-section--dark .testimonial-card__role  { color: #64748b; }
.testimonials-section--dark .testimonial-card__avatar--placeholder {
	background: #1e293b;
	color: #475569;
}

/* ── CTA Band — background variants ── */
.cta-section--primary {
	background: var(--color-primary);
}

.cta-section--dark {
	background: #0f172a;
}

/* ── Text Columns ── */
.text-columns {
	display: grid;
	gap: 2.5rem;
}
.text-columns--2col { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }

/* ── Image + Text ── */
.image-text-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}

.image-text-section--img-right .image-text-grid__image { order: 2; }
.image-text-section--img-right .image-text-grid__content { order: 1; }

.image-text-grid__img {
	width: 100%;
	height: auto;
	border-radius: var(--radius);
	display: block;
}

.image-text-grid__placeholder {
	aspect-ratio: 4/3;
	background: var(--color-surface);
	border-radius: var(--radius);
}

.image-text-grid__heading {
	margin-block-end: 1.25rem;
}

.image-text-grid__btn {
	margin-block-start: 2rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.image-text-grid {
		grid-template-columns: 1fr;
	}
	.image-text-section--img-right .image-text-grid__image,
	.image-text-section--img-right .image-text-grid__content {
		order: unset;
	}
	.features-grid--4col {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	}
}

/* ── Carousel ── */

.carousel-section--surface { background: var(--color-surface); }
.carousel-section--dark    { background: #0f172a; }
.carousel-section--dark .section-title,
.carousel-section--dark .section-eyebrow { color: #fff; }
.carousel-section--dark .section-eyebrow { opacity: .7; }

.carousel {
	position: relative;
	user-select: none;
}

.carousel__viewport {
	overflow: hidden;
	border-radius: var(--radius);
}

.carousel__track {
	display: flex;
	transition: transform .45s cubic-bezier(.4,0,.2,1);
	will-change: transform;
}

.carousel__slide {
	flex: 0 0 100%;
	position: relative;
	aspect-ratio: var(--carousel-aspect, 16/9);
	overflow: hidden;
	background: var(--color-surface);
}

.carousel__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.carousel__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.5rem 2rem;
	background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
}

.carousel__caption-text {
	color: #fff;
	font-size: .9375rem;
	line-height: 1.4;
	margin: 0;
	text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.carousel__caption-link {
	flex-shrink: 0;
	color: #fff;
	border-color: rgba(255,255,255,.6);
}
.carousel__caption-link:hover {
	background: rgba(255,255,255,.15);
	border-color: #fff;
	color: #fff;
}

/* Prev / next buttons */
.carousel__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,.9);
	color: var(--color-heading);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md);
	transition: background var(--transition), transform var(--transition);
	backdrop-filter: blur(4px);
}
.carousel__btn:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.carousel__btn--prev { left: .875rem; }
.carousel__btn--next { right: .875rem; }

/* Dark section — invert buttons */
.carousel-section--dark .carousel__btn {
	background: rgba(255,255,255,.15);
	color: #fff;
}
.carousel-section--dark .carousel__btn:hover { background: rgba(255,255,255,.25); }

/* Dots */
.carousel__dots {
	display: flex;
	justify-content: center;
	gap: .5rem;
	margin-block-start: 1.25rem;
}

.carousel__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: #d1d5db;
	cursor: pointer;
	transition: background var(--transition), transform var(--transition), width var(--transition);
}
.carousel__dot.is-active {
	background: var(--color-primary);
	width: 24px;
	border-radius: 4px;
}
.carousel-section--dark .carousel__dot         { background: rgba(255,255,255,.3); }
.carousel-section--dark .carousel__dot.is-active { background: #fff; }

@media (max-width: 600px) {
	.carousel__btn { width: 36px; height: 36px; }
	.carousel__caption { padding: 1rem; }
}

/* ── Image Slider (multi-item) ── */

.islider-section--surface { background: var(--color-surface); }
.islider-section--dark    { background: #0f172a; }
.islider-section--dark .section-title,
.islider-section--dark .section-eyebrow { color: #fff; }

/* Full-width breakout — extend edge to edge outside the container */
.islider-section--full-width .islider {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.islider {
	position: relative;
}

/* Viewport — scrollable strip, hides overflow, no scrollbar */
.islider__viewport {
	overflow-x: scroll;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.islider__viewport::-webkit-scrollbar { display: none; }

/* Gap variants */
.islider__viewport--gap-none   { --slide-gap: 0px; }
.islider__viewport--gap-small  { --slide-gap: 8px; }
.islider__viewport--gap-medium { --slide-gap: 16px; }

.islider__track {
	display: flex;
	gap: var(--slide-gap, 8px);
	/* Extra horizontal padding so first/last slides aren't flush on full-width */
}
.islider-section--full-width .islider__track {
	padding-inline: clamp(1rem, 4vw, 3rem);
}

.islider__slide {
	flex: 0 0 calc(
		(100% - var(--slide-gap, 8px) * (var(--slides-visible) - 1)) / var(--slides-visible)
	);
	scroll-snap-align: start;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
}

/*
 * Slides-visible count — responsive, driven by aspect ratio.
 * Portrait ratios → more per row; landscape → fewer.
 * The aspect ratio is set as a CSS variable on the track: --slide-aspect
 */

/* Default: landscape-ish (16/9, 3/2, 4/3, 1/1) */
.islider__viewport { --slides-visible: 1.15; }

@media (min-width: 600px)  { .islider__viewport { --slides-visible: 2.15; } }
@media (min-width: 900px)  { .islider__viewport { --slides-visible: 3.15; } }
@media (min-width: 1200px) { .islider__viewport { --slides-visible: 4.15; } }

/* Full-width gets one extra slot */
.islider-section--full-width .islider__viewport                    { --slides-visible: 1.4; }
@media (min-width: 600px)  { .islider-section--full-width .islider__viewport { --slides-visible: 2.5; } }
@media (min-width: 900px)  { .islider-section--full-width .islider__viewport { --slides-visible: 3.5; } }
@media (min-width: 1200px) { .islider-section--full-width .islider__viewport { --slides-visible: 5.2; } }

/* Portrait ratios (9/16, 3/4, 2/3) — narrower, so show more */
.islider__viewport[style*="--slide-aspect:9/16"],
.islider__viewport[style*="--slide-aspect:3/4"],
.islider__viewport[style*="--slide-aspect:2/3"] {
	--slides-visible: 2.2;
}
@media (min-width: 600px) {
	.islider__viewport[style*="--slide-aspect:9/16"],
	.islider__viewport[style*="--slide-aspect:3/4"],
	.islider__viewport[style*="--slide-aspect:2/3"] { --slides-visible: 3.2; }
}
@media (min-width: 900px) {
	.islider__viewport[style*="--slide-aspect:9/16"],
	.islider__viewport[style*="--slide-aspect:3/4"],
	.islider__viewport[style*="--slide-aspect:2/3"] { --slides-visible: 5.2; }
}
@media (min-width: 1200px) {
	.islider__viewport[style*="--slide-aspect:9/16"],
	.islider__viewport[style*="--slide-aspect:3/4"],
	.islider__viewport[style*="--slide-aspect:2/3"] { --slides-visible: 7.2; }
}

.islider__link {
	display: block;
}

.islider__img {
	width: 100%;
	aspect-ratio: var(--slide-aspect, 3/2);
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.islider__caption {
	font-size: .8125rem;
	color: #6b7280;
	margin: .5rem 0 0;
	line-height: 1.4;
}
.islider-section--dark .islider__caption { color: rgba(255,255,255,.6); }

/* Prev / next buttons — centred vertically on the image area, not the caption */
.islider__btn {
	position: absolute;
	top: calc(var(--slide-btn-top, 40%));
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,.92);
	color: var(--color-heading);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md);
	transition: background var(--transition), opacity var(--transition), transform var(--transition);
	backdrop-filter: blur(4px);
}
.islider__btn:hover  { background: #fff; transform: translateY(-50%) scale(1.08); }
.islider__btn:disabled { opacity: .3; pointer-events: none; }
.islider__btn--prev { left: .75rem; }
.islider__btn--next { right: .75rem; }

.islider-section--full-width .islider__btn--prev { left: clamp(.75rem, 2vw, 1.5rem); }
.islider-section--full-width .islider__btn--next { right: clamp(.75rem, 2vw, 1.5rem); }

.islider-section--dark .islider__btn {
	background: rgba(255,255,255,.15);
	color: #fff;
}
.islider-section--dark .islider__btn:hover { background: rgba(255,255,255,.25); }

/* --------------------------------------------------------------------------
   19. WordPress Core Classes
   -------------------------------------------------------------------------- */

.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide  { margin-inline: calc(var(--container-padding) * -1); max-width: none; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; overflow: hidden; padding: 0; position: absolute;
	width: 1px; word-wrap: normal !important;
}

.skip-link:focus {
	background: var(--color-bg);
	clip: auto; clip-path: none;
	height: auto; left: .5rem; top: .5rem;
	padding: 1rem 1.5rem; width: auto;
	z-index: 999; font-weight: 600;
	box-shadow: var(--shadow-md);
	border-radius: var(--radius);
}

.wp-caption      { max-width: 100%; }
.wp-caption-text { font-size: .875rem; color: #6b7280; text-align: center; }

/* Block editor */
.entry-content > * + * { margin-block-start: 1.25em; }
.entry-content .wp-block-image { margin-block: 2em; }
.entry-content .wp-block-quote { margin-block: 1.5em; }

/* ── Single post: richer content typography ──────────────────────────────── */
.entry-content blockquote {
	border-left: 4px solid var(--color-primary);
	background: var(--color-surface);
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: italic;
	font-size: 1.0625rem;
}
.entry-content blockquote p { margin: 0; }
.entry-content blockquote p + p { margin-top: .75rem; }
.entry-content blockquote cite {
	display: block;
	margin-top: .75rem;
	font-style: normal;
	font-size: .875rem;
	color: #6b7280;
}
.entry-content blockquote cite::before { content: '\2014\a0'; }

.entry-content pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 1.5rem;
	border-radius: var(--radius);
	overflow-x: auto;
	margin-block: 1.5rem;
	font-size: .875rem;
	line-height: 1.7;
}
.entry-content code {
	background: var(--color-surface);
	color: var(--color-primary);
	padding: .125rem .375rem;
	border-radius: 3px;
	font-size: .875em;
}
.entry-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	color: inherit;
	font-size: inherit;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 1.5rem;
	font-size: .9375rem;
	box-shadow: 0 0 0 1px #e5e7eb;
	border-radius: var(--radius);
	overflow: hidden;
}
.entry-content th {
	background: var(--color-surface);
	font-weight: 600;
	text-align: left;
	padding: .75rem 1rem;
	border-bottom: 2px solid #e5e7eb;
}
.entry-content td { padding: .75rem 1rem; border-bottom: 1px solid #f3f4f6; }
.entry-content tr:last-child td { border-bottom: none; }

.entry-content figcaption {
	text-align: center;
	font-size: .875rem;
	color: #6b7280;
	margin-top: .5rem;
	font-style: italic;
}
.entry-content hr {
	border: none;
	border-top: 2px solid #e5e7eb;
	margin-block: 2.5rem;
}

/* Pull-quote block override */
.entry-content .wp-block-pullquote {
	border-top: 4px solid var(--color-primary);
	border-bottom: 4px solid var(--color-primary);
	padding: 1.5rem;
	margin-block: 2rem;
}
.entry-content .wp-block-pullquote blockquote {
	border-left: none;
	background: none;
	padding: 0;
	margin: 0;
	border-radius: 0;
}

/* --------------------------------------------------------------------------
   20. Utility
   -------------------------------------------------------------------------- */

.no-results {
	text-align: center;
	padding-block: 4rem;
	max-width: 480px;
	margin-inline: auto;
}
.no-results__title { margin-block-end: 1rem; }
.no-results__text  { color: #6b7280; margin-block-end: 1.5rem; }

/* --------------------------------------------------------------------------
   21. Gravity Form Section
   -------------------------------------------------------------------------- */

.container--form {
	max-width: 640px;
}

.section-header--left {
	text-align: left;
	margin-inline: 0;
}

.gf-section--surface { background-color: var(--color-surface); }
.gf-section--dark    { background-color: #0f172a; color: #f8fafc; }
.gf-section--dark .section-title   { color: #f1f5f9; }
.gf-section--dark .section-subtitle { color: #94a3b8; }

.gf-section__form { margin-block-start: 2rem; }

/* --------------------------------------------------------------------------
   22. Post Cards Section
   -------------------------------------------------------------------------- */

.post-cards-section--surface { background-color: var(--color-surface); }
.post-cards-section--dark    { background-color: #0f172a; color: #f8fafc; }

.cpt-cards-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
}
.cpt-cards-grid--2col { grid-template-columns: repeat(2, 1fr); }
.cpt-cards-grid--3col { grid-template-columns: repeat(3, 1fr); }
.cpt-cards-grid--4col { grid-template-columns: repeat(4, 1fr); }

.cpt-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
	transition: transform .2s ease, box-shadow .2s ease;
	color: inherit;
}
.post-cards-section--surface .cpt-card { background: #fff; }
.post-cards-section--dark    .cpt-card { background: #1e293b; color: #f1f5f9; }

/* Whole-card link */
a.cpt-card--linked {
	text-decoration: none;
	color: inherit;
}
a.cpt-card--linked:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	text-decoration: none;
}

/* Image-top style */
.cpt-card__image {
	aspect-ratio: 16/9;
	overflow: hidden;
	background: var(--color-surface, #f8fafc);
}
.cpt-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--transition-slow, .4s ease);
}
.cpt-card--linked:hover .cpt-card__img { transform: scale(1.04); }

/* Card body */
.cpt-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.5rem;
	gap: .75rem;
}

.cpt-card__title {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	color: var(--color-heading);
}
.post-cards-section--dark .cpt-card__title  { color: #f1f5f9; }

.cpt-card__excerpt {
	font-size: .9375rem;
	color: #6b7280;
	line-height: 1.65;
	margin: 0;
	flex: 1;
}
.post-cards-section--dark .cpt-card__excerpt { color: #94a3b8; }

.cpt-card__btn { align-self: flex-start; margin-block-start: auto; }

/* Background-image style */
.cpt-card--bg-image {
	position: relative;
	min-height: 320px;
	background-color: var(--color-primary, #4f46e5);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	justify-content: flex-end;
}
.cpt-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.05) 100%);
	z-index: 0;
}
.cpt-card--bg-image .cpt-card__body {
	position: relative;
	z-index: 1;
	color: #fff;
}
.cpt-card--bg-image .cpt-card__title   { color: #fff; }
.cpt-card--bg-image .cpt-card__excerpt { color: rgba(255,255,255,.82); }

/* Responsive */
@media (max-width: 1023px) {
	.cpt-cards-grid--4col { grid-template-columns: repeat(2, 1fr); }
	.cpt-cards-grid--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
	.cpt-cards-grid--2col,
	.cpt-cards-grid--3col,
	.cpt-cards-grid--4col { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   22. Responsive — Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
	.blog-layout { display: block; }
	.blog-sidebar { position: static; margin-block-start: 3rem; }
}

@media (max-width: 768px) {
	.services-grid { grid-template-columns: 1fr; }

	.blog-layout--list .post-card { flex-direction: column; }
	.blog-layout--list .post-card__thumb { width: 100%; aspect-ratio: 16/9; }

	.posts-grid { grid-template-columns: 1fr; }

	.footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
	.hero-actions { flex-direction: column; align-items: flex-start; }
	.hero-actions .btn { width: 100%; justify-content: center; }

	/* post-nav mobile handled in its own @media block above */

	.search-form { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   22. Scroll Reveal
   -------------------------------------------------------------------------- */

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(22px); }
	to   { opacity: 1; transform: none; }
}

.reveal {
	opacity: 0;
	transform: translateY(22px);
}

.reveal.is-visible {
	animation: fadeInUp 0.55s ease both;
	animation-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.reveal.is-visible {
		opacity: 1;
		transform: none;
		animation: none;
	}
}

/* --------------------------------------------------------------------------
   23. Print
   -------------------------------------------------------------------------- */

@media print {
	.site-header, .site-footer, .hero-section, .cta-section,
	.services-section, .latest-posts-section, .post-cards-section, .post-nav,
	.comments-wrap, .hamburger, .btn, .reading-progress, .share-buttons,
	.author-bio__links, .post-toc, .related-posts { display: none !important; }
	body { font-size: 12pt; color: #000; }
	a[href]::after { content: " (" attr(href) ")"; }
}
