/*
Theme Name: FETEAN
Theme URI: https://fetean.org/
Author: Miguel Lucas
Author URI: https://fetean.org/
Description: Tema base de la web de la Federación Teatro Amateur de Navarra.
Version: 1.3.2
Requires at least: 5.3
Requires PHP: 7.4
Text Domain: fetean
*/

/*
 * FETEAN Theme 1.3.2
 *
 * Este archivo define la geometría base del documento y las páginas WordPress.
 * La navegación y el footer forman parte del shell del tema y cargan su hoja
 * específica desde assets/css/navigation.css.
 * Los estilos de contenido público específico pertenecen a FETEAN CSM.
 */

:root {
	--fetean-site-header-height: 110px;
	--fetean-shell-gap: 10px;
}

html {
	box-sizing: border-box;
	min-height: 100%;
	background: #f1f1f1;
	overflow-x: clip;
	overflow-y: scroll;
	scrollbar-gutter: stable;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	min-width: 0;
	max-width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #f1f1f1;
	color: #111;
	overflow-x: clip;
}

/* El shell global queda siempre por encima de los navegadores internos de CSM.
 * El fondo sticky se aplica solo desde assets/css/navigation.css cuando el
 * encabezado entra realmente en estado is-stuck. */
.fetean-site-header {
	z-index: 1000;
	isolation: isolate;
}

.fetean-site-content {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 0;
	flex: 1 0 auto;
	overflow-x: clip;
}

/* Páginas WordPress convencionales — mismo lenguaje modular que CSM. */
.fetean-page {
	--fetean-page-gap: 10px;
	--fetean-page-radius: 10px;
	--fetean-page-ink: #171717;
	--fetean-page-muted: #686868;
	--fetean-page-border: rgba(0, 0, 0, .10);
	--fetean-page-surface: #fff;
	--fetean-page-accent: #e83d37;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0 10px;
	color: var(--fetean-page-ink);
	font-family: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.fetean-page-article {
	display: grid;
	gap: var(--fetean-page-gap);
	width: 100%;
	margin: 0;
}

/* Métrica idéntica a .core-section-search-title de CSM. */
.fetean-page-header {
	display: flex;
	align-items: stretch;
	gap: var(--fetean-page-gap);
	width: 100%;
}

.fetean-page-header-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex: 1 1 100%;
	min-width: 0;
	min-height: 78px;
	padding: 0 3.5vw;
	border-radius: var(--fetean-page-radius);
	overflow: hidden;
	background: #191919;
	color: #fff;
}

.fetean-page-header-title h1 {
	margin: 0;
	color: #fff;
	font: inherit;
	font-size: 30px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1;
	text-transform: none !important;
	white-space: nowrap;
}


.fetean-page-modules {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--fetean-page-gap);
	width: 100%;
	min-width: 0;
}

.fetean-page-module {
	display: grid;
	grid-template-columns: minmax(0, 27fr) minmax(0, 73fr);
	width: 100%;
	min-width: 0;
	margin: 0;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: var(--fetean-page-radius);
	background: var(--fetean-page-surface);
	overflow: hidden;
}

.fetean-page-module-header {
	grid-column: 1;
	grid-row: 1;
	align-self: stretch;
	padding: 30px 3.5vw;
}

.fetean-page-module-header h2 {
	margin: 0;
	color: var(--fetean-page-ink);
	font: inherit;
	font-size: clamp(25px, 1.8vw, 32px);
	font-weight: 600;
	letter-spacing: -.015em;
	line-height: 1.08;
	text-transform: none;
	text-wrap: balance;
}

.fetean-page-module-body {
	grid-column: 2;
	grid-row: 1;
	position: relative;
	min-width: 0;
	padding: 30px 3.5vw;
	font-size: clamp(16px, 1.05vw, 19px);
	font-weight: 400;
	line-height: 1.6;
}

.fetean-page-module-body::before {
	content: "";
	position: absolute;
	top: 30px;
	bottom: 30px;
	left: 0;
	width: 1px;
	background: var(--fetean-page-border);
	pointer-events: none;
}

/* El primer bloque introductorio, al no tener título, ocupa por sí solo
 * todo el ancho del módulo. El resto mantiene la retícula de títulos. */
.fetean-page-module--intro .fetean-page-module-body {
	grid-column: 1 / -1;
	padding-top: 30px;
}

.fetean-page-module--intro .fetean-page-module-body::before {
	display: none;
}

.fetean-page-module-body > :first-child {
	margin-top: 0 !important;
}

.fetean-page-module-body > :last-child {
	margin-bottom: 0 !important;
}

.fetean-page-module-body h2,
.fetean-page-module-body h3,
.fetean-page-module-body h4 {
	color: var(--fetean-page-ink);
	font-family: inherit;
	text-transform: none;
	text-wrap: balance;
}

.fetean-page-module-body h2 {
	margin: 1.8em 0 .65em;
	font-size: clamp(25px, 1.8vw, 32px);
	font-weight: 600;
	line-height: 1.08;
}

.fetean-page-module-body h3 {
	margin: 1.6em 0 .6em;
	font-size: clamp(21px, 1.4vw, 27px);
	font-weight: 600;
	line-height: 1.12;
}

.fetean-page-module-body h4 {
	margin: 1.45em 0 .5em;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.2;
}

.fetean-page-module-body p {
	margin: 0 0 1.05em;
}

.fetean-page-module-body ul,
.fetean-page-module-body ol {
	margin: .6em 0 1.25em;
	padding-left: 1.35em;
}

.fetean-page-module-body li + li {
	margin-top: .32em;
}

.fetean-page-module-body a {
	color: var(--fetean-page-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: .14em;
}

.fetean-page-module-body a:hover,
.fetean-page-module-body a:focus-visible {
	text-decoration-thickness: 2px;
}

.fetean-page-module-body strong,
.fetean-page-module-body b {
	font-weight: 650;
}

.fetean-page-module-body blockquote {
	margin: 1.5em 0;
	padding: .9em 1.2em;
	border-left: 4px solid var(--fetean-page-accent);
	background: #f6f6f6;
}

.fetean-page-module-body hr {
	height: 1px;
	margin: 2em 0;
	border: 0;
	background: var(--fetean-page-border);
}

.fetean-page-module-body table {
	width: 100%;
	margin: 1.4em 0;
	border-collapse: collapse;
	font-size: .92em;
}

.fetean-page-module-body th,
.fetean-page-module-body td {
	padding: 12px 14px;
	border: 1px solid var(--fetean-page-border);
	text-align: left;
	vertical-align: top;
}

.fetean-page-module-body th {
	font-weight: 650;
	background: #f4f4f4;
}


/* 404 — escena a pantalla completa dentro del shell del tema. */
body.error404 {
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
}

body.error404 .fetean-site-content {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

body.error404 .fetean-site-header,
body.error404 .fetean-site-footer {
	flex: 0 0 auto;
}

.fetean-404 {
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 0 10px;
	font-family: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.fetean-404-stage {
	display: grid;
	grid-template-columns: minmax(0, .92fr) minmax(320px, 1.08fr);
	height: 100%;
	min-height: 0;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.fetean-404-copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-width: 0;
	padding: clamp(28px, 4.5vw, 86px);
}

.fetean-404-code {
	margin: 0 0 clamp(16px, 2vh, 28px);
	color: #e83d37;
	font-size: clamp(64px, 8.2vw, 154px);
	font-weight: 700;
	letter-spacing: -.075em;
	line-height: .72;
}

.fetean-404-copy h1 {
	max-width: 760px;
	margin: 0;
	color: #171717;
	font-size: clamp(34px, 4.1vw, 76px);
	font-weight: 600;
	letter-spacing: -.045em;
	line-height: .94;
	text-wrap: balance;
}

.fetean-404-copy > p:not(.fetean-404-code) {
	max-width: 620px;
	margin: clamp(18px, 2.4vh, 32px) 0 0;
	color: #686868;
	font-size: clamp(15px, 1.05vw, 19px);
	line-height: 1.5;
}

.fetean-404-button,
.fetean-404-button:link,
.fetean-404-button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: clamp(22px, 3vh, 40px);
	padding: 0 22px;
	border-radius: 8px;
	background: #191919;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .18s ease;
}

.fetean-404-button:hover,
.fetean-404-button:focus-visible {
	background: #e83d37;
}

.fetean-404-visual {
	position: relative;
	min-width: 0;
	min-height: 0;
	background: #f5f1e8;
	overflow: hidden;
}

.fetean-404-visual::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 52% 46%, rgba(255,255,255,.78), rgba(255,255,255,0) 58%);
	pointer-events: none;
}

.fetean-404-visual img {
	position: absolute;
	left: 50%;
	bottom: -2%;
	width: min(92%, 820px);
	height: min(94%, 900px);
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
	transform: translateX(-50%);
}

@media (max-width: 820px) {
	.fetean-404-stage {
		grid-template-columns: 1fr;
		position: relative;
	}

	.fetean-404-copy {
		position: relative;
		z-index: 2;
		justify-content: flex-start;
		padding: clamp(24px, 6vw, 46px);
		background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.92) 58%, rgba(255,255,255,.30) 100%);
	}

	.fetean-404-copy h1 {
		max-width: 520px;
		font-size: clamp(32px, 8.5vw, 56px);
	}

	.fetean-404-visual {
		position: absolute;
		inset: 0;
		z-index: 1;
	}

	.fetean-404-visual img {
		left: 70%;
		width: min(92vw, 620px);
		height: 62%;
	}
}

@media (max-height: 700px) and (min-width: 821px) {
	.fetean-404-code {
		font-size: clamp(54px, 7vw, 104px);
	}

	.fetean-404-copy h1 {
		font-size: clamp(30px, 3.4vw, 58px);
	}

	.fetean-404-copy > p:not(.fetean-404-code) {
		margin-top: 14px;
	}

	.fetean-404-button,
	.fetean-404-button:link,
	.fetean-404-button:visited {
		margin-top: 18px;
	}
}

@media (max-width: 900px) {
	.fetean-page-header-title {
		min-height: 58px;
		padding-right: 3.5vw;
		padding-left: 3.5vw;
	}

	.fetean-page-header-title h1 {
		font-size: 26px;
	}

}

@media (max-width: 760px) {
	.fetean-page-module {
		grid-template-columns: minmax(0, 1fr);
	}

	.fetean-page-module-header {
		grid-column: 1;
		grid-row: 1;
		padding: 24px 22px;
	}

	.fetean-page-module-body,
	.fetean-page-module--intro .fetean-page-module-body {
		grid-column: 1;
		grid-row: auto;
		padding: 22px;
	}

	.fetean-page-module-body::before {
		top: 0;
		bottom: auto;
		left: 22px;
		right: 22px;
		width: auto;
		height: 1px;
	}


}
