/*
 * Cabecera, menú y pie (F10, propuesta B).
 */

/* ------------------------------------------------------------------ */
/* Cabecera                                                           */
/* ------------------------------------------------------------------ */

.site-header {
	position: relative;
	z-index: 50;
	background: var(--paper);
	color: var(--ink);
}

.site-header--dark {
	background: var(--ink);
	color: var(--white);
}

.site-header--light {
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	min-height: var(--header-height);
}

.site-header__brand {
	display: inline-flex;
	align-items: center;
	justify-self: start;
	min-height: 44px;
}

.site-header__logo {
	width: 56px;
	height: 26px;
}

.site-header__logo--custom {
	width: auto;
	max-width: 120px;
	max-height: 42px;
}

.site-header--dark .site-header__logo--custom,
.site-footer__logo--custom {
	filter: brightness(0) invert(1);
}

.site-header--light .site-header__logo--custom {
	filter: brightness(0);
}

.site-header__tagline {
	justify-self: center;
	max-width: 16ch;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.18em;
	text-align: center;
	text-transform: uppercase;
}

.site-header__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 8px;
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav .current-menu-item > a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}

.site-nav .menu-item--cta > a,
.site-header__cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-left: 8px;
	padding: 0 20px;
	border-radius: 999px;
	background: var(--yellow);
	color: var(--ink);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 180ms ease;
}

.site-nav .menu-item--cta > a:hover,
.site-nav .menu-item--cta > a[aria-current="page"],
.site-nav .menu-item--cta.current-menu-item > a,
.site-header__cta:hover {
	background: var(--yellow-hover);
	text-decoration: none;
}

.site-header__cta {
	display: none;
	margin-left: 0;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
}

.menu-toggle__close {
	display: none;
}

.site-header.is-open .menu-toggle__open {
	display: none;
}

.site-header.is-open .menu-toggle__close {
	display: inline-flex;
}

body.menu-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Pie                                                                */
/* ------------------------------------------------------------------ */

.site-footer {
	padding: 80px 0 40px;
	font-size: 1.125rem;
}

.site-footer__top {
	display: flex;
	flex-wrap: wrap;
	gap: 48px 64px;
}

.site-footer__brand {
	display: flex;
	flex: 2 1 320px;
	flex-direction: column;
	gap: 20px;
}

.site-footer__logo {
	width: 92px;
	height: 42px;
}

.site-footer__logo--custom {
	width: auto;
	max-width: 160px;
	height: auto;
	max-height: 56px;
}

.site-footer__col {
	display: flex;
	flex: 1 1 160px;
	flex-direction: column;
}

.site-footer__col:nth-child(3) {
	flex-basis: 200px;
}

.site-footer__heading {
	margin-bottom: 8px;
}

.site-footer__nav-list,
.site-footer__list,
.social-links--text {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__nav-list a,
.site-footer__list a,
.social-links--text a {
	display: flex;
	align-items: center;
	min-height: 40px;
}

.site-footer a:hover {
	color: var(--yellow);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 64px;
	padding-top: 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 24px;
	color: var(--muted-dark);
	font-size: 0.875rem;
}

.site-footer__copyright {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
}

.site-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__legal-list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.site-footer__eu {
	width: 280px;
	max-width: 100%;
	height: auto;
}

/* Redes como iconos (por compatibilidad) y como píldoras (contacto). */
.social-links--icons {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-links--icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}

.social-links--pills,
.entry-content .social-links--pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-links__pill {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease;
}

.entry-content .social-links__pill {
	text-decoration: none;
}

.social-links__pill:hover {
	background: var(--surface-fg);
	color: var(--surface-bg);
}

/* ------------------------------------------------------------------ */
/* Tableta y móvil                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.site-header__inner {
		min-height: var(--header-height-mobile);
	}

	.site-header__actions {
		gap: 4px;
		margin-right: -8px;
	}

	.site-header__cta {
		display: inline-flex;
		padding: 0 16px;
		font-size: 0.75rem;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.site-nav {
		position: fixed;
		top: var(--header-height-mobile);
		right: 0;
		left: 0;
		z-index: 45;
		display: none;
		max-height: calc(100vh - var(--header-height-mobile));
		overflow-y: auto;
		background: var(--surface-bg);
		color: var(--surface-fg);
		border-top: 1px solid var(--line);
		box-shadow: 0 24px 32px rgba(0, 0, 0, 0.12);
	}

	.site-header--dark .site-nav {
		border-top-color: rgba(255, 255, 255, 0.14);
	}

	.site-header.is-open .site-nav {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px var(--gutter) 32px;
	}

	.site-nav a,
	.site-nav .menu-item--cta > a {
		display: flex;
		min-height: 56px;
		margin: 0;
		padding: 0;
		border-bottom: 1px solid var(--line);
		border-radius: 0;
		background: transparent;
		color: inherit;
		font-size: 0.875rem;
	}

	.site-header--dark .site-nav a {
		border-bottom-color: rgba(255, 255, 255, 0.14);
	}

	.site-nav .menu-item--cta > a:hover,
	.site-nav .menu-item--cta > a[aria-current="page"],
	.site-nav .menu-item--cta.current-menu-item > a {
		background: transparent;
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 8px;
	}
}

@media (max-width: 767px) {
	.site-header__inner {
		grid-template-columns: 1fr auto;
	}

	.site-header__tagline {
		display: none;
	}

	.site-header__logo {
		width: 46px;
		height: 21px;
	}

	.site-footer {
		padding: 64px 0 32px;
		font-size: 1rem;
	}

	.site-footer__top {
		gap: 40px 32px;
	}

	.site-footer__brand {
		flex-basis: 100%;
	}

	.site-footer__bottom {
		margin-top: 48px;
	}

	.site-footer__legal {
		gap: 0 20px;
	}

	.site-footer__legal-list {
		gap: 0 20px;
	}

	.site-footer__eu {
		width: 260px;
	}
}
