/*
Theme Name: Activ Surgical
Theme URI: https://activsurgical.com
Author: KBD
Description: Custom block theme for Activ Surgical.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.1.37
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: activ-surgical
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, wide-blocks
*/

/* Layout — shared horizontal padding and content width (header, footer, blocks) */
:root {
	--activ-layout-padding-inline: var(--wp--preset--spacing--8);
	--activ-layout-max-width: 1440px;
	--activ-header-height: 5.6875rem;
}

.activ-layout-shell {
	box-sizing: border-box;
	padding-inline: var(--activ-layout-padding-inline);
	width: 100%;
}

.activ-layout-container {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--activ-layout-max-width);
	width: 100%;
}

/* Buttons — smooth hover/focus across core, header CTA, forms, and custom buttons. */
.wp-element-button,
.wp-block-button__link,
.activ-header__cta,
.activ-news-press__load-more,
.activ-gform_wrapper .gform_button,
.activ-gform_wrapper input[type="submit"].gform_button,
.activ-content-block--contact .gform_wrapper .gform_button,
.activ-content-block--contact .gform_wrapper input[type="submit"].gform_button {
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		filter 0.2s ease,
		opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link,
	.activ-header__cta,
	.activ-news-press__load-more,
	.activ-gform_wrapper .gform_button,
	.activ-gform_wrapper input[type="submit"].gform_button,
	.activ-content-block--contact .gform_wrapper .gform_button,
	.activ-content-block--contact .gform_wrapper input[type="submit"].gform_button {
		transition: none;
	}
}

/* Full-bleed sections define their own padding; skip flow blockGap between them only. */
.wp-block-post-content.is-layout-flow > .alignfull,
.editor-styles-wrapper .wp-block-post-content.is-layout-flow > .alignfull {
	margin-block: 0 !important;
}

.wp-block-post-content.is-layout-flow > .alignfull + .alignfull,
.editor-styles-wrapper .wp-block-post-content.is-layout-flow > .alignfull + .alignfull {
	margin-block-start: 0 !important;
}

/* Template shell — main stacks flush under the fixed header (homepage + interior pages). */
.wp-site-blocks > main,
.editor-styles-wrapper .wp-site-blocks > main {
	margin-block: 0 !important;
}

/* Template shell blocks (header/main/footer) stack flush at the site root. */
.wp-site-blocks > main + .wp-block-template-part,
.editor-styles-wrapper .wp-site-blocks > main + .wp-block-template-part {
	margin-block-start: 0 !important;
}

/* Header — default light (light bg, dark text); dark overlay on dark heroes */
.activ-header {
	--activ-header-fg: var(--wp--preset--color--contrast);
	--activ-header-cta-bg: var(--wp--preset--color--contrast);
	--activ-header-cta-fg: var(--wp--preset--color--base);
	--activ-header-trigger-active: rgba(128, 128, 128, 0.7);
	background-color: var(--wp--preset--color--base);
	gap: 0;
	inset-block-start: 0;
	inset-inline: 0;
	overflow: visible;
	padding: 0;
	position: fixed;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		transform 0.3s ease;
	width: 100%;
	z-index: 100;
}

/* Keep the fixed header below the WP admin bar when logged in. */
.admin-bar .activ-header {
	inset-block-start: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .activ-header {
		inset-block-start: 46px;
	}
}

.activ-header.is-hidden {
	pointer-events: none;
	transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
	.activ-header {
		transition:
			background-color 0.25s ease,
			border-color 0.25s ease,
			box-shadow 0.25s ease;
	}
}

.activ-header__bar {
	padding-inline: var(--activ-layout-padding-inline);
	position: relative;
}

.activ-header.has-dark-hero {
	--activ-header-fg: var(--wp--preset--color--base);
	--activ-header-cta-bg: var(--wp--preset--color--neutral-600);
	--activ-header-cta-fg: var(--wp--preset--color--base);
	--activ-header-trigger-active: rgba(128, 128, 128, 0.3);
}

.activ-header.has-dark-hero:not(.is-scrolled):not(.is-mobile-open) {
	background-color: transparent;
}

.activ-header.has-dark-hero.is-scrolled {
	background-color: var(--wp--preset--color--contrast);
}

/* Light heroes — transparent so the soft gradient shows through the header. */
.activ-header.has-light-hero:not(.is-scrolled):not(.is-mobile-open) {
	background-color: transparent;
}

.activ-header.has-light-hero.is-scrolled {
	background-color: var(--wp--preset--color--base);
}

.activ-header.is-mobile-open {
	--activ-header-fg: var(--wp--preset--color--contrast);
	--activ-header-cta-bg: var(--wp--preset--color--contrast);
	--activ-header-cta-fg: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--base);
}

.activ-header__inner {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	gap: 0;
	justify-content: flex-start;
	margin-inline: auto;
	max-width: 1440px;
	/* Figma header is 91px total — keep padding inside that height. */
	min-height: 5.6875rem;
	padding-block: 1.125rem;
	width: 100%;
}

.activ-header--minimal .activ-header__inner {
	justify-content: flex-start;
}

.activ-header__logo {
	display: block;
	flex-shrink: 0;
	line-height: 0;
	position: relative;
}

.activ-header__logo-image {
	display: block;
	height: auto;
	width: 187px;
}

.activ-header__logo-image--light {
	inset-block-start: 0;
	inset-inline-start: 0;
	opacity: 0;
	position: absolute;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__logo-image--light {
	opacity: 1;
	position: static;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__logo-image--dark {
	opacity: 0;
	position: absolute;
}

.activ-header.is-mobile-open .activ-header__logo-image--light {
	opacity: 0;
	position: absolute;
}

.activ-header.is-mobile-open .activ-header__logo-image--dark {
	opacity: 1;
	position: static;
}

.activ-header__nav {
	display: none;
}

.activ-header__end {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: var(--wp--preset--spacing--6);
	margin-left: auto;
}

@media (min-width: 1025px) {
	.activ-header__end {
		gap: var(--wp--preset--spacing--1);
	}

	.activ-header__nav {
		display: block;
	}

	.activ-header__mobile-panel,
	.activ-header.is-mobile-open .activ-header__mobile-panel {
		display: none;
	}
}

.activ-header__menu {
	align-items: center;
	display: flex;
	gap: var(--wp--preset--spacing--1);
	list-style: none;
	margin: 0;
	padding: 0;
}

.activ-header__item:last-child {
	margin-right: calc(var(--wp--preset--spacing--12) - var(--wp--preset--spacing--5));
}

.activ-header__item {
	position: relative;
}

.activ-header__trigger {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 5px;
	color: var(--activ-header-fg);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	gap: 5px;
	letter-spacing: -0.5px;
	line-height: 1.2;
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--5);
	position: relative;
	text-decoration: none;
	white-space: nowrap;
}

.activ-header__item--has-dropdown .activ-header__trigger::before {
	background: var(--activ-header-trigger-active);
	border-radius: 10px;
	content: "";
	inset: 0;
	opacity: 0;
	position: absolute;
	transition: opacity 0.22s ease;
	z-index: 0;
}

.activ-header__item.is-open .activ-header__trigger::before {
	opacity: 1;
}

.activ-header__trigger span,
.activ-header__trigger .activ-header__chevron {
	position: relative;
	z-index: 1;
}

.activ-header__chevron {
	display: block;
	flex-shrink: 0;
	height: 16px;
	transition: transform 0.25s ease;
	width: 16px;
}

.activ-header__chevron--light {
	display: none;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__chevron--dark {
	display: none;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__chevron--light {
	display: block;
}

.activ-header__item.is-open .activ-header__chevron {
	transform: rotate(-180deg);
}

.activ-header__dropdown {
	background: var(--wp--preset--color--base);
	border: none;
	border-radius: 10px;
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
	color: inherit;
	inset: auto;
	margin: 0;
	max-width: 330px;
	min-width: 330px;
	overflow: hidden;
	padding: 0;
	position: fixed;
	width: 330px;
	z-index: 110;
}

.activ-header__dropdown[popover] {
	opacity: 0;
	transform: translateY(-8px);
	transition:
		opacity 0.22s ease,
		transform 0.22s ease,
		overlay 0.22s allow-discrete,
		display 0.22s allow-discrete;
}

.activ-header__dropdown:popover-open {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

@starting-style {
	.activ-header__dropdown:popover-open {
		opacity: 0;
		transform: translateY(-8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.activ-header__item--has-dropdown .activ-header__trigger::before,
	.activ-header__chevron,
	.activ-header__dropdown[popover] {
		transition: none;
	}

	.activ-header__dropdown[popover],
	.activ-header__dropdown:popover-open {
		transform: none;
	}
}

.activ-header__dropdown-item {
	align-items: stretch;
	border-bottom: 1px solid #e3e3e3;
	color: inherit;
	display: flex;
	gap: 0;
	padding: 0;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.activ-header__dropdown-item:last-child {
	border-bottom: 0;
}

.activ-header__dropdown-item:hover,
.activ-header__dropdown-item:focus-visible {
	background: var(--wp--preset--color--neutral-100);
}

.activ-header__dropdown-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: var(--wp--preset--spacing--6);
	transition: transform 0.25s ease;
}

.activ-header__dropdown-item:hover .activ-header__dropdown-text,
.activ-header__dropdown-item:focus-visible .activ-header__dropdown-text {
	transform: translateX(10px);
}

.activ-header__dropdown-title {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.2;
}

.activ-header__dropdown-desc {
	color: var(--wp--preset--color--neutral-700);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.6;
	text-wrap: pretty;
}

.activ-header__dropdown-arrow {
	align-items: center;
	align-self: stretch;
	border-left: 1px solid #e3e3e3;
	color: var(--wp--preset--color--neutral-500);
	display: flex;
	flex-shrink: 0;
	justify-content: center;
	padding: var(--wp--preset--spacing--6);
	transition: color 0.2s ease;
}

.activ-header__dropdown-item:hover .activ-header__dropdown-arrow,
.activ-header__dropdown-item:focus-visible .activ-header__dropdown-arrow {
	color: var(--wp--preset--color--contrast);
}

.activ-header__dropdown .activ-header__dropdown-arrow-icon {
	display: block;
	flex-shrink: 0;
	height: 16px;
	width: 8px;
}

.activ-header__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--activ-header-fg);
	cursor: pointer;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	padding: 0;
	width: 40px;
}

@media (min-width: 1025px) {
	.activ-header__toggle {
		display: none;
	}
}

.activ-header__toggle-icon {
	display: block;
	height: 40px;
	width: 40px;
}

.activ-header__toggle-icon--close,
.activ-header__toggle-icon--open:not(.activ-header__toggle-icon--dark) {
	display: none;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__toggle-icon--open.activ-header__toggle-icon--dark {
	display: none;
}

.activ-header.has-dark-hero:not(.is-mobile-open) .activ-header__toggle-icon--open:not(.activ-header__toggle-icon--dark) {
	display: block;
}

.activ-header.is-mobile-open .activ-header__toggle-icon--open {
	display: none !important;
}

.activ-header.is-mobile-open .activ-header__toggle-icon--close {
	display: block;
}

.activ-header__cta {
	background: var(--activ-header-cta-bg);
	border-radius: 5px;
	color: var(--activ-header-cta-fg);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.5px;
	line-height: 1.2;
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--5);
	text-decoration: none;
	white-space: nowrap;
}

.activ-header__cta:hover,
.activ-header__cta:focus-visible {
	filter: brightness(1.1);
}

.activ-header__mobile-panel {
	background: var(--wp--preset--color--base);
	border-radius: 0 0 10px 10px;
	border-top: 1px solid #e3e3e3;
	display: none;
	inset-block-start: 100%;
	inset-inline: 0;
	margin: 0 !important;
	max-height: calc(100dvh - 72px);
	opacity: 0;
	overflow-y: auto;
	padding: 0;
	position: absolute;
	transform: translateY(-8px);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease,
		overlay 0.25s allow-discrete,
		display 0.25s allow-discrete;
	width: 100%;
}

.activ-header.is-mobile-open .activ-header__mobile-panel {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

@starting-style {
	.activ-header.is-mobile-open .activ-header__mobile-panel {
		opacity: 0;
		transform: translateY(-8px);
	}
}

.activ-header__mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.activ-header__mobile-item {
	border-bottom: 1px solid #e3e3e3;
	position: relative;
}

.activ-header__mobile-trigger {
	align-items: stretch;
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	display: flex;
	font-family: inherit;
	padding: 0;
	position: relative;
	text-align: start;
	transition: background-color 0.22s ease;
	width: 100%;
}

.activ-header__mobile-trigger::after {
	background: var(--wp--preset--color--contrast-2);
	content: "";
	display: block;
	height: 3px;
	inset-block-end: 0;
	inset-inline: 0;
	opacity: 0;
	position: absolute;
	transition: opacity 0.22s ease;
}

.activ-header__mobile-direct {
	align-items: center;
	color: var(--wp--preset--color--contrast);
	display: flex;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	min-height: 56px;
	padding: var(--wp--preset--spacing--5) var(--wp--preset--spacing--8);
	text-decoration: none;
	width: 100%;
}

.activ-header__mobile-label {
	align-items: center;
	display: flex;
	flex: 1;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 500;
	letter-spacing: -1px;
	line-height: 1;
	min-width: 0;
	padding: var(--wp--preset--spacing--8);
}

.activ-header__mobile-caret {
	align-items: center;
	align-self: stretch;
	border-left: 1px solid #e3e3e3;
	box-sizing: border-box;
	color: var(--wp--preset--color--neutral-500);
	display: flex;
	flex-shrink: 0;
	justify-content: center;
	padding: var(--wp--preset--spacing--8);
	transition: color 0.22s ease;
	width: 84px;
}

.activ-header__mobile-item.is-open .activ-header__mobile-trigger {
	background: #f4f4f4;
}

.activ-header__mobile-item.is-open .activ-header__mobile-trigger::after {
	opacity: 1;
}

.activ-header__mobile-item.is-open .activ-header__mobile-caret {
	color: var(--wp--preset--color--contrast-2);
}

.activ-header__mobile-chevron {
	display: block;
	flex-shrink: 0;
	height: 12px;
	transition: transform 0.25s ease;
	width: 24px;
}

.activ-header__mobile-item.is-open .activ-header__mobile-chevron {
	transform: rotate(-180deg);
}

.activ-header__mobile-submenu {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition:
		grid-template-rows 0.3s ease,
		opacity 0.22s ease;
}

.activ-header__mobile-item.is-open .activ-header__mobile-submenu {
	grid-template-rows: 1fr;
	opacity: 1;
}

.activ-header__mobile-submenu-inner {
	min-height: 0;
	overflow: hidden;
}

.activ-header__mobile-link {
	align-items: stretch;
	border-bottom: 1px solid #e3e3e3;
	color: inherit;
	display: flex;
	gap: 0;
	padding: 0;
	text-decoration: none;
}

.activ-header__mobile-link:last-child {
	border-bottom: 0;
}

.activ-header__mobile-link:hover,
.activ-header__mobile-link:focus-visible {
	background: #f4f4f4;
}

.activ-header__mobile-link-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
	padding: var(--wp--preset--spacing--6) var(--wp--preset--spacing--8) var(--wp--preset--spacing--6) 46px;
}

.activ-header__mobile-link-title {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 400;
	letter-spacing: -0.5px;
	line-height: 1.4;
}

.activ-header__mobile-link-desc {
	color: var(--wp--preset--color--neutral-700);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	letter-spacing: -0.5px;
	line-height: 1.4;
}

.activ-header__mobile-link-arrow {
	align-items: center;
	align-self: stretch;
	border-left: 1px solid #e3e3e3;
	box-sizing: border-box;
	color: var(--wp--preset--color--neutral-500);
	display: flex;
	flex-shrink: 0;
	justify-content: center;
	padding: var(--wp--preset--spacing--8);
	width: 84px;
}

.activ-header__mobile-link:hover .activ-header__mobile-link-arrow,
.activ-header__mobile-link:focus-visible .activ-header__mobile-link-arrow {
	color: var(--wp--preset--color--contrast);
}

.activ-header__mobile-link-arrow .activ-header__dropdown-arrow-icon {
	display: block;
	flex-shrink: 0;
	height: 24px;
	width: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.activ-header__mobile-panel,
	.activ-header__mobile-trigger,
	.activ-header__mobile-trigger::after,
	.activ-header__mobile-caret,
	.activ-header__mobile-chevron,
	.activ-header__mobile-submenu {
		transition: none;
	}

	.activ-header__mobile-panel,
	.activ-header.is-mobile-open .activ-header__mobile-panel {
		transform: none;
	}
}

html.activ-header-menu-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.activ-header__inner {
		min-height: 90px;
	}

	.activ-header__logo-image {
		width: 116px;
	}
}

/* Footer — 1440px / 1024px: py 80, px 60 */
.activ-footer {
	padding-block: var(--wp--preset--spacing--20);
	padding-inline: var(--activ-layout-padding-inline);
}

.activ-footer__main {
	box-sizing: border-box;
	display: grid !important;
	grid-template-areas:
		"logo menus"
		"desc menus"
		"social ."
		"bottom bottom";
	grid-template-columns: 300px minmax(0, 1fr);
	margin-inline: auto;
	max-width: 1440px;
	width: 100%;
}

.activ-footer__main > .wp-block-group.activ-footer__bottom,
.activ-footer__bottom {
	max-width: none;
	min-width: 0;
}

.activ-footer__logo {
	grid-area: logo;
	margin: 0 0 35px;
}

.activ-footer__logo img {
	display: block;
	height: auto;
	width: 187px;
}

.activ-footer__description {
	grid-area: desc;
	margin: 0 0 var(--wp--preset--spacing--15);
	max-width: 300px;
}

.activ-footer__menus {
	align-self: start;
	display: flex;
	gap: 166px;
	grid-area: menus;
	justify-self: end;
}

.activ-footer__menu {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--10);
}

.activ-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--3);
	grid-area: social;
	margin: 0;
}

.activ-footer__social .wp-block-social-link {
	height: 52px;
	width: 52px;
}

.activ-footer__social .wp-block-social-link-anchor {
	align-items: center;
	background: var(--wp--preset--color--base) !important;
	border-radius: 5px;
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast) !important;
	display: flex;
	height: 52px;
	justify-content: center;
	padding: var(--wp--preset--spacing--3);
	width: 52px;
}

.activ-footer__social .wp-block-social-link svg {
	fill: currentColor;
	height: 32px;
	width: 32px;
}

.activ-footer__bottom {
	align-items: flex-end;
	display: flex;
	grid-area: bottom;
	grid-column: 1 / -1;
	justify-content: space-between;
	justify-self: stretch;
	margin-top: var(--wp--preset--spacing--15);
	max-width: none;
	width: 100%;
}

.activ-footer__copyright {
	flex: 0 0 300px;
	margin: 0;
	max-width: 300px;
}

.activ-footer__disclaimer {
	flex: 0 0 427px;
	margin: 0;
	white-space: nowrap;
	width: 427px;
}

/* Figma: Subheading — 20px / 500 / 1.2 / -0.3125px (fixed at all breakpoints) */
.activ-footer h3.activ-footer__heading {
	color: var(--wp--preset--color--neutral-200);
	font-size: 20px !important;
	font-weight: 500;
	letter-spacing: -0.3125px;
	line-height: 1.2;
	margin: 0;
}

/* Figma: Body/M — 14px / 400 / 1.4 / -0.5px */
.activ-footer .activ-footer__navigation {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	letter-spacing: -0.5px;
	line-height: 1.4;
}

.activ-footer .activ-footer__navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--neutral-500);
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

.activ-footer .activ-footer__navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--neutral-200);
}

/* Figma: Body/S — 12px / 400 / 1.6 / 0 */
.activ-footer .has-xs-font-size,
.activ-footer__description,
.activ-footer__copyright,
.activ-footer__disclaimer {
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.6;
}

/* Footer — minimal variant (logo, description, copyright, disclaimer only) */
.activ-footer--minimal {
	padding-block: var(--wp--preset--spacing--15);
}

.activ-footer--minimal .activ-footer__main {
	grid-template-areas:
		"logo desc"
		"legal legal";
	grid-template-columns: minmax(187px, 396px) minmax(0, 1fr);
	row-gap: var(--wp--preset--spacing--20);
}

.activ-footer--minimal .activ-footer__logo {
	grid-area: logo;
	margin: 0;
}

.activ-footer--minimal .activ-footer__description {
	align-self: start;
	grid-area: desc;
	justify-self: start;
	margin: 0;
	max-width: 543px;
	width: 100%;
}

.activ-footer--minimal .activ-footer__legal {
	align-items: start;
	display: grid;
	grid-area: legal;
	grid-column: 1 / -1;
	grid-template-columns: subgrid;
}

.activ-footer--minimal .activ-footer__legal > .activ-footer__copyright,
.activ-footer--minimal .activ-footer__legal > .activ-footer__disclaimer,
.activ-footer--minimal .activ-footer__description {
	margin: 0;
}

.activ-footer--minimal .activ-footer__copyright {
	flex: unset;
	grid-area: auto;
	justify-self: start;
	margin: 0;
	max-width: none;
	width: auto;
}

.activ-footer--minimal .activ-footer__disclaimer {
	flex: unset;
	grid-area: auto;
	justify-self: start;
	margin: 0;
	max-width: 543px;
	white-space: nowrap;
	width: 100%;
}

@media (min-width: 1024px) {
	.activ-footer--minimal {
		padding-block: var(--wp--preset--spacing--20) calc(var(--wp--preset--spacing--15) + var(--wp--preset--spacing--3));
	}
}

/* Footer — ≤768px: flex stack — logo, desc, nav, social, legal */
@media (max-width: 768px) {
	:root {
		--activ-layout-padding-inline: var(--wp--preset--spacing--8);
	}

	.activ-footer__main {
		display: flex !important;
		flex-direction: column;
		gap: var(--wp--preset--spacing--10);
		grid-template-areas: none;
		grid-template-columns: none;
	}

	.activ-footer__logo,
	.activ-footer__description,
	.activ-footer__menus,
	.activ-footer__social,
	.activ-footer__bottom,
	.activ-footer__legal {
		grid-area: unset;
		grid-column: unset;
		justify-self: unset;
		max-width: none;
		width: 100%;
	}

	.activ-footer__logo,
	.activ-footer__description,
	.activ-footer__menus,
	.activ-footer__social,
	.activ-footer__bottom {
		margin: 0;
	}

	.activ-footer__logo {
		order: 1;
	}

	.activ-footer__description {
		order: 2;
	}

	.activ-footer__menus {
		align-self: stretch;
		display: flex;
		flex-wrap: wrap;
		gap: var(--wp--preset--spacing--10);
		justify-content: flex-start;
		order: 3;
	}

	.activ-footer__social {
		order: 4;
	}

	.activ-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--wp--preset--spacing--6);
		margin-top: 0;
		order: 5;
	}

	.activ-footer__menu {
		flex: 1 1 124px;
		gap: var(--wp--preset--spacing--10);
		min-width: 0;
	}

	.activ-footer__copyright,
	.activ-footer__disclaimer {
		flex: none;
		max-width: none;
		white-space: normal;
		width: 100%;
	}

	.activ-footer--minimal .activ-footer__main {
		display: flex !important;
		flex-direction: column;
		gap: 0;
		grid-template-areas: none;
		grid-template-columns: none;
	}

	.activ-footer--minimal .activ-footer__logo {
		margin: 0;
		order: 1;
	}

	.activ-footer--minimal .activ-footer__description {
		margin-block: var(--wp--preset--spacing--10) 0;
		order: 2;
	}

	.activ-footer--minimal .activ-footer__legal {
		display: flex;
		flex-direction: column;
		gap: 0;
		grid-template-columns: none;
		margin-block: var(--wp--preset--spacing--10) 0;
		order: 3;
		width: 100%;
	}

	.activ-footer--minimal .activ-footer__copyright {
		margin: 0;
		order: unset;
	}

	.activ-footer--minimal .activ-footer__disclaimer {
		margin-block: var(--wp--preset--spacing--6) 0;
		order: unset;
		white-space: normal;
	}

	/* Fallback when legal wrapper is absent from cached markup */
	.activ-footer--minimal .activ-footer__main > .activ-footer__copyright {
		margin-block: var(--wp--preset--spacing--10) 0;
		order: 3;
	}

	.activ-footer--minimal .activ-footer__main > .activ-footer__disclaimer {
		margin-block: var(--wp--preset--spacing--6) 0;
		order: 4;
		white-space: normal;
	}
}

/* Footer — ≤480px: tighter padding, smaller menu heading gap */
@media (max-width: 480px) {
	:root {
		--activ-layout-padding-inline: var(--wp--preset--spacing--6);
	}

	.activ-header__inner {
		min-height: 72px;
	}

	.activ-footer {
		padding-block: var(--wp--preset--spacing--15);
	}

	.activ-footer__menu {
		flex: 1 1 0;
		gap: var(--wp--preset--spacing--6);
	}
}

/* Block editor — header stays in document flow while editing */
.editor-styles-wrapper .activ-header,
.wp-block-activ-header .activ-header {
	inset: auto;
	position: relative;
	width: auto;
	z-index: auto;
}
