/* Sección mapa + contacto */
.contact-split-section {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	overflow: hidden;
	height: calc(100vh - var(--ofizen-header-height, 64px) - 36px);
	scroll-margin-top: var(--ofizen-header-height, 64px);
}

/* Compensar admin bar de WordPress (32px desktop, 46px mobile) */
body.admin-bar .contact-split-section {
	height: calc(100vh - var(--ofizen-header-height, 64px) - 36px - 32px);
}
@media screen and (max-width: 782px) {
	body.admin-bar .contact-split-section {
		height: calc(100vh - var(--ofizen-header-height, 64px) - 36px - 46px);
	}
}

/* Encabezado de sección */
.contact-header {
	flex: 0 0 auto;
	text-align: center;
	padding: 16px 20px 20px;
	background: #ffffff;

	/* animación entrada */
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.contact-header.visible {
	opacity: 1;
	transform: translateY(0);
}

.contact-eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	line-height: 1;
	opacity: 0.9;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #666666;
}

.contact-section-title {
	margin: 0 0 6px;
	font-size: 28px;
	line-height: 1.05;
	font-weight: 600;
	color: #111;
}

.contact-section-sub {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #555;
}

/* Contenedor split */
.contact-body {
	display: flex;
	flex: 1 1 auto;
	overflow: hidden;
}

/* Mitad izquierda: mapa */
.contact-map {
	flex: 0 0 50%;
	width: 50%;
	height: 100%;
	position: relative;
	overflow: hidden;
}

.contact-body .contact-map {
	height: 100%;
}

.contact-map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Mitad derecha: formulario */
.contact-form {
	flex: 0 0 50%;
	width: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	border-left: 1px solid #ebebeb;
}

.contact-form-inner {
	width: 100%;
	max-width: 440px;
	padding: 16px 32px;
	box-sizing: border-box;
	overflow-y: auto;
	max-height: 100%;

	/* animación entrada */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.contact-form-inner.visible {
	opacity: 1;
	transform: translateY(0);
}

/* (legacy — ya no se usan en el PHP) */

/* Campos */
.cf-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
}

.cf-field label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #888;
}

.cf-field label span {
	font-weight: 400;
	text-transform: none;
	color: #bbb;
	letter-spacing: 0;
}

.cf-field input,
.cf-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 0;
	border: none;
	border-bottom: 1.5px solid #d8d8d8;
	border-radius: 0;
	font-size: 14px;
	color: #111;
	background: transparent;
	outline: none;
	transition: border-color 0.25s ease;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
	color: #c0c0c0;
}

.cf-field input:focus,
.cf-field textarea:focus {
	border-bottom-color: #2a21df;
}

.cf-field textarea {
	resize: none;
	min-height: 72px;
}

.cf-submit {
	margin-top: 8px;
	padding: 13px 24px;
	background: #2a21df;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	width: 100%;
	transition: background 0.2s ease, transform 0.15s ease;
}

.cf-submit:hover {
	background: #1e17b0;
	transform: translateY(-1px);
}

.cf-submit:active {
	transform: translateY(0);
}

.cf-notice {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 20px;
}

.cf-notice--ok {
	background: #eafaf1;
	color: #1a7a43;
	border: 1px solid #b2dfcc;
}

.cf-notice--error {
	background: #fdf2f2;
	color: #9b2424;
	border: 1px solid #f0bcbc;
}

.cf-notice--error a {
	color: #9b2424;
}

/* Popup de éxito */
.cf-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: cfFadeIn 0.25s ease;
}

@keyframes cfFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.cf-popup {
	background: #fff;
	border-radius: 12px;
	padding: 48px 40px 40px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0,0,0,0.2);
	animation: cfSlideUp 0.3s ease;
}

@keyframes cfSlideUp {
	from { transform: translateY(24px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

.cf-popup-icon {
	width: 56px;
	height: 56px;
	background: #2a21df;
	color: #fff;
	font-size: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.cf-popup-title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: #111;
}

.cf-popup-text {
	margin: 0 0 28px;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
}

.cf-popup-close {
	padding: 11px 28px;
	background: #2a21df;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cf-popup-close:hover {
	background: #1e17b0;
}

/* Responsive */
@media (max-width: 780px) {
	.contact-split-section {
		height: auto !important;
		min-height: calc(100vh - var(--ofizen-header-height, 64px) - 36px);
	}

	.contact-body {
		flex-direction: column;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.contact-map {
		flex: 0 0 220px !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 220px !important;
		min-height: unset !important;
		position: relative;
	}

	.contact-form {
		flex: 1 1 auto !important;
		width: 100% !important;
		max-width: 100% !important;
		min-height: 0;
		align-items: flex-start;
		overflow: visible;
		border-left: none;
		border-top: 1px solid #ebebeb;
	}

	.contact-form-inner {
		padding: 24px 20px 32px;
		max-height: none;
		max-width: 100%;
		width: 100%;
		box-sizing: border-box;
	}
}
