/**
 * pe-header.css — Estilos del header portado del re-skin editorial
 * (psico-ebased-theme 2.0, style.css). Solo lo que el header necesita:
 * tokens de diseño, contenedor, botón, header/nav y su responsive.
 * La variante de header transparente de Inicio (.pe-front) NO se portó:
 * la home actual es la congelada de Elementor y no está pensada para
 * un header superpuesto.
 *
 * @package psico-ebased-actual
 */

/* ---- Design tokens (subset del tema 2.0) ---- */
:root {
	--cream-2:      #fffefa;
	--pink-btn:     #fddef5;
	--pink-btn-h:   #f8c9ec;
	--brown:        #4b302b;
	--brown-2:      #36221f;
	--ink:          #211b18;
	--line:         #ece3d6;

	--pe-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--pe-sans:  "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--wrap: 1200px;
	--radius-pill: 999px;
}

/* ---- Contenedor / accesibilidad ---- */
.pe-container {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 24px;
}

.pe-skip-link {
	position: absolute; left: -999px; top: 0; z-index: 1000;
	background: var(--brown); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.pe-skip-link:focus {
	left: 0;
	width: auto; height: auto; clip: auto; overflow: visible;
	white-space: normal; margin: 0;
}

/* ---- Botón (base + variante rosa que usa el CTA del header) ---- */
.pe-btn {
	display: inline-block;
	font-family: var(--pe-sans);
	font-weight: 700;
	font-size: .74rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	padding: 15px 30px;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
	line-height: 1;
	text-align: center;
	text-decoration: none;
}
.pe-btn:hover { transform: translateY(-2px); }
.pe-btn--pink   { background: var(--pink-btn); color: var(--brown); }
.pe-btn--pink:hover { background: var(--pink-btn-h); color: var(--brown); }

/* ---- Header / nav ---- */
.pe-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .9);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--line);
}
.pe-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 74px;
}
.pe-logo, .pe-header .custom-logo-link {
	font-family: var(--pe-serif);
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: .04em;
	color: var(--ink);
	text-decoration: none;
}
.pe-logo__mark { font-style: italic; }
.pe-header .custom-logo-link { display: inline-block; line-height: 0; }
.pe-header .custom-logo,
.pe-header .pe-logo-light img { max-width: 220px !important; height: auto; display: block; }

.pe-nav { display: flex; align-items: center; }
.pe-nav__list {
	display: flex;
	gap: 30px;
	list-style: none;
	margin: 0; padding: 0;
}
.pe-nav__list li { margin: 0; }
.pe-nav__list a {
	font-family: var(--pe-sans);
	font-weight: 600;
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
	transition: border-color .18s ease, color .18s ease;
	text-decoration: none;
}
.pe-nav__list a:hover,
.pe-nav__list .current-menu-item > a { border-color: var(--pink-btn-h); }

/* Submenús (depth 2): dropdown simple */
.pe-nav__list .sub-menu {
	display: none;
	position: absolute;
	list-style: none;
	margin: 0; padding: 10px 18px;
	background: var(--cream-2);
	border: 1px solid var(--line);
	border-radius: 12px;
}
.pe-nav__list li { position: relative; }
.pe-nav__list li:hover > .sub-menu,
.pe-nav__list li:focus-within > .sub-menu { display: block; }
.pe-nav__list .sub-menu a { display: block; padding: 8px 0; border-bottom: 0; }

.pe-nav__toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none; border: 0; cursor: pointer; padding: 8px;
}
.pe-nav__bar { width: 24px; height: 2px; background: var(--ink); transition: .25s; }

.pe-header__cta { padding: 12px 22px; }

/* Logo blanco: en el tema 2.0 solo se ve sobre el hero de Inicio (.pe-front),
   variante que no se portó — acá queda siempre oculto. */
.pe-logo-light { display: none; line-height: 0; }

/* ---- Menú móvil: modal blanco a pantalla completa (como el sitio live) ---- */
@keyframes pe-nav-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.pe-nav__list.is-open { animation: none; }
}

.pe-nav__close { display: none; }
body.pe-menu-open { overflow: hidden; }

@media (max-width: 860px) {
	/* Con doble clase para ganarle al .pe-btn { display:inline-block } de
	 * pe-reset.css, que carga después en /reset/ y /contacto/ y hacía
	 * reaparecer el CTA en mobile solo en esas páginas. */
	.pe-header .pe-header__cta { display: none; }
	.pe-nav__toggle { display: flex; }
	.pe-nav__list {
		position: fixed; inset: 0;
		height: 100dvh;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 24px;
		background: #fff;
		padding: 70px 24px;
		display: none;
		z-index: 999;
		overflow-y: auto;
		text-align: center;
	}
	.pe-nav__list.is-open { display: flex; animation: pe-nav-in .25s ease both; }
	.pe-nav__list a {
		padding: 10px 0;
		border-bottom: 0;
		font-size: .92rem;
		font-weight: 500;
		letter-spacing: .03em;
		text-transform: none;
	}
	.pe-nav__list .sub-menu {
		display: block; position: static;
		border: 0; background: none; padding: 0; border-radius: 0;
	}
	body.pe-menu-open .pe-nav__close {
		display: block;
		position: fixed;
		top: 16px; right: 16px;
		z-index: 1000;
		background: none; border: 0; cursor: pointer;
		padding: 8px 12px;
		font-size: 30px;
		font-weight: 300;
		line-height: 1;
		color: var(--ink);
	}
}
