/**
 * Norte — cabecera y menú a pantalla completa, portados de Kalunat
 * Editorial (la cabecera del tema Kalunat original), con las fuentes y
 * colores de Norte. En la portada la cabecera flota transparente sobre
 * el héroe y toma el fondo de papel en cuanto se baja.
 *
 * 1. Cabecera fija que se compacta al hacer scroll
 * 2. Menú de escritorio con el efecto «linear» de Eroica
 * 3. Botón «Menú» (tres líneas que se barren y pasan a aspa)
 * 4. Menú a pantalla completa: fundido y entrada en cascada
 * 5. Contenido del menú y submenús como en Keel
 *
 * Las reglas del menú horizontal llevan body:not(.editor-styles-wrapper):
 * este archivo no se carga en el editor, pero así no estorban si alguien
 * lo añade; allí el menú tiene que verse con sus submenús para editarlo.
 */

:root {
	--norte-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--norte-gutter: var(--n-gutter);
}

/* =====================================================================
   1. CABECERA FIJA
   ===================================================================== */

.norte-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	transition:
		background-color 0.4s var(--norte-ease),
		color 0.4s var(--norte-ease),
		box-shadow 0.4s var(--norte-ease);
}

/* En móvil la barra de administración no es fija: la cabecera va a 0. */
@media (max-width: 600px) {

	.norte-site-header {
		top: 0;
	}
}

.norte-header__bar {
	gap: 2rem;
	min-height: var(--n-header);
	padding: 0 var(--n-gutter) 0 5.9vw;
	border-bottom: 1px solid var(--wp--preset--color--paper-line);
	transition: min-height 0.4s var(--norte-ease), border-color 0.4s var(--norte-ease);
}

.norte-header__bar .wp-block-site-title {
	font-size: clamp(12px, 0.93vw, 15px);
	line-height: 1;
	white-space: nowrap;
}

.norte-site-header .wp-block-site-title a {
	text-decoration: none;
}

.norte-site-header.is-scrolled {
	box-shadow: 0 2px 10px rgba(28, 27, 25, 0.05);
}

.norte-site-header.is-scrolled .norte-header__bar {
	min-height: calc(var(--n-header) - 20px);
	border-bottom-color: transparent;
}

/* En el editor la parte se ve suelta, sin .norte-site-header. */
.editor-styles-wrapper .norte-header__bar {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* Portada: transparente sobre el héroe, fija, y con papel al bajar. */
body.norte-overlay-header .norte-site-header {
	position: fixed;
	inset: var(--wp-admin--admin-bar--height, 0px) 0 auto;
	background-color: transparent;
}

body.norte-overlay-header .norte-site-header:not(.is-scrolled) .norte-header__bar {
	border-bottom-color: transparent;
}

body.norte-overlay-header .norte-site-header.is-scrolled {
	background-color: var(--wp--preset--color--paper);
}

@media (max-width: 600px) {

	body.norte-overlay-header .norte-site-header {
		top: 0;
	}
}

.norte-site-header .wp-block-site-title a {
	color: inherit;
}

.norte-site-header .wp-block-site-title a:hover {
	color: inherit;
}

/* Logo de imagen (Apariencia › Logo, inc/logo.php): la versión para
   fondos claros por defecto y la de fondos oscuros en modo oscuro, sobre
   una foto, con el menú a pantalla completa y en el pie. */
.norte-logo a {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.norte-logo__img {
	display: block;
	width: auto;
	max-width: min(56vw, 340px);
	/* Nunca más alto que la cabecera menos su aire. */
	height: min(var(--norte-logo-h, 28px), calc(var(--n-header) - 28px));
	object-fit: contain;
	object-position: left center;
	transition: height 0.4s var(--norte-ease, ease);
}

.norte-site-header.is-scrolled .norte-logo__img {
	height: min(var(--norte-logo-h, 28px) * 0.86, calc(var(--n-header) - 40px));
}

.norte-logo__img--dark,
:root[data-theme="dark"] .norte-logo__img--light,
body.norte-header-on-image .norte-site-header:not(.is-scrolled) .norte-logo__img--light,
html.norte-menu-is-full .norte-site-header .norte-logo__img--light,
.norte-footer .norte-logo__img--light {
	display: none;
}

:root[data-theme="dark"] .norte-logo__img--dark,
body.norte-header-on-image .norte-site-header:not(.is-scrolled) .norte-logo__img--dark,
html.norte-menu-is-full .norte-site-header .norte-logo__img--dark,
.norte-footer .norte-logo__img--dark {
	display: block;
}

.norte-logo .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 600px) {

	.norte-logo__img {
		height: min(var(--norte-logo-h, 28px) * 0.82, calc(var(--n-header) - 32px));
	}
}

/* Con el menú a pantalla completa (móvil) la cabecera se funde con él:
   noche y nieve. En escritorio el panel lateral la cubre con su velo. */
html.norte-menu-is-full .norte-site-header,
html.norte-menu-is-full body.norte-overlay-header .norte-site-header.is-scrolled {
	background-color: var(--norte-menu-bg, var(--wp--preset--color--night));
	box-shadow: none;
	color: var(--wp--preset--color--snow);
}

/* En modo oscuro el menú toma el gris carbón de la página (el papel
   oscuro), no el negro de noche, para que no se vea más oscuro que ella. */
:root[data-theme="dark"] .norte-menu,
:root[data-theme="dark"] .norte-menu__panel,
:root[data-theme="dark"].norte-menu-is-full .norte-site-header {
	--norte-menu-bg: var(--wp--preset--color--paper);
}

html.norte-menu-is-full .norte-header__bar {
	border-bottom-color: transparent;
}

html.norte-menu-is-full .norte-site-header .norte-nav {
	visibility: hidden;
}

/* =====================================================================
   2. MENÚ DE ESCRITORIO: EFECTO «LINEAR» DE EROICA
   Solo con CSS: :has() sabe sobre qué elemento está el ratón (o el foco).
   - Sobre un elemento sin submenú: los demás se desvanecen.
   - Sobre uno con submenú: los demás casi desaparecen mientras suben; el
     elegido sube, se atenúa y deja su submenú, en fila, justo donde
     estaba el enlace.
   - Subrayado fino solo en la página actual.
   Tiempos y curvas, los de Eroica. Desde 1025px; por debajo, solo el
   botón del menú a pantalla completa.
   ===================================================================== */

.norte-site-header .norte-nav a {
	color: inherit;
	text-decoration: none;
}

/* Items del menú horizontal (y de sus submenús en fila). */
.norte-header__bar > .wp-block-group {
	gap: clamp(28px, 3vw, 44px);
}

.norte-header__bar .norte-nav,
.norte-header__bar .norte-nav .wp-block-navigation__container {
	gap: clamp(22px, 2.4vw, 36px);
}

.norte-header__bar .norte-nav {
	font-family: var(--wp--preset--font-family--text);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

@media (min-width: 1025px) {

	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav {
		--norte-nav-rise: 30px;
	}

	/* Con la cabecera compacta hay menos sitio por encima. */
	body:not(.editor-styles-wrapper) .norte-site-header.is-scrolled .norte-nav {
		--norte-nav-rise: 20px;
	}

	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > .wp-block-navigation-item {
		position: relative;
		transform: translate3d(0, 0, 0);
		transition: all 375ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
	}

	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav .wp-block-navigation-item__content {
		position: relative;
		padding-block: 9px;
		text-decoration: none !important;
	}

	/* Subrayado de la página actual. */
	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav .wp-block-navigation-item__content::after {
		content: "";
		position: absolute;
		top: 100%;
		left: 0;
		width: 0;
		height: 1px;
		margin-top: -6px;
		background-color: var(--wp--preset--color--ink);
		opacity: 1;
		transition: width 100ms linear, opacity 375ms ease, transform 375ms ease;
	}

	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav :is(.current-menu-item, .current-menu-ancestor) > .wp-block-navigation-item__content::after,
	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav .wp-block-navigation-item__content[aria-current="page"]::after {
		width: 100%;
	}

	/* listening: hay un elemento activo; los demás se atenúan y suben. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container):has(> li:is(:hover, :focus-within)) > li {
		opacity: 0.25;
		transform: translate3d(0, calc(-1 * var(--norte-nav-rise)), 0);
		transition: opacity 475ms ease 139ms, transform 475ms ease 139ms;
	}

	/* no-dis: el activo no tiene submenú; nadie se mueve. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container):has(> li:not(.has-child):is(:hover, :focus-within)) > li {
		transform: translate3d(0, 0, 0);
	}

	/* listen-active: el elemento activo, entero. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container):has(> li:is(:hover, :focus-within)) > li:is(:hover, :focus-within) {
		opacity: 1;
	}

	/* hidep: el activo tiene submenú; los demás casi desaparecen. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container):has(> li.has-child:is(:hover, :focus-within)) > li:not(:hover, :focus-within) {
		opacity: 0.025;
		pointer-events: none;
		transition: opacity 375ms ease 199ms, transform 555ms cubic-bezier(0.29, 0.09, 0.22, 0.98) 139ms;
	}

	/* phovered: el activo sube y su enlace se atenúa. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container):has(> li.has-child:is(:hover, :focus-within)) > li.has-child:is(:hover, :focus-within) {
		opacity: 1;
		transform: translate3d(0, calc(-1 * var(--norte-nav-rise)), 0);
		transition: all 337.5ms cubic-bezier(0.29, 0.09, 0.22, 0.98) 215ms;
	}

	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > li.has-child:is(:hover, :focus-within) > .wp-block-navigation-item__content {
		opacity: 0.35;
	}

	/* Con el teclado, el enlace con el foco no se atenúa. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > li.has-child > .wp-block-navigation-item__content:focus-visible {
		opacity: 1;
	}

	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > li.has-child:is(:hover, :focus-within) > .wp-block-navigation-item__content::after {
		opacity: 0;
		transform: translate3d(0, -5px, 0);
		transition: all 375ms ease 139ms;
	}

	/* Submenú en fila, en la línea donde estaba el enlace antes de subir.
	   Toca al enlace que ha subido: el ratón no «se cae» por el camino.
	   Se alinea a la derecha del elemento, porque el menú va pegado al
	   borde derecho y un submenú largo se saldría de la pantalla. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > .has-child > .wp-block-navigation__submenu-container {
		position: absolute;
		top: var(--norte-nav-rise);
		right: 0;
		left: auto;
		flex-direction: row;
		gap: 22px;
		width: max-content;
		min-width: 0;
		height: auto;
		padding: 0;
		overflow: visible;
		border: 0;
		background: none;
		color: inherit;
		opacity: 0;
		visibility: hidden;
		transform: matrix(0.99939, 0.0145, 0, 1.111, 0, 3);
		transform-origin: right center;
		transition: opacity 150ms cubic-bezier(0.29, 0.09, 0.22, 0.98), transform 175ms cubic-bezier(0.29, 0.09, 0.22, 0.98), visibility 0s linear 175ms;
	}

	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > .has-child:is(:hover, :focus-within) > .wp-block-navigation__submenu-container {
		opacity: 1;
		visibility: visible;
		transform: matrix(1, 0, 0, 1, 0, 0);
		transition: opacity 515ms cubic-bezier(0.29, 0.09, 0.22, 0.98) 315ms, transform 575ms cubic-bezier(0.29, 0.09, 0.22, 0.98) 315ms, visibility 0s linear 315ms;
	}

	/* Con el teclado el submenú es visible (y enfocable) al instante. */
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > .has-child:focus-within > .wp-block-navigation__submenu-container {
		transition-delay: 315ms, 315ms, 0s;
	}

	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: 9px 0;
		white-space: nowrap;
	}
}

@media (min-width: 1025px) and (prefers-reduced-motion: reduce) {

	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > li,
	body:not(.editor-styles-wrapper) .norte-site-header :is(.norte-nav.wp-block-navigation__container, .norte-nav .wp-block-navigation__container) > .has-child > .wp-block-navigation__submenu-container {
		transform: none !important;
	}
}

@media (max-width: 1024px) {

	body:not(.editor-styles-wrapper) .norte-site-header .norte-nav {
		display: none;
	}
}

/* =====================================================================
   3. BOTÓN «MENÚ»
   «MENÚ» en Acumin y una hamburguesa de tres líneas que se «barren» al
   pasar por encima; abierto, «CERRAR» y aspa.
   ===================================================================== */

.norte-menu-toggle {
	display: inline-flex;
	gap: 0.85rem;
	align-items: center;
	margin: 0;
	padding: 0.5rem 0.25rem;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.norte-menu-toggle:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 3px;
}

.norte-menu-toggle__label {
	font-family: var(--wp--preset--font-family--text);
	font-size: 10.5px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.norte-menu-toggle__box {
	position: relative;
	display: block;
	width: 26px;
	height: 14px;
}

.norte-menu-toggle__line {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background-color: currentcolor;
	clip-path: inset(0 0 0 0);
	transform-origin: left center;
	transition: all 377ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
}

.norte-menu-toggle__line:nth-child(1) {
	top: 0;
}

.norte-menu-toggle__line:nth-child(2) {
	top: 6.25px;
}

.norte-menu-toggle__line:nth-child(3) {
	top: 12.5px;
}

/* Barrido al pasar por encima («tigreton» en Eroica). */
@keyframes norte-menu-sweep {

	50% {
		clip-path: inset(0 0 0 100%);
	}

	51% {
		clip-path: inset(0 100% 0 0);
	}

	100% {
		clip-path: inset(0 0 0 0);
	}
}

.norte-menu-toggle:not(.is-open):hover .norte-menu-toggle__line:nth-child(1) {
	animation: norte-menu-sweep 515ms 150ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
}

.norte-menu-toggle:not(.is-open):hover .norte-menu-toggle__line:nth-child(2) {
	animation: norte-menu-sweep 515ms 250ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
}

.norte-menu-toggle:not(.is-open):hover .norte-menu-toggle__line:nth-child(3) {
	animation: norte-menu-sweep 515ms 350ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
}

/* Abierto: la línea del medio se va y las otras dos se cruzan. */
.norte-menu-toggle.is-open .norte-menu-toggle__line:nth-child(1),
.norte-menu-toggle.is-open .norte-menu-toggle__line:nth-child(3) {
	top: 6.25px;
	transform-origin: center center;
}

.norte-menu-toggle.is-open .norte-menu-toggle__line:nth-child(1) {
	transform: rotate(45deg);
}

.norte-menu-toggle.is-open .norte-menu-toggle__line:nth-child(3) {
	transform: rotate(-45deg);
}

.norte-menu-toggle.is-open .norte-menu-toggle__line:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

/* =====================================================================
   4. MENÚ A PANTALLA COMPLETA
   Por debajo de la cabecera (que se queda encima con el botón para
   cerrar). Siempre oscuro. Aparece con un fundido lento y cada elemento
   de lista entra en cascada, 50ms después del anterior (--norte-i, lo pone
   header.js), como en Eroica.
   ===================================================================== */

html.norte-menu-is-open {
	overflow: hidden;
}

.norte-menu {
	position: fixed;
	inset: 0;
	z-index: 44;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: var(--norte-menu-bg, var(--wp--preset--color--night));
	color: var(--wp--preset--color--snow);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.45s;
}

.norte-menu.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

.norte-menu__panel {
	box-sizing: border-box;
	min-height: 100%;
	padding: calc(var(--norte-header-bottom, 5rem) + 1.5rem) var(--norte-gutter) 2rem;
}

.norte-menu a {
	color: inherit;
}

.norte-menu li {
	opacity: 0;
	transform: matrix(0.99939, 0, 0, 1.055, 0, 8);
	transform-origin: 0 0;
	transition:
		transform 275ms cubic-bezier(0.29, 0.09, 0.22, 0.98),
		opacity 275ms cubic-bezier(0.29, 0.09, 0.22, 0.98);
}

.norte-menu.is-open li {
	opacity: 1;
	transform: matrix(1, 0, 0, 1, 0, 0);
	transition-delay: calc(var(--norte-i, 0) * 50ms + 250ms);
}

/* El aspa del panel: solo en escritorio (4B). */
.norte-menu__close {
	display: none;
}

/* =====================================================================
   4B. ESCRITORIO: PANEL LATERAL
   El menú lateral de Kalunat Core (como en Eroica): un velo negro al 25%
   sobre toda la página, cabecera incluida, y a la derecha una columna
   oscura con el contenido que entra desde el borde. La página se
   desplaza 24px a la izquierda mientras está abierto. El aspa va donde
   estaba el botón (header.js lo mide al abrir), con su alto.
   ===================================================================== */

@media (min-width: 1025px) {

	.norte-menu {
		z-index: 60;
		overflow: hidden;
		background-color: rgb(0 0 0 / 0.25);
		transition: opacity 0.3s linear, visibility 0s linear 0.4s;
	}

	.norte-menu.is-open {
		transition: opacity 0.2s linear, visibility 0s;
	}

	.norte-menu .norte-menu__panel {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: clamp(420px, 40vw, 720px);
		min-height: 0;
		padding: clamp(5rem, 12vh, 8rem) clamp(2rem, 4vw, 4rem) 2.5rem;
		overflow-y: auto;
		overscroll-behavior: contain;
		border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--snow) 10%, transparent);
		background-color: var(--norte-menu-bg, var(--wp--preset--color--night));
		transform: translateX(100%);
		transition: transform 377ms cubic-bezier(0.5, 0.29, 0.43, 0.96);
	}

	.norte-menu.is-open .norte-menu__panel {
		transform: none;
	}

	.norte-menu .norte-menu__close {
		position: absolute;
		top: var(--norte-toggle-top, 1.5rem);
		right: var(--norte-toggle-right, clamp(2rem, 4vw, 4rem));
		display: flex;
		gap: 0.85rem;
		align-items: center;
		height: var(--norte-toggle-height, 2rem);
		padding: 0 0.25rem;
		border: 0;
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.norte-menu__close-label {
		font-family: var(--wp--preset--font-family--text);
		font-size: 10.5px;
		font-weight: 400;
		line-height: 1;
		letter-spacing: 0.22em;
		text-transform: uppercase;
	}

	.norte-menu__close-icon {
		position: relative;
		display: block;
		width: 26px;
		height: 14px;
	}

	.norte-menu__close-icon::before,
	.norte-menu__close-icon::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 0;
		width: 100%;
		height: 1.5px;
		margin-top: -0.75px;
		background: currentcolor;
		rotate: 45deg;
	}

	.norte-menu__close-icon::after {
		rotate: -45deg;
	}

	.norte-menu__close:focus-visible {
		outline: 2px solid currentcolor;
		outline-offset: 4px;
	}

	/* El contenido llena la altura del panel: enlaces centrados y pie
	   abajo; los enlaces, algo menores que a pantalla completa. */
	.norte-menu .norte-menu-content {
		min-height: calc(100dvh - clamp(5rem, 12vh, 8rem) - 2.5rem);
	}

	.norte-menu .norte-menu__nav {
		font-size: clamp(2.75rem, 4vw, 4.5rem);
		font-family: var(--wp--preset--font-family--display);
		font-weight: 300;
		letter-spacing: -0.02em;
	}

	/* La página, un poco hacia la izquierda mientras el panel entra. */
	.wp-site-blocks {
		position: relative;
		left: 0;
		transition: left 435ms cubic-bezier(0.72, 0.17, 0.29, 0.87);
	}

	html.norte-menu-is-open .wp-site-blocks {
		left: -24px;
	}
}

@media (min-width: 1025px) and (prefers-reduced-motion: reduce) {

	.norte-menu .norte-menu__panel,
	.wp-site-blocks {
		transition-duration: 0.15s;
	}
}

/* =====================================================================
   5. CONTENIDO DEL MENÚ
   Los enlaces de primer nivel, uno debajo de otro y alineados a la
   derecha, grandes, en Freight Big; al pasar por uno, los demás se
   atenúan. Al pie, «Sígueme», las redes y el «di hola».
   ===================================================================== */

.norte-menu-content {
	min-height: calc(100dvh - var(--norte-header-bottom, 5rem) - 3.5rem);
}

.norte-menu-content > * {
	align-self: stretch;
}

.norte-menu .norte-menu__nav {
	margin-block: auto;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.75rem, 6.4vw, 5.75rem);
	font-weight: 230;
	line-height: 1;
	letter-spacing: -0.03em;
	word-spacing: 0.06em;
	text-transform: none;
}

/* Sin el flex de WordPress, que haría la lista tan ancha como su
   contenido. */
.norte-menu .norte-menu__nav,
.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container) {
	display: block;
	width: 100%;
	text-align: right;
}

/* Sin menú asignado, WordPress muestra la lista de páginas, con una
   lista más: se aplana. */
.norte-menu .norte-menu__nav .wp-block-page-list {
	display: contents;
}

.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container, .norte-menu__nav .wp-block-page-list) > li {
	display: block;
	padding-block: 0.05em;
}

.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container, .norte-menu__nav .wp-block-page-list) > li > a {
	position: relative;
	display: inline-flex;
	padding: 0;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container, .norte-menu__nav .wp-block-page-list):has(> li > a:is(:hover, :focus-visible)) > li > a:not(:hover, :focus-visible) {
	opacity: 0.45;
}

.norte-menu .norte-menu__nav :is(.current-menu-item, .current-menu-ancestor) > a,
.norte-menu .norte-menu__nav a[aria-current="page"] {
	font-style: italic;
}

/* Submenús (header.js): el elemento abierto se queda encendido con una
   etiqueta «Contraer» encima, los demás se apagan y sus enlaces salen
   debajo, en columnas de hasta 6. Los submenús de WordPress siguen
   ocultos: el script copia sus enlaces al panel. */
.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container).has-open > li > a {
	opacity: 0.35;
}

.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container).has-open > li:is(.is-open, :hover) > a,
.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container).has-open > li > a:focus-visible {
	opacity: 1;
}

.norte-menu :is(.norte-menu__nav.wp-block-navigation__container, .norte-menu__nav .wp-block-navigation__container) > li.is-open > a::before {
	content: attr(data-collapse);
	position: absolute;
	top: 50%;
	left: 50%;
	padding: 0.4em 0.65em;
	background: var(--wp--preset--color--snow);
	color: var(--wp--preset--color--night);
	font-family: var(--wp--preset--font-family--text);
	font-size: 12px;
	font-style: normal;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(-50%, -50%);
	animation: norte-menu-fade 0.3s ease both;
}

.norte-menu__secondary {
	display: grid;
	grid-template-rows: repeat(6, auto);
	grid-auto-columns: max-content;
	grid-auto-flow: column;
	column-gap: clamp(2rem, 6vw, 5rem);
	justify-content: end;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: right;
	font-family: var(--wp--preset--font-family--text);
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.3;
	animation: norte-menu-rise 0.45s cubic-bezier(0.29, 0.09, 0.22, 0.98) both;
}

.norte-menu__secondary[hidden] {
	display: none;
}

.norte-menu .norte-menu__secondary li {
	padding-block: 0.25em;
	opacity: 1;
	transform: none;
}

.norte-menu__secondary a {
	color: var(--wp--preset--color--ash) !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.norte-menu .norte-menu__secondary a:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--snow) !important;
}

@keyframes norte-menu-fade {

	from {
		opacity: 0;
	}
}

@keyframes norte-menu-rise {

	from {
		opacity: 0;
		transform: translateY(0.6rem);
	}
}

/* Los submenús de WordPress, ocultos (ver arriba). */
body:not(.editor-styles-wrapper) .norte-menu .norte-menu__nav .wp-block-navigation__submenu-container,
body:not(.editor-styles-wrapper) .norte-menu .norte-menu__nav .wp-block-navigation__submenu-icon,
body:not(.editor-styles-wrapper) .norte-menu .norte-menu__nav .wp-block-navigation-submenu__toggle {
	display: none;
}

/* Pie del menú, abajo del todo: el mismo que el de la web (.norte-footer,
   en global.css), en claro sobre oscuro y sin los textos legales ni
   «Volver arriba». */
.norte-menu__footer {
	font-family: var(--wp--preset--font-family--text);
	font-weight: 400;
}

.norte-menu__footer p {
	margin: 0;
}

.norte-menu__footer a {
	color: var(--wp--preset--color--snow);
	text-decoration: none;
}

.norte-menu__label {
	color: var(--wp--preset--color--ash);
	font-family: var(--wp--preset--font-family--text);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 20px;
	line-height: 1.2;
}

.norte-menu__social a {
	font-size: clamp(24px, 2.4vw, 30px);
	line-height: 1.2;
	transition: color 0.2s ease;
}

.norte-menu__social a:hover {
	color: var(--wp--preset--color--ash);
}

.norte-menu__contact {
	font-size: clamp(18px, 1.6vw, 24px);
	font-weight: 300;
	line-height: 1.28;
	text-wrap: pretty;
}

.norte-menu__copy {
	color: var(--wp--preset--color--ash);
	font-family: var(--wp--preset--font-family--text);
	font-size: 13px;
	line-height: 1.3;
}

/* En móvil, más pequeño y apretado, para dejar sitio al menú: las redes
   en una línea y el contacto a tamaño de texto. */
@media (max-width: 781px) {

	.norte-menu .norte-menu__footer {
		gap: 22px;
	}

	.norte-menu .norte-menu__footer > .wp-block-group {
		gap: 6px;
	}

	.norte-menu .norte-menu__social {
		gap: 4px 18px;
	}

	.norte-menu__label {
		font-size: 14px;
	}

	.norte-menu__social a {
		font-size: 18px;
	}

	.norte-menu__contact {
		font-size: 15px;
		line-height: 1.35;
	}

	.norte-menu__copy {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.norte-menu-toggle__line {
		transition: none;
		animation: none !important;
	}

	.norte-menu,
	.norte-menu.is-open {
		transition-duration: 0.15s;
	}

	.norte-menu li,
	.norte-menu.is-open li {
		transform: none;
		transition: opacity 150ms linear;
		transition-delay: 0s;
	}
}

/* El elemento con el submenú abierto sigue encendido aunque el cursor se
   vaya a otro (el panel desplaza la lista y el cursor cae en otro). */
.norte-menu .norte-menu__nav li.is-open > a {
	opacity: 1 !important;
}

/* =====================================================================
   6. LUPA Y MODO CLARO / OSCURO
   Los dos iconos de cada botón van apilados, con el giro del child de
   Eroica: la lupa se encoge y gira mientras aparece el aspa; el sol,
   mientras aparece la luna.
   ===================================================================== */

:is(.norte-search-toggle, .norte-mode-toggle) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.35rem;
	border: 0;
	background: none;
	color: inherit;
	font-size: 17px;
	line-height: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

:is(.norte-search-toggle, .norte-mode-toggle):hover {
	opacity: 0.6;
}

:is(.norte-search-toggle, .norte-mode-toggle):focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 3px;
}

:is(.norte-search-toggle__icons, .norte-mode-toggle__icons) {
	position: relative;
	display: inline-block;
	width: 1em;
	height: 1em;
}

:is(.norte-search-toggle__icon, .norte-mode-toggle__icon) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transition: opacity 300ms ease, transform 400ms ease;
}

.norte-search-toggle__icon--close,
.norte-mode-toggle__icon--moon {
	opacity: 0;
	transform: rotate(-90deg) scale(0.4);
}

.norte-search-toggle.is-open .norte-search-toggle__icon--search,
:root[data-theme="dark"] .norte-mode-toggle__icon--sun {
	opacity: 0;
	transform: rotate(90deg) scale(0.4);
}

.norte-search-toggle.is-open .norte-search-toggle__icon--close,
:root[data-theme="dark"] .norte-mode-toggle__icon--moon {
	opacity: 1;
	transform: none;
}

/* Un respiro entre los iconos y «MENÚ». */
.norte-site-header .norte-menu-toggle {
	margin-left: 8px;
}

/* =====================================================================
   7. BÚSQUEDA EN VENTANA
   Por debajo de la cabecera, que se queda encima con el aspa para
   cerrar. En escritorio, un panel centrado sobre un velo; en móvil
   (hasta 768px), a pantalla completa. Con los colores del modo activo.
   ===================================================================== */

html:is(.norte-finder-is-open, .norte-menu-is-open) {
	overflow: hidden;
}

.norte-finder {
	position: fixed;
	inset: 0;
	z-index: 45;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: calc(var(--norte-header-bottom, 5rem) + 1rem) var(--norte-gutter) 2rem;
	background: rgba(13, 12, 11, 0.4);
	opacity: 0;
	visibility: hidden;
	transition: opacity 275ms ease-out, visibility 0s linear 375ms;
}

.norte-finder.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 275ms ease-out, visibility 0s;
}

.norte-finder__panel {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(2rem, 4vw, 3.5rem);
	width: min(65vw, 1180px);
	max-height: 100%;
	padding: clamp(2.5rem, 7vw, 7rem);
	overflow-y: auto;
	border: 1px solid var(--wp--preset--color--paper-line);
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	transform: translateY(3%);
	transition: transform 375ms ease-out;
}

.norte-finder.is-open .norte-finder__panel {
	transform: none;
}

.norte-finder__form {
	display: flex;
	align-items: center;
	width: min(100%, 36rem);
	border-bottom: 1px solid currentcolor;
}

.norte-finder__input {
	flex: 1;
	min-width: 0;
	padding: 0.8em 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: var(--wp--preset--font-family--text);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.norte-finder__input::placeholder {
	color: inherit;
	opacity: 0.55;
}

.norte-finder__input:focus {
	outline: none;
}

.norte-finder__input::-webkit-search-cancel-button {
	display: none;
}

.norte-finder__form:focus-within {
	border-bottom-color: var(--wp--preset--color--ink);
}

.norte-finder__submit {
	display: inline-flex;
	padding: 0.5em;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.norte-finder__submit svg {
	width: 18px;
	height: 18px;
}

/* Categorías separadas por «/», en la letra de los subtítulos. */
.norte-finder__categories {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--wp--preset--font-family--headline);
	font-size: clamp(26px, 2.6vw, 36px);
	font-weight: 400;
	letter-spacing: -0.005em;
	line-height: 1.2;
}

.norte-finder__categories li:not(:last-child)::after {
	content: "/";
	padding: 0 14px 0 10px;
	color: var(--wp--preset--color--paper-line);
}

.norte-finder__categories a {
	color: inherit;
	text-decoration: none;
}

.norte-finder__categories a:hover {
	color: var(--wp--preset--color--ink);
}

/* Etiquetas en píldora. */
.norte-finder__tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.norte-finder__tags a {
	display: inline-block;
	padding: 0.7em 1.25em;
	border: 1px solid var(--wp--preset--color--paper-line);
	border-radius: 999px;
	color: inherit;
	font-family: var(--wp--preset--font-family--text);
	font-size: 10.5px;
	letter-spacing: 0.22em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.norte-finder__tags a:hover {
	border-color: var(--wp--preset--color--ink);
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

@media (max-width: 768px) {

	.norte-finder {
		align-items: stretch;
		padding: 0;
		background: var(--wp--preset--color--paper);
	}

	.norte-finder__panel {
		justify-content: center;
		width: 100%;
		max-height: none;
		padding: calc(var(--norte-header-bottom, 5rem) + 2rem) var(--norte-gutter) 3rem;
		border: 0;
		background: none;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.norte-finder,
	.norte-finder__panel,
	:is(.norte-search-toggle__icon, .norte-mode-toggle__icon) {
		transition: none;
	}
}

/* En móviles estrechos no caben el nombre, los iconos y «MENÚ» en una
   línea: queda solo la hamburguesa (el nombre accesible no cambia). */
@media (max-width: 480px) {

	.norte-site-header .norte-menu-toggle__label {
		display: none;
	}

	.norte-site-header .norte-menu-toggle {
		margin-left: 2px;
	}
}
