/* ===============================
   HEADER 2 (fixed bottom center)
================================ */
#header-2 {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	z-index: 9999;
	/* IMPORTANTE: Quitamos display: flex y gap */
	/* Los elementos se posicionarán absolutamente */
}

/* Estado inicial oculto del header */
#header-2.initial-hidden {
	opacity: 0;
}

/* Estado visible del header con transición */
#header-2.initial-visible {
	opacity: 1;
	transition: opacity 0.8s ease;
}

/* ===============================
   FLEXY (VISIBLE POR DEFECTO)
================================ */
.flexy {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	cursor: pointer;
	padding: 0.94rem 0.94rem 0.625rem 0.94rem;
	background: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(30px);
	-webkit-backdrop-filter: blur(30px);
	border-radius: 10px;
	
	/* Propiedades para la transición */
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s ease, visibility 0.5s ease;
	pointer-events: auto;
}

/* Estado oculto de flexy */
.flexy.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.logo-central {
	width: 3.75rem;
	height: auto;
}

.burguer {
	display: none;
	width: 1.25rem;
	height: auto;
}

/* ===============================
   MENU MOBILE WRAPPER (SOLO MÓVIL)
================================ */
.menu-mobile-wrapper {
	display: none; /* Oculto en desktop */
}

/* ===============================
   MENU CENTRAL DESKTOP
================================ */
/* Solo el menú que NO está en el wrapper se muestra en desktop */
#header-2 > .menu-central {
	display: flex; /* SIEMPRE flex, nunca none */
	align-items: center;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0.94rem;
	background: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(30px);
	-webkit-backdrop-filter: blur(30px);
	border-radius: 10px;
	
	/* Posicionamos en el mismo lugar que flexy */
	position: absolute;
	left: 0;
	top: 0;
	
	/* Propiedades para la transición - OCULTO por defecto */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Estado visible del menú desktop */
#header-2 > .menu-central.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Ocultar el menú dentro del wrapper en desktop */
.menu-mobile-wrapper .menu-central {
	display: none;
}

/* ===============================
   MENU ITEMS
================================ */
.menu-central li {
	color: #202020;
	font-family: "Utile Display";
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 100%;
	text-transform: uppercase;
}

.menu-central li a {
	color: inherit;
	text-decoration: none;
}

.menu-central li:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 767px) {
	#header-2 {
		bottom: 16px;
		left: 50%;
		transform: translateX(-50%);
		/* Sin width, deja que los hijos determinen el tamaño */
	}
	
	/* FLEXY: Ahora ocupa todo el ancho del header */
	.flexy {
		gap: 10px;
		padding: 15px 15px 10px 15px;
		box-sizing: border-box;
		justify-content: center;
	}

	.logo-central {
		width: 60px;
	}

	.burguer {
		display: block;
		width: 20px;
		padding-bottom: 2px;
	}

	/* Ocultar el menú desktop en móvil */
	#header-2 > .menu-central {
		display: none !important;
	}

	/* ===============================
	   MENU MOBILE WRAPPER ACTIVADO
	================================ */
	.menu-mobile-wrapper {
		display: block;
		position: fixed;
		left: 50%;
		bottom: 0;
		transform: translateX(-50%);
		width: calc(100vw - 32px);
		padding: 16px;
		background: rgba(255, 255, 255, 0.4);
		backdrop-filter: blur(30px);
		-webkit-backdrop-filter: blur(30px);
		border-radius: 10px;
		box-sizing: border-box;
		
		/* Oculto por defecto */
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.5s ease, visibility 0.5s ease;
	}
	
	/* Estado visible del wrapper */
	.menu-mobile-wrapper.visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}
	
	/* ===============================
	   BOTÓN CERRAR
	================================ */
	.close-menu {
		position: absolute;
		top: 16px;
		right: 16px;
		background: none;
		border: none;
		color: #202020;
		font-family: "Utile Display";
		font-size: 16px;
		font-weight: 500;
		text-decoration: underline;
		text-underline-offset: 4px;
		cursor: pointer;
		padding: 0;
		line-height: 100%;
	}
	
	.close-menu:hover {
		opacity: 0.7;
	}

	/* ===============================
	   MENU CENTRAL EN MÓVIL
	================================ */
	.menu-mobile-wrapper .menu-central {
		/* Mostrar el menú dentro del wrapper en móvil */
		display: flex !important;
		
		/* Resetear estilos de desktop */
		position: static;
		background: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		padding: 0;
		border-radius: 0;
		list-style: none;
		margin: 0;
		
		/* Estilos de columna */
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
		
		/* NO especificamos opacity, visibility ni pointer-events */
		/* El menú hereda estos valores del wrapper padre */
		transition: none;
	}

	.menu-mobile-wrapper .menu-central li {
		font-size: 16px;
	}
}