/**
 * Apex Velocity — Main Stylesheet
 * Shell theme: CSS variables + minimal resets. Elementor controls all page content.
 */

/* ==========================================================================
   CSS Custom Properties (DESIGN.md tokens)
   ========================================================================== */

:root {
	/* Brand */
	--av-primary: #6d28d9;
	--av-primary-hover: #5b21b6;
	--av-primary-light: rgba(109, 40, 217, 0.10);
	--av-primary-glow: rgba(109, 40, 217, 0.25);

	/* Light mode surfaces */
	--av-surface: #fef7ff;
	--av-surface-dim: #dfd7e5;
	--av-surface-alt: #f3ebf9;
	--av-surface-elevated: #ffffff;

	/* Light mode text */
	--av-text: #1d1a24;
	--av-text-muted: #4a4455;
	--av-text-inverse: #ffffff;

	/* Light mode borders */
	--av-border: rgba(15, 23, 42, 0.08);
	--av-border-strong: rgba(15, 23, 42, 0.12);

	/* Dark mode surfaces */
	--av-dark-surface: #0f172a;
	--av-dark-surface-alt: #1e293b;
	--av-dark-surface-elevated: rgba(30, 41, 59, 0.7);
	--av-dark-text: #f1f5f9;
	--av-dark-text-muted: #94a3b8;

	/* Element tokens (light defaults) */
	--av-code-bg: #f3ebf9;
	--av-code-text: #6d28d9;
	--av-pre-bg: #1e293b;
	--av-pre-text: #e2e8f0;
	--av-selection-bg: rgba(109, 40, 217, 0.20);
	--av-input-bg: #ffffff;
	--av-input-border: rgba(15, 23, 42, 0.16);
	--av-table-stripe: rgba(15, 23, 42, 0.02);
	--av-table-header-bg: #f3ebf9;
	--av-blockquote-border: #6d28d9;
	--av-blockquote-bg: #f3ebf9;
	--av-focus-ring: rgba(109, 40, 217, 0.40);
	--av-dropdown-bg: #ffffff;
	--av-dropdown-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);

	/* Typography — Plus Jakarta Sans for everything */
	--av-font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--av-font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--av-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Spacing & Shape */
	--av-radius: 8px;
	--av-radius-lg: 16px;
	--av-radius-xl: 24px;
	--av-radius-full: 9999px;
	--av-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
	--av-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.08);
	--av-transition: 0.2s ease;
	--av-container: 1280px;
	--av-header-height: 72px;
	--av-section-padding: 120px;
	--av-grid-gutter: 24px;
}

/* Dark mode — toggle class on body */
body.av-theme-dark {
	--av-surface: #0f172a;
	--av-surface-alt: #1e293b;
	--av-surface-elevated: rgba(30, 41, 59, 0.7);
	--av-text: #f1f5f9;
	--av-text-muted: #94a3b8;
	--av-text-inverse: #0f172a;
	--av-border: rgba(241, 245, 249, 0.10);
	--av-border-strong: rgba(241, 245, 249, 0.15);
	--av-shadow: 0 1px 3px rgba(0, 0, 0, 0.20), 0 4px 16px rgba(0, 0, 0, 0.15);
	--av-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);

	/* Dark element tokens */
	--av-code-bg: #1e293b;
	--av-code-text: #a78bfa;
	--av-input-bg: #1e293b;
	--av-input-border: rgba(241, 245, 249, 0.12);
	--av-table-stripe: rgba(241, 245, 249, 0.02);
	--av-table-header-bg: #1e293b;
	--av-blockquote-bg: rgba(109, 40, 217, 0.06);
	--av-focus-ring: rgba(109, 40, 217, 0.50);
	--av-dropdown-bg: #1e293b;
	--av-dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.20);

	background-color: #0f172a;
}

/* OS-level dark mode (no explicit choice made) */
@media (prefers-color-scheme: dark) {
	body:not(.av-theme-light):not(.av-theme-dark) {
		--av-surface: #0f172a;
		--av-surface-alt: #1e293b;
		--av-surface-elevated: rgba(30, 41, 59, 0.7);
		--av-text: #f1f5f9;
		--av-text-muted: #94a3b8;
		--av-text-inverse: #0f172a;
		--av-border: rgba(241, 245, 249, 0.10);
		--av-border-strong: rgba(241, 245, 249, 0.15);

		--av-code-bg: #1e293b;
		--av-code-text: #a78bfa;
		--av-input-bg: #1e293b;
		--av-input-border: rgba(241, 245, 249, 0.12);
		--av-table-stripe: rgba(241, 245, 249, 0.02);
		--av-table-header-bg: #1e293b;
		--av-blockquote-bg: rgba(109, 40, 217, 0.06);
		--av-focus-ring: rgba(109, 40, 217, 0.50);
		--av-dropdown-bg: #1e293b;
		--av-dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.20);

		background-color: #0f172a;
	}
}

html.av-theme-dark-pending {
	background-color: #0f172a;
}

/* ==========================================================================
   Reset & Base (minimal — Elementor handles page content)
   ========================================================================== */

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--av-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--av-text);
	background-color: var(--av-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--av-font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--av-text);
}

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

a:hover {
	color: var(--av-primary-hover);
}

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

::selection {
	background: var(--av-selection-bg);
}

:focus-visible {
	outline: 2px solid var(--av-focus-ring);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	padding: 1rem;
	margin: 0;
	overflow: visible;
	clip: auto;
	background: var(--av-primary);
	color: #fff;
	z-index: 100000;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.av-topbar {
	background: var(--av-primary);
	color: #ffffff;
	font-size: 0.8125rem;
	line-height: 1;
	position: relative;
	z-index: 10000;
}

.av-topbar__inner {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding-block: 0.5rem;
}

.av-topbar__contact {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.av-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color var(--av-transition);
}

.av-topbar__link:hover {
	color: #ffffff;
}

.av-topbar__link svg {
	flex-shrink: 0;
	opacity: 0.75;
}

@media (max-width: 480px) {
	.av-topbar__inner {
		justify-content: center;
	}

	.av-topbar__contact {
		flex-wrap: wrap;
		gap: 0.75rem;
		justify-content: center;
	}

	.av-topbar__link span {
		font-size: 0.75rem;
	}
}

/* ==========================================================================
   Header & Navigation (theme shell only)
   ========================================================================== */

.av-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	height: var(--av-header-height);
	background: rgba(254, 247, 255, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--av-border);
	transition: box-shadow var(--av-transition);
}

.av-header.is-scrolled {
	box-shadow: var(--av-shadow);
}

body.av-theme-dark .av-header {
	background: rgba(15, 23, 42, 0.92);
}

.av-container {
	max-width: var(--av-container);
	margin-inline: auto;
	padding-inline: 1.5rem;
}

.av-header__inner {
	height: var(--av-header-height);
	display: flex;
	align-items: center;
	gap: 1rem;
}

.av-header__brand {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.av-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.av-header__actions {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* Menu alignment — only the nav links move; logo always left, actions always right */
.av-menu-align-left .av-nav {
	justify-content: flex-start;
}

.av-menu-align-center .av-nav {
	justify-content: center;
}

.av-menu-align-right .av-nav {
	justify-content: flex-end;
}

.av-logo {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--av-primary);
	letter-spacing: -0.02em;
}

.av-logo:hover {
	color: var(--av-primary-hover);
}

.custom-logo-link img.custom-logo {
	height: 36px;
	width: auto;
}

/* Desktop nav list */
.av-nav__list {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.av-nav__link,
.av-nav__list > li > a {
	color: var(--av-text);
	font-size: 0.9375rem;
	font-weight: 500;
	transition: color var(--av-transition);
	text-decoration: none;
}

.av-nav__link:hover,
.av-nav__list > li > a:hover,
.av-nav__list > li.current-menu-item > a,
.av-nav__list > li.current_page_item > a {
	color: var(--av-primary);
}

/* ==========================================================================
   Dropdown / Submenu (desktop)
   ========================================================================== */

.av-nav__list > li {
	position: relative;
}

.av-nav__list > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.375rem;
	vertical-align: middle;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.5;
	transition: transform var(--av-transition), opacity var(--av-transition);
}

.av-nav__list > li.menu-item-has-children:hover > a::after,
.av-nav__list > li.menu-item-has-children > a:focus::after {
	opacity: 1;
	transform: rotate(180deg);
}

.av-nav__list > li > .sub-menu,
.av-nav__list > li > .av-nav__sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	min-width: 240px;
	padding: 0.5rem 0;
	margin: 0;
	list-style: none;
	background: var(--av-dropdown-bg);
	border: 1px solid var(--av-border-strong);
	border-radius: var(--av-radius-lg);
	box-shadow: var(--av-dropdown-shadow);
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.av-nav__list > li:last-child > .sub-menu,
.av-nav__list > li:last-child > .av-nav__sub-menu {
	left: auto;
	right: 0;
	transform: translateX(0) translateY(8px);
}

.av-nav__list > li.menu-item-has-children:hover > .sub-menu,
.av-nav__list > li.menu-item-has-children:hover > .av-nav__sub-menu,
.av-nav__list > li.menu-item-has-children:focus-within > .sub-menu,
.av-nav__list > li.menu-item-has-children:focus-within > .av-nav__sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

.av-nav__list > li:last-child.menu-item-has-children:hover > .sub-menu,
.av-nav__list > li:last-child.menu-item-has-children:hover > .av-nav__sub-menu,
.av-nav__list > li:last-child.menu-item-has-children:focus-within > .sub-menu,
.av-nav__list > li:last-child.menu-item-has-children:focus-within > .av-nav__sub-menu {
	transform: translateX(0) translateY(0);
}

.sub-menu li,
.av-nav__sub-menu li {
	margin: 0;
	padding: 0;
}

.sub-menu li a,
.av-nav__sub-menu li a {
	display: block;
	padding: 0.5rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--av-text);
	text-decoration: none;
	white-space: nowrap;
	border-radius: 0;
	transition: background var(--av-transition), color var(--av-transition);
}

.sub-menu li a:hover,
.sub-menu li.current-menu-item > a,
.sub-menu li.current_page_item > a,
.av-nav__sub-menu li a:hover,
.av-nav__sub-menu li.current-menu-item > a,
.av-nav__sub-menu li.current_page_item > a {
	background: var(--av-primary-light);
	color: var(--av-primary);
}

.sub-menu .menu-divider,
.av-nav__sub-menu .menu-divider {
	height: 1px;
	background: var(--av-border-strong);
	margin: 0.375rem 0;
	padding: 0;
}

/* Nested submenus (3rd+ level) */
.sub-menu li.menu-item-has-children,
.av-nav__sub-menu li.menu-item-has-children {
	position: relative;
}

.sub-menu li.menu-item-has-children > a,
.av-nav__sub-menu li.menu-item-has-children > a {
	position: relative;
}

.sub-menu li.menu-item-has-children > a::after,
.av-nav__sub-menu li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 5px solid currentColor;
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0.5;
}

.sub-menu .sub-menu,
.av-nav__sub-menu .sub-menu,
.sub-menu .av-nav__sub-menu,
.av-nav__sub-menu .av-nav__sub-menu {
	position: absolute;
	top: -0.5rem;
	left: 100%;
	transform: translateX(8px);
	min-width: 220px;
	padding: 0.5rem 0;
	margin: 0;
	list-style: none;
	background: var(--av-dropdown-bg);
	border: 1px solid var(--av-border-strong);
	border-radius: var(--av-radius-lg);
	box-shadow: var(--av-dropdown-shadow);
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.sub-menu li.menu-item-has-children:hover > .sub-menu,
.sub-menu li.menu-item-has-children:hover > .av-nav__sub-menu,
.av-nav__sub-menu li.menu-item-has-children:hover > .sub-menu,
.av-nav__sub-menu li.menu-item-has-children:hover > .av-nav__sub-menu {
	transform: translateX(0);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */

.av-theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius);
	background: var(--av-surface-alt);
	color: var(--av-text);
	cursor: pointer;
	transition: background var(--av-transition), border-color var(--av-transition);
}

.av-theme-toggle:hover {
	border-color: var(--av-primary);
	color: var(--av-primary);
}

.av-theme-toggle__icon--dark {
	display: none;
}

body.av-theme-dark .av-theme-toggle__icon--light {
	display: none;
}

body.av-theme-dark .av-theme-toggle__icon--dark {
	display: block;
}

/* ==========================================================================
   Mobile Hamburger
   ========================================================================== */

.av-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius);
	background: transparent;
	color: var(--av-text);
	cursor: pointer;
	flex-shrink: 0;
}

.av-mobile-toggle__close {
	display: none;
}

.av-header.is-menu-open .av-mobile-toggle__open {
	display: none;
}

.av-header.is-menu-open .av-mobile-toggle__close {
	display: block;
}

/* ==========================================================================
   Buttons (theme utility)
   ========================================================================== */

.av-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	font-family: var(--av-font);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	border-radius: var(--av-radius);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--av-transition), color var(--av-transition), border-color var(--av-transition), transform var(--av-transition), box-shadow var(--av-transition);
	text-decoration: none;
}

.av-btn--primary {
	background: var(--av-primary);
	color: #ffffff;
	border-color: var(--av-primary);
}

.av-btn--primary:hover {
	background: var(--av-primary-hover);
	border-color: var(--av-primary-hover);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px var(--av-primary-glow);
}

.av-btn--ghost,
.av-btn--outline {
	background: transparent;
	color: var(--av-text);
	border-color: var(--av-border-strong);
}

.av-btn--ghost:hover,
.av-btn--outline:hover {
	border-color: var(--av-primary);
	color: var(--av-primary);
}

.av-btn--sm {
	padding: 0.5rem 1.125rem;
	font-size: 0.875rem;
}

.av-btn--lg {
	padding: 0.875rem 2rem;
	font-size: 1rem;
}

/* ==========================================================================
   Scroll to Top
   ========================================================================== */

.av-scroll-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--av-primary);
	color: #ffffff;
	box-shadow: 0 4px 16px var(--av-primary-glow);
	cursor: pointer;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity var(--av-transition), transform var(--av-transition), background var(--av-transition);
}

.av-scroll-top.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.av-scroll-top:hover {
	background: var(--av-primary-hover);
}

.av-scroll-top[hidden] {
	display: flex;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.av-footer {
	background: var(--av-surface-alt);
	color: var(--av-text);
	padding: 4rem 0 0;
	border-top: 1px solid var(--av-border);
}

body.av-theme-dark .av-footer {
	background: var(--av-dark-surface);
	color: var(--av-dark-text);
	border-top: 1px solid var(--av-border);
}

.av-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid var(--av-border);
}

.av-footer__col--brand {
	padding-right: 2rem;
}

.av-logo--footer {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--av-text);
	letter-spacing: -0.02em;
	text-decoration: none;
	display: inline-block;
	margin-bottom: 1rem;
}

.av-logo--footer img {
	display: block;
	max-height: 100%;
	width: auto;
}

body.av-theme-dark .av-logo--footer {
	color: #ffffff;
}

.av-logo--footer:hover {
	color: var(--av-primary);
}

.av-footer__about {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--av-text-muted);
	margin: 0;
}

.av-footer__title {
	font-family: var(--av-font-heading);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--av-text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 1.25rem;
}

body.av-theme-dark .av-footer__title {
	color: #ffffff;
}

.av-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.av-footer__links li {
	margin-bottom: 0.75rem;
}

.av-footer__links a {
	font-size: 0.9375rem;
	color: var(--av-text-muted);
	text-decoration: none;
	transition: color var(--av-transition);
}

.av-footer__links a:hover {
	color: var(--av-text);
}

body.av-theme-dark .av-footer__links a {
	color: var(--av-dark-text-muted);
}

body.av-theme-dark .av-footer__links a:hover {
	color: #ffffff;
}

.av-footer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 0;
}

.av-footer__copy {
	font-size: 0.875rem;
	color: var(--av-text-muted);
	margin: 0;
}

body.av-theme-dark .av-footer__copy {
	color: var(--av-dark-text-muted);
}

.av-footer__social {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.av-footer__social a {
	color: var(--av-text-muted);
	transition: color var(--av-transition), background var(--av-transition);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--av-radius);
	background: var(--av-border-strong);
}

body.av-theme-dark .av-footer__social a {
	color: var(--av-dark-text-muted);
	background: rgba(255, 255, 255, 0.06);
}

.av-footer__social a:hover {
	color: #ffffff;
	background: var(--av-primary);
}

/* ==========================================================================
   WordPress Core Block Compatibility
   ========================================================================== */

.alignwide {
	max-width: var(--av-container);
	margin-inline: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	font-family: var(--av-font);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	border-radius: var(--av-radius);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--av-transition), color var(--av-transition), border-color var(--av-transition), transform var(--av-transition), box-shadow var(--av-transition);
	text-decoration: none;
	background: var(--av-primary);
	color: #ffffff;
	border-color: var(--av-primary);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus {
	background: var(--av-primary-hover);
	border-color: var(--av-primary-hover);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px var(--av-primary-glow);
}

.wp-block-button__link:active {
	transform: translateY(0);
}

/* Button fill — primary (default) */
.wp-block-button:not(.is-style-outline):not(.is-style-link) .wp-block-button__link {
	background: var(--av-primary);
	color: #ffffff;
	border-color: var(--av-primary);
}

.wp-block-button:not(.is-style-outline):not(.is-style-link) .wp-block-button__link:hover {
	background: var(--av-primary-hover);
	border-color: var(--av-primary-hover);
}

/* Button outline */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--av-primary);
	border-color: var(--av-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--av-primary);
	color: #ffffff;
}

/* Button link */
.wp-block-button.is-style-link .wp-block-button__link {
	background: transparent;
	color: var(--av-primary);
	border-color: transparent;
	padding-left: 0;
	padding-right: 0;
	border-radius: 0;
}

.wp-block-button.is-style-link .wp-block-button__link:hover {
	background: transparent;
	color: var(--av-primary-hover);
	box-shadow: none;
	text-decoration: underline;
}

/* Button sizes */
.wp-block-button.has-small-font-size .wp-block-button__link {
	padding: 0.5rem 1.125rem;
	font-size: 0.875rem;
}

.wp-block-button.has-large-font-size .wp-block-button__link {
	padding: 0.875rem 2rem;
	font-size: 1rem;
}

.custom-logo-link {
	display: flex;
	align-items: center;
}

.custom-logo {
	width: auto;
	height: auto;
}

/* ==========================================================================
   Elementor Editor Compatibility
   ========================================================================== */

body.elementor-editor-active .av-header,
body.elementor-editor-active .av-nav {
	display: none;
}

/* ==========================================================================
   Responsive — Mobile (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
	.av-header__inner {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-inline: 1rem;
	}

	.av-nav {
		flex: none;
		justify-content: center;
	}

	.av-menu-align-left .av-nav,
	.av-menu-align-center .av-nav,
	.av-menu-align-right .av-nav {
		justify-content: center;
	}

	.av-menu-align-right .av-header__brand,
	.av-menu-align-right .av-nav,
	.av-menu-align-right .av-header__actions {
		order: unset;
	}

	.av-mobile-toggle {
		display: flex;
	}

	.av-header__cta {
		display: none;
	}

	.av-theme-toggle {
		display: flex;
		width: 40px;
		height: 40px;
	}

	/* Off-canvas nav */
	.av-nav {
		position: fixed;
		top: var(--av-header-height);
		left: 0;
		right: 0;
		bottom: 0;
		height: calc(100dvh - var(--av-header-height));
		z-index: 9998;
		background: var(--av-surface);
		padding: 1rem 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		display: block;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-12px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
		pointer-events: none;
	}

	.av-header.is-menu-open .av-nav {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
		pointer-events: auto;
	}

	.av-nav__list {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0 1rem 4rem;
	}

	.av-nav__list > li {
		width: 100%;
		border-bottom: none;
	}

	.av-nav__list > li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 1rem 1.25rem;
		font-size: 1.125rem;
		font-weight: 600;
		color: var(--av-text);
		border-radius: var(--av-radius);
		transition: background var(--av-transition), color var(--av-transition);
	}

	.av-nav__list > li > a:hover,
	.av-nav__list > li > a:focus {
		background: var(--av-primary-light);
		color: var(--av-primary);
	}

	.av-nav__list > li.menu-item-has-children > a {
		padding-right: 2.5rem;
		position: relative;
	}

	.av-nav__list > li.menu-item-has-children > a::after {
		content: "";
		position: absolute;
		right: 1.25rem;
		top: 50%;
		transform: translateY(-50%);
		width: 0;
		height: 0;
		border-left: 5px solid transparent;
		border-right: 5px solid transparent;
		border-top: 6px solid currentColor;
		opacity: 0.4;
		transition: transform 0.25s ease, opacity 0.25s ease;
	}

	.av-nav__list > li.is-open > a::after {
		transform: translateY(-50%) rotate(180deg);
		opacity: 1;
	}

	/* Submenu — hidden by default */
	.sub-menu,
	.av-nav__sub-menu {
		position: static;
		transform: none;
		min-width: 0;
		width: 100%;
		padding: 0;
		margin: 0.25rem 0 0.5rem;
		list-style: none;
		background: var(--av-surface-alt);
		border: 1px solid var(--av-border);
		border-radius: var(--av-radius);
		box-shadow: none;
		opacity: 0;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s ease, opacity 0.25s ease;
		pointer-events: none;
	}

	.av-nav__list > li.is-open > .sub-menu,
	.av-nav__list > li.is-open > .av-nav__sub-menu {
		opacity: 1;
		max-height: 2000px;
		pointer-events: auto;
		transition: max-height 0.5s ease, opacity 0.3s ease;
		padding: 0.375rem 0;
	}

	.sub-menu li,
	.av-nav__sub-menu li {
		margin: 0;
		padding: 0 0.375rem;
	}

	.sub-menu li a,
	.av-nav__sub-menu li a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 0.75rem 1rem;
		font-size: 1rem;
		font-weight: 500;
		color: var(--av-text-muted);
		border-bottom: none;
		border-radius: calc(var(--av-radius) * 0.75);
		margin: 0;
		transition: background var(--av-transition), color var(--av-transition);
	}

	.sub-menu li a:hover,
	.sub-menu li a:focus,
	.av-nav__sub-menu li a:hover,
	.av-nav__sub-menu li a:focus {
		background: var(--av-primary-light);
		color: var(--av-primary);
	}

	/* Nested submenus — deeper indentation */
	.sub-menu .sub-menu,
	.sub-menu .av-nav__sub-menu,
	.av-nav__sub-menu .sub-menu,
	.av-nav__sub-menu .av-nav__sub-menu {
		position: static;
		transform: none;
		margin: 0.25rem 0 0.25rem 1.25rem;
		padding: 0;
		background: var(--av-surface);
		border: 1px solid var(--av-border);
		border-radius: var(--av-radius);
	}

	.sub-menu .sub-menu li,
	.sub-menu .av-nav__sub-menu li,
	.av-nav__sub-menu .sub-menu li,
	.av-nav__sub-menu .av-nav__sub-menu li {
		padding: 0 0.25rem;
	}

	.sub-menu .sub-menu li a,
	.sub-menu .av-nav__sub-menu li a,
	.av-nav__sub-menu .sub-menu li a,
	.av-nav__sub-menu .av-nav__sub-menu li a {
		padding: 0.625rem 0.875rem;
		font-size: 0.9375rem;
	}

	/* 3rd+ level deeper indentation */
	.sub-menu .sub-menu .sub-menu,
	.sub-menu .sub-menu .av-nav__sub-menu,
	.sub-menu .av-nav__sub-menu .sub-menu,
	.sub-menu .av-nav__sub-menu .av-nav__sub-menu,
	.av-nav__sub-menu .sub-menu .sub-menu,
	.av-nav__sub-menu .sub-menu .av-nav__sub-menu,
	.av-nav__sub-menu .av-nav__sub-menu .sub-menu,
	.av-nav__sub-menu .av-nav__sub-menu .av-nav__sub-menu {
		margin-left: 1rem;
	}

	.sub-menu li.menu-item-has-children > a,
	.av-nav__sub-menu li.menu-item-has-children > a {
		padding-right: 2.25rem;
		position: relative;
	}

	.sub-menu li.menu-item-has-children > a::after,
	.av-nav__sub-menu li.menu-item-has-children > a::after {
		content: "";
		position: absolute;
		right: 0.875rem;
		top: 50%;
		transform: translateY(-50%);
		width: 0;
		height: 0;
		border-top: 5px solid transparent;
		border-bottom: 5px solid transparent;
		border-left: 5px solid currentColor;
		opacity: 0.4;
		transition: transform 0.25s ease;
	}

	.sub-menu li.is-open > a::after,
	.av-nav__sub-menu li.is-open > a::after {
		transform: translateY(-50%) rotate(90deg);
		opacity: 0.8;
	}
}

@media (max-width: 480px) {
	.av-header__inner {
		padding-inline: 0.75rem;
	}
}

/* ==========================================================================
   Dark Mode — Elementor widget overrides

   Two-tier system controlled by the "Force Dark Mode on Elementor Sections"
   Customizer toggle (apex_velocity_dark_mode_override):

   TIER 1 — ALWAYS ACTIVE (body.av-theme-dark)
   Global colour variables are redefined in the Customizer inline CSS so any
   element using a global colour (the default) adapts automatically. The
   universal catch-all rules below also apply — they cover elements that
   inherit their colour (no explicit colour set) by targeting ALL descendants
   generically, so new/current widget types are covered without !important.

   TIER 2 — TOGGLE ON ONLY (body.av-theme-dark.av-dark-override)
   Forceful !important overrides that swap section backgrounds to dark and
   force headings/text to light colours. When OFF, only Tier 1 rules apply
   and sections keep their original styling.
   ========================================================================== */

/* ========================================================================
   TIER 1 — ALWAYS ACTIVE
   ========================================================================== */

/* ---- Base text ---- */
body.av-theme-dark .elementor-page {
	color: var(--av-text);
}

/* ==========================================================================
   UNIVERSAL catch-all — covers ANY current or future Elementor element
   No !important, so a user's explicit colour choice still wins.
   ========================================================================== */
body.av-theme-dark .elementor h1,
body.av-theme-dark .elementor h2,
body.av-theme-dark .elementor h3,
body.av-theme-dark .elementor h4,
body.av-theme-dark .elementor h5,
body.av-theme-dark .elementor h6,
body.av-theme-dark .elementor p,
body.av-theme-dark .elementor span:not(.elementor-button-text),
body.av-theme-dark .elementor li,
body.av-theme-dark .elementor dt,
body.av-theme-dark .elementor dd,
body.av-theme-dark .elementor td,
body.av-theme-dark .elementor th,
body.av-theme-dark .elementor blockquote,
body.av-theme-dark .elementor figcaption,
body.av-theme-dark .elementor label,
body.av-theme-dark .elementor cite,
body.av-theme-dark .elementor strong,
body.av-theme-dark .elementor em,
body.av-theme-dark .elementor small {
	color: var(--av-text);
}

/* Links inside content adopt the primary colour unless they're buttons */
body.av-theme-dark .elementor a:not(.elementor-button):not([class*="elementor-button"]):not([role="button"]) {
	color: var(--av-primary);
}

/* ========================================================================
   TIER 2 — PURE CSS FORCE OVERRIDES (toggle ON only)
   Applied only when the user enables "Force Dark Mode on Elementor Sections".
   Forces dark backgrounds, white text, primary borders and buttons across ALL
   Elementor elements without touching images or using filters. Works on every
   current and future widget by targeting Elementor's DOM structure.
   ========================================================================== */

/* ---- 1. BACKGROUNDS → dark or transparent ---- */

/* Sections get dark surface background */
body.av-theme-dark.av-dark-override .elementor-section {
	background-color: var(--av-dark-surface) !important;
}

/* THE KEY RULE: Catch ALL Elementor elements by their unique class pattern.
   Elementor generates per-element classes like .elementor-element-abc123 and
   sets backgrounds via .elementor-element-abc123 { background-color: #fff }.
   Targeting [class*="elementor-element-"] catches columns, widgets, and any
   other element with a unique ID — so nothing is left with a light bg. */
body.av-theme-dark.av-dark-override [class*="elementor-element-"]:not(.elementor-section) {
	background-color: transparent !important;
}

/* Also catch wrapper elements that may not have unique IDs */
body.av-theme-dark.av-dark-override .elementor-column-wrap,
body.av-theme-dark.av-dark-override .elementor-widget-wrap,
body.av-theme-dark.av-dark-override .elementor-widget-container,
body.av-theme-dark.av-dark-override .elementor-widget {
	background-color: transparent !important;
}

/* Background overlays and slides */
body.av-theme-dark.av-dark-override .elementor-section-background {
	background-color: transparent !important;
}

body.av-theme-dark.av-dark-override .elementor-section-bg-section {
	background-color: var(--av-dark-surface) !important;
}

/* ---- 2. ALL TEXT → white ---- */
body.av-theme-dark.av-dark-override .elementor-section h1,
body.av-theme-dark.av-dark-override .elementor-section h2,
body.av-theme-dark.av-dark-override .elementor-section h3,
body.av-theme-dark.av-dark-override .elementor-section h4,
body.av-theme-dark.av-dark-override .elementor-section h5,
body.av-theme-dark.av-dark-override .elementor-section h6,
body.av-theme-dark.av-dark-override .elementor-section p,
body.av-theme-dark.av-dark-override .elementor-section span,
body.av-theme-dark.av-dark-override .elementor-section li,
body.av-theme-dark.av-dark-override .elementor-section td,
body.av-theme-dark.av-dark-override .elementor-section th,
body.av-theme-dark.av-dark-override .elementor-section label,
body.av-theme-dark.av-dark-override .elementor-section cite,
body.av-theme-dark.av-dark-override .elementor-section strong,
body.av-theme-dark.av-dark-override .elementor-section em,
body.av-theme-dark.av-dark-override .elementor-section small,
body.av-theme-dark.av-dark-override .elementor-section blockquote,
body.av-theme-dark.av-dark-override .elementor-section figcaption,
body.av-theme-dark.av-dark-override .elementor-section dt,
body.av-theme-dark.av-dark-override .elementor-section dd,
body.av-theme-dark.av-dark-override .elementor-heading-title,
body.av-theme-dark.av-dark-override .elementor-icon-box-title,
body.av-theme-dark.av-dark-override .elementor-icon-box-description,
body.av-theme-dark.av-dark-override .elementor-image-box-title,
body.av-theme-dark.av-dark-override .elementor-image-box-description,
body.av-theme-dark.av-dark-override .elementor-tab-title,
body.av-theme-dark.av-dark-override .elementor-tab-content,
body.av-theme-dark.av-dark-override .elementor-toggle-title,
body.av-theme-dark.av-dark-override .elementor-toggle-content,
body.av-theme-dark.av-dark-override .elementor-testimonial-content,
body.av-theme-dark.av-dark-override .elementor-testimonial-name,
body.av-theme-dark.av-dark-override .elementor-testimonial-job,
body.av-theme-dark.av-dark-override .elementor-counter-number,
body.av-theme-dark.av-dark-override .elementor-counter-title,
body.av-theme-dark.av-dark-override .elementor-progress-title,
body.av-theme-dark.av-dark-override .elementor-alert-title,
body.av-theme-dark.av-dark-override .elementor-alert-description,
body.av-theme-dark.av-dark-override .elementor-price-table__title,
body.av-theme-dark.av-dark-override .elementor-price-table__heading,
body.av-theme-dark.av-dark-override .elementor-price-table__price,
body.av-theme-dark.av-dark-override .elementor-price-table__period,
body.av-theme-dark.av-dark-override .elementor-price-table__description,
body.av-theme-dark.av-dark-override .elementor-icon-list-text,
body.av-theme-dark.av-dark-override .elementor-star-rating__title,
body.av-theme-dark.av-dark-override .elementor-divider__text,
body.av-theme-dark.av-dark-override .elementor-cta__title,
body.av-theme-dark.av-dark-override .elementor-cta__description,
body.av-theme-dark.av-dark-override .elementor-field-label,
body.av-theme-dark.av-dark-override .elementor-field-textual,
body.av-theme-dark.av-dark-override .elementor-field-textual::placeholder,
body.av-theme-dark.av-dark-override .widget-title,
body.av-theme-dark.av-dark-override .widgettitle,
body.av-theme-dark.av-dark-override .widget a,
body.av-theme-dark.av-dark-override .widget ul li,
body.av-theme-dark.av-dark-override .elementor-shortcode {
	color: #ffffff !important;
}

/* ---- 3. ALL BORDERS → primary colour ---- */
body.av-theme-dark.av-dark-override .elementor-section,
body.av-theme-dark.av-dark-override .elementor-column-wrap,
body.av-theme-dark.av-dark-override .elementor-widget-wrap,
body.av-theme-dark.av-dark-override .elementor-widget-container,
body.av-theme-dark.av-dark-override .elementor-widget,
body.av-theme-dark.av-dark-override .elementor-divider-separator,
body.av-theme-dark.av-dark-override .elementor-toggle,
body.av-theme-dark.av-dark-override .elementor-toggle-item,
body.av-theme-dark.av-dark-override .elementor-tab-content,
body.av-theme-dark.av-dark-override .elementor-field-textual,
body.av-theme-dark.av-dark-override .elementor-progress-wrapper {
	border-color: var(--av-primary) !important;
}

/* ---- 4. BUTTONS → primary purple with white text ---- */
body.av-theme-dark.av-dark-override .elementor-button,
body.av-theme-dark.av-dark-override .elementor-button-wrapper a,
body.av-theme-dark.av-dark-override .elementor-button-wrapper .elementor-button {
	background-color: var(--av-primary) !important;
	color: #ffffff !important;
	border-color: var(--av-primary) !important;
}

body.av-theme-dark.av-dark-override .elementor-button:hover,
body.av-theme-dark.av-dark-override .elementor-button-wrapper a:hover {
	background-color: var(--av-primary-hover) !important;
}

/* ---- 5. ICONS → primary colour ---- */
body.av-theme-dark.av-dark-override .elementor-icon-box-icon i,
body.av-theme-dark.av-dark-override .elementor-icon-box-icon svg,
body.av-theme-dark.av-dark-override .elementor-icon-box-icon .elementor-icon,
body.av-theme-dark.av-dark-override .elementor-icon i,
body.av-theme-dark.av-dark-override .elementor-icon svg,
body.av-theme-dark.av-dark-override .elementor-icon-list-icon i,
body.av-theme-dark.av-dark-override .elementor-icon-list-icon svg,
body.av-theme-dark.av-dark-override .elementor-social-icons-link i,
body.av-theme-dark.av-dark-override .elementor-social-icons-link svg,
body.av-theme-dark.av-dark-override .elementor-counter-icon i,
body.av-theme-dark.av-dark-override .elementor-counter-icon svg {
	color: var(--av-primary) !important;
	fill: var(--av-primary) !important;
}

/* ---- 6. FORM FIELDS → dark bg, white text, primary border ---- */
body.av-theme-dark.av-dark-override input[type="text"],
body.av-theme-dark.av-dark-override input[type="email"],
body.av-theme-dark.av-dark-override input[type="tel"],
body.av-theme-dark.av-dark-override input[type="url"],
body.av-theme-dark.av-dark-override input[type="number"],
body.av-theme-dark.av-dark-override input[type="search"],
body.av-theme-dark.av-dark-override textarea,
body.av-theme-dark.av-dark-override select,
body.av-theme-dark.av-dark-override .widget_search input {
	background-color: var(--av-dark-surface) !important;
	color: #ffffff !important;
	border-color: var(--av-primary) !important;
}

body.av-theme-dark.av-dark-override input:focus,
body.av-theme-dark.av-dark-override textarea:focus,
body.av-theme-dark.av-dark-override select:focus {
	border-color: var(--av-primary) !important;
}

/* ---- 7. PROGRESS BAR → dark track, primary fill ---- */
body.av-theme-dark.av-dark-override .elementor-progress-wrapper {
	background-color: rgba(255, 255, 255, 0.1) !important;
}

body.av-theme-dark.av-dark-override .elementor-progress-bar {
	background-color: var(--av-primary) !important;
}

/* ---- 8. SOCIAL ICONS → primary background ---- */
body.av-theme-dark.av-dark-override .elementor-social-icons-link {
	background-color: var(--av-primary) !important;
	color: #ffffff !important;
}

body.av-theme-dark.av-dark-override .elementor-social-icons-link:hover {
	background-color: var(--av-primary-hover) !important;
}

/* ---- 9. TABS / ACCORDION → active state with primary ---- */
body.av-theme-dark.av-dark-override .elementor-tab-title.elementor-active,
body.av-theme-dark.av-dark-override .elementor-tab-title.elementor-active a {
	color: var(--av-primary) !important;
	border-color: var(--av-primary) !important;
}

body.av-theme-dark.av-dark-override .elementor-toggle-title.elementor-active,
body.av-theme-dark.av-dark-override .elementor-toggle-title.elementor-active a {
	color: var(--av-primary) !important;
}

/* ---- 10. PRICE TABLE → featured column uses primary ---- */
body.av-theme-dark.av-dark-override .elementor-price-table .elementor-price-table__featured .elementor-price-table__button {
	background-color: var(--av-primary) !important;
	color: #ffffff !important;
	border-color: var(--av-primary) !important;
}

/* ---- 11. CTA SECTION → dark bg ---- */
body.av-theme-dark.av-dark-override .elementor-cta {
	background-color: var(--av-dark-surface) !important;
	border-color: var(--av-primary) !important;
}

/* ---- 12. GALLERY ITEMS → transparent ---- */
body.av-theme-dark.av-dark-override .elementor-image-gallery .gallery-item {
	background-color: transparent !important;
	border-color: var(--av-primary) !important;
}

/* ---- 13. ALERT / CALLOUT → dark bg, primary border ---- */
body.av-theme-dark.av-dark-override .elementor-alert {
	background-color: var(--av-dark-surface) !important;
	border-color: var(--av-primary) !important;
}

/* ---- 14. CATCH-ALL: any remaining Elementor element with a background ----
   Uses [class*="elementor-element-"] to match ALL elements Elementor generates,
   plus the direct child selectors for widget containers. This ensures no
   element is left with a light background regardless of its DOM depth. */
body.av-theme-dark.av-dark-override .elementor-section .elementor-section [class*="elementor-element-"] {
	background-color: transparent !important;
}

body.av-theme-dark.av-dark-override .elementor-element > .elementor-widget-container {
	background-color: transparent !important;
}

body.av-theme-dark.av-dark-override .elementor-element > .elementor-widget {
	background-color: transparent !important;
}

/* ---- Global: boxed section container width (always applies) ---- */
body.av-theme-dark .elementor-section-wrap > .elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--av-container);
}

body.av-theme-dark .elementor-section .elementor-container {
	max-width: var(--av-container);
}

/* Footer responsive */
@media (max-width: 768px) {
	.av-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}

	.av-footer__col--brand {
		grid-column: 1 / -1;
		padding-right: 0;
	}

	.av-footer__bar {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.av-footer__social {
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.av-footer__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* ==========================================================================
   Blog — Page shell & layout
   ========================================================================== */

.av-page {
	padding-block: clamp(2.5rem, 6vw, 5rem);
	color: var(--av-text);
}

.av-page-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: start;
}

body.av-has-sidebar .av-page-layout {
	grid-template-columns: minmax(0, 1fr) 320px;
}

.av-page-layout__content {
	min-width: 0;
}

/* ==========================================================================
   Blog — Archive header
   ========================================================================== */

.av-archive-header {
	margin-bottom: clamp(2rem, 4vw, 3rem);
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--av-border);
}

.av-archive-header__eyebrow {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--av-primary);
	margin-bottom: 0.75rem;
}

.av-archive-header__title {
	font-family: var(--av-font-heading);
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--av-text);
	margin: 0;
}

.av-archive-header__description {
	margin-top: 1rem;
	max-width: 60ch;
	color: var(--av-text-muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

/* ==========================================================================
   Blog — Post grid & cards
   ========================================================================== */

.av-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: clamp(1.5rem, 3vw, 2.25rem);
}

body.av-has-sidebar .av-post-grid {
	grid-template-columns: 1fr;
}

/* Animated conic-gradient "running ray" border for blog cards */
@property --av-ray-angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

.av-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	overflow: hidden;
	box-shadow: var(--av-shadow);
	transition: transform var(--av-transition), box-shadow var(--av-transition), border-color var(--av-transition);
}

/* The rotating conic gradient sits behind the card content, clipped to the
   border area with a mask so only the running ray on the edge is visible. */
.av-card::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	padding: 2px;
	background: conic-gradient(
		from var(--av-ray-angle),
		transparent 0deg,
		transparent 50deg,
		var(--av-primary-hover) 75deg,
		var(--av-primary) 95deg,
		#ffffff 105deg,
		var(--av-primary) 115deg,
		var(--av-primary-hover) 135deg,
		transparent 160deg,
		transparent 220deg,
		#9333ea 245deg,
		#7c3aed 265deg,
		#ffffff 275deg,
		#7c3aed 285deg,
		#9333ea 305deg,
		transparent 330deg,
		transparent 360deg
	);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--av-transition);
	pointer-events: none;
}

.av-card:hover::before {
	opacity: 1;
	animation: av-ray-run 2s linear infinite;
}

@keyframes av-ray-run {
	to {
		--av-ray-angle: 360deg;
	}
}

.av-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--av-shadow-lg), 0 0 24px -6px var(--av-primary-light);
	border-color: var(--av-border-strong);
}

.av-card__body,
.av-card .av-entry__thumbnail {
	position: relative;
	z-index: 2;
}

.av-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Horizontal card when sidebar present and wide enough */
@media (min-width: 960px) {
	body.av-has-sidebar .av-card {
		flex-direction: row;
	}

	body.av-has-sidebar .av-card .av-entry__thumbnail {
		flex: 0 0 42%;
		aspect-ratio: 4 / 3;
		border-radius: var(--av-radius-lg) 0 0 var(--av-radius-lg);
	}

	body.av-has-sidebar .av-card__body {
		flex: 1;
	}
}

.av-entry__thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--av-surface-alt);
	border-radius: var(--av-radius-lg) var(--av-radius-lg) 0 0;
}

/* Animated border on the thumbnail image */
.av-entry__thumbnail::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 3;
	border-radius: inherit;
	padding: 2px;
	background: conic-gradient(
		from var(--av-ray-angle),
		transparent 0deg,
		transparent 50deg,
		#9333ea 75deg,
		#7c3aed 95deg,
		#ffffff 105deg,
		#7c3aed 115deg,
		#9333ea 135deg,
		transparent 160deg,
		transparent 220deg,
		var(--av-primary-hover) 245deg,
		var(--av-primary) 265deg,
		#ffffff 275deg,
		var(--av-primary) 285deg,
		var(--av-primary-hover) 305deg,
		transparent 330deg,
		transparent 360deg
	);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--av-transition);
	pointer-events: none;
}

.av-card:hover .av-entry__thumbnail::before {
	opacity: 1;
	animation: av-ray-run 2s linear infinite;
	animation-delay: 0.15s;
}

.av-entry__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.av-card:hover .av-entry__thumbnail img {
	transform: scale(1.04);
}

.av-entry__title {
	font-family: var(--av-font-heading);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.av-entry__title a {
	color: var(--av-text);
	text-decoration: none;
	background-image: linear-gradient(var(--av-primary), var(--av-primary));
	background-size: 0% 2px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size var(--av-transition), color var(--av-transition);
}

.av-entry__title a:hover {
	color: var(--av-primary);
	background-size: 100% 2px;
}

.av-entry__excerpt {
	color: var(--av-text-muted);
	line-height: 1.7;
}

.av-entry__excerpt p {
	margin: 0;
}

.av-entry__readmore {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.25rem;
	font-weight: 600;
	color: var(--av-primary);
	text-decoration: none;
	transition: gap var(--av-transition);
}

.av-entry__readmore:hover {
	gap: 0.65rem;
}

.av-entry__readmore svg {
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   Blog — Meta & badges
   ========================================================================== */

.av-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1rem;
	font-size: 0.875rem;
	color: var(--av-text-muted);
}

.av-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.av-meta__item a {
	color: inherit;
	text-decoration: none;
	transition: color var(--av-transition);
}

.av-meta__item a:hover {
	color: var(--av-primary);
}

.av-meta__avatar img {
	width: 28px;
	height: 28px;
	border-radius: var(--av-radius-full);
	display: block;
}

.av-meta__author-link {
	font-weight: 600;
	color: var(--av-text);
}

.av-meta__item + .av-meta__item::before {
	content: "";
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
	margin-right: 1rem;
}

.av-entry__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.av-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: var(--av-radius-full);
	text-decoration: none;
	transition: background var(--av-transition), color var(--av-transition);
}

.av-badge--category {
	background: var(--av-primary-light);
	color: var(--av-primary);
}

.av-badge--category:hover {
	background: var(--av-primary);
	color: #ffffff;
}

.av-badge--tag {
	background: var(--av-surface-alt);
	color: var(--av-text-muted);
}

.av-badge--tag:hover {
	background: var(--av-primary);
	color: #ffffff;
}

/* ==========================================================================
   Blog — Single article
   ========================================================================== */

.av-article {
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	padding: clamp(1.5rem, 4vw, 3.5rem);
	box-shadow: var(--av-shadow);
}

.av-single .av-article {
	max-width: 820px;
	margin-inline: auto;
}

body.av-has-sidebar .av-single .av-article {
	margin-inline: 0;
	max-width: none;
}

.av-article__header {
	margin-bottom: 2rem;
}

.av-article__header .av-entry__categories {
	margin-bottom: 1rem;
}

.av-article__title {
	font-family: var(--av-font-heading);
	font-size: clamp(1.9rem, 4.5vw, 3rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--av-text);
	margin: 0 0 1.25rem;
}

.av-article__meta {
	font-size: 0.95rem;
}

.av-entry__thumbnail:not(a) {
	border-radius: var(--av-radius-lg);
	margin-bottom: 2.5rem;
	aspect-ratio: auto;
}

.av-article .av-entry__thumbnail img {
	border-radius: var(--av-radius-lg);
}

/* ==========================================================================
   Blog — Article content typography & formats
   ========================================================================== */

.av-article__content {
	color: var(--av-text);
	font-size: 1.0625rem;
	line-height: 1.8;
	word-wrap: break-word;
}

.av-article__content > * {
	margin-block: 0 1.5rem;
}

.av-article__content > *:last-child {
	margin-bottom: 0;
}

.av-article__content h2,
.av-article__content h3,
.av-article__content h4,
.av-article__content h5,
.av-article__content h6 {
	font-family: var(--av-font-heading);
	font-weight: 700;
	line-height: 1.3;
	color: var(--av-text);
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.av-article__content h2 { font-size: 1.75rem; }
.av-article__content h3 { font-size: 1.4rem; }
.av-article__content h4 { font-size: 1.2rem; }

.av-article__content a {
	color: var(--av-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.av-article__content a:hover {
	color: var(--av-primary-hover);
}

.av-article__content ul,
.av-article__content ol {
	padding-left: 1.5rem;
}

.av-article__content li {
	margin-bottom: 0.5rem;
}

.av-article__content img,
.av-article__content iframe,
.av-article__content video {
	max-width: 100%;
	height: auto;
	border-radius: var(--av-radius);
}

.av-article__content figure {
	margin: 0 0 1.75rem;
}

.av-article__content figcaption,
.wp-caption-text {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: var(--av-text-muted);
	text-align: center;
}

/* Blockquote */
.av-article__content blockquote {
	margin: 2rem 0;
	padding: 1.25rem 1.75rem;
	border-left: 4px solid var(--av-blockquote-border);
	background: var(--av-blockquote-bg);
	border-radius: 0 var(--av-radius) var(--av-radius) 0;
	font-size: 1.15rem;
	font-style: italic;
	color: var(--av-text);
}

.av-article__content blockquote p:last-child {
	margin-bottom: 0;
}

.av-article__content blockquote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 600;
	color: var(--av-text-muted);
}

/* Inline code & preformatted blocks */
.av-article__content code,
.av-article__content kbd {
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", Menlo, monospace;
	font-size: 0.9em;
	background: var(--av-code-bg);
	color: var(--av-code-text);
	padding: 0.15em 0.4em;
	border-radius: 4px;
}

.av-article__content pre {
	background: var(--av-pre-bg);
	color: var(--av-pre-text);
	padding: 1.25rem 1.5rem;
	border-radius: var(--av-radius);
	overflow-x: auto;
	font-size: 0.9rem;
	line-height: 1.6;
}

.av-article__content pre code {
	background: none;
	color: inherit;
	padding: 0;
	font-size: inherit;
}

/* Tables */
.av-article__content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.75rem;
	font-size: 0.95rem;
}

.av-article__content th,
.av-article__content td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--av-border);
	text-align: left;
}

.av-article__content thead th {
	background: var(--av-table-header-bg);
	font-weight: 700;
}

.av-article__content tbody tr:nth-child(even) {
	background: var(--av-table-stripe);
}

/* Definition lists & horizontal rule */
.av-article__content dt {
	font-weight: 700;
}

.av-article__content hr {
	border: 0;
	height: 1px;
	background: var(--av-border);
	margin: 2.5rem 0;
}

/* Alignment helpers inside content */
.av-article__content .alignleft {
	float: left;
	margin: 0.4rem 1.75rem 1.25rem 0;
	max-width: 50%;
}

.av-article__content .alignright {
	float: right;
	margin: 0.4rem 0 1.25rem 1.75rem;
	max-width: 50%;
}

.av-article__content .aligncenter {
	display: block;
	margin-inline: auto;
}

/* Galleries */
.av-article__content .gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.75rem;
}

.av-article__content .gallery-item {
	margin: 0;
}

.av-article__content .gallery-item img {
	width: 100%;
	object-fit: cover;
	border: 1px solid var(--av-border);
}

.gallery-caption,
.av-article__content .gallery-caption {
	font-size: 0.8rem;
	color: var(--av-text-muted);
	text-align: center;
	padding: 0.5rem;
	line-height: 1.5;
}

/* Sticky post highlight */
.av-card.sticky,
.av-article.sticky {
	border-color: var(--av-primary);
	box-shadow: 0 0 0 1px var(--av-primary), var(--av-shadow);
}

/* wp_link_pages */
.av-page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2rem;
	font-weight: 600;
}

.av-page-links__number {
	display: inline-flex;
	min-width: 2.25rem;
	height: 2.25rem;
	align-items: center;
	justify-content: center;
	padding: 0 0.5rem;
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius);
}

.av-page-links a .av-page-links__number:hover {
	border-color: var(--av-primary);
	color: var(--av-primary);
}

/* ==========================================================================
   Blog — Article footer, tags, author box
   ========================================================================== */

.av-article__footer {
	margin-top: 2.5rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--av-border);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.av-entry__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.av-entry__tags-label {
	font-weight: 700;
	color: var(--av-text);
	margin-right: 0.25rem;
}

.av-edit-link a {
	color: var(--av-primary);
}

.av-author-box {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	margin-top: 2.5rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--av-surface-alt);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
}

.av-author-box__avatar img {
	width: 80px;
	height: 80px;
	border-radius: var(--av-radius-full);
	display: block;
}

.av-author-box__eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--av-primary);
}

.av-author-box__name {
	font-family: var(--av-font-heading);
	font-size: 1.35rem;
	margin: 0.25rem 0 0.5rem;
}

.av-author-box__name a {
	color: var(--av-text);
	text-decoration: none;
}

.av-author-box__name a:hover {
	color: var(--av-primary);
}

.av-author-box__bio {
	margin: 0;
	color: var(--av-text-muted);
	line-height: 1.7;
}

/* ==========================================================================
   Blog — Post navigation (prev / next)
   ========================================================================== */

.av-post-nav {
	margin-top: 2.5rem;
}

.av-post-nav .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.av-post-nav .nav-previous a,
.av-post-nav .nav-next a {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	height: 100%;
	padding: 1.25rem 1.5rem;
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	text-decoration: none;
	transition: border-color var(--av-transition), transform var(--av-transition);
}

.av-post-nav .nav-previous a:hover,
.av-post-nav .nav-next a:hover {
	border-color: var(--av-primary);
	transform: translateY(-2px);
}

.av-post-nav .nav-next {
	text-align: right;
}

.av-post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--av-primary);
}

.av-post-nav .nav-next .av-post-nav__label {
	justify-content: flex-end;
}

.av-post-nav__label svg {
	width: 16px;
	height: 16px;
}

.av-post-nav__title {
	font-weight: 600;
	color: var(--av-text);
	line-height: 1.4;
}

/* ==========================================================================
   Blog — Pagination
   ========================================================================== */

.av-pagination {
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.av-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.av-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius);
	color: var(--av-text);
	text-decoration: none;
	font-weight: 600;
	transition: all var(--av-transition);
}

.av-pagination .page-numbers svg {
	width: 18px;
	height: 18px;
}

.av-pagination a.page-numbers:hover {
	border-color: var(--av-primary);
	color: var(--av-primary);
}

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

.av-pagination .page-numbers.dots {
	border-color: transparent;
}

/* ==========================================================================
   Blog — Search form
   ========================================================================== */

.av-search-form {
	display: flex;
	align-items: stretch;
	gap: 0;
	background: var(--av-input-bg);
	border: 1px solid var(--av-input-border);
	border-radius: var(--av-radius);
	overflow: hidden;
}

.av-search-form:focus-within {
	border-color: var(--av-primary);
	box-shadow: 0 0 0 3px var(--av-focus-ring);
}

.av-search-form__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 0.75rem 1rem;
	color: var(--av-text);
	font-family: inherit;
	font-size: 0.95rem;
}

.av-search-form__input:focus {
	outline: none;
}

.av-search-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	border: 0;
	background: var(--av-primary);
	color: #ffffff;
	cursor: pointer;
	transition: background var(--av-transition);
}

.av-search-form__submit:hover {
	background: var(--av-primary-hover);
}

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

/* ==========================================================================
   Blog — No results
   ========================================================================== */

.av-no-results {
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	box-shadow: var(--av-shadow);
}

.av-no-results__title {
	font-family: var(--av-font-heading);
	font-size: 1.75rem;
	margin: 0 0 0.75rem;
	color: var(--av-text);
}

.av-no-results__text {
	color: var(--av-text-muted);
	line-height: 1.7;
	margin-bottom: 1.5rem;
}

/* ==========================================================================
   Blog — Sidebar & widgets
   ========================================================================== */

.av-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	position: sticky;
	top: calc(var(--av-header-height) + 1.5rem);
}

.av-sidebar .widget {
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	padding: 1.5rem;
	box-shadow: var(--av-shadow);
}

.av-sidebar .widget-title,
.av-sidebar .widgettitle {
	font-family: var(--av-font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--av-text);
	margin: 0 0 1.1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--av-border);
}

.av-sidebar .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.av-sidebar .widget ul li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	color: var(--av-text-muted);
	line-height: 1.5;
}

.av-sidebar .widget ul li a {
	color: var(--av-text);
	text-decoration: none;
	transition: color var(--av-transition);
}

.av-sidebar .widget ul li a:hover {
	color: var(--av-primary);
}

.av-sidebar .widget ul ul {
	margin-top: 0.6rem;
	padding-left: 1rem;
}

/* Category / archive counts */
.av-sidebar .widget_categories li,
.av-sidebar .widget_archive li {
	position: relative;
}

/* Tag cloud */
.av-sidebar .tagcloud,
.av-sidebar .wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.av-sidebar .tagcloud a,
.av-sidebar .wp-block-tag-cloud a {
	display: inline-flex;
	padding: 0.35rem 0.75rem;
	background: var(--av-surface-alt);
	color: var(--av-text-muted);
	border-radius: var(--av-radius-full);
	font-size: 0.8rem !important;
	text-decoration: none;
	transition: all var(--av-transition);
}

.av-sidebar .tagcloud a:hover,
.av-sidebar .wp-block-tag-cloud a:hover {
	background: var(--av-primary);
	color: #ffffff;
}

/* Widget search form spacing */
.av-sidebar .widget_search .av-search-form {
	margin-top: 0;
}

/* ==========================================================================
   Blog — Comments
   ========================================================================== */

.av-comments {
	margin-top: 3rem;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	box-shadow: var(--av-shadow);
}

.av-comments__title,
.av-comments__reply-title {
	font-family: var(--av-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--av-text);
	margin: 0 0 1.75rem;
}

.av-comments__list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.av-comments__list .children {
	list-style: none;
	margin: 1.5rem 0 0;
	padding-left: clamp(1rem, 4vw, 3rem);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	border-left: 2px solid var(--av-border);
}

.av-comments__list .comment-body {
	padding: 1.25rem 1.5rem;
	background: var(--av-surface-alt);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
}

.av-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.av-comments__list .comment-author .avatar {
	border-radius: var(--av-radius-full);
}

.av-comments__list .comment-author .fn {
	font-weight: 700;
	font-style: normal;
	color: var(--av-text);
}

.av-comments__list .comment-author .says {
	display: none;
}

.av-comments__list .comment-metadata {
	font-size: 0.8rem;
	margin-bottom: 0.75rem;
}

.av-comments__list .comment-metadata a {
	color: var(--av-text-muted);
	text-decoration: none;
}

.av-comments__list .comment-content {
	color: var(--av-text);
	line-height: 1.7;
}

.av-comments__list .comment-content p:last-child {
	margin-bottom: 0;
}

.av-comments__list .reply {
	margin-top: 0.75rem;
}

.av-comments__list .comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--av-primary);
	text-decoration: none;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--av-primary-light);
	border-radius: 999px;
	transition: background var(--av-transition), color var(--av-transition), border-color var(--av-transition);
}

.av-comments__list .comment-reply-link:hover {
	background: var(--av-primary);
	color: #ffffff;
	border-color: var(--av-primary);
}

.av-comments__list .bypostauthor > .comment-body {
	border-color: var(--av-primary);
}

.av-comments__closed {
	color: var(--av-text-muted);
	font-style: italic;
}

/* ==========================================================================
   Comment form — premium SaaS styling
   ========================================================================== */

/* Container — elevated card with subtle top accent */
.comment-respond {
	margin-top: 2.5rem;
	padding: clamp(1.75rem, 4vw, 3rem);
	background: var(--av-surface-elevated);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	box-shadow: var(--av-shadow);
	position: relative;
}

.comment-respond::before {
	content: '';
	position: absolute;
	top: 0;
	left: 2rem;
	right: 2rem;
	height: 3px;
	background: linear-gradient(90deg, var(--av-primary), var(--av-primary-hover));
	border-radius: var(--av-radius-lg) var(--av-radius-lg) 0 0;
}

/* Reply title */
.comment-respond .comment-reply-title {
	font-family: var(--av-font-heading);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--av-text);
	margin: 0 0 0.25rem;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Cancel reply link — pill style */
#cancel-comment-reply-link {
	display: inline-flex;
	align-items: center;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--av-text-muted);
	text-decoration: none;
	border: 1px solid var(--av-border);
	border-radius: 999px;
	padding: 0.2rem 0.7rem;
	transition: color var(--av-transition), border-color var(--av-transition), background var(--av-transition);
}

#cancel-comment-reply-link:hover {
	color: var(--av-primary);
	border-color: var(--av-primary-light);
	background: var(--av-primary-light);
}

/* Notes and logged-in message */
.comment-form .comment-notes,
.comment-form .logged-in-as {
	font-size: 0.85rem;
	color: var(--av-text-muted);
	margin: 0 0 0.5rem;
	line-height: 1.6;
}

.comment-form .logged-in-as a {
	color: var(--av-primary);
	font-weight: 600;
	text-decoration: none;
}

.comment-form .logged-in-as a:hover {
	text-decoration: underline;
}

/* Form grid — responsive */
.av-comment-form,
.comment-respond .comment-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 601px) {
	.av-comment-form,
	.comment-respond .comment-form {
		grid-template-columns: 1fr 1fr;
	}

	.comment-form .comment-notes,
	.comment-form .logged-in-as,
	.comment-form .comment-form-comment,
	.comment-form .comment-form-cookies-consent,
	.comment-form .form-submit {
		grid-column: 1 / -1;
	}

	.comment-form .comment-form-author {
		grid-column: 1 / 2;
	}

	.comment-form .comment-form-email {
		grid-column: 2 / 3;
	}
}

/* Wrapper paragraphs */
.comment-form > p {
	margin: 0;
}

/* Field group styling */
.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url,
.comment-form .comment-form-comment {
	margin: 0;
}

/* Labels — modern floating-style */
.comment-form label {
	display: block;
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--av-text-muted);
	margin-bottom: 0.4rem;
	transition: color var(--av-transition);
}

.comment-form .comment-form-author:focus-within label,
.comment-form .comment-form-email:focus-within label,
.comment-form .comment-form-url:focus-within label,
.comment-form .comment-form-comment:focus-within label {
	color: var(--av-primary);
}

/* Inputs — clean bordered with animated bottom accent */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 0.8rem 1rem;
	background: var(--av-input-bg);
	border: 1px solid var(--av-input-border);
	border-bottom: 2px solid var(--av-input-border);
	border-radius: var(--av-radius);
	color: var(--av-text);
	font-family: inherit;
	font-size: 0.95rem;
	transition: border-color var(--av-transition), box-shadow var(--av-transition);
	-webkit-appearance: none;
	appearance: none;
}

/* Focus — animated bottom accent */
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--av-input-border);
	border-bottom-color: var(--av-primary);
	box-shadow: 0 4px 12px -4px var(--av-primary-light);
	background: var(--av-surface-elevated);
}

/* Textarea specific */
.comment-form textarea {
	resize: vertical;
	min-height: 150px;
	line-height: 1.7;
	padding: 1rem;
}

/* Cookies consent checkbox — styled toggle row */
.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin: 0;
	font-size: 0.85rem;
	color: var(--av-text-muted);
	line-height: 1.5;
}

.comment-form .comment-form-cookies-consent input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	accent-color: var(--av-primary);
	border: 1px solid var(--av-input-border);
	border-radius: var(--av-radius-sm);
	cursor: pointer;
}

/* Submit row */
.comment-form .form-submit {
	margin: 0;
	padding-top: 0.5rem;
}

/* Submit button — with arrow, gradient, and lift */
.comment-form .submit,
.form-submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.9rem 2rem;
	background: linear-gradient(135deg, var(--av-primary), var(--av-primary-hover));
	color: #ffffff;
	border: 0;
	border-radius: var(--av-radius);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 4px 14px -2px var(--av-primary-light);
	transition: transform var(--av-transition), box-shadow var(--av-transition), background var(--av-transition);
}

.comment-form .submit::after {
	content: '→';
	font-size: 1.1em;
	line-height: 1;
	transition: transform var(--av-transition);
}

.comment-form .submit:hover,
.form-submit input[type="submit"]:hover {
	background: linear-gradient(135deg, var(--av-primary-hover), color-mix(in srgb, var(--av-primary-hover), #000 10%));
	transform: translateY(-2px);
	box-shadow: 0 6px 20px -4px var(--av-primary-light);
}

.comment-form .submit:hover::after {
	transform: translateX(3px);
}

.comment-form .submit:active,
.form-submit input[type="submit"]:active {
	transform: scale(0.97) translateY(0);
	box-shadow: 0 2px 8px -2px var(--av-primary-light);
}

/* Required indicator */
.comment-form .required {
	color: var(--av-primary);
	text-decoration: none;
}

/* Responsive — mobile */
@media (max-width: 600px) {
	.av-comments {
		padding: 1.25rem;
	}

	.comment-respond {
		padding: 1.25rem;
	}

	.comment-respond::before {
		left: 1.25rem;
		right: 1.25rem;
	}

	.comment-form input[type="text"],
	.comment-form input[type="email"],
	.comment-form input[type="url"],
	.comment-form textarea {
		padding: 0.7rem 0.85rem;
		font-size: 1rem;
	}

	.comment-form textarea {
		min-height: 120px;
	}

	.comment-form .submit,
	.form-submit input[type="submit"] {
		width: 100%;
		justify-content: center;
	}

	.av-comments__list .children {
		padding-left: 0.75rem;
	}
}

/* ==========================================================================
   Blog — Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	body.av-has-sidebar .av-page-layout {
		grid-template-columns: 1fr;
	}

	body.av-has-sidebar .av-post-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}

	.av-sidebar {
		position: static;
	}
}

@media (max-width: 600px) {
	.av-post-grid,
	body.av-has-sidebar .av-post-grid {
		grid-template-columns: 1fr;
	}

	body.av-has-sidebar .av-card {
		flex-direction: column;
	}

	body.av-has-sidebar .av-card .av-entry__thumbnail {
		flex-basis: auto;
		aspect-ratio: 16 / 9;
	}

	.av-post-nav .nav-links {
		grid-template-columns: 1fr;
	}

	.av-author-box {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}

	.av-article__content .alignleft,
	.av-article__content .alignright {
		float: none;
		margin-inline: auto;
		max-width: 100%;
	}
}

/* ==========================================================================
   Breadcrumbs — agentic & screen-reader navigation
   ========================================================================== */

.av-breadcrumbs {
	margin-bottom: 1.5rem;
	font-size: 0.85rem;
}

.av-breadcrumbs__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
}

.av-breadcrumbs__item {
	display: inline-flex;
	align-items: center;
	color: var(--av-text-muted);
}

.av-breadcrumbs__link {
	color: var(--av-text-muted);
	text-decoration: none;
	transition: color var(--av-transition);
}

.av-breadcrumbs__link:hover {
	color: var(--av-primary);
	text-decoration: underline;
}

.av-breadcrumbs__separator {
	margin: 0 0.45rem;
	color: var(--av-border-strong);
	font-weight: 400;
}

.av-breadcrumbs__current {
	color: var(--av-text);
	font-weight: 600;
}

@media (max-width: 600px) {
	.av-breadcrumbs {
		font-size: 0.8rem;
	}

	.av-breadcrumbs__separator {
		margin: 0 0.3rem;
	}
}

/* ==========================================================================
   Accessibility — Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.av-card:hover,
	.av-post-nav .nav-previous a:hover,
	.av-post-nav .nav-next a:hover {
		transform: none !important;
	}

	.av-card:hover .av-entry__thumbnail img {
		transform: none !important;
	}

	/* Replace the spinning ray with a static primary edge. */
	.av-card:hover::before {
		animation: none !important;
		background: var(--av-primary) !important;
		opacity: 0.85;
	}

	.av-card:hover .av-entry__thumbnail::before {
		animation: none !important;
		background: var(--av-primary) !important;
		opacity: 0.85;
	}
}

/* ==========================================================================
   Reading Progress Bar
   ========================================================================== */

.av-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: transparent;
	z-index: 10001;
	pointer-events: none;
}

body.admin-bar .av-reading-progress {
	top: 32px;
}

.av-reading-progress__bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--av-primary), var(--av-primary-hover));
	transform-origin: left center;
	transition: width 0.1s linear;
}

@media screen and (max-width: 782px) {
	body.admin-bar .av-reading-progress {
		top: 46px;
	}
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.av-toc {
	background: var(--av-surface-alt);
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius-lg);
	padding: 1.25rem 1.5rem;
	margin: 0 0 2.5rem;
}

.av-toc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.av-toc__title {
	font-family: var(--av-font-heading);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--av-text);
	margin: 0;
}

.av-toc__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid var(--av-border);
	border-radius: var(--av-radius);
	background: var(--av-surface-elevated);
	color: var(--av-text);
	cursor: pointer;
	transition: color var(--av-transition), border-color var(--av-transition);
}

.av-toc__toggle:hover {
	color: var(--av-primary);
	border-color: var(--av-primary);
}

.av-toc__toggle svg {
	width: 18px;
	height: 18px;
	transition: transform var(--av-transition);
}

.av-toc.is-collapsed .av-toc__toggle svg {
	transform: rotate(-90deg);
}

.av-toc__nav {
	margin-top: 1rem;
	overflow: hidden;
}

.av-toc.is-collapsed .av-toc__nav {
	display: none;
}

.av-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	counter-reset: av-toc;
}

.av-toc__item {
	line-height: 1.4;
}

.av-toc__item--h3 {
	padding-left: 1.25rem;
}

.av-toc__item--h4 {
	padding-left: 2.5rem;
}

.av-toc__link {
	display: block;
	padding: 0.4rem 0.6rem;
	border-radius: var(--av-radius);
	color: var(--av-text-muted);
	text-decoration: none;
	border-left: 2px solid transparent;
	transition: color var(--av-transition), background var(--av-transition), border-color var(--av-transition);
}

.av-toc__link:hover {
	color: var(--av-primary);
	background: var(--av-primary-light);
}

.av-toc__link.is-active {
	color: var(--av-primary);
	font-weight: 600;
	border-left-color: var(--av-primary);
	background: var(--av-primary-light);
}

/* Offset anchor targets so the sticky header doesn't cover headings */
.av-article__content :is(h2, h3, h4)[id] {
	scroll-margin-top: calc(var(--av-header-height) + 1.5rem);
}

body.admin-bar .av-article__content :is(h2, h3, h4)[id] {
	scroll-margin-top: calc(var(--av-header-height) + 3.5rem);
}

/* ---- BLOCK STYLE: Outline Button ---- */
.wp-block-button.is-style-av-outline .wp-block-button__link {
	background: transparent !important;
	border: 2px solid var(--av-primary, #6d28d9);
	color: var(--av-primary, #6d28d9) !important;
	outline: none;
}

.wp-block-button.is-style-av-outline .wp-block-button__link:hover {
	background: var(--av-primary, #6d28d9) !important;
	color: #fff !important;
}

/* ---- BLOCK STYLE: Rounded Image ---- */
.wp-block-image.is-style-av-rounded img {
	border-radius: 1rem;
}

/* ---- BLOCK STYLE: Brand Quote ---- */
.wp-block-quote.is-style-av-brand-quote {
	border-left: 4px solid var(--av-primary, #6d28d9);
	background: var(--av-primary-light, #f3e8ff);
	padding: 1.25rem 1.5rem;
	border-radius: 0 0.5rem 0.5rem 0;
}

/* ==========================================================================
   CONTACT FORM 7 — Premium SaaS Styling
   ========================================================================== */

.wpcf7 {
	max-width: 640px;
}

.wpcf7 .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* ---- Labels ---- */
.wpcf7 label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--av-text-muted, #4a4455);
	margin-bottom: 0.35rem;
}

.wpcf7 .screen-reader-text + label {
	margin-top: 0;
}

/* ---- Inputs, Textareas, Selects ---- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 input[type="search"],
.wpcf7 textarea,
.wpcf7 select {
	display: block;
	width: 100%;
	padding: 0.7rem 0.85rem;
	font-family: var(--av-font, inherit);
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--av-text, #1d1a24);
	background: var(--av-input-bg, #ffffff);
	border: 1px solid var(--av-input-border, rgba(15, 23, 42, 0.16));
	border-radius: var(--av-radius, 8px);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	box-sizing: border-box;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 input[type="search"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
	border-color: var(--av-primary, #6d28d9);
	box-shadow: 0 0 0 3px var(--av-focus-ring, rgba(109, 40, 217, 0.40));
}

.wpcf7 textarea {
	resize: vertical;
	min-height: 120px;
}

.wpcf7 select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a4455' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2.5rem;
}

/* ---- Checkboxes & Radios ---- */
.wpcf7 .wpcf7-list-item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.35rem 0;
	font-size: 0.9rem;
	color: var(--av-text, #1d1a24);
}

.wpcf7 .wpcf7-list-item input[type="checkbox"],
.wpcf7 .wpcf7-list-item input[type="radio"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--av-primary, #6d28d9);
	flex-shrink: 0;
}

.wpcf7 .wpcf7-list-item label {
	font-size: inherit;
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
	color: var(--av-text, #1d1a24);
	margin-bottom: 0;
}

/* ---- Submit Button ---- */
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.85rem 2rem;
	font-family: var(--av-font, inherit);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--av-text-inverse, #ffffff);
	background: linear-gradient(135deg, var(--av-primary, #6d28d9), #9333ea);
	border: none;
	border-radius: var(--av-radius, 8px);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(109, 40, 217, 0.35);
}

.wpcf7 input[type="submit"]:active,
.wpcf7 .wpcf7-submit:active {
	transform: translateY(0);
}

/* ---- Validation & Error Messages ---- */
.wpcf7 .wpcf7-not-valid-tip {
	font-size: 0.8rem;
	color: #dc2626;
	margin-top: 0.25rem;
}

.wpcf7 .wpcf7-not-valid-tip::before {
	content: "⚠ ";
}

.wpcf7 input.wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid,
.wpcf7 select.wpcf7-not-valid {
	border-color: #dc2626;
}

/* ---- Server Response Messages ---- */
.wpcf7 .wpcf7-response-output {
	font-size: 0.9rem;
	line-height: 1.6;
	padding: 0.85rem 1rem;
	border-radius: var(--av-radius, 8px);
	margin: 0;
	border: none;
}

.wpcf7 .wpcf7-response-output.wpcf7-validation-errors {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.wpcf7 .wpcf7-response-output.wpcf7-mail-sent-ok {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

/* ---- Spam Protection ---- */
.wpcf7 .wpcf7-acceptance label {
	font-size: 0.85rem;
}

/* ---- Spinner ---- */
.wpcf7 .wpcf7-spinner {
	float: right;
	margin-top: 0.5rem;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.wpcf7 .wpcf7-spinner.is-active {
	visibility: visible;
	opacity: 1;
}

/* ---- CF7 in Dark Mode ---- */
body.av-theme-dark .wpcf7 label {
	color: var(--av-dark-text-muted, #94a3b8);
}

body.av-theme-dark .wpcf7 input[type="text"],
body.av-theme-dark .wpcf7 input[type="email"],
body.av-theme-dark .wpcf7 input[type="url"],
body.av-theme-dark .wpcf7 input[type="tel"],
body.av-theme-dark .wpcf7 input[type="number"],
body.av-theme-dark .wpcf7 input[type="date"],
body.av-theme-dark .wpcf7 input[type="search"],
body.av-theme-dark .wpcf7 textarea,
body.av-theme-dark .wpcf7 select {
	color: var(--av-dark-text, #f1f5f9);
	background: var(--av-dark-surface-alt, #1e293b);
	border-color: rgba(148, 163, 184, 0.15);
}

body.av-theme-dark .wpcf7 .wpcf7-list-item label {
	color: var(--av-dark-text, #f1f5f9);
}

body.av-theme-dark .wpcf7 .wpcf7-response-output.wpcf7-validation-errors {
	background: rgba(220, 38, 38, 0.15);
	color: #fca5a5;
	border-color: rgba(220, 38, 38, 0.3);
}

body.av-theme-dark .wpcf7 .wpcf7-response-output.wpcf7-mail-sent-ok {
	background: rgba(34, 197, 94, 0.15);
	color: #86efac;
	border-color: rgba(34, 197, 94, 0.3);
}

/* ==========================================================================
   Core Block Overrides — Match theme design tokens
   ========================================================================== */

/* ---- Core Separator (hr) ---- */
.wp-block-separator {
	border-color: var(--av-border);
	margin: 2rem 0;
}

.wp-block-separator.is-style-wide {
	border-bottom-width: 1px;
}

.wp-block-separator.is-style-dots::before {
	color: var(--av-primary);
}

/* ---- Core List ---- */
.wp-block-list {
	margin-bottom: 1.5rem;
	padding-left: 1.25rem;
}

.wp-block-list li {
	margin-bottom: 0.4rem;
	line-height: 1.7;
}

.wp-block-list li::marker {
	color: var(--av-primary);
}

/* ---- Core Pullquote ---- */
.wp-block-pullquote {
	border-top-color: var(--av-primary);
	border-bottom-color: var(--av-primary);
	padding: 1.5rem 0;
}

.wp-block-pullquote blockquote,
.wp-block-pullquote.is-style-default blockquote {
	border-left: none;
}

/* ---- Core Cover ---- */
.wp-block-cover__background {
	background-color: var(--av-dark-surface);
}

.wp-block-cover__inner-container {
	padding: clamp(2rem, 5vw, 4rem);
}

/* ---- Core Columns ---- */
.wp-block-columns {
	margin-bottom: 1.5rem;
}

.wp-block-column {
	margin-bottom: 1.5rem;
}

/* ---- Core Group ---- */
.wp-block-group {
	margin-bottom: 1.5rem;
}

/* ---- Core Spacer ---- */
.wp-block-spacer {
	margin: 0;
}

/* ---- Core Image ---- */
.wp-block-image figcaption {
	font-size: 0.85rem;
	color: var(--av-text-muted);
	text-align: center;
	margin-top: 0.5rem;
}

/* ---- Core Video ---- */
.wp-block-video figcaption {
	font-size: 0.85rem;
	color: var(--av-text-muted);
	text-align: center;
	margin-top: 0.5rem;
}

/* ---- Core Table ---- */
.wp-block-table {
	margin-bottom: 1.5rem;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.wp-block-table th {
	background: var(--av-table-header-bg, #f3ebf9);
	font-weight: 600;
	text-align: left;
	padding: 0.65rem 0.85rem;
	border-bottom: 2px solid var(--av-border-strong);
}

.wp-block-table td {
	padding: 0.65rem 0.85rem;
	border-bottom: 1px solid var(--av-border);
}

.wp-block-table tbody tr:nth-child(even) {
	background: var(--av-table-stripe, rgba(15, 23, 42, 0.02));
}

/* ---- Core Code ---- */
.wp-block-code {
	font-size: 0.875rem;
	background: var(--av-code-bg, #f3ebf9);
	color: var(--av-code-text, #6d28d9);
	border-radius: var(--av-radius);
	padding: 0.2rem 0.4rem;
}

.wp-block-code code {
	font-size: inherit;
	background: transparent;
	padding: 0;
	color: inherit;
}

/* ---- Core Preformatted ---- */
.wp-block-preformatted {
	background: var(--av-pre-bg, #1e293b);
	color: var(--av-pre-text, #e2e8f0);
	border-radius: var(--av-radius);
	padding: 1.25rem;
	font-size: 0.85rem;
	line-height: 1.6;
	overflow-x: auto;
}

/* ---- Core Verse ---- */
.wp-block-verse {
	font-style: italic;
	border-left: 3px solid var(--av-primary);
	padding-left: 1rem;
	margin-bottom: 1.5rem;
	color: var(--av-text-muted);
}

/* ---- Core Quote ---- */
.wp-block-quote {
	border-left: 4px solid var(--av-primary);
	background: var(--av-primary-light, #f3e8ff);
	padding: 1.25rem 1.5rem;
	border-radius: 0 var(--av-radius) var(--av-radius) 0;
	margin-bottom: 1.5rem;
}

.wp-block-quote cite {
	font-size: 0.85rem;
	color: var(--av-text-muted);
	display: block;
	margin-top: 0.5rem;
	font-style: normal;
}

.wp-block-quote.is-style-plain {
	border-left: none;
	background: transparent;
	padding: 0;
	border-radius: 0;
	border-left: 4px solid var(--av-primary);
	padding: 1.25rem 1.5rem;
	background: var(--av-primary-light, #f3e8ff);
	border-radius: 0 var(--av-radius) var(--av-radius) 0;
}

/* ---- Core Gallery ---- */
.wp-block-gallery {
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.wp-block-gallery .wp-block-image {
	margin-bottom: 0;
}

/* ---- Core Categories / Archives ---- */
.wp-block-categories,
.wp-block-archives {
	margin-bottom: 1.5rem;
}

/* ---- Core Latest Posts ---- */
.wp-block-latest-posts {
	margin-bottom: 1.5rem;
}

.wp-block-latest-posts li {
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--av-border);
}

.wp-block-latest-posts li:last-child {
	border-bottom: none;
}

/* ---- Core Embed / Responsive ---- */
.wp-block-embed {
	margin-bottom: 1.5rem;
}

.wp-block-embed__wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}

.wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.wp-block-embed figcaption {
	font-size: 0.85rem;
	color: var(--av-text-muted);
	text-align: center;
	margin-top: 0.5rem;
}

/* ---- Dark mode overrides for core blocks ---- */
body.av-theme-dark .wp-block-separator {
	border-color: var(--av-dark-text-muted, #94a3b8);
}

body.av-theme-dark .wp-block-table th {
	background: rgba(148, 163, 184, 0.1);
}

body.av-theme-dark .wp-block-table td {
	border-bottom-color: rgba(148, 163, 184, 0.15);
}

body.av-theme-dark .wp-block-table tbody tr:nth-child(even) {
	background: rgba(148, 163, 184, 0.05);
}

body.av-theme-dark .wp-block-code {
	background: rgba(109, 40, 217, 0.15);
	color: #c4b5fd;
}

body.av-theme-dark .wp-block-quote {
	background: rgba(109, 40, 217, 0.15);
}

body.av-theme-dark .wp-block-latest-posts li {
	border-bottom-color: rgba(148, 163, 184, 0.15);
}
