/* ==========================================================================
   i-animese — estilos del child theme
   Header/footer de respaldo, formulario, foco visible y ajustes globales.
   El contenido de las páginas y (con PRO Elements) el header/footer
   se estilizan desde Elementor.
   ========================================================================== */

:root {
	--ianimese-text: #252525;
	--ianimese-muted: #5B6470;
	--ianimese-white: #FFFFFF;
	--ianimese-bg: #F6F8FA;
	--ianimese-sky: #EAF4FB;
	--ianimese-blue: #1769AA;
	--ianimese-blue-hover: #125689;
	--ianimese-navy: #12395B;
	--ianimese-green: #1F9D48;
	--ianimese-green-dark: #157A38;
	--ianimese-green-hover: #0F5F2B;
	--ianimese-orange: #E8772E;
	--ianimese-line: #E1E8EF;
	--ianimese-font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--ianimese-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--ianimese-header-height: 78px;
}

html {
	scroll-padding-top: calc(var(--ianimese-header-height) + 12px);
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	font-family: var(--ianimese-font-body);
	color: var(--ianimese-text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Foco visible en toda la web (teclado). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--ianimese-orange);
	outline-offset: 3px;
	border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Botón genérico (header de respaldo, formulario)
   -------------------------------------------------------------------------- */

.ianimese-btn,
body a.ianimese-btn,
body button.ianimese-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 2px solid var(--ianimese-blue);
	border-radius: 999px;
	background: var(--ianimese-blue);
	color: var(--ianimese-white);
	font-family: var(--ianimese-font-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ianimese-btn:hover,
.ianimese-btn:focus-visible,
body a.ianimese-btn:hover,
body a.ianimese-btn:focus-visible,
body button.ianimese-btn:hover,
body button.ianimese-btn:focus-visible {
	background: var(--ianimese-blue-hover);
	border-color: var(--ianimese-blue-hover);
	color: var(--ianimese-white);
}

.ianimese-btn--whatsapp,
body a.ianimese-btn--whatsapp {
	background: var(--ianimese-green-dark);
	border-color: var(--ianimese-green-dark);
}

.ianimese-btn--whatsapp:hover,
.ianimese-btn--whatsapp:focus-visible,
body a.ianimese-btn--whatsapp:hover,
body a.ianimese-btn--whatsapp:focus-visible {
	background: var(--ianimese-green-hover);
	border-color: var(--ianimese-green-hover);
}

.ianimese-btn--sm,
body a.ianimese-btn--sm {
	min-height: 42px;
	padding: 8px 18px;
	font-size: 14px;
}

/* --------------------------------------------------------------------------
   Header de respaldo (sin Theme Builder)
   -------------------------------------------------------------------------- */

.ianimese-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid var(--ianimese-line);
	transition: box-shadow .2s ease;
}

.ianimese-header.is-scrolled {
	box-shadow: 0 6px 24px rgba(18, 57, 91, 0.08);
}

.ianimese-header__inner {
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 24px;
	min-height: var(--ianimese-header-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ianimese-header__brand,
body a.ianimese-header__brand,
body a.ianimese-header__brand:hover {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--ianimese-navy);
}

.ianimese-header__logo {
	width: 118px;
	height: auto;
	display: block;
}

.ianimese-header__name {
	font-family: var(--ianimese-font-heading);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.ianimese-header__nav {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.ianimese-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.ianimese-menu li {
	margin: 0;
}

.ianimese-header .ianimese-menu a,
body .ianimese-header .ianimese-menu li a {
	display: inline-block;
	padding: 8px 14px;
	color: var(--ianimese-navy);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}

.ianimese-header .ianimese-menu a:hover,
.ianimese-header .ianimese-menu a:focus-visible,
.ianimese-header .ianimese-menu .current-menu-item > a,
.ianimese-header .ianimese-menu .current_page_item > a {
	color: var(--ianimese-blue);
	border-bottom-color: var(--ianimese-blue);
}

.ianimese-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	order: 3;
}

.ianimese-header__cta-icon {
	flex: 0 0 auto;
}

.ianimese-header__cta-text-short {
	display: none;
}

.ianimese-header__toggle,
body button.ianimese-header__toggle,
body button.ianimese-header__toggle:hover,
body button.ianimese-header__toggle:focus {
	display: none;
	color: var(--ianimese-navy);
	line-height: 1;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	background: transparent;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	border-radius: 8px;
}

.ianimese-header__toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--ianimese-navy);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

.ianimese-header__toggle[aria-expanded="true"] .ianimese-header__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.ianimese-header__toggle[aria-expanded="true"] .ianimese-header__toggle-bar:nth-child(2) {
	opacity: 0;
}

.ianimese-header__toggle[aria-expanded="true"] .ianimese-header__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
	.ianimese-header__toggle,
	body button.ianimese-header__toggle,
	body button.ianimese-header__toggle:hover,
	body button.ianimese-header__toggle:focus {
		display: flex;
	}

	.ianimese-header__nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		margin: 0;
		padding: 8px 20px 20px;
		background: var(--ianimese-white);
		border-bottom: 1px solid var(--ianimese-line);
		box-shadow: 0 16px 32px rgba(18, 57, 91, 0.1);
	}

	.ianimese-header__nav.is-open {
		display: block;
	}

	.ianimese-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.ianimese-header .ianimese-menu a {
		display: block;
		padding: 14px 4px;
		font-size: 17px;
		border-bottom: 1px solid var(--ianimese-line);
	}

	.ianimese-header .ianimese-menu li:last-child a {
		border-bottom-color: transparent;
	}

	.ianimese-header .ianimese-menu .current-menu-item > a {
		border-bottom-color: var(--ianimese-line);
	}
}

@media (max-width: 767px) {
	:root {
		--ianimese-header-height: 64px;
	}

	.ianimese-header__inner {
		padding: 6px 16px;
		gap: 8px;
	}

	.ianimese-header__logo {
		width: 92px;
	}

	.ianimese-header__cta {
		padding: 8px 14px;
	}

	.ianimese-header__cta-text {
		display: none;
	}

	.ianimese-header__cta-text-short {
		display: inline;
	}
}

/* --------------------------------------------------------------------------
   Footer de respaldo (sin Theme Builder)
   -------------------------------------------------------------------------- */

.ianimese-footer {
	background: var(--ianimese-navy);
	color: rgba(255, 255, 255, 0.82);
	font-size: 15px;
	line-height: 1.7;
}

.ianimese-footer a,
body .ianimese-footer a {
	color: var(--ianimese-white);
	text-decoration: none;
}

.ianimese-footer a:hover,
.ianimese-footer a:focus-visible,
body .ianimese-footer a:hover,
body .ianimese-footer a:focus-visible {
	color: #8FC3E8;
	text-decoration: underline;
}

.ianimese-footer__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 64px 24px 40px;
	display: grid;
	grid-template-columns: 1.3fr 1.1fr 1fr;
	gap: 32px;
}

.ianimese-footer__col p {
	margin: 0 0 8px;
}

.ianimese-footer__logo-box {
	display: inline-block;
	padding: 12px 16px;
	background: var(--ianimese-white);
	border-radius: 16px;
	margin-bottom: 14px;
}

.ianimese-footer__logo {
	width: 138px;
	height: auto;
	display: block;
}

.ianimese-footer__name,
.ianimese-footer p.ianimese-footer__name {
	font-family: var(--ianimese-font-heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--ianimese-white);
	margin: 0 0 4px;
}

.ianimese-footer__tagline {
	color: rgba(255, 255, 255, 0.62);
}

.ianimese-footer__social {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.ianimese-footer__heading,
.ianimese-footer h2.ianimese-footer__heading {
	font-family: var(--ianimese-font-body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #8FC3E8;
	margin: 0 0 12px;
}

.ianimese-footer__heading + .ianimese-footer__heading,
.ianimese-footer__menu + .ianimese-footer__heading {
	margin-top: 22px;
}

.ianimese-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ianimese-footer__menu li {
	margin-bottom: 6px;
}

.ianimese-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	text-align: center;
	padding: 18px 24px;
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.62);
}

.ianimese-footer__bottom p {
	margin: 0;
}

@media (max-width: 1024px) {
	.ianimese-footer__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.ianimese-footer__inner {
		grid-template-columns: 1fr;
		padding: 44px 20px 32px;
	}
}

/* Enlaces legales [ianimese_legal_links] (footer Theme Builder y fallback). */
.ianimese-legal {
	margin-top: 10px;
}

.ianimese-legal__title {
	font-family: var(--ianimese-font-body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #8FC3E8;
	margin: 0 0 12px;
	line-height: 1.4;
}

.ianimese-legal-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ianimese-legal-links li {
	margin: 0 0 6px;
}

.elementor-location-footer .ianimese-legal-links a,
body .elementor-location-footer .ianimese-legal-links a {
	color: rgba(255, 255, 255, 0.82);
	font-size: 15px;
	text-decoration: none;
}

.elementor-location-footer .ianimese-legal-links a:hover,
.elementor-location-footer .ianimese-legal-links a:focus-visible {
	color: var(--ianimese-white);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Formulario de contacto [ianimese_contact_form]
   -------------------------------------------------------------------------- */

.ianimese-form-wrap {
	scroll-margin-top: calc(var(--ianimese-header-height) + 24px);
}

.ianimese-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ianimese-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.ianimese-form__row {
		grid-template-columns: 1fr;
	}
}

.ianimese-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ianimese-form__field label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ianimese-navy);
}

.ianimese-form__field input,
.ianimese-form__field textarea,
.ianimese-form__field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--ianimese-line);
	border-radius: 12px;
	background: var(--ianimese-white);
	color: var(--ianimese-text);
	font-family: var(--ianimese-font-body);
	font-size: 16px;
	line-height: 1.4;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.ianimese-form__field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312395B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

.ianimese-form__field input:focus,
.ianimese-form__field textarea:focus,
.ianimese-form__field select:focus {
	outline: none;
	border-color: var(--ianimese-blue);
	box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.2);
}

.ianimese-form__field textarea {
	min-height: 140px;
	resize: vertical;
}

.ianimese-form__check {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.ianimese-form__check input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	padding: 0;
	flex: 0 0 auto;
	accent-color: var(--ianimese-blue);
	border-radius: 4px;
}

.ianimese-form__check label {
	font-weight: 500;
	color: var(--ianimese-text);
	line-height: 1.5;
}

.ianimese-form__check label a {
	color: var(--ianimese-blue);
	text-decoration: underline;
}

.ianimese-form__legal {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--ianimese-muted);
}

.ianimese-form__legal a {
	color: var(--ianimese-blue);
}

.ianimese-form__actions {
	align-items: flex-start;
}

.ianimese-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ianimese-form__notice {
	margin: 0 0 16px;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 15px;
}

.ianimese-form__notice--ok {
	background: #E4F4E9;
	color: #1B5E31;
	border: 1px solid #BFE1CB;
}

.ianimese-form__notice--error {
	background: #FBE9E4;
	color: #8A3A21;
	border: 1px solid #F0C7BA;
}

/* --------------------------------------------------------------------------
   Ajustes Elementor
   -------------------------------------------------------------------------- */

/* El logo (PNG con transparencia) nunca se recorta. */
.elementor-widget-image img[src*="logo-ianimese"] {
	object-fit: contain;
}

/* Botón WhatsApp del header del Theme Builder: texto corto en móvil. */
@media (max-width: 767px) {
	.elementor-location-header .ianimese-header-cta .elementor-button-text {
		font-size: 0;
	}

	.elementor-location-header .ianimese-header-cta .elementor-button-text::after {
		content: 'WhatsApp';
		font-size: 14px;
	}

	.elementor-location-header .ianimese-header-cta .elementor-button {
		padding: 9px 14px;
	}
}

/* Desplegable del menú móvil del Theme Builder por encima del contenido. */
.elementor-nav-menu--dropdown.elementor-nav-menu__container {
	z-index: 1000;
}

/* Iconos de los icon-box: tamaño mínimo del círculo para que no bailen. */
.elementor-widget-icon-box .elementor-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Páginas que no son Elementor (legales): ancho de lectura. */
body:not(.elementor-page) .page .entry-content,
body:not(.elementor-page) .site-main > .page {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
