/**
 * Header Live Consulting Perú — barra fija con efecto vidrio (glass).
 * Referencia Figma: nodo 65:16580 (1920x80).
 *   Fondo   : rgba(0,0,0,.20) sobre rgba(29,29,29,.30) + desenfoque
 *   Menú    : Montserrat SemiBold 20px, blanco, separación 50px
 *   Botón   : 198x47, radio 50px, #7dd230
 */

:root {
	--lc-header-h: 80px;
	--lc-green: #7dd230;
	--lc-green-dark: #6bb926;
}

/* ============================================================
   Barra
   ============================================================ */

.lc-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9990;
	height: var(--lc-header-h);
	isolation: isolate;

	/* Capa 1 — tinte oscuro translúcido (rellenos del Figma, aligerados para
	   que el desenfoque de lo que hay detrás siga siendo visible). */
	background-color: rgba(24, 34, 18, .30);

	/* Capa 2 — vidrio: reflejo especular a -45° (luz desde arriba-izquierda).
	   Es lo que convierte el gris plano en algo que se lee como cristal. */
	background-image: linear-gradient(
		135deg,
		rgba(255, 255, 255, .26) 0%,
		rgba(255, 255, 255, .10) 26%,
		rgba(255, 255, 255, .02) 46%,
		rgba(255, 255, 255, 0) 62%,
		rgba(255, 255, 255, .12) 100%
	);

	/* Desenfoque amplio + saturación: el color de lo que pasa por debajo
	   "sangra" a través del cristal en vez de quedar apagado. */
	-webkit-backdrop-filter: blur(30px) saturate(190%) brightness(1.06);
	backdrop-filter: blur(30px) saturate(190%) brightness(1.06);

	/* Cantos: filo superior brillante y borde inferior tenue = grosor de vidrio. */
	border-bottom: 1px solid rgba(255, 255, 255, .22);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .5),
		inset 0 -1px 0 rgba(255, 255, 255, .1),
		0 10px 30px rgba(0, 0, 0, .18);

	transition: background-color .25s ease, box-shadow .25s ease;
}

/* Brillo diagonal que recorre la barra — el "highlight" del material Glass. */
.lc-header::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		115deg,
		rgba(255, 255, 255, 0) 30%,
		rgba(255, 255, 255, .13) 45%,
		rgba(255, 255, 255, 0) 58%
	);
}

/* Sobre páginas de fondo claro el tinte sube para que el texto blanco
   siga legible; el vidrio (desenfoque + reflejo) se mantiene igual. */
.lc-header--over-light {
	background-color: rgba(24, 34, 18, .56);
}

.lc-header--over-light.is-scrolled {
	background-color: rgba(18, 28, 12, .66);
}

/* Navegadores sin backdrop-filter: se compensa con un fondo más sólido. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.lc-header {
		background-color: rgba(20, 32, 14, .82);
	}
}

/* Al hacer scroll el fondo se refuerza para mantener el contraste. */
.lc-header.is-scrolled {
	background-color: rgba(18, 28, 12, .42);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .45),
		inset 0 -1px 0 rgba(255, 255, 255, .1),
		0 12px 34px rgba(0, 0, 0, .26);
}

/* Reserva de espacio en las páginas donde el header NO va sobre el hero. */
.lc-header__spacer {
	height: var(--lc-header-h);
}

.lc-header__inner {
	position: relative;
	z-index: 1; /* por encima del reflejo .lc-header::after */
	max-width: 1440px;
	height: 100%;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	box-sizing: border-box;
}

.lc-header a {
	text-decoration: none;
}

/* ============================================================
   Logo
   ============================================================ */

.lc-header__brand {
	display: flex;
	align-items: center;
	min-width: 0;
}

.lc-header__brand .custom-logo-link {
	display: block;
	line-height: 0;
}

.lc-header__brand img {
	display: block;
	width: auto;
	height: 56px;
	max-width: 220px;
	object-fit: contain;
}

.lc-header__brand-text {
	font-family: Montserrat, var(--OZ-Font-Headings, system-ui), sans-serif;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
}

/* ============================================================
   Menú
   ============================================================ */

.lc-header__nav {
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.lc-menu li {
	position: relative;
	list-style: none;
}

.lc-menu > li > a {
	display: inline-block;
	padding-bottom: 8px;
	border-bottom: 3px solid transparent;
	font-family: Montserrat, var(--OZ-Font-Headings, system-ui), sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	transition: color .2s ease, border-color .2s ease;
}

.lc-menu > li > a:hover,
.lc-menu > li > a:focus-visible {
	border-bottom-color: rgba(125, 210, 48, .55);
}

/* Página actual: subrayado verde. */
.lc-menu > li.current-menu-item > a,
.lc-menu > li.current-menu-ancestor > a,
.lc-menu > li.current_page_item > a,
.lc-menu > li.current_page_parent > a {
	border-bottom-color: var(--lc-green);
}

/* --- Submenús (2.º nivel) --- */

.lc-menu .sub-menu {
	position: absolute;
	top: calc(100% + 18px);
	left: 0;
	min-width: 230px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: rgba(18, 30, 12, .92);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.lc-menu > li:hover > .sub-menu,
.lc-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.lc-menu .sub-menu a {
	display: block;
	padding: 10px 20px;
	font-family: Montserrat, var(--OZ-Font-Headings, system-ui), sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	transition: background-color .2s ease, color .2s ease;
}

.lc-menu .sub-menu a:hover,
.lc-menu .sub-menu a:focus-visible {
	background: rgba(125, 210, 48, .18);
	color: var(--lc-green);
}

/* ============================================================
   Acciones (botón + hamburguesa)
   ============================================================ */

.lc-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
}

.lc-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 198px;
	height: 47px;
	padding: 0 24px;
	border-radius: 50px;
	background: var(--lc-green);
	font-family: Montserrat, var(--OZ-Font-Headings, system-ui), sans-serif;
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	box-sizing: border-box;
	transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.lc-header__cta:hover,
.lc-header__cta:focus-visible {
	background: var(--lc-green-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(125, 210, 48, .35);
}

/* Copia del botón dentro del panel móvil. */
.lc-header__cta--mobile {
	display: none;
}

.lc-header__burger {
	display: none;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

.lc-header__burger:hover {
	background: rgba(255, 255, 255, .1);
}

.lc-header__burger-bars,
.lc-header__burger-bars::before,
.lc-header__burger-bars::after {
	display: block;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transition: transform .25s ease, opacity .2s ease;
}

.lc-header__burger-bars {
	position: relative;
}

.lc-header__burger-bars::before,
.lc-header__burger-bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.lc-header__burger-bars::before {
	top: -8px;
}

.lc-header__burger-bars::after {
	top: 8px;
}

.lc-header__burger[aria-expanded="true"] .lc-header__burger-bars {
	background: transparent;
}

.lc-header__burger[aria-expanded="true"] .lc-header__burger-bars::before {
	transform: translateY(8px) rotate(45deg);
}

.lc-header__burger[aria-expanded="true"] .lc-header__burger-bars::after {
	transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1280px) {
	.lc-menu {
		gap: 30px;
	}

	.lc-menu > li > a {
		font-size: 18px;
	}

	.lc-header__cta {
		min-width: 0;
		font-size: 18px;
	}
}

@media (max-width: 1024px) {
	:root {
		--lc-header-h: 70px;
	}

	.lc-header__inner {
		grid-template-columns: auto 1fr;
		padding: 0 18px;
	}

	.lc-header__brand img {
		height: 44px;
	}

	.lc-header__burger {
		display: inline-flex;
	}

	/* El botón grande vive dentro del panel en móvil. */
	.lc-header__actions > .lc-header__cta {
		display: none;
	}

	.lc-header__cta--mobile {
		display: inline-flex;
		width: 100%;
	}

	/* Cajón lateral: entra deslizándose desde el borde derecho.
	   El tinte es mucho más opaco que el de la barra a propósito: aquí hay
	   texto largo encima del contenido de la página, y con el vidrio original
	   (.58) las líneas del fondo se leían a través del menú. */
	.lc-header__nav {
		position: fixed;
		top: var(--lc-header-h);
		right: 0;
		left: auto;
		width: min(340px, 84vw);
		height: calc(100vh - var(--lc-header-h));
		/* dvh evita que la barra del navegador móvil recorte el panel. */
		height: calc(100dvh - var(--lc-header-h));
		display: block;
		overflow-y: auto;
		padding: 18px;
		background-color: rgba(18, 30, 13, .96);
		background-image: linear-gradient(
			135deg,
			rgba(255, 255, 255, .12) 0%,
			rgba(255, 255, 255, .04) 30%,
			rgba(255, 255, 255, 0) 60%,
			rgba(255, 255, 255, .06) 100%
		);
		-webkit-backdrop-filter: blur(30px) saturate(190%);
		backdrop-filter: blur(30px) saturate(190%);
		border-left: 1px solid rgba(255, 255, 255, .22);
		box-shadow:
			inset 1px 0 0 rgba(255, 255, 255, .25),
			-18px 0 44px rgba(0, 0, 0, .3);
		box-sizing: border-box;
		visibility: hidden;
		transform: translateX(100%);
		/* Curva de salida marcada: arranca rápido y frena, que es como se leen
		   los paneles deslizantes. */
		transition: transform .32s cubic-bezier(.22, 1, .36, 1), visibility .32s;
	}

	@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
		.lc-header__nav {
			background-color: rgba(18, 30, 13, .99);
		}
	}

	.lc-header__nav.is-open {
		visibility: visible;
		transform: translateX(0);
	}

	.lc-menu {
		display: block;
		gap: 0;
	}

	.lc-menu > li > a {
		display: block;
		padding: 14px 4px;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}

	.lc-menu > li.current-menu-item > a,
	.lc-menu > li.current_page_item > a {
		color: var(--lc-green);
		border-bottom-color: rgba(255, 255, 255, .12);
	}

	/* En móvil los submenús se muestran siempre desplegados. */
	.lc-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		min-width: 0;
		margin: 0 0 0 14px;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.lc-menu .sub-menu a {
		padding: 10px 4px;
	}

	.lc-header__cta--mobile {
		margin-top: 18px;
	}
}

/* Bloquea el scroll del documento con el panel abierto. */
body.lc-nav-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.lc-header,
	.lc-header__nav,
	.lc-header__cta,
	.lc-menu .sub-menu,
	.lc-menu > li > a,
	.lc-header__burger-bars,
	.lc-header__burger-bars::before,
	.lc-header__burger-bars::after {
		transition: none;
	}
}
