/*
 * Hoja principal de upt-theme — paridad visual con el sitio Astro.
 *
 * Replica los componentes del frontend Astro (global.css + componentes) con
 * las mismas clases y variables de marca. Responsable de la paridad pública
 * (T016); los refinamientos de UX/UI se hacen en la etapa T043+.
 */

/* ------------------------------------------------------------------ *
 * Variables de marca y base
 * ------------------------------------------------------------------ */
:root {
	color-scheme: light;
	--brand-green: #a0c62f;
	--brand-blue: #3a62a8;
	--brand-blue-dark: #183b78;
	--brand-yellow: #f8df27;
	--brand-black: #0b0b0b;
	--brand-white: #ffffff;
	--text-primary: #111827;
	--text-muted: #526071;
	--surface: #ffffff;
	--surface-alt: #f5f7fb;
	--surface-strong: #e9eef7;
	--border-soft: #dbe4f0;
	--shadow-soft: 0 14px 34px rgba(17, 24, 39, 0.1);
	--shadow-brand: 0 18px 40px rgba(58, 98, 168, 0.18);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);

	--font-xs: 0.75rem;
	--font-sm: 1rem;
	--font-base: 1.618rem;
	--font-lg: 2.618rem;
	--font-xl: 4.236rem;

	--space-xs: 0.618rem;
	--space-sm: 1rem;
	--space-md: 1.618rem;
	--space-lg: 2.618rem;
	--space-xl: 4.236rem;
	--space-2xl: 6.854rem;

	--font-body: "Montserrat", "Segoe UI", system-ui, sans-serif;

	/* Offset de la barra de admin de WordPress (T042/SC-009).
	 * body.admin-bar solo existe cuando el usuario está logueado y la barra
	 * visible (show_admin_bar). Por defecto 0 → no afecta usuarios anónimos. */
	/* Altura real de la cabecera (logo + padding); evita desajustes con el admin bar. */
	--header-height: 70px;
	--wp-admin-bar-offset: 0px;
}

/* Compensación responsive de la barra de administración (desktop + móvil). */
body.admin-bar {
	--wp-admin-bar-offset: 32px; /* #wpadminbar desktop: 32px */
	/* Empuja el header fijo hacia abajo para no solapar/cortar (T042/SC-009). */
}

body.admin-bar .site-header {
	top: var(--wp-admin-bar-offset);
}

@media (max-width: 782px) {
	/* En móvil WP fija #wpadminbar (height 46px) y sube z-index a 1031. */
	body.admin-bar {
		--wp-admin-bar-offset: 46px;
	}
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */
.site-main {
	display: block;
}

.container {
	width: min(1120px, 92vw);
	margin: 0 auto;
}

.section {
	padding: var(--space-2xl) 0;
}

.section.alt {
	background:
		linear-gradient(135deg, rgba(58, 98, 168, 0.08), transparent 34%),
		var(--surface-alt);
}

.content {
	max-width: 760px;
}

.content h2 {
	margin-top: var(--space-lg);
	font-size: clamp(1.618rem, 3vw, 2.618rem);
}

.content p,
.content li {
	color: var(--text-muted);
}

.content a {
	color: var(--brand-blue-dark);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ------------------------------------------------------------------ *
 * Grids
 * ------------------------------------------------------------------ */
.grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.metrics {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	/* z-index < 1030 (#wpadminbar) para que la barra de admin siga visible. */
	z-index: 100;
	background:
		linear-gradient(110deg, rgba(24, 59, 120, 0.97) 0%, rgba(58, 98, 168, 0.94) 48%, rgba(58, 98, 168, 1) 48%),
		var(--brand-blue);
	backdrop-filter: blur(14px);
}

.site-main {
	padding-top: calc(var(--header-height) + var(--wp-admin-bar-offset, 0px));
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	gap: 24px;
}

.brand {
	display: inline-flex;
	align-items: center;
	min-width: max-content;
	color: var(--brand-green);
	font-weight: 900;
	line-height: 0.98;
	text-transform: uppercase;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
}

.brand img {
	display: block;
	width: 180px;
	height: 78px;
}

.logo {
	display: block;
}

.logo--primary {
	filter: none;
}

.logo--white {
	filter: brightness(0) invert(1);
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: flex-end;
	font-size: 0.9rem;
}

.nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: flex-end;
}

.nav-list li {
	margin: 0;
}

/* Voluntariado es la acción prioritaria y conserva la separación visual del menú Astro. */
.nav-list li.menu-item--volunteer {
	margin-left: 6px;
	padding-left: 10px;
	border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-list li.menu-item--volunteer > a {
	color: var(--brand-yellow);
	box-shadow: inset 0 0 0 1px rgba(248, 223, 39, 0.55);
}

.nav-list li.menu-item--volunteer > a:hover,
.nav-list li.menu-item--volunteer > a:focus-visible,
.nav-list li.menu-item--volunteer.current-menu-item > a {
	background: var(--brand-yellow);
	color: var(--brand-black);
	box-shadow: none;
}

.nav-link,
.nav-list li a {
	position: relative;
	display: inline-block;
	padding: 9px 11px;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 700;
	transition: background 180ms var(--ease-out), color 180ms var(--ease-out);
}

.nav-link--cta {
	background: var(--brand-green);
	color: var(--brand-black);
	box-shadow: 0 8px 18px rgba(160, 198, 47, 0.22);
}

.nav-link--volunteer {
	color: var(--brand-yellow);
	box-shadow: inset 0 0 0 1px rgba(248, 223, 39, 0.55);
}

.nav-link--volunteer:hover,
.nav-link--volunteer:focus-visible {
	background: var(--brand-yellow);
	color: var(--brand-black);
	box-shadow: none;
}

.nav-divider {
	display: inline-block;
	align-self: center;
	width: 2px;
	height: 22px;
	margin: 0 6px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 999px;
}

.nav-link--cta:hover,
.nav-link--cta:focus-visible {
	background: var(--brand-yellow);
	color: var(--brand-black);
}

.nav-list li a:hover,
.nav-link:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--brand-white);
}

.nav-link--cta:hover,
.nav-link--cta:focus-visible {
	background: var(--brand-yellow);
	color: var(--brand-black);
}

/* Focus visible: outline consistente, NO depende solo de color. */
.nav-list li a:focus-visible,
.nav-link:focus-visible {
	outline: 2px solid var(--brand-yellow);
	outline-offset: 2px;
}

/* Activo (página actual): bg más alto que el hover para distinguir. */
.nav-list li.current-menu-item > a,
.nav-link[aria-current="page"],
.nav-link[aria-current="page"]:hover {
	background-color: transparent;
	color: var(--brand-white);
	transform: none;
	box-shadow: inset 0 -2px 0 var(--brand-green);
}

.hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: none;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
}

.hamburger-line {
	display: block;
	height: 3px;
	background: var(--brand-white);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
	opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

.mobile-overlay {
	position: fixed;
	inset: 0;
	/* Sobre el header (z 100), debajo del panel (z 1020) y de #wpadminbar (z 1030). */
	z-index: 1018;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s;
}

.mobile-overlay:not([hidden]) {
	opacity: 1;
}

.mobile-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	/* Debajo de #wpadminbar (z 1030) y sobre .site-header (z 100). */
	z-index: 1020;
	width: min(320px, 80vw);
	background: var(--brand-blue-dark);
	display: flex;
	flex-direction: column;
	padding: calc(24px + var(--wp-admin-bar-offset, 0px)) 24px 28px;
	gap: 4px;
	box-shadow: -18px 0 42px rgba(11, 11, 11, 0.22);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.mobile-panel:not([hidden]) {
	transform: translateX(0);
}

.mobile-close {
	position: absolute;
	top: 16px;
	right: 12px;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	color: var(--brand-white);
	font-size: 2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-brand {
	display: flex;
	align-items: center;
	padding: 8px 4px 12px;
	margin-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-brand img {
	width: 140px;
	height: auto;
}

.mobile-divider {
	height: 1px;
	margin: 8px 14px;
	background: rgba(255, 255, 255, 0.18);
}

.mobile-link--cta {
	background: var(--brand-green);
	color: var(--brand-black);
	font-weight: 800;
}

.mobile-link--cta:hover,
.mobile-link--cta:focus-visible {
	background: var(--brand-green);
	color: var(--brand-black);
}

.mobile-link--cta::after {
	display: none;
}

.mobile-link--cta[aria-current="page"] {
	background: var(--brand-green);
	color: var(--brand-black);
}

.mobile-link--volunteer {
	margin-top: 4px;
	color: var(--brand-yellow);
	box-shadow: inset 0 0 0 1px rgba(248, 223, 39, 0.55);
}

.mobile-link--volunteer:hover,
.mobile-link--volunteer:focus-visible,
.mobile-link--volunteer[aria-current="page"] {
	background: var(--brand-yellow);
	color: var(--brand-black);
	box-shadow: none;
}

.mobile-nav {
	display: grid;
	gap: 4px;
}

.mobile-nav-list {
	display: grid;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-nav-list .menu-item {
	margin: 0;
}

.mobile-nav-list a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 8px 14px;
	border-radius: 1rem;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.3;
	text-decoration: none;
}

.mobile-nav-list a:hover,
.mobile-nav-list a:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	color: var(--brand-white);
}

.mobile-nav-list .current-menu-item > a {
	background: rgba(255, 255, 255, 0.15);
	color: var(--brand-yellow);
}

.mobile-nav-list .menu-item--volunteer {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-link {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 8px 14px;
	border-radius: 1rem;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.3;
	transition: background 0.2s;
}

.mobile-link::after {
	content: "→";
	margin-left: auto;
	opacity: 0.45;
	font-size: 1.2rem;
	transition: transform 180ms var(--ease-out), opacity 180ms ease;
}

.mobile-link:hover,
.mobile-link:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	color: var(--brand-white);
}

.mobile-link:hover::after,
.mobile-link:focus-visible::after {
	opacity: 1;
	transform: translateX(4px);
}

.mobile-link[aria-current="page"] {
	background: rgba(255, 255, 255, 0.15);
	color: var(--brand-yellow);
}

body.menu-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Hero (home)
 * ------------------------------------------------------------------ */
.hero {
	background:
		linear-gradient(110deg, rgba(24, 59, 120, 0.97) 0%, rgba(58, 98, 168, 0.94) 48%, rgba(245, 247, 251, 1) 48%),
		var(--brand-blue);
	min-height: calc(100svh - var(--header-height));
	padding: var(--space-xl) 0 var(--space-lg);
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(120deg, transparent 16%, rgba(160, 198, 47, 0.78) 16%, rgba(160, 198, 47, 0.78) 22%, transparent 22%),
		linear-gradient(120deg, transparent 68%, rgba(248, 223, 39, 0.72) 68%, rgba(248, 223, 39, 0.72) 72%, transparent 72%);
	pointer-events: none;
	mix-blend-mode: multiply;
}

.hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
	gap: var(--space-lg);
	align-items: center;
	position: relative;
	z-index: 1;
}

.hero-copy {
	max-width: 500px;
}

.hero-kicker {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: var(--font-xs);
	font-weight: 800;
	color: var(--brand-yellow);
	margin-bottom: var(--space-sm);
}

.hero h1 {
	color: var(--brand-white);
	font-size: clamp(1.618rem, 5vw, 3.236rem);
	line-height: 1.06;
	max-width: 600px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
	margin-bottom: var(--space-sm);
}

.hero-subtitle {
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--font-sm);
	max-width: 500px;
	margin-top: var(--space-md);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-ctas {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--space-sm);
	margin-top: var(--space-lg);
}

.hero-proof {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
	margin: var(--space-md) 0 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
}

.hero-proof strong {
	color: var(--brand-yellow);
	font-size: 1.25rem;
}

.cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 20px;
	border-radius: 999px;
	font-weight: 900;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0;
	transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.cta:hover {
	transform: translateY(-1px);
}

.cta.primary {
	background: var(--brand-green);
	color: var(--brand-black);
	box-shadow: 0 10px 20px rgba(160, 198, 47, 0.24);
}

.cta.secondary {
	border: 2px solid rgba(255, 255, 255, 0.7);
	color: var(--brand-white);
}

.cta.secondary:hover {
	background: var(--brand-white);
	color: var(--brand-blue-dark);
}

.hero-visual {
	display: flex;
	align-items: center;
	justify-content: center;
	height: fit-content;
}

.hero-photo {
	position: relative;
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 22px 46px rgba(24, 59, 120, 0.28);
	aspect-ratio: 4 / 3;
	border: 6px solid var(--brand-white);
	width: 100%;
	max-width: 500px;
}

.hero-photo img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}

.hero-photo figcaption {
	position: absolute;
	left: 14px;
	bottom: 14px;
	max-width: calc(100% - 28px);
	padding: 8px 12px;
	border-radius: 10px;
	background: rgb(0 0 0 / 15%);
	color: var(--brand-white);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.3;
}

/* ------------------------------------------------------------------ *
 * Page Hero (interior)
 * ------------------------------------------------------------------ */
.page-hero {
	position: relative;
	overflow: hidden;
	padding: var(--space-lg) 0 var(--space-md);
	background:
		linear-gradient(120deg, rgba(24, 59, 120, 0.94), rgba(58, 98, 168, 0.92)),
		var(--brand-blue);
	color: var(--brand-white);
}

.hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(120deg, rgba(24, 59, 120, 0.88) 0%, rgba(58, 98, 168, 0.78) 50%, rgba(58, 98, 168, 0.60) 100%);
}

.page-hero::before {
	content: "";
	position: absolute;
	inset: auto -8% -42px auto;
	width: min(520px, 62vw);
	height: 150px;
	background: var(--brand-green);
	transform: skewX(-22deg);
	opacity: 0.95;
	z-index: 1;
}

.page-hero-inner {
	position: relative;
	z-index: 1;
	max-width: 760px;
	padding-top: var(--space-sm);
}

.page-hero .kicker {
	display: inline-flex;
	margin-bottom: var(--space-md);
	color: var(--brand-yellow);
	font-size: var(--font-xs);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.page-hero h1 {
	max-width: 720px;
	margin-bottom: var(--space-sm);
	color: var(--brand-white);
	font-size: clamp(1.618rem, 5vw, 3.236rem);
}

.page-hero p {
	max-width: 650px;
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--font-sm);
}

/* ------------------------------------------------------------------ *
 * Section title
 * ------------------------------------------------------------------ */
.section-title {
	display: grid;
	gap: var(--space-xs);
	max-width: 760px;
	margin-bottom: var(--space-lg);
}

.section-title .kicker {
	font-size: var(--font-xs);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--brand-blue);
}

.section-title h2 {
	font-size: clamp(1.618rem, 4vw, 2.618rem);
	margin: 0;
	color: var(--brand-blue-dark);
}

.section-title p {
	margin: 0;
	max-width: 640px;
	font-size: var(--font-sm);
	color: var(--text-muted);
}

.section-heading-row {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: var(--space-lg);
}

.section-heading-row .section-title {
	margin-bottom: var(--space-lg);
}

.gallery-link {
	flex: 0 0 auto;
	margin: 0 0 var(--space-lg);
}

.section-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: var(--space-lg);
	color: var(--brand-blue-dark);
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	transition: color 160ms ease, gap 160ms ease;
}

.section-link:hover,
.section-link:focus-visible {
	color: var(--brand-blue);
	gap: 0.7rem;
}

/* ------------------------------------------------------------------ *
 * Program card
 * ------------------------------------------------------------------ */
.program-card {
	position: relative;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 8px;
	padding: var(--space-lg);
	box-shadow: var(--shadow-soft);
	transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms ease;
}

.program-card:hover,
.program-card:focus-within {
	transform: translateY(-5px);
	border-color: rgba(58, 98, 168, 0.38);
	box-shadow: 0 20px 44px rgba(17, 24, 39, 0.14);
}

.card-img {
	display: block;
	margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-lg)) var(--space-md);
	width: calc(100% + 2 * var(--space-lg));
	height: 200px;
	overflow: hidden;
}

.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.card-body {
	position: relative;
	z-index: 1;
}

.card-body .mark {
	display: block;
	width: 44px;
	height: 6px;
	margin-bottom: var(--space-md);
	background: var(--brand-green);
	transform: skewX(-24deg);
}

.card-body h3 {
	font-size: 1.18rem;
	color: var(--brand-blue-dark);
	margin: 0 0 0.5em;
}

.program-summary {
	color: var(--text-muted);
}

.program-card .audience {
	display: inline-flex;
	margin: var(--space-xs) 0 0;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--surface-strong);
	font-size: 0.84rem;
	font-weight: 800;
	color: var(--brand-blue);
}

.card-body ul {
	padding-left: 18px;
	margin: var(--space-sm) 0 0;
	color: var(--text-muted);
}

.card-body li + li {
	margin-top: var(--space-xs);
}

/* ------------------------------------------------------------------ *
 * Impact metric
 * ------------------------------------------------------------------ */
.impact-metric {
	position: relative;
	min-height: 150px;
	background:
		linear-gradient(150deg, var(--brand-blue-dark), var(--brand-blue));
	color: var(--brand-white);
	padding: var(--space-lg) var(--space-md);
	border-radius: 8px;
	text-align: left;
	overflow: hidden;
	box-shadow: var(--shadow-brand);
}

.impact-metric::after {
	content: "";
	position: absolute;
	right: -24px;
	bottom: -18px;
	width: 130px;
	height: 42px;
	background: var(--brand-green);
	transform: skewX(-24deg);
}

.impact-metric .value {
	position: relative;
	z-index: 1;
	color: var(--brand-yellow);
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1;
	font-weight: 900;
	margin: 0;
}

.impact-metric .label {
	position: relative;
	z-index: 1;
	margin: var(--space-xs) 0 0;
	color: var(--brand-white);
	font-weight: 800;
}

.impact-metric .period {
	position: relative;
	z-index: 1;
	display: block;
	font-size: 0.85rem;
	margin-top: var(--space-xs);
	color: rgba(255, 255, 255, 0.72);
}

/* ------------------------------------------------------------------ *
 * Testimonial card
 * ------------------------------------------------------------------ */
.testimonial-card {
	margin: 0;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-left: 6px solid var(--brand-green);
	padding: var(--space-lg);
	border-radius: 8px;
	box-shadow: var(--shadow-soft);
	transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.testimonial-card:hover,
.testimonial-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 20px 44px rgba(17, 24, 39, 0.14);
}

.testimonial-header {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	margin-bottom: var(--space-sm);
}

.avatar {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid var(--brand-green);
}

.avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.testimonial-author {
	flex: 1;
}

.testimonial-card .quote {
	font-style: italic;
	color: var(--brand-black);
	font-weight: 500;
	margin: 0;
}

.testimonial-card .name {
	color: var(--brand-blue-dark);
	font-weight: 900;
	margin: 0;
}

.testimonial-card .role,
.testimonial-card .context {
	margin: var(--space-xs) 0 0;
	color: var(--text-muted);
}

/* ------------------------------------------------------------------ *
 * Gallery grid
 * ------------------------------------------------------------------ */
.gallery-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-grid .tile {
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	box-shadow: var(--shadow-soft);
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid .tile:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-brand);
}

.gallery-grid .tile:active {
	transform: translateY(-2px);
}

.gallery-grid .tile img {
	transition: transform 0.3s;
	width: 100%;
	height: 230px;
	object-fit: cover;
	display: block;
}

.gallery-grid .tile:hover img {
	transform: scale(1.05);
}

.gallery-grid figcaption {
	padding: 12px 14px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-muted);
}

/* ------------------------------------------------------------------ *
 * CTA box
 * ------------------------------------------------------------------ */
.cta-box {
	margin-top: var(--space-xl);
	padding: var(--space-lg);
	border: 1px solid var(--border-soft);
	border-radius: 8px;
	background:
		linear-gradient(135deg, rgba(160, 198, 47, 0.16), transparent 44%),
		var(--surface);
	box-shadow: var(--shadow-soft);
}

.cta-box h3 {
	color: var(--brand-blue-dark);
	margin: 0 0 0.5em;
}

.cta-box p {
	color: var(--text-muted);
}

.cta-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: var(--space-sm);
	padding: 11px 18px;
	border-radius: 999px;
	background: var(--brand-blue);
	color: var(--brand-white);
	font-weight: 800;
	font-size: 0.9rem;
	text-transform: uppercase;
	text-decoration: none;
	min-height: 44px;
}

.cta-link:hover {
	background: var(--brand-blue-dark);
}

/* ------------------------------------------------------------------ *
 * Contact form
 * ------------------------------------------------------------------ */
.contact-form {
	display: grid;
	gap: 16px;
	max-width: 520px;
	padding: 24px;
	border: 1px solid var(--border-soft);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: var(--shadow-soft);
}

.contact-form .field {
	display: grid;
	gap: 6px;
}

.contact-form label {
	color: var(--brand-blue-dark);
	font-weight: 800;
	font-size: 0.9rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
	border: 1px solid var(--border-soft);
	border-radius: 8px;
	padding: 12px;
	font-family: inherit;
	font-size: 1rem;
	color: var(--text-primary);
	background: var(--surface-alt);
	width: 100%;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
	border-color: var(--brand-blue);
	background: var(--surface);
	outline: 3px solid var(--brand-yellow);
	outline-offset: 2px;
}

.contact-form .submit {
	min-height: 48px;
	padding: 12px 20px;
	border: none;
	border-radius: 999px;
	background: var(--brand-blue);
	color: var(--brand-white);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
	cursor: pointer;
}

.contact-form .submit:hover {
	background: var(--brand-blue-dark);
}

.form-note {
	font-size: 0.9rem;
	color: var(--text-muted);
	margin: 0;
}

.contact-form .honeypot {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */
.site-footer {
	margin-top: 0;
	padding: var(--space-xl) 0;
	background: #2d3e52;
	color: var(--brand-white);
	border-top: 3px solid var(--brand-green);
}

.footer-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(190px, 0.8fr);
	gap: var(--space-lg);
	align-items: start;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: var(--space-md);
}

.footer-brand .logo {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
}

.footer-title {
	margin: 0 0 var(--space-xs);
	font-size: 1.1rem;
	font-weight: 900;
	text-transform: uppercase;
	color: var(--brand-yellow);
}

.footer-brand p {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
}

.footer-label {
	margin: 0 0 var(--space-xs);
	color: var(--brand-yellow);
	font-weight: 800;
}

.footer-note p {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
}

.footer-links {
	display: grid;
	gap: 2px;
}

.footer-links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	padding: 4px 0 4px var(--space-xs);
	color: var(--brand-white);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.4;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.footer-links a:hover {
	color: var(--brand-yellow);
	transform: translateX(4px);
	border-color: var(--brand-yellow);
}

.footer-links a::after {
	content: "→";
	margin-left: var(--space-sm);
	color: var(--brand-green);
	font-size: 1.1em;
	line-height: 1;
}

.footer-links a:focus-visible {
	outline: 2px solid var(--brand-yellow);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ *
 * Lightbox
 * ------------------------------------------------------------------ */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s, visibility 0.25s;
}

.lightbox[aria-hidden="false"] {
	visibility: visible;
	opacity: 1;
}

.lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
}

.lightbox-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
	max-height: 90vh;
}

.lightbox-close {
	position: fixed;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.4rem;
	cursor: pointer;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.lightbox-close:hover {
	opacity: 1;
}

.lightbox-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 3rem;
	cursor: pointer;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	opacity: 0.6;
	transition: opacity 0.2s;
}

.lightbox-nav:hover {
	opacity: 1;
}

.lightbox-prev {
	left: 8px;
}

.lightbox-next {
	right: 8px;
}

.lightbox-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: calc(90vh - 60px);
}

.lightbox-picture {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-img {
	max-width: 100%;
	max-height: calc(90vh - 60px);
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 0 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
	gap: 16px;
}

.lightbox-caption {
	flex: 1;
	margin: 0;
	text-align: center;
}

.lightbox-counter {
	flex-shrink: 0;
	font-weight: 600;
	opacity: 0.6;
}

body.lightbox-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Accesibilidad
 * ------------------------------------------------------------------ */
.skip-link {
	position: absolute;
	top: -40px;
	left: 16px;
	padding: 8px 12px;
	background: var(--brand-yellow);
	color: var(--brand-black);
	border-radius: 999px;
	z-index: 1000;
}

.skip-link:focus {
	top: 16px;
}

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

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.section {
		padding: calc(var(--space-xl) + var(--space-md)) 0;
	}
}

@media (max-width: 900px) {
	.hero-inner {
		grid-template-columns: 1fr;
	}

	.hero-photo {
		width: 100%;
		max-width: 100%;
	}

	.hero-ctas {
		flex-wrap: wrap;
	}

	.hero-copy {
		max-width: 620px;
	}
}

@media (max-width: 1100px) {
	.header-inner {
		align-items: center;
		gap: 12px;
	}

	.nav,
	.nav-list {
		display: none;
	}

	.hamburger {
		display: flex;
	}
}

@media (max-width: 720px) {
	.section-heading-row {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--space-sm);
	}

	.section-heading-row .section-title,
	.gallery-link {
		margin-bottom: 0;
	}

	.section {
		padding: var(--space-xl) 0;
	}

	.cta-box {
		padding: var(--space-md);
	}

	.lightbox-img {
		max-height: calc(80vh - 60px);
	}

	.lightbox-prev {
		left: 4px;
	}

	.lightbox-next {
		right: 4px;
	}

	.lightbox-nav {
		font-size: 2rem;
		width: 44px;
		height: 44px;
	}
}

@media (max-width: 640px) {
	.site-footer {
		padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
	}

	.footer-inner {
		grid-template-columns: 1fr;
		gap: var(--space-md);
		text-align: center;
	}

	.footer-brand {
		flex-direction: column;
		text-align: center;
	}

	.footer-links {
		width: min(100%, 280px);
		margin-inline: auto;
		text-align: left;
	}

	.footer-note {
		grid-column: 1;
	}
}

@media (max-width: 520px) {
	.hero-ctas {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-ctas .cta {
		width: 100%;
	}

	.site-main {
		padding-top: calc(85px + var(--wp-admin-bar-offset, 0px));
	}
}

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