/**
 * Pie: sin títulos UBICACIÓN / TELÉFONOS / CORREO / + INFO; iconos delante del texto.
 * data-chaniar-footer-icon en el contenedor del bloque (wrap o .e-con-inner) lo asigna footer-contact-columns.js
 */

html body .elementor-widget-heading.chaniar-footer-heading-hidden {
	display: none !important;
}

/* Enlaces del pie: correo en false-white (no heredar accent naranja del kit) */
html body [data-chaniar-footer-icon="mail"] a.chaniar-footer-contact-link {
	color: var(--chaniar-false-white, #f7f6f3) !important;
	text-decoration: none;
}

html body [data-chaniar-footer-icon]:not([data-chaniar-footer-icon="mail"]) a.chaniar-footer-contact-link {
	color: inherit;
	text-decoration: none;
}

html body [data-chaniar-footer-icon] a.chaniar-footer-contact-link:hover {
	text-decoration: underline;
}

html body [data-chaniar-footer-icon] a.chaniar-footer-contact-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Sin margen fantasma del heading oculto */
html body [data-chaniar-footer-icon] > .elementor-widget-text-editor:first-of-type {
	margin-block-start: 0 !important;
}

/*
 * Fila del pie (tablet+): columnas alineadas arriba. En móvil el contenedor del pie suele ser
 * flex-direction: column; align-items:flex-start empuja todo el bloque al inicio horizontal.
 */
@media (min-width: 768px) {
	html body .elementor-location-footer .elementor-top-section .elementor-container,
	html body [data-elementor-type="footer"] .elementor-top-section .elementor-container,
	html body footer .elementor-top-section .elementor-container {
		align-items: flex-start !important;
	}

	html body .elementor-location-footer .elementor-top-section .elementor-row,
	html body [data-elementor-type="footer"] .elementor-top-section .elementor-row {
		align-items: flex-start !important;
	}

	html body .elementor-location-footer .elementor-top-section .e-con.e-flex,
	html body [data-elementor-type="footer"] .elementor-top-section .e-con.e-flex {
		align-items: flex-start !important;
	}
}

/* --- Ubicación / correo: flex (icono + texto al mismo borde superior que teléfonos) --- */
html body [data-chaniar-footer-icon="location"] > .elementor-widget-text-editor,
html body [data-chaniar-footer-icon="mail"] > .elementor-widget-text-editor {
	margin-block: 0 !important;
	padding-block: 0 !important;
}

html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor > .elementor-widget-container,
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor > .elementor-widget-container {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.5rem;
	padding-inline-start: 0;
	position: static;
}

/* Correo: padding superior para alinear la primera línea con ubicación / WhatsApp */
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor > .elementor-widget-container {
	padding-top: 1.05rem;
	align-items: flex-start;
}

html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor > .elementor-widget-container::before,
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor > .elementor-widget-container::before {
	content: "";
	position: static;
	flex: 0 0 auto;
	width: 1.05rem;
	height: 1.05rem;
	margin-top: 0.15em;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	opacity: 0.95;
}

html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor > .elementor-widget-container::before {
	width: 1.06rem;
	height: 1.06rem;
	margin-top: 0.12em;
}

html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor > .elementor-widget-container > * {
	margin-block-start: 0 !important;
}

html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor p,
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor p {
	margin: 0 0 0.2em !important;
}

html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor p:last-child,
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor p:last-child {
	margin-bottom: 0 !important;
}

/* Ubicación: pin */
html body [data-chaniar-footer-icon="location"] .elementor-widget-text-editor > .elementor-widget-container::before {
	-webkit-mask-image: var(--chaniar-footer-icon-pin);
	mask-image: var(--chaniar-footer-icon-pin);
}

/* Teléfonos: WhatsApp en primera línea, teléfono clásico en la segunda */
html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p {
	position: relative;
	padding-inline-start: 1.65rem;
	margin: 0 0 0.35em;
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor > .elementor-widget-container {
	padding-inline-start: 0;
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor > .elementor-widget-container::before {
	display: none;
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:first-of-type::before,
html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:nth-of-type(2)::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.15em;
	width: 1.05rem;
	height: 1.05rem;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	opacity: 0.95;
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:first-of-type::before {
	-webkit-mask-image: var(--chaniar-footer-icon-whatsapp);
	mask-image: var(--chaniar-footer-icon-whatsapp);
}

html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:nth-of-type(2)::before {
	-webkit-mask-image: var(--chaniar-footer-icon-phone);
	mask-image: var(--chaniar-footer-icon-phone);
}

/* Si solo hay un bloque de texto (un solo <p>), un solo icono genérico */
html body [data-chaniar-footer-icon="phone"] .elementor-widget-text-editor p:only-of-type::before {
	-webkit-mask-image: var(--chaniar-footer-icon-phone);
	mask-image: var(--chaniar-footer-icon-phone);
}

/* Una sola línea y es WhatsApp: icono correcto (marca footer-contact-columns.js) */
html body [data-chaniar-footer-icon="phone"].chaniar-footer-phone-one-whatsapp .elementor-widget-text-editor p:only-of-type::before {
	-webkit-mask-image: var(--chaniar-footer-icon-whatsapp);
	mask-image: var(--chaniar-footer-icon-whatsapp);
}

/* Correo: sobre (mismo layout flex que ubicación) */
html body [data-chaniar-footer-icon="mail"] .elementor-widget-text-editor > .elementor-widget-container::before {
	-webkit-mask-image: var(--chaniar-footer-icon-mail);
	mask-image: var(--chaniar-footer-icon-mail);
}

:root {
	--chaniar-footer-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' 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.5S10.62 6.5 12 6.5s2.5 1.12 2.5 2.5S13.38 11.5 12 11.5z'/%3E%3C/svg%3E");
	--chaniar-footer-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.21z'/%3E%3C/svg%3E");
	--chaniar-footer-icon-whatsapp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' 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.435 9.884-9.881 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");
	--chaniar-footer-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.89 2 1.99 2H20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

/**
 * Móvil: teléfonos — iconos en otra columna o lista de iconos (space-between).
 * .chaniar-footer-phone-scope lo pone footer-contact-columns.js en el inner section / fila real.
 */
@media (max-width: 767px) {
	/* Inner section clásico: dos columnas (iconos | números) */
	html body .chaniar-footer-phone-scope .elementor-inner-section > .elementor-container > .elementor-row,
	html body .chaniar-footer-phone-scope > .elementor-widget-container .elementor-inner-section > .elementor-container > .elementor-row,
	html body .elementor-row.chaniar-footer-phone-scope {
		justify-content: center !important;
		column-gap: 0.65rem !important;
		row-gap: 0.35rem !important;
		flex-wrap: nowrap !important;
	}

	html body .chaniar-footer-phone-scope .elementor-inner-section .elementor-column,
	html body .elementor-row.chaniar-footer-phone-scope > .elementor-column {
		width: auto !important;
		max-width: 100% !important;
		flex: 0 1 auto !important;
		flex-basis: auto !important;
	}

	/* Descendientes del bloque teléfono (misma columna) */
	html body [data-chaniar-footer-icon="phone"] .elementor-container,
	html body [data-chaniar-footer-icon="phone"] .elementor-row {
		justify-content: center !important;
		column-gap: 0.65rem !important;
		row-gap: 0.35rem !important;
		flex-wrap: nowrap !important;
	}

	html body [data-chaniar-footer-icon="phone"] .elementor-column {
		width: auto !important;
		max-width: 100% !important;
		flex: 0 1 auto !important;
		flex-basis: auto !important;
	}

	html body [data-chaniar-footer-icon="phone"] .e-flex,
	html body [data-chaniar-footer-icon="phone"] .e-con.e-flex,
	html body [data-chaniar-footer-icon="phone"] .e-con-inner.e-flex,
	html body .chaniar-footer-phone-scope.e-flex,
	html body .chaniar-footer-phone-scope > .e-con-inner {
		justify-content: center !important;
		column-gap: 0.65rem !important;
		row-gap: 0.35rem !important;
	}

	/*
	 * Lista de iconos Elementor: el kit suele poner justify-content: space-between y/o
	 * margin-inline-start: auto / flex-grow: 1 en .elementor-icon-list-text (empuja el número al otro lado).
	 */
	html body [data-chaniar-footer-icon="phone"] .elementor-widget-icon-list .elementor-icon-list-item,
	html body [data-chaniar-footer-icon="phone"] .elementor-widget-icon-list .elementor-icon-list-item > a {
		display: flex !important;
		justify-content: flex-start !important;
		align-items: center !important;
		column-gap: 0.55rem !important;
		flex-wrap: nowrap !important;
		width: auto !important;
		max-width: 100% !important;
	}

	html body [data-chaniar-footer-icon="phone"] .elementor-widget-icon-list .elementor-icon-list-text {
		flex: 0 1 auto !important;
		flex-grow: 0 !important;
		text-align: start !important;
		white-space: normal !important;
		margin-inline-start: 0 !important;
		margin-inline-end: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: auto !important;
		max-width: none !important;
	}

	html body .chaniar-footer-phone-scope .elementor-widget-icon-list .elementor-icon-list-item,
	html body .chaniar-footer-phone-scope .elementor-widget-icon-list .elementor-icon-list-item > a {
		display: flex !important;
		justify-content: flex-start !important;
		align-items: center !important;
		column-gap: 0.55rem !important;
		flex-wrap: nowrap !important;
		width: auto !important;
		max-width: 100% !important;
	}

	html body .chaniar-footer-phone-scope .elementor-widget-icon-list .elementor-icon-list-text {
		flex: 0 1 auto !important;
		flex-grow: 0 !important;
		text-align: start !important;
		margin-inline-start: 0 !important;
		margin-inline-end: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: auto !important;
		max-width: none !important;
	}

}
