/*
 * Gente Solidaria — Base del cuerpo del sitio
 * Tokens de identidad, tipografía y componentes compartidos.
 *
 * Todo está acotado a .gs-cuerpo / .gs-* para no interferir con el
 * encabezado y el pie de página globales (fase posterior) ni con un tema
 * padre cuando se usa como tema hijo.
 *
 * Paleta provisional (no se proporcionó identidad gráfica): sustituya los
 * valores de :root para aplicar los colores oficiales.
 */

:root {
	/* Color */
	--gs-tinta: #13232b;          /* texto principal            14.4:1 sobre papel */
	--gs-tinta-suave: #55615f;    /* texto secundario            5.8:1 sobre papel */
	--gs-petroleo: #0d4652;       /* color institucional         9.3:1 sobre papel */
	--gs-abismo: #0b2b33;         /* fondos oscuros                                 */
	--gs-papel: #f6f2ea;          /* fondo principal                                */
	--gs-papel-claro: #fbf9f4;    /* fondo alterno                                  */
	--gs-arena: #ece4d4;          /* superficies                                    */
	--gs-linea: #d3c6ad;          /* filetes                                        */
	--gs-ocre: #8a5a0f;           /* acento sobre claro          5.3:1 sobre papel */
	--gs-ocre-claro: #e0ae52;     /* acento sobre oscuro         7.3:1 sobre abismo */
	--gs-papel-tenue: #c9d6d3;    /* texto secundario sobre oscuro                  */

	/* Tipografía */
	--gs-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--gs-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Medidas */
	--gs-ancho: 1240px;
	--gs-margen: clamp(18px, 4.5vw, 56px);
	--gs-seccion: clamp(80px, 10vw, 160px);
	--gs-radio: 2px;
}

/* ---------------------------------------------------------------------
 * Cuerpo
 * ------------------------------------------------------------------- */

.gs-cuerpo {
	display: block;
	color: var(--gs-tinta);
	font-family: var(--gs-sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.gs-cuerpo:focus {
	outline: none;
}

:where(.gs-cuerpo) img {
	max-width: 100%;
	height: auto;
}

.gs-contenedor {
	width: 100%;
	max-width: calc(var(--gs-ancho) + 2 * var(--gs-margen));
	margin-inline: auto;
	padding-inline: var(--gs-margen);
}

.gs-icono {
	flex: none;
	width: 1.15em;
	height: 1.15em;
}

.gs-cuerpo a:focus-visible,
.gs-cuerpo button:focus-visible,
.gs-cuerpo summary:focus-visible {
	outline: 3px solid var(--gs-ocre);
	outline-offset: 3px;
	border-radius: 2px;
}

.gs-trabajos a:focus-visible,
.gs-compromiso a:focus-visible {
	outline-color: var(--gs-ocre-claro);
}

/* Enlace para saltar al contenido */
.gs-saltar {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: var(--gs-abismo);
	color: #fff;
	font: 600 1rem/1.2 var(--gs-sans);
	text-decoration: none;
	border-radius: 2px;
}

.gs-saltar:focus {
	top: 12px;
	outline: 3px solid var(--gs-ocre-claro);
	outline-offset: 2px;
}

/* Integración con los componentes del plugin */
.gs-cuerpo .gsg-galeria,
.gs-cuerpo .gsg-fotos,
.gs-cuerpo .gsg-detalle-fotos {
	--gsg-fuente-titulos: var(--gs-serif);
	--gsg-acento: var(--gs-ocre);
	--gsg-foco: var(--gs-ocre);
	--gsg-fondo-media: var(--gs-arena);
	--gsg-margen-movil: var(--gs-margen);
}

.gs-cuerpo .gsg-galeria--oscura {
	--gsg-acento: var(--gs-ocre-claro);
	--gsg-sobre-acento: var(--gs-abismo);
	--gsg-foco: var(--gs-ocre-claro);
	--gsg-fondo-media: #12363f;
}

.gs-cuerpo .gsg-trabajo__titulo {
	font-weight: 450;
}

/* ---------------------------------------------------------------------
 * Elementos editoriales compartidos
 * ------------------------------------------------------------------- */

.gs-etiqueta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	color: var(--gs-tinta-suave);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
}

.gs-etiqueta__n {
	color: var(--gs-ocre);
	font-variant-numeric: tabular-nums;
}

.gs-etiqueta__raya {
	width: 36px;
	height: 1px;
	background: currentColor;
	opacity: 0.55;
}

.gs-boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 11px 22px;
	border: 1.5px solid var(--gs-petroleo);
	border-radius: 999px;
	background: transparent;
	color: var(--gs-petroleo);
	font-family: var(--gs-sans);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gs-boton:hover {
	background: var(--gs-petroleo);
	color: var(--gs-papel);
}

.gs-boton--relleno {
	background: var(--gs-petroleo);
	color: var(--gs-papel);
}

.gs-boton--relleno:hover {
	background: var(--gs-abismo);
	border-color: var(--gs-abismo);
}

.gs-boton--claro {
	border-color: var(--gs-papel);
	color: var(--gs-papel);
}

.gs-boton--claro:hover {
	background: var(--gs-papel);
	color: var(--gs-abismo);
}

.gs-enlace-flecha {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: var(--gs-petroleo);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.gs-enlace-flecha .gs-icono {
	transition: transform 0.25s ease;
}

.gs-enlace-flecha:hover .gs-icono {
	transform: translateX(4px);
}

/* Marcador de contenido pendiente (solo visible para editores) */
.gs-pendiente {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 16px 0;
	padding: 14px 18px;
	border: 1.5px dashed #a36c12;
	border-radius: 3px;
	background: repeating-linear-gradient(-45deg, rgba(224, 174, 82, 0.14) 0 10px, rgba(224, 174, 82, 0.05) 10px 20px);
	color: var(--gs-tinta);
	font-family: var(--gs-sans);
	font-size: 0.9375rem;
	line-height: 1.45;
}

.gs-pendiente__etiqueta {
	color: #774c09;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.gs-pendiente__enlace {
	color: var(--gs-petroleo);
	font-weight: 600;
}

.gs-pendiente--oscuro {
	border-color: var(--gs-ocre-claro);
	color: var(--gs-papel);
}

.gs-pendiente--oscuro .gs-pendiente__etiqueta,
.gs-pendiente--oscuro .gs-pendiente__enlace {
	color: var(--gs-ocre-claro);
}

/* Texto enriquecido */
.gs-prosa > :first-child {
	margin-top: 0;
}

.gs-prosa > :last-child {
	margin-bottom: 0;
}

.gs-prosa > p,
.gs-prosa > ul,
.gs-prosa > ol {
	margin: 0 0 1.1em;
}

/* Solo enlaces de texto: no afecta a los componentes del plugin (con clase). */
.gs-prosa a:not([class]) {
	color: var(--gs-petroleo);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.gs-prosa > h2,
.gs-prosa > h3,
.gs-prosa > h4 {
	font-family: var(--gs-serif);
	font-weight: 500;
	line-height: 1.2;
	margin: 1.6em 0 0.6em;
	color: var(--gs-tinta);
}

.gs-prosa > blockquote {
	margin: 1.6em 0;
	padding-left: 1.2em;
	border-left: 3px solid var(--gs-ocre);
	font-family: var(--gs-serif);
	font-size: 1.25em;
	line-height: 1.45;
}

/* ---------------------------------------------------------------------
 * Páginas generales (incluida la página de galería)
 * ------------------------------------------------------------------- */

.gs-pagina {
	padding-bottom: clamp(72px, 9vw, 136px);
	background: var(--gs-papel);
}

.gs-pagina__cabecera {
	padding-top: clamp(48px, 7vw, 112px);
	padding-bottom: clamp(32px, 4vw, 56px);
}

.gs-pagina__titulo {
	margin: 0;
	max-width: 18ch;
	color: var(--gs-petroleo);
	font-family: var(--gs-serif);
	font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.gs-pagina__entrada {
	margin: 22px 0 0;
	max-width: 60ch;
	color: var(--gs-tinta-suave);
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
}

.gs-pagina .gs-prosa > *:not(.alignwide):not(.alignfull) {
	max-width: 760px;
}

.gs-pagina .gs-prosa > .alignwide {
	max-width: none;
	margin-block: clamp(24px, 3vw, 40px);
}

.gs-pagina .gs-prosa > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.gs-listado__item {
	padding-block: 24px;
	border-top: 1px solid var(--gs-linea);
}

.gs-listado__titulo {
	margin: 0;
	font-family: var(--gs-serif);
	font-weight: 500;
	font-size: 1.75rem;
	line-height: 1.2;
}

.gs-listado__titulo a {
	color: var(--gs-tinta);
	text-decoration: none;
}

.gs-aviso-plugin {
	padding-block: 120px;
}

/* Clases de accesibilidad de WordPress (por si el tema padre no las define) */
.gs-cuerpo .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.gs-cuerpo *,
	.gs-cuerpo *::before,
	.gs-cuerpo *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
