/*
 * Yaqivent editorial polish.
 * Keeps the industrial photography and red accent; removes template-like
 * gradients, glass, oversized shadows and ornamental heading rules.
 */

:root {
	--yq-brand: #c91838;
	--yq-brand-deep: #9f142d;
	--yq-ink: #172033;
	--yq-muted: #526074;
	--yq-paper: #f7f4f1;
	--yq-line: rgba(23, 32, 51, 0.14);
	--yq-radius: 8px;
}

body {
	background: var(--yq-paper) !important;
	background-image: none !important;
	color: var(--yq-ink);
}

body #content,
body .site-content,
body .ast-container {
	background-color: transparent !important;
	background-image: none !important;
}

/* Flat, warm grounds make the photography and industrial subject lead. */
body
	#content
	.entry-content
	> .spectra-is-root-container:not(.has-image-background) {
	background-color: transparent !important;
	background-image: none !important;
}

/* The hero occupies one complete screen at every size. */
body.home
	.entry-content
	> .spectra-is-root-container.has-image-background:first-child {
	height: 100svh !important;
	min-height: 0 !important;
	max-height: 100svh !important;
	overflow: hidden !important;
	padding-bottom: clamp(34px, 6vh, 64px) !important;
	box-sizing: border-box;
}

/* Some translated hero layouts arrive with wrap enabled. Keep the hero in
 * one vertical flex flow so long copy cannot be pushed off the left edge. */
@media (min-width: 768px) {
	body.home
		.entry-content
		> .spectra-is-root-container.has-image-background:first-child {
		flex-wrap: nowrap !important;
		justify-content: center !important;
	}

	body.home .entry-content .has-image-background h1 {
		max-width: calc(100% - 48px) !important;
		margin-inline: auto !important;
		font-size: clamp(44px, 4.45vw, 64px) !important;
	}
}

body.home .entry-content .has-image-background h1 {
	font-weight: 700 !important;
	line-height: 1.08 !important;
	letter-spacing: -0.035em !important;
	text-wrap: balance;
}

body.home .entry-content .has-image-background p {
	font-size: clamp(16px, 1.25vw, 20px) !important;
	line-height: 1.5 !important;
	text-wrap: balance;
}

.yq-hero-fact {
	display: block;
	width: min(100%, 720px);
	margin: 12px auto 16px !important;
	color: rgba(255, 255, 255, 0.88) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: 0 !important;
	text-align: center;
	text-wrap: balance;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.68);
}

/* The same button geometry and restrained states across the page. */
.yq-hero-actions {
	gap: 12px !important;
	margin-top: 0 !important;
}

.yq-hero-actions .yq-hero-btn,
body #content .wp-block-spectra-button,
body #content .wp-block-button__link,
body #content .ast-button,
body #content .btn {
	border-radius: var(--yq-radius) !important;
	box-shadow: none !important;
	transition:
		transform 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease,
		color 180ms ease !important;
	white-space: nowrap;
}

.yq-hero-actions .yq-hero-btn--primary {
	background: var(--yq-brand) !important;
	border-color: var(--yq-brand) !important;
}

.yq-hero-actions .yq-hero-btn--secondary {
	background: rgba(15, 23, 42, 0.72) !important;
	border-color: rgba(255, 255, 255, 0.82) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

.yq-hero-actions .yq-hero-btn:hover,
body #content .wp-block-spectra-button:hover,
body #content .wp-block-button__link:hover,
body #content .ast-button:hover,
body #content .btn:hover {
	transform: translateY(-1px) !important;
	box-shadow: none !important;
}

.yq-hero-actions .yq-hero-btn--primary:hover {
	background: var(--yq-brand-deep) !important;
	border-color: var(--yq-brand-deep) !important;
}

.yq-hero-actions .yq-hero-btn--secondary:hover {
	background: rgba(15, 23, 42, 0.9) !important;
	border-color: #fff !important;
}

.yq-hero-actions .yq-hero-btn:active,
body #content .wp-block-spectra-button:active,
body #content .wp-block-button__link:active {
	transform: translateY(0) !important;
}

/* A quiet editorial type scale and a readable minimum for body copy. */
body #content .entry-content p,
body #content .entry-content li {
	font-size: 16px;
	line-height: 1.65;
}

body #content .entry-content h2,
body #content .entry-content h3,
body #content .entry-content h4 {
	text-wrap: balance;
}

/* Remove the repeated red underline motif from content headings. */
body #content .entry-content h2::after,
body #content .entry-content h3::after {
	display: none !important;
}

/* Keep the real photographs moving only a little under the pointer. */
body ul.products li.product,
body .factory-card,
body .service-card,
body .feature-card,
body .wp-block-spectra-container {
	box-shadow: none;
}

body ul.products li.product:hover,
body .factory-card:hover,
body .service-card:hover,
body .feature-card:hover {
	transform: translateY(-2px) !important;
	box-shadow: none !important;
}

body ul.products li.product:hover img,
body .wp-block-spectra-image:hover img,
body .spectra-image-block:hover img {
	transform: scale(1.025) !important;
}

/* Clear, restrained nav feedback instead of a second set of glyphs. */
.main-header-menu > .menu-item > .menu-link {
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 calc(100% - 10px);
	background-size: 0 1px;
	transition:
		color 180ms ease,
		background-size 220ms ease !important;
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item > .menu-link:focus-visible {
	background-size: 100% 1px;
}

/* Make the logo itself a full-height target on phones. */
.site-header .custom-logo-link {
	align-items: center;
	min-height: 44px;
}

/* Phone product cards become one readable column rather than clipped tiles. */
@media (max-width: 640px) {
	body ul.products {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 20px !important;
		margin: 0 !important;
		width: 100% !important;
	}

	body ul.products::before,
	body ul.products::after {
		display: none !important;
	}

	body ul.products li.product {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		min-width: 0 !important;
		box-sizing: border-box;
	}

	body
		ul.products
		li.product
		.woocommerce-loop-product__title,
	body ul.products li.product .ast-woo-product-category {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		overflow: visible !important;
		overflow-wrap: anywhere;
		white-space: normal !important;
		text-overflow: clip !important;
	}

	body
		ul.products
		li.product
		.woocommerce-loop-product__title {
		font-size: clamp(21px, 6.2vw, 26px) !important;
		line-height: 1.22 !important;
	}

	body ul.products li.product .ast-woo-product-category {
		font-size: 13px !important;
		line-height: 1.4 !important;
	}
}

/* Progressive disclosure keeps mobile overviews useful without deleting content. */
.yq-load-more {
	display: none;
	align-items: center;
	justify-content: center;
	width: min(100%, 320px);
	min-height: 48px;
	margin: 28px auto 0;
	padding: 12px 20px;
	border: 1px solid var(--yq-brand);
	border-radius: var(--yq-radius);
	background: transparent;
	color: var(--yq-brand);
	font: 600 15px/1.2 inherit;
	cursor: pointer;
}

.yq-load-more:hover {
	background: var(--yq-brand);
	color: #fff;
}

.yq-load-more:focus-visible {
	outline: 3px solid var(--yq-ink);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	body .yq-progressive-list > .yq-progressive-item,
	body .yq-progressive-item {
		display: none !important;
	}

	.yq-load-more:not([hidden]) {
		display: flex;
	}
}

/* Contact details are the page's purpose, so they read at body size. */
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	p,
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	strong {
	font-size: 16px !important;
	line-height: 1.55 !important;
}

body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	a[href^="mailto:"],
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	a[href^="tel:"] {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block: -10px;
	padding-block: 10px;
}

/* Mobile news categories read as one calm menu, not a broken uneven grid. */
@media (max-width: 640px) {
	body #content [data-spectra-id="spectra-4405554a"] {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-top: 1px solid var(--yq-line);
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		> .wp-block-spectra-container {
		grid-column: auto !important;
		width: 100% !important;
		padding: 0 !important;
		border-bottom: 1px solid var(--yq-line);
		background: transparent !important;
		box-shadow: none !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-buttons {
		display: flex !important;
		justify-content: flex-start !important;
		width: 100% !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button {
		justify-content: flex-start !important;
		width: 100% !important;
		min-height: 52px !important;
		padding: 12px 4px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		color: var(--yq-ink) !important;
		-webkit-text-fill-color: var(--yq-ink) !important;
		font-size: 15px !important;
		line-height: 1.35 !important;
		text-align: start !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button:hover {
		color: var(--yq-brand) !important;
		-webkit-text-fill-color: var(--yq-brand) !important;
	}
}

/* Menu accordions keep their visual plus, but expose one real button to keyboard users. */
.wpb_category_n_menu_accordion li {
	position: relative !important;
}

.wpb_category_n_menu_accordion .menu-link {
	padding-inline-end: 52px !important;
}

.wpb_category_n_menu_accordion .menu-link > .wpb-submenu-indicator {
	position: absolute !important;
	inline-size: 1px !important;
	block-size: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.yq-submenu-toggle {
	position: absolute;
	inset-inline-end: 0;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	padding: 0 !important;
	transform: translateY(-50%);
	border: 1px solid rgba(255, 255, 255, 0.36);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.yq-submenu-toggle:hover {
	background: rgba(255, 255, 255, 0.16);
}

.yq-submenu-toggle:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--yq-brand);
}

/* Projects use the same page edges as every other section. */
.yq-project-page
	.entry-content
	> .spectra-is-root-container.alignfull {
	width: 100vw !important;
	max-width: 100vw !important;
	padding-inline: 0 !important;
	margin-inline: calc(50% - 50vw) !important;
}

/* Phone navigation uses the whole screen instead of letting page actions show through. */
@media (max-width: 767px) {
	body.yq-menu-open {
		overflow: hidden !important;
	}

	body.yq-menu-open #ast-hf-mobile-menu {
		position: fixed !important;
		top: var(--yq-nav-height, 72px) !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 100vw !important;
		height: calc(100svh - var(--yq-nav-height, 72px)) !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		transform: none !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: flex-start !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		background: #0f1115 !important;
	}
}

/* The consent layer becomes a smaller, flatter decision panel. */
@media (max-width: 767px) {
	.surecookie-public-banner.surecookie-container-mobile {
		left: 12px !important;
		right: 12px !important;
		bottom: 12px !important;
		width: auto !important;
		max-width: calc(100vw - 24px) !important;
		padding: 12px 14px !important;
		border: 1px solid rgba(23, 32, 51, 0.14) !important;
		border-radius: 10px !important;
		background: rgba(255, 255, 255, 0.985) !important;
		box-shadow: 0 -1px 0 rgba(23, 32, 51, 0.08) !important;
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
		box-sizing: border-box;
	}

	.surecookie-public-banner .surecookie-content-mobile {
		gap: 8px !important;
	}

	.surecookie-public-banner .surecookie-branding-mobile {
		display: none !important;
	}

	.surecookie-public-banner .surecookie-banner-text-wrapper,
	.surecookie-public-banner .surecookie-banner-text-wrapper p {
		margin-block: 0 !important;
		font-size: 13px !important;
		line-height: 1.4 !important;
	}

	.surecookie-public-banner .surecookie-buttons-mobile {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 7px !important;
	}

	.surecookie-public-banner .surecookie-buttons-mobile button {
		width: 100% !important;
		min-width: 0 !important;
		min-height: 44px !important;
		padding: 8px 10px !important;
		border-radius: 6px !important;
		box-shadow: none !important;
		font-size: 13px !important;
		line-height: 1.2 !important;
	}

	.surecookie-public-banner .surecookie-accept-all-btn {
		background: var(--yq-brand) !important;
		border-color: var(--yq-brand) !important;
		color: #fff !important;
	}

	.surecookie-public-banner .surecookie-accept-btn {
		background: #fff !important;
		border: 1px solid var(--yq-line) !important;
		color: var(--yq-ink) !important;
	}

	.surecookie-public-banner .surecookie-preferences-btn,
	.surecookie-public-banner .surecookie-decline-btn {
		background: transparent !important;
		border-color: transparent !important;
		color: var(--yq-muted) !important;
	}
}

@media (max-width: 380px) {
	body.home .entry-content .has-image-background h1 {
		font-size: clamp(28px, 9vw, 32px) !important;
		line-height: 1.08 !important;
	}

	.yq-hero-fact {
		max-width: 280px;
		margin-block: 10px 12px !important;
		font-size: 13px !important;
	}

	.yq-hero-actions {
		gap: 8px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yq-hero-actions .yq-hero-btn,
	.main-header-menu > .menu-item > .menu-link,
	ul.products li.product,
	ul.products li.product img,
	.wp-block-spectra-container,
	.wp-block-spectra-image img {
		transition: none !important;
		transform: none !important;
	}
}
