/**
 * Project contact page.
 *
 * Colors, backgrounds, borders and border radii are set from native Gutenberg
 * controls in the markup. This file covers what Gutenberg's block spacing
 * panel cannot express — responsive breakpoint steps for padding and type
 * scale — plus the soft shadows and the icon squares. Breakpoints and spacing
 * steps mirror the Tailwind reference 1:1 (sm=640px, md=768px, lg=1024px).
 *
 * It is enqueued on `enqueue_block_assets`, so the same rules apply on the
 * frontend and inside the editor canvas.
 */

.spx-project-contact {
	--spx-contact-radius-icon: 24px;
	--spx-contact-shadow-soft: 0 1px 2px rgba(22, 16, 16, 0.04), 0 8px 24px -12px rgba(237, 28, 128, 0.14);
	--spx-contact-shadow-card: 0 1px 3px rgba(22, 16, 16, 0.05), 0 12px 32px -16px rgba(237, 28, 128, 0.2);
	--spx-contact-icon-size: 44px;
	color: var(--wp--preset--color--spx-ink, #161010);
	font-family: var(--wp--preset--font-family--spx-base, "Poppins", "Inter", system-ui, sans-serif);
	line-height: 1.5;
	overflow-x: clip;
}

.spx-project-contact > * {
	margin-block-start: 0 !important;
}

.spx-project-contact a {
	text-decoration: none;
}

/* ---------------------------------------------------------------- Hero --- */

.spx-project-contact__hero-section {
	padding: 1.5rem 1.25rem 0 !important;
}

@media (min-width: 768px) {
	.spx-project-contact__hero-section {
		padding: 2.5rem 2.5rem 0 !important;
	}
}

@media (min-width: 1536px) {
	.spx-project-contact__hero-section {
		padding-inline: 4rem !important;
	}
}

.spx-project-contact__hero-card {
	box-shadow: var(--spx-contact-shadow-soft);
	padding: 1.5rem !important;
}

@media (min-width: 640px) {
	.spx-project-contact__hero-card {
		padding: 2.5rem !important;
	}
}

@media (min-width: 768px) {
	.spx-project-contact__hero-card {
		padding: 3.5rem !important;
	}
}

.spx-project-contact__hero-card > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__kicker {
	margin: 0 0 0.5rem !important;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.33;
	text-transform: uppercase;
}

.spx-project-contact__title {
	margin: 0 !important;
	font-size: 1.875rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
}

@media (min-width: 640px) {
	.spx-project-contact__title {
		font-size: 2.25rem;
		line-height: 1.1111;
	}
}

@media (min-width: 768px) {
	.spx-project-contact__title {
		font-size: 3rem;
		line-height: 1;
	}
}

.spx-project-contact__lead {
	max-width: 42rem;
	margin: 0.75rem auto 0 !important;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
}

@media (min-width: 640px) {
	.spx-project-contact__lead {
		font-size: 1rem;
	}
}

/* -------------------------------------------------------------- Layout --- */

.spx-project-contact__main {
	padding-inline: 1.25rem !important;
}

@media (min-width: 768px) {
	.spx-project-contact__main {
		padding-inline: 2.5rem !important;
	}
}

@media (min-width: 1536px) {
	.spx-project-contact__main {
		padding-inline: 4rem !important;
	}
}

.spx-project-contact__grid {
	margin-bottom: 0 !important;
}

.spx-project-contact__aside {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.spx-project-contact__aside > * {
	margin-block: 0 !important;
}

/* The reference layout keeps both cards side by side only from 1024px up. */
@media (max-width: 1023.98px) {
	.spx-project-contact__grid {
		flex-wrap: wrap !important;
	}

	.spx-project-contact__grid > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* --------------------------------------------------------------- Cards --- */

.spx-project-contact__card {
	box-shadow: var(--spx-contact-shadow-soft);
}

.spx-project-contact__map-card {
	overflow: hidden;
}

.spx-project-contact__card-head {
	padding: 1.25rem !important;
}

@media (min-width: 640px) {
	.spx-project-contact__card-head {
		padding: 1.75rem !important;
	}
}

.spx-project-contact__card-head > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__card-title {
	margin: 0.25rem 0 0 !important;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.4;
}

@media (min-width: 640px) {
	.spx-project-contact__card-title {
		font-size: 1.5rem;
		line-height: 1.3333;
	}
}

.spx-project-contact__card-text {
	margin: 0.5rem 0 0 !important;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.62;
}

/* ------------------------------------------------------------ Channels --- */

.spx-project-contact__channels,
.spx-project-contact__schedule {
	padding: 1.25rem !important;
}

@media (min-width: 640px) {
	.spx-project-contact__channels,
	.spx-project-contact__schedule {
		padding: 1.5rem !important;
	}
}

.spx-project-contact__channels {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.spx-project-contact__channels > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__item {
	align-items: center !important;
	gap: 0.75rem !important;
	padding: 0.5rem;
	border-radius: var(--spx-contact-radius-icon);
	transition: background-color 180ms ease;
}

.spx-project-contact__item::before {
	content: "";
	flex: 0 0 auto;
	width: var(--spx-contact-icon-size);
	height: var(--spx-contact-icon-size);
	border-radius: var(--spx-contact-radius-icon);
	background-color: var(--wp--preset--color--spx-surface, #ffeef5);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
}

.spx-project-contact__item:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--spx-surface, #ffeef5) 50%, transparent);
}

.spx-project-contact__item--whatsapp::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed1c80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E");
}

.spx-project-contact__item--phone::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed1c80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.spx-project-contact__item--address::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed1c80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.spx-project-contact__item-body {
	min-width: 0;
}

.spx-project-contact__item-body > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__item-label {
	margin: 0 !important;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.33;
}

.spx-project-contact__item-value {
	margin: 0.1rem 0 0 !important;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.43;
	overflow-wrap: anywhere;
}

.spx-project-contact__item-value a {
	color: inherit;
}

.spx-project-contact__item-value a:hover,
.spx-project-contact__item-value a:focus-visible {
	color: var(--wp--preset--color--spx-primary, #ed1c80);
}

/* ------------------------------------------------------------ Schedule --- */

.spx-project-contact__schedule > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__schedule-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 !important;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

.spx-project-contact__schedule-title::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed1c80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center / contain;
}

.spx-project-contact__schedule-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1rem !important;
}

.spx-project-contact__schedule-list > * {
	margin-block-start: 0 !important;
}

.spx-project-contact__schedule-row {
	align-items: center !important;
	gap: 1rem !important;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.43;
}

.spx-project-contact__schedule-row p {
	margin: 0 !important;
}

.spx-project-contact__schedule-row .spx-project-contact__schedule-value {
	font-weight: 600;
	text-align: right;
	color: var(--wp--preset--color--spx-ink, #161010);
}

/* -------------------------------------------------------------- Action --- */

.spx-project-contact__actions {
	margin-top: 1.25rem !important;
}

.spx-project-contact__whatsapp-button .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.43;
	box-shadow: 0 10px 24px -12px rgba(74, 192, 108, 0.75);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.spx-project-contact__whatsapp-button .wp-block-button__link::after {
	content: "";
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.spx-project-contact__whatsapp-button .wp-block-button__link:hover,
.spx-project-contact__whatsapp-button .wp-block-button__link:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px -12px rgba(74, 192, 108, 0.85);
}

/* --------------------------------------------------------------- Editor --- */

/* Gutenberg wraps every block in an extra element; keep the aside column
   spacing identical to the frontend inside the canvas. */
.editor-styles-wrapper .spx-project-contact__aside > .wp-block {
	margin-block: 0;
}
