/*
 * La Huella · Header y footer
 * Las reglas llevan "html body" delante para ganarle al CSS adicional viejo del Personalizador.
 */

:root {
	--lh-dark: #20241a;
	--lh-olive: #333a24;
	--lh-cream: #f5f0e4;
	--lh-paper: #fcfaf3;
	--lh-gold: #b4894a;
	--lh-gold-dark: #98713a;
	--lh-header-h: 84px;
	--lh-header-h-min: 68px;
	--lh-admin-bar: 0px;
	--lh-sans: Archivo, system-ui, sans-serif;
	--lh-serif: Fraunces, Georgia, serif;
}

body.admin-bar {
	--lh-admin-bar: 32px;
}

@media (max-width: 782px) {
	:root {
		--lh-header-h: 64px;
		--lh-header-h-min: 60px;
	}
	body.admin-bar {
		--lh-admin-bar: 46px;
	}
}

html {
	scroll-padding-top: calc(var(--lh-header-h-min) + 16px);
}

/* Las páginas sin hero arrancan debajo del header. */
html body.lh-layout:not(.lh-has-hero) {
	padding-top: var(--lh-header-h);
}

/* El selector flotante de TranslatePress queda reemplazado por el del header. */
html body.lh-layout #trp-floater-ls,
html body.lh-layout .trp-floating-switcher {
	display: none !important;
}

.lh-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

html body .lh-ico {
	display: inline-block;
	flex: none;
	vertical-align: middle;
}

/* ---------- Botón ---------- */

html body .lh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 24px;
	border-radius: 100px;
	background: var(--lh-gold);
	color: #fff !important;
	font-family: var(--lh-sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

html body .lh-btn:hover,
html body .lh-btn:focus-visible {
	background: var(--lh-gold-dark);
	color: #fff !important;
}

html body .lh-btn .lh-ico {
	width: 18px;
	height: 18px;
	transition: transform 0.25s ease;
}

html body .lh-btn:hover .lh-ico {
	transform: translateX(3px);
}

html body .lh-btn--block {
	display: flex;
	width: 100%;
	padding: 18px 24px;
	font-size: 15px;
}

/* ---------- Idioma ---------- */

html body .lh-lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--lh-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
}

html body .lh-lang span {
	opacity: 0.35;
}

html body .lh-lang a {
	color: inherit !important;
	text-decoration: none !important;
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

html body .lh-lang a:hover,
html body .lh-lang a.is-active {
	opacity: 1;
}

/* ---------- Header ---------- */

html body .lh-header {
	position: fixed;
	top: var(--lh-admin-bar);
	left: 0;
	right: 0;
	z-index: 1000;
	color: var(--lh-olive);
	background: rgba(252, 250, 243, 0.94);
	-webkit-backdrop-filter: saturate(1.2) blur(14px);
	backdrop-filter: saturate(1.2) blur(14px);
	box-shadow: 0 1px 0 rgba(51, 58, 36, 0.08);
	transition: background-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease, transform 0.4s ease;
}

html body .lh-header__bar {
	display: flex;
	align-items: center;
	gap: 40px;
	max-width: 1320px;
	height: var(--lh-header-h);
	margin: 0 auto;
	padding: 0 40px;
	transition: height 0.35s ease;
}

html body .lh-header__logo {
	position: relative;
	display: block;
	flex: none;
	line-height: 0;
}

html body .lh-header .lh-logo {
	width: auto;
	height: 38px;
	max-width: none;
	transition: opacity 0.35s ease, height 0.35s ease;
}

html body .lh-header .lh-logo--blanco {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
}

html body .lh-header__nav {
	margin-left: auto;
}

html body .lh-header__nav ul {
	display: flex;
	gap: 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .lh-header__nav a {
	position: relative;
	display: block;
	padding: 6px 0;
	color: inherit !important;
	font-family: var(--lh-sans);
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none !important;
}

html body .lh-header__nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: var(--lh-gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

html body .lh-header__nav a:hover::after,
html body .lh-header__nav a:focus-visible::after,
html body .lh-header__nav a.is-current::after {
	transform: scaleX(1);
}

html body .lh-header__actions {
	display: flex;
	align-items: center;
	gap: 22px;
}

html body .lh-header__nav + .lh-header__actions {
	margin-left: 0;
}

html body .lh-header__actions:first-child,
html body .lh-header__logo + .lh-header__actions {
	margin-left: auto;
}

/* Hamburguesa (solo celular y tablet) */
html body .lh-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 -10px 0 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
	cursor: pointer;
}

html body .lh-header__toggle-lines {
	position: relative;
	display: block;
	width: 22px;
	height: 10px;
}

html body .lh-header__toggle-lines span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.35s ease, top 0.35s ease;
}

html body .lh-header__toggle-lines span:first-child {
	top: 0;
}

html body .lh-header__toggle-lines span:last-child {
	top: 8.5px;
}

/* Al scrollear: más bajo. Bajando se esconde; subiendo vuelve. */
html body .lh-header.is-scrolled .lh-header__bar {
	height: var(--lh-header-h-min);
}

html body .lh-header.is-scrolled .lh-logo {
	height: 32px;
}

html body .lh-header.is-hidden {
	transform: translateY(calc(-100% - var(--lh-admin-bar)));
}

/* Home: transparente sobre la foto hasta que se scrollea. */
html body .lh-header--hero:not(.is-scrolled),
html body .lh-header.is-menu-open {
	color: var(--lh-cream);
	background: linear-gradient(to bottom, rgba(20, 22, 16, 0.5), rgba(20, 22, 16, 0));
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: none;
}

html body .lh-header.is-menu-open {
	background: transparent;
}

html body .lh-header--hero:not(.is-scrolled) .lh-logo--blanco,
html body .lh-header.is-menu-open .lh-logo--blanco {
	opacity: 1;
}

html body .lh-header--hero:not(.is-scrolled) .lh-logo--negro,
html body .lh-header.is-menu-open .lh-logo--negro {
	opacity: 0;
}

/* ---------- Menú de celular ---------- */

html body .lh-menu {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	overflow-x: hidden;
	overflow-y: auto;
	background: radial-gradient(120% 70% at 100% 0%, #2c3223 0%, var(--lh-dark) 60%);
	color: var(--lh-cream);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

html body .lh-menu.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.35s ease;
}

/* La huella del logo, enorme y casi transparente, como marca de agua. */
html body .lh-menu__huella {
	position: absolute;
	right: -18%;
	bottom: -6%;
	width: 78%;
	max-width: 420px;
	height: auto;
	opacity: 0.06;
	filter: grayscale(1) brightness(2);
	pointer-events: none;
	transform: rotate(-12deg) scale(0.92);
	transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html body .lh-menu.is-open .lh-menu__huella {
	transform: rotate(-8deg) scale(1);
}

html body .lh-menu__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
	min-height: 100%;
	/* El JS ajusta el espacio de arriba a la altura real del header (y de la barra de WordPress). */
	padding: var(--lh-menu-top, calc(var(--lh-admin-bar) + var(--lh-header-h) + 12px)) 24px 28px;
}

html body .lh-menu__links {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

html body .lh-menu__links li {
	border-bottom: 1px solid rgba(245, 240, 228, 0.1);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
	transition-delay: var(--d, 0s);
}

html body .lh-menu.is-open .lh-menu__links li,
html body .lh-menu.is-open .lh-menu__reveal {
	opacity: 1;
	transform: none;
}

html body .lh-menu__links a {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 13px 0;
	color: var(--lh-cream) !important;
	text-decoration: none !important;
}

html body .lh-menu__num {
	flex: none;
	width: 22px;
	color: var(--lh-gold);
	font-family: var(--lh-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
}

html body .lh-menu__txt {
	flex: 1;
	font-family: var(--lh-serif);
	font-size: 29px;
	font-weight: 300;
	line-height: 1.1;
}

html body .lh-menu__links .lh-ico {
	align-self: center;
	width: 18px;
	height: 18px;
	color: rgba(245, 240, 228, 0.35);
	transition: transform 0.25s ease, color 0.25s ease;
}

html body .lh-menu__links a:active .lh-ico,
html body .lh-menu__links a:hover .lh-ico {
	color: var(--lh-gold);
	transform: translateX(4px);
}

/* Bloques de abajo: entran después de los links. */
html body .lh-menu__reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
	transition-delay: var(--d, 0.3s);
}

/* Tarjeta de la tiny house */
html body .lh-menu__card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 14px 10px 10px;
	border: 1px solid rgba(245, 240, 228, 0.14);
	border-radius: 18px;
	background: rgba(245, 240, 228, 0.05);
	color: var(--lh-cream) !important;
	text-decoration: none !important;
}

html body .lh-menu__card img {
	flex: none;
	width: 64px;
	height: 64px;
	max-width: none;
	border-radius: 12px;
	object-fit: cover;
}

html body .lh-menu__card > span {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-family: var(--lh-sans);
	line-height: 1.3;
}

html body .lh-menu__card small {
	color: var(--lh-gold);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

html body .lh-menu__card strong {
	font-family: var(--lh-serif);
	font-size: 20px;
	font-weight: 400;
}

html body .lh-menu__card em {
	color: rgba(245, 240, 228, 0.7);
	font-size: 13px;
	font-style: normal;
}

html body .lh-menu__card em .mphb-price,
html body .lh-menu__card em .mphb-currency {
	color: inherit !important;
	font: inherit !important;
}

html body .lh-menu__card .lh-ico {
	width: 18px;
	height: 18px;
	color: var(--lh-gold);
}

/* Datos útiles */
html body .lh-menu__info {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: rgba(245, 240, 228, 0.6);
	font-family: var(--lh-sans);
	font-size: 13px;
	line-height: 1.4;
}

html body .lh-menu__info li {
	display: flex;
	align-items: center;
	gap: 10px;
}

html body .lh-menu__info .lh-ico {
	width: 16px;
	height: 16px;
	color: var(--lh-gold);
}

/* Contacto e idioma */
html body .lh-menu__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 6px;
	font-family: var(--lh-sans);
	font-size: 13.5px;
}

html body .lh-menu__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

html body .lh-menu__contact a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px;
	border: 1px solid rgba(245, 240, 228, 0.18);
	border-radius: 100px;
	color: var(--lh-cream) !important;
	font-weight: 500;
	text-decoration: none !important;
}

html body .lh-menu__contact .lh-ico {
	width: 17px;
	height: 17px;
}

/* ES / EN como interruptor */
html body .lh-menu__lang {
	gap: 0 !important;
	padding: 3px;
	border: 1px solid rgba(245, 240, 228, 0.18);
	border-radius: 100px;
}

html body .lh-menu__lang span {
	display: none;
}

html body .lh-menu__lang a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 34px;
	padding: 0 10px;
	border-radius: 100px;
	opacity: 0.6 !important;
}

html body .lh-menu__lang a.is-active {
	background: var(--lh-cream);
	color: var(--lh-dark) !important;
	opacity: 1 !important;
}

@media (max-height: 700px) {
	html body .lh-menu__txt {
		font-size: 25px;
	}
	html body .lh-menu__links a {
		padding: 10px 0;
	}
	html body .lh-menu__inner {
		gap: 18px;
	}
}

html body.lh-menu-open {
	overflow: hidden;
}

/* ---------- Footer ---------- */

html body .lh-footer {
	position: relative;
	clear: both;
	padding: 88px 40px 0;
	background: var(--lh-dark);
	color: rgba(245, 240, 228, 0.72);
	font-family: var(--lh-sans);
	font-size: 14px;
	line-height: 1.6;
}

html body .lh-footer__inner {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1.15fr 1.35fr;
	gap: 56px;
	max-width: 1240px;
	margin: 0 auto;
}

html body .lh-footer__logo {
	display: inline-block;
	line-height: 0;
}

html body .lh-footer .lh-logo {
	width: auto;
	height: 40px;
	max-width: none;
}

html body .lh-footer__claim {
	max-width: 30ch;
	margin: 28px 0 28px;
	color: var(--lh-cream);
	font-family: var(--lh-serif);
	font-size: 20px;
	font-weight: 300;
	line-height: 1.45;
}

html body .lh-footer__social {
	display: flex;
	gap: 10px;
}

html body .lh-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(245, 240, 228, 0.22);
	border-radius: 50%;
	color: var(--lh-cream) !important;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

html body .lh-footer__social a:hover {
	border-color: var(--lh-gold);
	background: var(--lh-gold);
	color: #fff !important;
}

html body .lh-footer__title {
	margin: 6px 0 20px;
	padding: 0;
	color: var(--lh-gold);
	font-family: var(--lh-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

html body .lh-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .lh-footer__col li + li {
	margin-top: 12px;
}

html body .lh-footer__col a {
	color: var(--lh-cream) !important;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

html body .lh-footer__col a:hover {
	color: var(--lh-gold) !important;
}

html body .lh-footer__note {
	color: rgba(245, 240, 228, 0.55);
	font-size: 13px;
}

html body .lh-footer__col li.lh-footer__note:first-of-type {
	margin-top: 20px;
}

html body .lh-footer__contact a {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

html body .lh-footer__contact .lh-ico {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	color: var(--lh-gold);
}

html body .lh-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1240px;
	margin: 72px auto 0;
	padding: 26px 0 30px;
	border-top: 1px solid rgba(245, 240, 228, 0.12);
	color: rgba(245, 240, 228, 0.5);
	font-size: 12.5px;
}

html body .lh-footer__bottom .lh-lang {
	color: var(--lh-cream);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	html body .lh-header__nav ul {
		gap: 24px;
	}
	html body .lh-header__bar {
		gap: 28px;
		padding: 0 28px;
	}
}

@media (max-width: 1024px) {
	html body .lh-header__nav,
	html body .lh-header__lang {
		display: none;
	}
	html body .lh-header__actions {
		margin-left: auto;
		gap: 14px;
	}
	html body .lh-header__toggle {
		display: inline-flex;
	}
	html body .lh-header.is-menu-open .lh-header__toggle-lines span:first-child {
		top: 4.25px;
		transform: rotate(45deg);
	}
	html body .lh-header.is-menu-open .lh-header__toggle-lines span:last-child {
		top: 4.25px;
		transform: rotate(-45deg);
	}
	html body .lh-header.is-menu-open .lh-header__cta {
		opacity: 0;
		pointer-events: none;
	}

	html body .lh-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 48px 40px;
	}
	html body .lh-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1025px) {
	html body .lh-menu {
		display: none;
	}
}

@media (max-width: 782px) {
	html body .lh-header__bar {
		padding: 0 20px;
	}
	html body .lh-header .lh-logo {
		height: 30px;
	}
	html body .lh-header.is-scrolled .lh-logo {
		height: 28px;
	}
	html body .lh-header__cta {
		padding: 10px 18px;
		font-size: 12.5px;
	}
}

@media (max-width: 600px) {
	/* En celular la barra de WordPress no queda fija: el header va arriba de todo. */
	body.admin-bar {
		--lh-admin-bar: 0px;
	}

	html body .lh-footer {
		padding: 64px 24px 0;
	}
	html body .lh-footer__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	html body .lh-footer__claim {
		font-size: 19px;
	}
	html body .lh-footer__bottom {
		flex-direction: column-reverse;
		align-items: flex-start;
		margin-top: 56px;
	}
}

@media (max-width: 380px) {
	html body .lh-header .lh-logo {
		height: 26px;
	}
	html body .lh-header__cta {
		padding: 9px 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html body .lh-header,
	html body .lh-menu,
	html body .lh-menu__links li,
	html body .lh-menu__reveal,
	html body .lh-menu__huella {
		transition: none;
	}
}

/* ---------- 10/10: idioma, hamburguesa y menú de celular ---------- */

/* Selector de idioma del header: interruptor en píldora, como el del menú de celular. */
html body .lh-header__lang {
	gap: 0;
	padding: 3px;
	border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 100px;
	font-size: 11px;
	letter-spacing: 0.14em;
}

html body .lh-header__lang span {
	display: none;
}

html body .lh-header__lang a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 26px;
	padding: 0 9px;
	border-radius: 100px;
	opacity: 0.7;
	transition: opacity 0.2s ease, background 0.25s ease, color 0.25s ease;
}

html body .lh-header__lang a.is-active {
	background: var(--lh-gold);
	color: var(--lh-dark) !important;
	opacity: 1;
}

/* Hamburguesa con los íconos del sistema visual; pegada al borde derecho. */
html body .lh-header__toggle-ico {
	display: block;
	width: 26px;
	height: 26px;
}

html body .lh-header__toggle-ico--cerrar,
html body .lh-header.is-menu-open .lh-header__toggle-ico--abrir {
	display: none;
}

html body .lh-header.is-menu-open .lh-header__toggle-ico--cerrar {
	display: block;
}

@media (max-width: 1024px) {
	html body .lh-header__actions {
		gap: 22px;
	}
	html body .lh-header__toggle {
		margin-right: -12px;
	}
}

/* Menú de celular: sin scroll, contenido más centrado. */
html body .lh-menu__inner {
	box-sizing: border-box;
	min-height: 100%;
	gap: clamp(12px, 2.2vh, 22px);
}

html body .lh-menu nav {
	margin-top: clamp(8px, 4vh, 40px);
}

html body .lh-menu__links a {
	padding: clamp(8px, 1.5vh, 13px) 0;
}

html body .lh-menu__txt {
	font-size: clamp(23px, 3.6vh, 29px);
}

@media (max-height: 700px) {
	html body .lh-menu__info {
		display: none;
	}
}

@media (max-height: 600px) {
	html body .lh-menu .lh-menu__card {
		display: none;
	}
}

/* ---------- 10/10 (2): banderas, hamburguesa al borde, huella sin scroll ---------- */

/* El separador "/" no se usa: cada idioma es su píldora con bandera. */
html body .lh-lang > span[aria-hidden] {
	display: none;
}

html body .lh-lang a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

html body .lh-lang__flag {
	display: block;
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(245, 240, 228, 0.35);
}

html body .lh-lang a:not(.is-active) .lh-lang__flag {
	filter: saturate(0.6);
	opacity: 0.85;
}

html body .lh-lang__code {
	display: inline-block;
	line-height: 1;
}

/* Hamburguesa pegada al borde derecho de la pantalla. */
@media (max-width: 1024px) {
	html body .lh-header__toggle {
		width: 36px;
		margin-right: -16px;
	}
}

/* La huella del menú: fija a la pantalla (no estira el menú ni genera scroll) y un poco más arriba. */
html body .lh-menu__huella {
	position: fixed;
	bottom: 6%;
	right: -16%;
	max-height: 62vh;
	width: auto;
	max-width: 78vw;
}

/* Celular y tablet: con el menú de texto oculto, «Reservar» y la hamburguesa van contra el borde derecho.
   (La regla de escritorio «.lh-header__nav + .lh-header__actions { margin-left: 0 }» les quitaba el margen automático.) */
@media (max-width: 1024px) {
	html body .lh-header__nav + .lh-header__actions {
		margin-left: auto;
	}
}
/* Las rayas de la hamburguesa (20 px dentro de un botón de 36 px) quedan a 20 px del borde, igual que el logo a la izquierda. */
@media (max-width: 1024px) {
	html body .lh-header__toggle {
		margin-right: -8px;
	}
}
