/**
 * Theme Name:  La Rocca Maurizio SRL
 * Theme URI:   https://laroccamauriziosrl.it
 * Template:    twentytwentyfive
 * Description: Child theme of Twenty Twenty-Five for La Rocca Maurizio SRL — Impianti Tecnologici, Trapani.
 * Author:      La Rocca Maurizio SRL
 * Author URI:  https://laroccamauriziosrl.it
 * Version:     1.7.0
 * Requires at least: 6.7
 * Tested up to: 6.9
 * Requires PHP: 7.2
 * License:     GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: larocca-maurizio
 */

/* ==========================================================================
   Global
   ========================================================================== */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:root :where(p) {
	line-height: 1.7;
}

/* Focus — visible only on keyboard navigation (accessibility) */
:where(*:focus) {
	outline: none !important;
	box-shadow: none !important;
	border-color: transparent !important;
}
:where(*:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent-1) !important;
	outline-offset: 2px;
}

/* Remove current-page border on navigation links */
:root :where(.wp-block-navigation-item.current-menu-item > a),
:root :where(.wp-block-navigation-item > a:focus),
:root :where(.wp-block-navigation-item > a) {
	border: none !important;
	outline: none !important;
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */

:root :where(.site-header) {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--accent-5);
	padding-top: 0.5rem !important;
	padding-bottom: 0.5rem !important;
}

/* Site title — clean link style + red lightning bolt */
:root :where(.site-header .wp-block-site-title a) {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

:root :where(.site-header .wp-block-site-title a)::before {
	content: "";
	display: inline-block;
	width: 0.75em;
	height: 1.2em;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--accent-1);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath d='M10 0L0 16h7l-3 12L16 10H8z'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath d='M10 0L0 16h7l-3 12L16 10H8z'/%3E%3C/svg%3E");
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	animation: bolt-pulse 2.5s ease-in-out infinite;
}

@keyframes bolt-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* ==========================================================================
   Header — Responsive
   ========================================================================== */

.header-actions-desktop {
	display: none !important;
}

@media (min-width: 768px) {
	.header-actions-desktop {
		display: flex !important;
		align-items: center;
		gap: 1rem;
	}
}

:root :where(.header-phone a) {
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
	color: var(--wp--preset--color--contrast);
}

:root :where(.header-actions-desktop .wp-element-button) {
	border-radius: 0;
}

/* ==========================================================================
   Hero Section — Homepage
   ========================================================================== */

/* Remove WP core margin between site blocks (header → content → footer) */
:root :where(.wp-site-blocks > *) {
	margin-block-start: 0 !important;
}

/* Remove gap between header and hero */
:root :where(.wp-block-post-content > .wp-block-group.alignfull:first-child) {
	margin-top: 0 !important;
}

/* Remove default flow layout margin between full-width sections on homepage */
:root :where(.wp-block-post-content > .wp-block-group.alignfull + .wp-block-group.alignfull) {
	margin-block-start: 0 !important;
}

:root :where(.hero-home) {
	background: linear-gradient(rgba(17, 17, 17, 0.55), rgba(17, 17, 17, 0.65)),
		url("assets/images/hero-trapani.jpg") center / cover no-repeat;
	position: relative;
}

/* Force white text on all elements inside hero */
:root :where(.hero-home) h1,
:root :where(.hero-home) h2,
:root :where(.hero-home) p {
	color: var(--wp--preset--color--base);
}

:root :where(.hero-home) h1 {
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Hero subtitle — more visible */
:root :where(.hero-home) p {
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	font-weight: 500;
	font-size: 1.2rem !important;
	line-height: 1.8;
}

/* Hero outline button */
:root :where(.hero-home .is-style-outline .wp-element-button) {
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   Trust Badges Section
   ========================================================================== */

:root :where(.section-trust) .wp-block-column {
	text-align: center;
	padding: 1.75rem 1rem;
	border-radius: 8px;
}

:root :where(.section-trust) .wp-block-heading {
	color: var(--wp--preset--color--accent-1);
	font-weight: 800;
	line-height: 1;
	margin-bottom: 0.5rem;
}

:root :where(.section-trust) .wp-block-heading::after {
	content: "";
	display: block;
	width: 2rem;
	height: 3px;
	background-color: var(--wp--preset--color--accent-1);
	margin: 0.6rem auto 0;
	border-radius: 2px;
}

:root :where(.section-trust) p {
	line-height: 1.5;
}

/* ==========================================================================
   Services Section — Card Style
   ========================================================================== */

:root :where(.section-services) .wp-block-column {
	background-color: var(--wp--preset--color--base);
	padding: 1.75rem 1.5rem;
	border-radius: 8px;
	border-left: 3px solid var(--wp--preset--color--accent-1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

:root :where(.section-services) .wp-block-heading {
	margin-bottom: 0.5rem;
}

/* ==========================================================================
   Brands Section — Card Style with Aligned Buttons
   ========================================================================== */

:root :where(.section-brands) .wp-block-column.has-background {
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	border-top: 3px solid var(--wp--preset--color--accent-1);
	display: flex;
	flex-direction: column;
}

:root :where(.section-brands) .wp-block-column.has-background .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
}

/* ==========================================================================
   CTA Emergency Section
   ========================================================================== */

:root :where(.section-cta-emergency) {
	background: linear-gradient(135deg, #C8102E 0%, #8B0000 100%) !important;
}

:root :where(.section-cta-emergency) h2,
:root :where(.section-cta-emergency) p {
	color: var(--wp--preset--color--base) !important;
}

:root :where(.section-cta-emergency .is-style-outline .wp-element-button) {
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   Servizi Page — Navigation Index
   ========================================================================== */

:root :where(.servizi-index) {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
}

:root :where(.servizi-index) li {
	margin: 0;
}

:root :where(.servizi-index) a {
	display: inline-block;
	padding: 0.6rem 1.2rem;
	border: 2px solid var(--wp--preset--color--accent-1);
	border-radius: 4px;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--accent-1);
	background: var(--wp--preset--color--base);
	transition: background-color 0.2s ease, color 0.2s ease;
}

:root :where(.servizi-index) a:hover {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   Certifications Section — Card Style
   ========================================================================== */

:root :where(.section-certifications) .wp-block-column {
	background: var(--wp--preset--color--base);
	padding: 1.75rem 1.5rem;
	border-radius: 8px;
	border-top: 3px solid var(--wp--preset--color--accent-1);
	text-align: center;
}

:root :where(.section-certifications) .wp-block-heading {
	color: var(--wp--preset--color--accent-1);
	margin-bottom: 0.5rem;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

:root :where(.wp-block-details) {
	border-bottom: 1px solid var(--wp--preset--color--accent-5);
	padding: 0.75rem 0;
}

:root :where(.wp-block-details summary) {
	font-weight: 600;
	cursor: pointer;
	padding: 0.5rem 0;
}

:root :where(.wp-block-details[open] summary) {
	color: var(--wp--preset--color--accent-1);
}

/* ==========================================================================
   WhatsApp Floating Action Button
   ========================================================================== */

.whatsapp-fab {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 99;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #25d366;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	text-decoration: none;
}

.whatsapp-fab svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

@media (max-width: 767px) {
	.whatsapp-fab {
		display: none;
	}
}

/* ==========================================================================
   Mobile Bottom Bar — with iOS Safe Area
   ========================================================================== */

.mobile-bottom-bar {
	display: none;
}

@media (max-width: 767px) {
	.mobile-bottom-bar {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 100;
		background-color: var(--wp--preset--color--base);
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
		border-top: 1px solid var(--wp--preset--color--accent-5);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.mobile-bottom-bar a {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0.25rem;
		padding: 0.625rem 0;
		text-decoration: none;
		font-size: 0.75rem;
		font-weight: 600;
		color: var(--wp--preset--color--contrast);
	}

	.mobile-bottom-bar a.bottom-bar-whatsapp {
		color: #25d366;
	}

	.mobile-bottom-bar svg {
		width: 22px;
		height: 22px;
		fill: currentColor;
	}

	body {
		padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
	}

	:root :where(.site-footer) {
		margin-bottom: 0;
	}
}

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

:root :where(.site-footer) {
	border-top: 3px solid var(--wp--preset--color--accent-1);
}

:root :where(.footer-bottom) {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}

:root :where(.site-footer a) {
	color: var(--wp--preset--color--base);
	text-decoration-color: rgba(255, 255, 255, 0.3);
}

/* Footer contact items with inline SVG icons */
:root :where(.footer-contact-item) {
	padding-left: 1.5rem;
	position: relative;
	line-height: 1.5;
}

:root :where(.footer-contact-item)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1rem;
	height: 1rem;
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 0.7;
}

:root :where(.footer-contact-item:first-of-type)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

:root :where(.footer-contact-item:nth-of-type(2))::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 00-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z'/%3E%3C/svg%3E");
}

:root :where(.footer-contact-item:nth-of-type(3))::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

:root :where(.footer-contact-item:nth-of-type(4))::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Inner Pages — Title & Content Typography
   ========================================================================== */

:root :where(.wp-block-post-title) {
	font-size: var(--wp--preset--font-size--xx-large);
	text-align: center;
	margin-bottom: var(--wp--preset--spacing--50);
}

:root :where(.wp-block-post-content) p {
	max-width: 75ch;
}

:root :where(.wp-block-post-content) h2 {
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--30);
}

:root :where(.wp-block-post-content) h3 {
	margin-top: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--20);
}

:root :where(.wp-block-post-content) ul,
:root :where(.wp-block-post-content) ol {
	padding-left: 1.5rem;
}

:root :where(.wp-block-post-content) li {
	margin-bottom: 0.4rem;
}

/* ==========================================================================
   Utility — Sections
   ========================================================================== */

:root :where(.section-alternate) {
	background-color: var(--wp--preset--color--accent-5);
}

/* ==========================================================================
   Mobile Responsive — Header & Navigation
   ========================================================================== */

@media (max-width: 767px) {
	:root :where(.site-header .wp-block-site-title) {
		font-size: var(--wp--preset--font-size--large) !important;
	}

	/* ── Mobile Overlay Menu — Full-screen, centered, minimal ── */

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) {
		background-color: #111111 !important;
		color: #fff !important;
	}

	/* Animated lightning bolt background */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open)::after {
		content: "";
		position: fixed;
		top: 50%;
		left: 50%;
		width: 60vw;
		height: 60vw;
		max-width: 320px;
		max-height: 320px;
		transform: translate(-50%, -50%);
		background-color: var(--wp--preset--color--accent-1);
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath d='M10 0L0 16h7l-3 12L16 10H8z'/%3E%3C/svg%3E");
		-webkit-mask-size: contain;
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-position: center;
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath d='M10 0L0 16h7l-3 12L16 10H8z'/%3E%3C/svg%3E");
		mask-size: contain;
		mask-repeat: no-repeat;
		mask-position: center;
		opacity: 0.06;
		z-index: 0;
		pointer-events: none;
		animation: lightning-pulse 3s ease-in-out infinite;
	}

	@keyframes lightning-pulse {
		0%, 100% { opacity: 0.06; }
		50% { opacity: 0.12; }
	}

	/* Center the menu content vertically and horizontally */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__responsive-close {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: 100vh;
		min-height: 100dvh;
		padding: 5rem 2rem 3rem;
		position: relative;
		z-index: 1;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__responsive-container-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		width: 100%;
		max-width: 320px;
	}

	/* Navigation list — centered, no bullets */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__container {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		width: 100%;
	}

	/* Menu items — large, centered, generous spacing */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-item {
		width: 100%;
		text-align: center;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-item a {
		color: #fff !important;
		font-size: 1.5rem;
		font-weight: 500;
		letter-spacing: 0.02em;
		padding: 0.9rem 0;
		display: block;
		text-decoration: none;
		border-bottom: none;
		transition: color 0.2s ease;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-item a:hover {
		color: var(--wp--preset--color--accent-1) !important;
	}

	/* Subtle separator between items */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-item + .wp-block-navigation-item {
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	/* Close button — top right, clean */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__responsive-container-close {
		color: #fff !important;
		position: absolute;
		top: 1.25rem;
		right: 1.25rem;
		z-index: 10;
		background: none;
		border: none;
		padding: 0.5rem;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__responsive-container-close svg {
		width: 28px;
		height: 28px;
	}

	/* Submenu toggle (Marchi ▸) */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-submenu__toggle {
		color: #fff !important;
		font-size: 1.5rem;
		font-weight: 500;
		letter-spacing: 0.02em;
		background: none !important;
		border: none !important;
		padding: 0.9rem 0;
		justify-content: center;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation-submenu__toggle:hover {
		color: var(--wp--preset--color--accent-1) !important;
	}

	/* Submenu items — smaller, slightly muted */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__submenu-container {
		padding-left: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		border-top: none;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item a {
		font-size: 1.1rem;
		font-weight: 400;
		color: rgba(255, 255, 255, 0.65) !important;
		padding: 0.6rem 0;
	}

	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item a:hover {
		color: #fff !important;
	}

	/* Submenu separator — lighter */
	:root :where(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item + .wp-block-navigation-item {
		border-top: 1px solid rgba(255, 255, 255, 0.04);
	}

	/* Contact info at bottom of mobile menu */
	.mobile-menu-footer {
		margin-top: 2.5rem;
		padding-top: 1.5rem;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		text-align: center;
		display: flex;
		flex-direction: column;
		gap: 0.4rem;
	}

	.mobile-menu-footer a {
		color: var(--wp--preset--color--accent-1) !important;
		text-decoration: none;
		font-size: 1.1rem;
		font-weight: 600;
		letter-spacing: 0.03em;
	}

	.mobile-menu-footer span {
		color: rgba(255, 255, 255, 0.4);
		font-size: 0.8rem;
		letter-spacing: 0.02em;
	}
}

/* ==========================================================================
   Contact Form 7
   ========================================================================== */

:root :where(.wpcf7-form) p {
	margin-bottom: 1.25rem;
	max-width: none;
}

:root :where(.wpcf7-form) label {
	display: block;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0.35rem;
}

:root :where(.wpcf7-form) input[type="text"],
:root :where(.wpcf7-form) input[type="email"],
:root :where(.wpcf7-form) input[type="tel"],
:root :where(.wpcf7-form) select,
:root :where(.wpcf7-form) textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--accent-4);
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

:root :where(.wpcf7-form) input[type="text"]:focus,
:root :where(.wpcf7-form) input[type="email"]:focus,
:root :where(.wpcf7-form) input[type="tel"]:focus,
:root :where(.wpcf7-form) select:focus,
:root :where(.wpcf7-form) textarea:focus {
	border-color: var(--wp--preset--color--accent-1) !important;
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.15);
}

:root :where(.wpcf7-form) select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.25rem;
	padding-right: 2.5rem;
	cursor: pointer;
}

:root :where(.wpcf7-form) textarea {
	min-height: 160px;
	resize: vertical;
}

/* Two-column layout for name + email on desktop */
@media (min-width: 768px) {
	:root :where(.wpcf7-form) .cf7-row {
		display: flex;
		gap: 1.25rem;
	}

	:root :where(.wpcf7-form) .cf7-row > p {
		flex: 1;
	}
}

/* Privacy checkbox — inline alignment */
:root :where(.wpcf7-form) .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	cursor: pointer;
}

:root :where(.wpcf7-form) .wpcf7-acceptance input[type="checkbox"] {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
	accent-color: var(--wp--preset--color--accent-1);
	cursor: pointer;
}

/* Submit button */
:root :where(.wpcf7-form) input[type="submit"] {
	display: inline-block;
	padding: 0.875rem 2.5rem;
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	border: none;
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s ease;
	width: auto;
}

:root :where(.wpcf7-form) input[type="submit"]:hover {
	background-color: #a00d25;
}

/* Validation — error state */
:root :where(.wpcf7-form) .wpcf7-not-valid {
	border-color: #d32f2f !important;
}

:root :where(.wpcf7-form) .wpcf7-not-valid-tip {
	color: #d32f2f;
	font-size: 0.8125rem;
	margin-top: 0.25rem;
	display: block;
}

/* Response messages */
:root :where(.wpcf7-form) .wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 1rem 1.25rem;
	border-radius: 4px;
	font-size: var(--wp--preset--font-size--small);
}

:root :where(.wpcf7-form.sent) .wpcf7-response-output {
	border-color: #2e7d32;
	background-color: #e8f5e9;
	color: #2e7d32;
}

:root :where(.wpcf7-form.failed) .wpcf7-response-output,
:root :where(.wpcf7-form.aborted) .wpcf7-response-output,
:root :where(.wpcf7-form.invalid) .wpcf7-response-output {
	border-color: #d32f2f;
	background-color: #fce4ec;
	color: #d32f2f;
}

/* Spinner — loading state */
:root :where(.wpcf7-form) .wpcf7-spinner {
	margin-left: 1rem;
}

/* Remove default WP block margins between full-width sections */
:root :where(.wp-block-group.alignfull + .wp-block-group.alignfull) {
	margin-top: 0;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

:root :where(.page-404) {
	text-align: center;
	padding: 6rem 1rem 7rem;
}

:root :where(.page-404) .wp-block-heading,
:root :where(.page-404) p {
	margin-block-start: 0;
	margin-block-end: 0;
}

:root :where(.page-404-icon) {
	font-size: 8rem;
	line-height: 1;
	margin-bottom: 0.25rem !important;
}

:root :where(.page-404) .wp-block-buttons {
	margin-top: 2rem !important;
}
