/* Landing con el diseño de la home. Los tokens pisan el verde de CCU solo acá. */

html:has(body.ccu-landing-home) { background: #111; }

body.ccu-landing-home {
	--ccu-green: #00205c;
	--ccu-green-bright: #ff0000;
	--ccu-quote-gradient: none;
	background: #fff;
}

body.ccu-landing-home .site-main {
	overflow: visible;
	background: #fff;
}

body.ccu-landing-home .home-hero {
	height: 100svh;
	min-height: 100svh;
	margin: 0;
	padding: 0;
}

body.ccu-landing-home .home-feature__quote,
body.ccu-landing-home .page-statement--banner .page-statement__panel {
	background-color: var(--lh-plano, #00205c);
	background-image: none;
}

body.ccu-landing-home .home-feature__quote { top: -45px; }

body.ccu-landing-home .home-hero__cta:hover,
body.ccu-landing-home .home-hero__cta:focus-visible {
	background: #fff;
	color: #ff0000;
	text-decoration: none;
}

body.ccu-landing-home .home-feature,
body.ccu-landing-home .page-statement {
	scroll-margin-top: 24px;
}

.lh-chrome {
	position: absolute;
	z-index: 40;
	top: 0;
	right: 0;
	left: 0;
}

.lh-utility {
	background: rgb(40 40 40 / 10%);
	color: #fff;
	backdrop-filter: blur(10px);
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 2.4px;
	line-height: 30px;
}

.lh-utility__inner {
	display: flex;
	min-height: 50px;
	align-items: center;
	justify-content: flex-end;
}

.lh-utility ul,
.lh-nav ul {
	display: flex;
	gap: 1.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lh-nav ul { gap: 0; }

.lh-utility a {
	color: #fff;
	text-decoration: none;
}

.lh-utility a:hover,
.lh-utility a:focus-visible { text-decoration: underline; text-underline-offset: .25rem; }

.lh-bar { position: relative; }

.lh-bar__inner {
	display: flex;
	min-height: 102px;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.lh-logo {
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

.lh-logo img {
	/* Mismo tamaño que el logo de la home (120 x 44). Alto fijo y ancho según la
	   proporción del archivo: nunca se estira ni se recorta (object-fit). */
	display: block;
	width: auto;
	max-width: 180px;
	height: 44px;
	object-fit: contain;
	object-position: left center;
}

.lh-logo img.lh-logo-img--square { height: 60px; max-width: 120px; }

.lh-toggle {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.lh-toggle span[aria-hidden] {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	transform-origin: center;
	transition: transform 280ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}

.lh-toggle[aria-expanded="true"] span[aria-hidden]:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.lh-toggle[aria-expanded="true"] span[aria-hidden]:nth-child(3) { opacity: 0; }
.lh-toggle[aria-expanded="true"] span[aria-hidden]:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.lh-nav a {
	position: relative;
	display: block;
	padding: 10px 15px;
	color: #fff;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 2.88px;
	text-decoration: none;
	text-transform: uppercase;
}

.lh-nav > ul > li > a::before {
	position: absolute;
	right: 15px;
	bottom: 3px;
	left: 15px;
	height: 1px;
	background: #fff;
	content: '';
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 180ms ease;
}

.lh-nav > ul > li > a:hover::before,
.lh-nav > ul > li > a:focus-visible::before { transform: scaleX(1); }

.lh-nav__extra { display: none; }

.lh-logo:focus-visible,
.lh-nav a:focus-visible,
.lh-utility a:focus-visible,
.lh-whatsapp:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.lh-whatsapp {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	display: grid;
	width: 60px;
	height: 60px;
	place-items: center;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	box-shadow: 0 8px 24px rgb(0 0 0 / 22%);
	text-decoration: none;
}

.lh-whatsapp svg { width: 32px; height: 32px; fill: currentColor; }
.lh-whatsapp:hover,
.lh-whatsapp:focus-visible { background: #1ebe5d; }

body:has(.ccu-consent:not([hidden])) .lh-whatsapp { bottom: 108px; }

.lh-empty {
	margin: 0;
	padding: 48px 0 72px;
	color: var(--ccu-muted);
	text-align: center;
}

body.ccu-landing-home .site-footer__socials img {
	width: 25px;
	height: 25px;
	object-fit: contain;
}

@media (max-width: 1024px) {
	.lh-utility { display: none; }
	.lh-bar__inner { min-height: 72px; }
	.lh-toggle { display: flex; }
	.lh-nav {
		position: absolute;
		z-index: 50;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100dvh - 72px);
		overflow: auto;
		background: #232323;
	}
	.lh-nav.is-open { display: block; }
	.lh-nav ul { flex-direction: column; gap: 0; }
	.lh-nav__extra { display: block; border-top: 1px solid #444; }
	.lh-nav a {
		display: flex;
		min-height: 44px;
		align-items: center;
	}
	body.ccu-landing-home .home-feature__quote {
		display: flex;
		position: relative;
		top: auto;
		right: auto;
		width: min(275px, 100%);
		min-width: 0;
		margin: 16px 0 0 auto;
	}
	body.ccu-landing-home .page-statement--banner { display: block; }
	body.ccu-landing-home .page-statement--banner .page-statement__media {
		position: relative;
		height: 320px;
	}
	body.ccu-landing-home .page-statement--banner .page-statement__inner {
		height: auto;
		min-height: 0;
		justify-content: center;
		padding: 0 0 32px;
	}
	body.ccu-landing-home .page-statement--banner .page-statement__panel { margin-top: -48px; }
}

@media (max-width: 760px) {
	body.ccu-landing-home .page-statement--banner { display: block; }
	.lh-whatsapp { right: 16px; bottom: 16px; }
	body:has(.ccu-consent:not([hidden])) .lh-whatsapp { bottom: 128px; }
}

/* Estilo "Genérica (tipo home CCU)" de la plantilla Landing: colores de CCU
   (verde), plano azul editable y portada de alto normal o pantalla completa. */
body.ccu-landing-home.ccu-lh-generic {
	--ccu-green: #034e31;
	--ccu-green-bright: #57b847;
	--ccu-quote-gradient: linear-gradient(54deg, var(--ccu-green) 0%, var(--ccu-green-bright) 100%);
}

body.ccu-lh-generic .home-hero__cta:hover,
body.ccu-lh-generic .home-hero__cta:focus-visible { color: var(--ccu-green); }

body.ccu-landing-home .home-hero.lh-hero--normal {
	height: 720px;
	min-height: 720px;
}

@media (max-width: 760px) {
	body.ccu-landing-home .home-hero.lh-hero--normal {
		height: 560px;
		min-height: 560px;
	}
}

/* Logo del pie: mismo tamaño que el de la home (77 x 29), sin deformar. */
body.ccu-landing-home .site-footer__logo.lh-logo-img {
	width: auto;
	max-width: 120px;
	height: 29px;
	object-fit: contain;
	object-position: left center;
}
body.ccu-landing-home .site-footer__logo.lh-logo-img--square { height: 56px; max-width: 80px; }

@media (max-width: 760px) {
	.lh-logo img { height: 38px; max-width: 150px; }
	.lh-logo img.lh-logo-img--square { height: 48px; max-width: 96px; }
}

/* Ritmo vertical único del estilo genérico (tipo home CCU).
   Cada bloque lleva el mismo aire arriba y abajo de su contenido (--lh-s), sin
   márgenes entre bloques: entre dos bloques siempre hay 2 x --lh-s, en cualquier
   orden, y el último deja --lh-s antes del pie. El banner va a sangre (sin aire
   propio). El plano superpuesto del módulo Somos sobresale 45 px de la foto: ese
   bloque suma esos 45 px arriba para que el borde del plano respete el mismo aire. */
body.ccu-landing-home { --lh-s: 64px; --lh-quote-out: 45px; }
@media (max-width: 1024px) { body.ccu-landing-home { --lh-s: 56px; --lh-quote-out: 0px; } }
@media (max-width: 760px) { body.ccu-landing-home { --lh-s: 48px; } }

body.ccu-landing-home .site-main > .home-feature,
body.ccu-landing-home .site-main > .home-news,
body.ccu-landing-home .site-main > .page-statement--banner {
	min-height: 0;
	margin: 0;
	padding: var(--lh-s) 0;
}
body.ccu-landing-home .site-main > .page-statement--banner { padding: 0; }
body.ccu-landing-home .home-feature__grid { min-height: 0; }

@media (min-width: 1025px) {
	body.ccu-landing-home .site-main > .home-feature:has(.home-feature__quote) {
		padding-top: calc(var(--lh-s) + var(--lh-quote-out));
	}
	/* Somos: la foto queda dentro de su bloque (no invade el siguiente). */
	body.ccu-landing-home .home-feature--media-overflow .home-feature__image { margin: 0; }
	/* Marcas: la foto sale por la izquierda pero ocupa todo el alto del bloque. */
	body.ccu-landing-home .home-feature--media-offset-left .home-feature__grid { min-height: 660px; }
	body.ccu-landing-home .home-feature--media-offset-left .home-feature__image { top: 0; }
	/* Verde degradé: la figura recortada queda dentro del bloque. */
	body.ccu-landing-home .home-feature--theme-green-gradient .home-feature__grid { min-height: 560px; }
	body.ccu-landing-home .home-feature--theme-green-gradient .home-feature__image { top: 0; height: 560px; }
	body.ccu-landing-home .home-feature--theme-green-gradient .home-feature__image img { height: 560px; }
}
@media (max-width: 1024px) {
	body.ccu-landing-home .page-statement--banner .page-statement__inner { padding: 0; }
	/* El plano va debajo de la foto: la columna crece con él en vez de recortarlo. */
	body.ccu-landing-home .site-main > .home-feature.home-feature:has(.home-feature__quote) .home-feature__image { overflow: visible; aspect-ratio: auto; }
	body.ccu-landing-home .site-main > .home-feature.home-feature:has(.home-feature__quote) .home-feature__image > img,
	body.ccu-landing-home .site-main > .home-feature.home-feature:has(.home-feature__quote) .home-feature__media { height: auto; aspect-ratio: 16 / 9; }
	body.ccu-landing-home .home-feature--theme-green-gradient,
	body.ccu-landing-home .home-feature--theme-green-gradient.home-feature--media-contained { margin: 0; padding: var(--lh-s) 0; }
	body.ccu-landing-home .home-feature--theme-green-gradient .home-feature__image,
	body.ccu-landing-home .home-feature--theme-green-gradient.home-feature--media-contained .home-feature__image { margin-bottom: 0; }
}
