/*
Theme Name: Amnistía
Description: Tema para mostrar testimonios en video. Plantillas PHP simples, un solo CSS y un solo JS.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: amnistia
*/

/* ==========================================================
   CONTENIDO
   1. Fuentes y variables (colores, tamaños)
   2. Base
   3. Cabecera y menú
   4. Inicio: hero, sobre, columnas
   5. Tarjetas (inicio) y miniaturas (perfil)
   6. Página de persona: preguntas + reproductor
   7. Páginas de texto y pie de página
   8. Móvil (responsive)
   ========================================================== */


/* ==========================================================
   1. FUENTES Y VARIABLES
   ========================================================== */
@font-face {
	font-family: "Helvetica Amnistia";
	src: url("fonts/helvetica-light.woff") format("woff");
	font-weight: 300;
	font-display: swap;
}
@font-face {
	font-family: "Helvetica Amnistia";
	src: url("fonts/helvetica-regular.woff") format("woff");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Helvetica Amnistia";
	src: url("fonts/helvetica-bold.woff") format("woff");
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: "Bebas Neue";
	src: url("fonts/bebas-neue-bold.woff") format("woff");
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: "Myriad Pro";
	src: url("fonts/myriad-pro-regular.woff") format("woff");
	font-weight: 400;
	font-display: swap;
}

:root {
	/* Colores: cámbialos aquí y cambian en todo el sitio. */
	--negro: #030303;
	--negro-puro: #000;
	--blanco: #fff;
	--gris-claro: #fafafa;
	--gris-texto: #282828;
	--amarillo: #f0e528;

	/* Fuentes */
	--fuente-texto: "Helvetica Amnistia", Helvetica, Arial, sans-serif;
	--fuente-titulos: "Bebas Neue", Impact, sans-serif;
	--fuente-preguntas: "Myriad Pro", "Helvetica Amnistia", Arial, sans-serif;

	/* Espacio entre tarjetas (el "marco" blanco del diseño) */
	--separacion: 18px;
}


/* ==========================================================
   2. BASE
   ========================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--negro);
	color: var(--blanco);
	font-family: var(--fuente-texto);
	font-weight: 300;
	line-height: 1.5;
}

img,
video,
iframe {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
}

/* Texto solo para lectores de pantalla */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Enlace "Saltar al contenido" (aparece al tabular) */
.saltar {
	position: absolute;
	left: -9999px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--amarillo);
	color: var(--negro);
}
.saltar:focus {
	left: 0;
	top: 0;
}

:focus-visible {
	outline: 3px solid var(--amarillo);
	outline-offset: 2px;
}


/* ==========================================================
   3. CABECERA Y MENÚ
   ========================================================== */
.site-header {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	background: var(--negro);
}

/* En el inicio la cabecera flota encima de la imagen */
.home .site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
}

/* Logo: caja amarilla pegada a la esquina, como en el diseño */
.site-logo {
	display: flex;
	align-items: center;
	min-width: 120px;
	min-height: 52px;
	margin-top: 30px;
	padding: 8px 20px 8px 0;
	background: var(--amarillo);
}
.site-logo a {
	display: block;
	padding-left: 14px; /* solo afecta al logo de texto; el logo en imagen no lleva enlace con texto */
	color: var(--negro);
	font-family: var(--fuente-titulos);
	font-size: 1.5rem;
	text-decoration: none;
}
.site-logo .custom-logo-link {
	padding-left: 0;
}
.site-logo img {
	width: auto;
	max-height: 56px;
}

.menu-principal ul {
	display: flex;
	gap: 2.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.menu-principal {
	padding: 40px 6% 0 0;
}
.menu-principal a {
	color: var(--blanco);
	font-weight: 700;
	font-size: 1.1rem;
	text-transform: uppercase;
	text-decoration: none;
}
.menu-principal a:hover,
.menu-principal .current-menu-item a {
	color: var(--amarillo);
}

/* El botón hamburguesa solo se ve en móvil */
.menu-boton {
	display: none;
}


/* ==========================================================
   4. INICIO: HERO, SOBRE, COLUMNAS
   ========================================================== */
.hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: max(47vw, 420px);
	padding: 120px 4% 80px;
	background: var(--negro) center / cover no-repeat;
	text-align: center;
}
/* Capa oscura para que el texto siempre se lea */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.25));
}
.hero__titulo {
	position: relative;
	margin: 0;
	font-size: clamp(1.9rem, 4vw, 3.6rem);
	font-weight: 300;
	line-height: 1.1;
	text-transform: uppercase;
}
.hero__titulo strong {
	font-weight: 700;
}

.sobre {
	padding: 80px 6%;
	background: var(--blanco);
	color: var(--gris-texto);
	text-align: center;
}
.sobre__icono {
	width: auto;
	max-height: 90px;
	margin: 0 auto 10px;
}
.sobre__titulo {
	margin: 0 0 14px;
	font-family: var(--fuente-titulos);
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}
.amarillo {
	color: var(--amarillo);
}
.sobre p {
	max-width: 720px;
	margin: 0 auto;
	font-size: 1.2rem;
}

.columnas {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	padding: 60px 6%;
	background: var(--gris-claro);
	color: var(--negro);
	text-align: center;
}
/* Si la columna tiene enlace (<a>), se ve igual que una sin enlace */
a.columna {
	display: block;
	color: inherit;
	text-decoration: none;
}
a.columna:hover h3 {
	text-decoration: underline;
}
.columna img {
	width: auto;
	max-height: 100px;
	margin: 0 auto 20px;
}
.columna h3 {
	margin: 0 0 20px;
	font-size: 1.4rem;
	font-weight: 700;
	text-transform: uppercase;
}
.columna p {
	max-width: 300px;
	margin: 0 auto;
	font-size: 0.95rem;
}


/* ==========================================================
   5. TARJETAS (INICIO) Y MINIATURAS (PERFIL)
   Mismo diseño: rejilla de 2 columnas con separación blanca.
   ========================================================== */
.tarjetas {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--separacion);
	background: var(--blanco);
}

/* Si hay un número impar de tarjetas, la celda vacía se rellena de negro
   (en vez de quedar un bloque blanco). Un pseudo-elemento ocupa esa celda. */
.tarjetas:has(> :last-child:nth-child(odd))::after {
	content: "";
	background: var(--negro);
}

.tarjeta {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: var(--negro-puro);
	color: var(--blanco);
	aspect-ratio: 16 / 10;
	cursor: pointer;
}
.tarjeta img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* En el perfil, la rejilla tiene una franja blanca arriba y el resto es negro */
.tarjetas--miniaturas {
	padding-top: var(--separacion);
	padding-bottom: 0;
}

/* Nombre de la persona sobre la tarjeta (abajo, con degradado para que se lea) */
.tarjeta__nombre {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 48px 24px 20px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	color: var(--blanco);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: left;
	text-transform: uppercase;
}

.vacio {
	grid-column: 1 / -1;
	padding: 60px 6%;
	text-align: center;
}

/* Círculo "play" + texto "Ver Video" */
.play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translate(-50%, -50%);
	opacity: 0.6;
	transition: opacity 0.2s;
}
.tarjeta:hover .play,
.tarjeta:focus-visible .play,
.visor__poster:hover .play {
	opacity: 1;
}
.play__circulo {
	position: relative;
	width: 72px;
	height: 72px;
	border: 4px solid var(--blanco);
	border-radius: 50%;
}
/* Triángulo del play */
.play__circulo::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -13px 0 0 -9px;
	border-style: solid;
	border-width: 13px 0 13px 22px;
	border-color: transparent transparent transparent var(--blanco);
}
.play__texto {
	margin-top: 10px;
	font-size: 1.6rem;
	font-weight: 700;
}


/* ==========================================================
   6. PÁGINA DE PERSONA: PREGUNTAS + REPRODUCTOR
   ========================================================== */
/* Nombre de la persona, encima de las preguntas y el video */
.perfil-nombre {
	margin: 0;
	padding: 50px 4% 0 7.5%;
	background: var(--negro);
	font-family: var(--fuente-titulos);
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.perfil {
	display: grid;
	grid-template-columns: minmax(180px, 17%) 1fr;
	gap: 2%;
	align-items: start;
	padding: 30px 4% var(--separacion) 7.5%;
	background: var(--negro);
}

.preguntas ul {
	margin: 0;
	padding: 60px 0 0;
	list-style: none;
}
.preguntas li {
	margin-bottom: 0.45rem;
}
.pregunta {
	padding: 0;
	border: 0;
	background: none;
	color: var(--blanco);
	font-family: var(--fuente-preguntas);
	font-size: 1.05rem;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}
.pregunta:hover,
.pregunta.activo {
	color: var(--amarillo);
}

.visor {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: var(--negro-puro);
}
.visor iframe,
.visor video,
.visor__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: var(--negro-puro);
}
.visor video {
	object-fit: contain;
}
.visor__poster {
	padding: 0;
	color: var(--blanco);
	cursor: pointer;
}
.visor__poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}


/* ==========================================================
   7. PÁGINAS DE TEXTO Y PIE DE PÁGINA
   ========================================================== */
.contenido-texto {
	max-width: 820px;
	margin: 0 auto;
	padding: 60px 6% 80px;
}
.contenido-texto h1,
.contenido-texto h2 {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	text-transform: uppercase;
}
.contenido-texto a:hover {
	color: var(--amarillo);
}

/* Mapa (Google Maps incrustado) */
.mapa {
	background: var(--negro);
}
.mapa iframe {
	width: 100%;
	height: 360px; /* cambia este número para hacer el mapa más alto o más bajo */
	border: 0;
}

/* Pie de página: logo, texto y datos de contacto, todo centrado */
.site-footer {
	padding: 70px 6% 50px;
	background: var(--negro);
	text-align: center;
}
.pie-logo {
	display: inline-block;
	margin-bottom: 50px;
	background: var(--amarillo);
}
.pie-logo img {
	width: auto;
	max-height: 56px;
}
.pie-logo span {
	display: block;
	padding: 14px 20px;
	color: var(--negro);
	font-family: var(--fuente-titulos);
	font-size: 1.5rem;
}
.pie-texto,
.pie-contacto {
	margin: 0 0 8px;
	font-size: 1.15rem;
}
.pie-contacto {
	color: var(--amarillo);
	font-weight: 700;
}
.pie-contacto a {
	color: var(--amarillo);
	text-decoration: none;
}
.pie-contacto a:hover {
	text-decoration: underline;
}
.pie-separador {
	margin: 0 0.4em;
	color: var(--blanco);
}


/* ==========================================================
   8. MÓVIL (RESPONSIVE)
   Un solo punto de corte: por debajo de 800px.
   ========================================================== */
@media (max-width: 800px) {

	/* Menú: se oculta y se abre con el botón */
	.site-header {
		flex-wrap: wrap;
	}
	.menu-boton {
		display: block;
		width: 48px;
		height: 48px;
		margin: 30px 4% 0 0;
		border: 0;
		background: none;
		cursor: pointer;
	}
	/* Las 3 rayas se dibujan con un elemento y su sombra */
	.menu-boton__rayas,
	.menu-boton__rayas::before,
	.menu-boton__rayas::after {
		display: block;
		width: 28px;
		height: 3px;
		margin: 0 auto;
		background: var(--blanco);
	}
	.menu-boton__rayas {
		position: relative;
	}
	.menu-boton__rayas::before,
	.menu-boton__rayas::after {
		content: "";
		position: absolute;
		left: 0;
	}
	.menu-boton__rayas::before {
		top: -9px;
	}
	.menu-boton__rayas::after {
		top: 9px;
	}

	.menu-principal {
		display: none;
		width: 100%;
		padding: 10px 6% 20px;
		background: var(--negro);
	}
	.menu-principal.abierto {
		display: block;
	}
	.menu-principal ul {
		flex-direction: column;
		gap: 0.8rem;
	}

	/* Inicio */
	.hero {
		min-height: 420px;
	}
	.columnas {
		grid-template-columns: 1fr;
	}
	.tarjetas {
		grid-template-columns: 1fr;
	}
	.tarjetas::after {
		display: none; /* en móvil hay 1 columna, no hace falta rellenar */
	}

	/* Perfil: preguntas arriba (con scroll si son muchas) y video debajo */
	.perfil-nombre {
		padding: 30px 4% 0;
	}
	.tarjeta__nombre {
		padding: 40px 16px 14px;
		font-size: 1.2rem;
	}
	.perfil {
		grid-template-columns: 1fr;
		padding: 20px 4% var(--separacion);
	}
	.preguntas {
		margin-bottom: 16px;
	}
	.preguntas ul {
		max-height: 200px;
		padding-top: 0;
		overflow-y: auto;
	}
	.mapa iframe {
		height: 280px;
	}
	.pie-texto,
	.pie-contacto {
		font-size: 1rem;
	}
	.play__circulo {
		width: 56px;
		height: 56px;
	}
	.play__texto {
		font-size: 1.2rem;
	}
}
