/* ==========================================================================
   27games — Hoja de estilos principal
   Diseño gaming, modo oscuro por defecto, responsive.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
	--zg-font-heading: 'Rajdhani', 'Arial Narrow', 'Segoe UI', sans-serif;
	--zg-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--zg-bg: #0b0d17;
	--zg-bg-alt: #11142a;
	--zg-bg-elev: #181c38;
	--zg-bg-soft: #161a33;
	--zg-border: rgba(255, 255, 255, 0.08);
	--zg-border-strong: rgba(255, 255, 255, 0.18);

	--zg-text: #e9ecf8;
	--zg-text-soft: #c4cae0;
	--zg-text-muted: #949bb8;

	--zg-accent: #7b2ff7;
	--zg-accent-2: #ff2fa0;
	--zg-accent-3: #00e5ff;
	--zg-success: #22d3a5;
	--zg-warning: #ffb020;
	--zg-danger: #ff4d6d;

	--zg-grad: linear-gradient(120deg, var(--zg-accent) 0%, var(--zg-accent-2) 100%);
	--zg-grad-cyan: linear-gradient(120deg, var(--zg-accent-3), var(--zg-accent));

	--zg-radius: 14px;
	--zg-radius-sm: 9px;
	--zg-radius-pill: 999px;

	--zg-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.7);
	--zg-glow: 0 0 0 1px rgba(123, 47, 247, 0.4), 0 18px 46px -12px rgba(123, 47, 247, 0.55);

	--zg-gutter: clamp(18px, 4vw, 36px);
	--zg-maxw: 1200px;
	--zg-header-h: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	/* Recorta el desborde horizontal (p. ej. menú off-canvas cerrado).
	   Se usa clip y no hidden para no crear un scroll container que
	   rompería position: sticky. */
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: var(--zg-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--zg-text);
	background-color: var(--zg-bg);
	background-image:
		radial-gradient(1100px 520px at 85% -10%, rgba(123, 47, 247, 0.16), transparent 60%),
		radial-gradient(900px 480px at -10% 10%, rgba(0, 229, 255, 0.1), transparent 55%);
	background-attachment: fixed;
	overflow-x: clip; /* Mismo motivo que en html: clip, no hidden. */
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--zg-accent-3);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--zg-accent-2);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--zg-font-heading);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 0.6em;
	color: var(--zg-text);
	letter-spacing: 0.2px;
}

p {
	margin: 0 0 1em;
}

ul, ol {
	margin: 0 0 1em;
	padding-left: 1.4em;
}

button {
	font-family: inherit;
	cursor: pointer;
}

input,
select,
textarea {
	font-family: inherit;
	font-size: 1rem;
	color: var(--zg-text);
	background: var(--zg-bg-elev);
	border: 1px solid var(--zg-border-strong);
	border-radius: var(--zg-radius-sm);
	padding: 12px 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--zg-accent);
	box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.28);
}

::selection {
	background: var(--zg-accent);
	color: #fff;
}

/* Utilidades */
.zg-container {
	width: 100%;
	max-width: var(--zg-maxw);
	margin-inline: auto;
	padding-inline: var(--zg-gutter);
}

.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;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--zg-accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 var(--zg-radius-sm) 0;
}

.skip-link:focus {
	left: 0;
	color: #fff;
}

:focus-visible {
	outline: 2px solid var(--zg-accent-3);
	outline-offset: 3px;
	border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Botones y etiquetas
   -------------------------------------------------------------------------- */
.zg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--zg-font-heading);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 13px 26px;
	border-radius: var(--zg-radius-pill);
	border: 0;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.zg-btn--primary {
	background: var(--zg-grad);
	color: #fff;
	box-shadow: 0 10px 26px -10px rgba(255, 47, 160, 0.65);
}

.zg-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 34px -10px rgba(255, 47, 160, 0.8);
	color: #fff;
}

.zg-btn--ghost {
	background: transparent;
	color: var(--zg-text);
	border: 1px solid var(--zg-border-strong);
}

.zg-btn--ghost:hover {
	border-color: var(--zg-accent-3);
	color: var(--zg-accent-3);
	transform: translateY(-2px);
}

.zg-btn--sm {
	padding: 9px 18px;
	font-size: 0.85rem;
}

.zg-tag {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--zg-accent-3);
	background: rgba(0, 229, 255, 0.1);
	border: 1px solid rgba(0, 229, 255, 0.28);
	border-radius: var(--zg-radius-pill);
	padding: 3px 12px;
	margin: 0 6px 6px 0;
}

.zg-tag:hover {
	background: rgba(0, 229, 255, 0.2);
	color: var(--zg-accent-3);
}

.zg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: var(--zg-text-muted);
}

.zg-meta__sep {
	opacity: 0.5;
}

/* --------------------------------------------------------------------------
   4. Cabecera
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 13, 23, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--zg-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	height: var(--zg-header-h);
}

.site-title {
	font-family: var(--zg-font-heading);
	font-size: 1.9rem;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--zg-text);
	line-height: 1;
}

.site-title__mark {
	background: var(--zg-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.site-title:hover {
	color: var(--zg-text);
}

.site-branding .custom-logo {
	max-height: 48px;
	width: auto;
}

/* Navegación principal */
.main-navigation .menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation .menu-item {
	position: relative;
}

.main-navigation .menu-item > a {
	display: block;
	padding: 10px 16px;
	font-family: var(--zg-font-heading);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--zg-text-soft);
	border-radius: var(--zg-radius-sm);
	transition: color 0.2s ease, background 0.2s ease;
}

.main-navigation .menu-item > a:hover,
.main-navigation .menu-item.current-menu-item > a,
.main-navigation .menu-item.current_page_item > a {
	color: #fff;
	background: rgba(123, 47, 247, 0.16);
}

/* Submenús */
.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--zg-bg-elev);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius-sm);
	box-shadow: var(--zg-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.main-navigation .menu-item:hover > .sub-menu,
.main-navigation .menu-item:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-navigation .sub-menu .menu-item > a {
	font-size: 0.92rem;
	text-transform: none;
}

/* Botón hamburguesa (oculto en escritorio) */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: transparent;
	border: 1px solid var(--zg-border-strong);
	border-radius: var(--zg-radius-sm);
}

.menu-toggle__bar {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--zg-text);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Acciones del header */
.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.header-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--zg-text-soft);
	background: transparent;
	border: 1px solid var(--zg-border-strong);
	border-radius: var(--zg-radius-sm);
	transition: color 0.2s ease, border-color 0.2s ease;
}

.header-search-toggle:hover {
	color: var(--zg-accent-3);
	border-color: var(--zg-accent-3);
}

/* Panel de búsqueda del header */
.header-search {
	border-top: 1px solid var(--zg-border);
	background: var(--zg-bg-alt);
	padding: 18px 0;
}

.header-search[hidden] {
	display: none;
}

/* Formulario de búsqueda */
.zg-search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.zg-search-form__field {
	width: 100%;
	padding: 14px 54px 14px 18px;
	border-radius: var(--zg-radius-pill);
	background: var(--zg-bg-elev);
	border: 1px solid var(--zg-border-strong);
}

.zg-search-form__submit {
	position: absolute;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	color: #fff;
	background: var(--zg-grad);
	border: 0;
	border-radius: 50%;
	transition: transform 0.18s ease;
}

.zg-search-form__submit:hover {
	transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.zg-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(70px, 10vw, 130px) 0;
	background:
		radial-gradient(760px 380px at 78% 18%, rgba(255, 47, 160, 0.28), transparent 60%),
		radial-gradient(820px 420px at 18% 82%, rgba(123, 47, 247, 0.34), transparent 60%),
		linear-gradient(180deg, rgba(11, 13, 23, 0) 0%, var(--zg-bg) 100%);
	border-bottom: 1px solid var(--zg-border);
	text-align: center;
}

.zg-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	pointer-events: none;
}

.zg-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 820px;
}

.zg-hero__eyebrow {
	display: inline-block;
	font-family: var(--zg-font-heading);
	text-transform: uppercase;
	letter-spacing: 4px;
	font-size: 0.85rem;
	color: var(--zg-accent-3);
	background: rgba(0, 229, 255, 0.08);
	border: 1px solid rgba(0, 229, 255, 0.25);
	padding: 6px 16px;
	border-radius: var(--zg-radius-pill);
	margin-bottom: 18px;
}

.zg-hero__title {
	font-size: clamp(3rem, 9vw, 6rem);
	letter-spacing: 2px;
	margin-bottom: 0.25em;
}

.zg-hero__title .zg-text-grad {
	background: var(--zg-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.zg-hero__lead {
	font-size: clamp(1rem, 2vw, 1.25rem);
	color: var(--zg-text-soft);
	max-width: 620px;
	margin: 0 auto 34px;
}

.zg-hero__search {
	max-width: 640px;
	margin: 0 auto;
}

.zg-hero__search .zg-search-form__field {
	padding: 18px 62px 18px 22px;
	font-size: 1.05rem;
	border-color: rgba(255, 255, 255, 0.22);
	box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.7);
}

.zg-hero__stats {
	display: flex;
	justify-content: center;
	gap: clamp(24px, 6vw, 64px);
	margin-top: 44px;
}

.zg-hero__stat {
	text-align: center;
}

.zg-hero__stat-num {
	font-family: var(--zg-font-heading);
	font-size: 2.2rem;
	font-weight: 700;
	background: var(--zg-grad-cyan);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.zg-hero__stat-label {
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--zg-text-muted);
}

/* --------------------------------------------------------------------------
   6. Secciones
   -------------------------------------------------------------------------- */
.zg-section {
	padding: clamp(44px, 7vw, 84px) 0;
}

.zg-section + .zg-section {
	border-top: 1px solid var(--zg-border);
}

.zg-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 30px;
}

.zg-section__title {
	font-size: clamp(1.7rem, 3.4vw, 2.4rem);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 14px;
}

.zg-section__title::before {
	content: '';
	width: 6px;
	height: 1.15em;
	background: var(--zg-grad);
	border-radius: var(--zg-radius-pill);
	display: inline-block;
}

.zg-section__link {
	font-family: var(--zg-font-heading);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--zg-text-soft);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.zg-section__link:hover {
	color: var(--zg-accent-3);
}

/* --------------------------------------------------------------------------
   7. Tarjetas (juegos y posts)
   -------------------------------------------------------------------------- */
.zg-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.zg-grid--games {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.zg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius);
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.zg-card:hover {
	transform: translateY(-5px);
	border-color: rgba(123, 47, 247, 0.55);
	box-shadow: var(--zg-glow);
}

.zg-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--zg-bg-elev);
}

.zg-card--game .zg-card__media {
	aspect-ratio: 3 / 4;
}

.zg-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.zg-card:hover .zg-card__media img {
	transform: scale(1.06);
}

.zg-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--zg-font-heading);
	font-size: 3rem;
	font-weight: 700;
	background: var(--zg-grad);
	color: rgba(255, 255, 255, 0.85);
}

.zg-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 18px 18px;
}

.zg-card__cats {
	margin-bottom: 8px;
}

.zg-card__title {
	font-size: 1.18rem;
	margin-bottom: 8px;
}

.zg-card__title a {
	color: var(--zg-text);
}

.zg-card__title a:hover {
	color: var(--zg-accent-3);
}

.zg-card__excerpt {
	font-size: 0.92rem;
	color: var(--zg-text-muted);
	margin-bottom: 14px;
	flex: 1;
}

.zg-card__meta {
	margin-top: auto;
}

/* Rating de juegos */
.zg-card__score {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	font-family: var(--zg-font-heading);
	font-weight: 700;
	font-size: 0.95rem;
	background: rgba(11, 13, 23, 0.85);
	backdrop-filter: blur(4px);
	border: 1px solid var(--zg-border-strong);
	padding: 3px 10px;
	border-radius: var(--zg-radius-pill);
}

.zg-card__score--hot {
	color: var(--zg-success);
	border-color: rgba(34, 211, 165, 0.5);
}

.zg-card__platforms {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}

.zg-card__platform {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--zg-text-muted);
	background: var(--zg-bg-elev);
	border: 1px solid var(--zg-border);
	padding: 2px 9px;
	border-radius: var(--zg-radius-pill);
}

/* --------------------------------------------------------------------------
   8. Encabezado de página / archivos
   -------------------------------------------------------------------------- */
.page-header {
	padding: clamp(36px, 6vw, 64px) 0 8px;
}

.page-header__title {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	margin-bottom: 8px;
}

.page-header__subtitle {
	color: var(--zg-text-muted);
}

.page-header__query {
	background: var(--zg-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* FiltrBar del catálogo */
.zg-filters {
	background: var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius);
	padding: 20px;
	margin: 24px 0;
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 16px;
	align-items: end;
}

.zg-filters__group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.zg-filters__label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--zg-text-muted);
}

.zg-filters select {
	width: 100%;
}

.zg-filters__actions {
	display: flex;
	gap: 10px;
}

.zg-archive-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}

.zg-archive-tools__count {
	color: var(--zg-text-muted);
	font-size: 0.9rem;
}

.zg-order {
	display: inline-flex;
	border: 1px solid var(--zg-border-strong);
	border-radius: var(--zg-radius-pill);
	overflow: hidden;
	margin-left: auto;
}

.zg-order a {
	padding: 9px 16px;
	font-family: var(--zg-font-heading);
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--zg-text-muted);
}

.zg-order a + a {
	border-left: 1px solid var(--zg-border);
}

.zg-order a.is-active {
	color: #fff;
	background: var(--zg-grad);
}

/* --------------------------------------------------------------------------
   9. Contenido editorial (prose)
   -------------------------------------------------------------------------- */
.zg-prose {
	max-width: 760px;
	font-size: 1.06rem;
	color: var(--zg-text-soft);
}

.zg-prose > *:first-child {
	margin-top: 0;
}

.zg-prose h2 {
	font-size: 1.7rem;
	margin-top: 1.6em;
}

.zg-prose h3 {
	font-size: 1.35rem;
	margin-top: 1.4em;
}

.zg-prose img {
	border-radius: var(--zg-radius);
	margin: 1.4em 0;
}

.zg-prose blockquote {
	margin: 1.6em 0;
	padding: 6px 0 6px 22px;
	border-left: 4px solid var(--zg-accent-2);
	color: var(--zg-text);
	font-style: italic;
	background: linear-gradient(90deg, rgba(255, 47, 160, 0.08), transparent);
}

.zg-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.zg-prose code {
	background: var(--zg-bg-elev);
	border: 1px solid var(--zg-border);
	border-radius: 6px;
	padding: 2px 7px;
	font-size: 0.9em;
}

/* Post individual */
.zg-post__header {
	padding: clamp(30px, 5vw, 56px) 0 24px;
	text-align: center;
	max-width: 860px;
}

.zg-post__title {
	font-size: clamp(1.9rem, 4.4vw, 3rem);
	margin-top: 12px;
}

.zg-post__meta {
	justify-content: center;
}

.zg-post__thumb {
	padding-bottom: 0;
}

.zg-post__image {
	width: 100%;
	border-radius: var(--zg-radius);
	box-shadow: var(--zg-shadow);
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.zg-post__footer {
	margin: 30px 0 10px;
}

/* --------------------------------------------------------------------------
   10. Ficha de juego (single-juego)
   -------------------------------------------------------------------------- */
.zg-game {
	padding-top: clamp(28px, 5vw, 52px);
}

.zg-game__hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--zg-radius);
	border: 1px solid var(--zg-border);
	margin-bottom: 36px;
	background: linear-gradient(135deg, rgba(123, 47, 247, 0.35), rgba(255, 47, 160, 0.25)), var(--zg-bg-elev);
}

.zg-game__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.35;
}

.zg-game__hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 32px;
	align-items: end;
	padding: clamp(24px, 4vw, 44px);
}

.zg-game__cover {
	border-radius: var(--zg-radius);
	box-shadow: var(--zg-shadow);
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
	border: 1px solid var(--zg-border-strong);
}

.zg-game__info {
	padding-bottom: 4px;
}

.zg-game__cats {
	margin-bottom: 10px;
}

.zg-game__title {
	font-size: clamp(2rem, 4.5vw, 3.2rem);
	margin-bottom: 12px;
}

.zg-game__meta-list {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px 24px;
}

.zg-game__meta-list li {
	font-size: 0.92rem;
}

.zg-game__meta-list strong {
	display: block;
	font-family: var(--zg-font-heading);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.76rem;
	color: var(--zg-text-muted);
	margin-bottom: 2px;
}

.zg-game__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.zg-game__score-big {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--zg-font-heading);
	font-weight: 700;
	font-size: 1.15rem;
	padding: 8px 16px;
	border-radius: var(--zg-radius-pill);
	background: rgba(34, 211, 165, 0.12);
	border: 1px solid rgba(34, 211, 165, 0.5);
	color: var(--zg-success);
}

.zg-game__grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 40px;
	align-items: start;
}

.zg-game__requirements {
	background: var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius);
	padding: 22px;
	margin-bottom: 28px;
}

.zg-game__requirements h3 {
	margin-top: 0;
}

.zg-game__req {
	margin-bottom: 16px;
}

.zg-game__req:last-child {
	margin-bottom: 0;
}

.zg-game__req-title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--zg-text-muted);
	font-weight: 600;
}

.zg-game__req-text {
	margin-top: 4px;
	font-size: 0.92rem;
	color: var(--zg-text-soft);
	white-space: pre-line;
}

/* Galería de capturas */
.zg-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin: 20px 0 10px;
}

.zg-gallery img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--zg-radius-sm);
	border: 1px solid var(--zg-border);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.zg-gallery img:hover {
	transform: scale(1.02);
	border-color: var(--zg-accent-3);
}

/* --------------------------------------------------------------------------
   11. Blog / listados de post
   -------------------------------------------------------------------------- */
.zg-grid--posts {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --------------------------------------------------------------------------
   12. Comunidad / foro
   -------------------------------------------------------------------------- */
.zg-forum {
	background: var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius);
	overflow: hidden;
}

.zg-forum__row {
	display: grid;
	grid-template-columns: 1fr 130px 130px;
	gap: 16px;
	align-items: center;
	padding: 16px 22px;
	border-bottom: 1px solid var(--zg-border);
	transition: background 0.2s ease;
}

.zg-forum__row:last-child {
	border-bottom: 0;
}

.zg-forum__row:hover {
	background: var(--zg-bg-soft);
}

.zg-forum__title {
	font-size: 1.06rem;
	margin: 0 0 4px;
}

.zg-forum__title a {
	color: var(--zg-text);
}

.zg-forum__title a:hover {
	color: var(--zg-accent-3);
}

.zg-forum__author {
	font-size: 0.85rem;
	color: var(--zg-text-muted);
}

.zg-forum__stat {
	text-align: center;
	font-size: 0.85rem;
	color: var(--zg-text-muted);
}

.zg-forum__stat strong {
	display: block;
	font-family: var(--zg-font-heading);
	font-size: 1.2rem;
	color: var(--zg-text);
}

/* --------------------------------------------------------------------------
   13. Newsletter
   -------------------------------------------------------------------------- */
.zg-newsletter {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(500px 300px at 85% 20%, rgba(255, 47, 160, 0.25), transparent 60%),
		radial-gradient(500px 300px at 12% 80%, rgba(0, 229, 255, 0.2), transparent 60%),
		var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius);
	padding: clamp(36px, 6vw, 64px) var(--zg-gutter);
	text-align: center;
}

.zg-newsletter__title {
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
	margin-bottom: 10px;
}

.zg-newsletter__text {
	color: var(--zg-text-muted);
	max-width: 560px;
	margin: 0 auto 26px;
}

.zg-newsletter__form {
	display: flex;
	gap: 10px;
	max-width: 480px;
	margin: 0 auto;
}

.zg-newsletter__form .zg-newsletter__email {
	flex: 1;
	min-width: 0;
}

.zg-newsletter__note {
	font-size: 0.8rem;
	color: var(--zg-text-muted);
	margin-top: 14px;
}

.zg-newsletter__msg {
	margin-top: 14px;
	font-weight: 600;
	min-height: 1.4em;
}

.zg-newsletter__msg--ok {
	color: var(--zg-success);
}

.zg-newsletter__msg--error {
	color: var(--zg-danger);
}

/* --------------------------------------------------------------------------
   14. Géneros populares (portada)
   -------------------------------------------------------------------------- */
.zg-genres {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.zg-genre {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 140px;
	padding: 20px;
	border-radius: var(--zg-radius);
	border: 1px solid var(--zg-border);
	background: linear-gradient(160deg, var(--zg-bg-elev), var(--zg-bg-alt));
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.zg-genre:hover {
	transform: translateY(-4px);
	border-color: var(--zg-accent);
	box-shadow: var(--zg-glow);
}

.zg-genre::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--zg-grad);
	opacity: 0.08;
	pointer-events: none;
}

.zg-genre__name {
	font-family: var(--zg-font-heading);
	font-size: 1.35rem;
	margin: 0;
	position: relative;
	z-index: 1;
}

.zg-genre__count {
	font-size: 0.85rem;
	color: var(--zg-text-muted);
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   15. Paginación
   -------------------------------------------------------------------------- */
.navigation.pagination {
	margin: 40px 0 10px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: var(--zg-radius-sm);
	border: 1px solid var(--zg-border-strong);
	color: var(--zg-text-soft);
	font-family: var(--zg-font-heading);
	font-weight: 600;
}

.nav-links .page-numbers.current {
	background: var(--zg-grad);
	border-color: transparent;
	color: #fff;
}

.nav-links .page-numbers:hover {
	border-color: var(--zg-accent);
	color: var(--zg-accent-3);
}

/* --------------------------------------------------------------------------
   16. Comentarios
   -------------------------------------------------------------------------- */
.zg-comments {
	max-width: 760px;
	margin-top: 48px;
}

.zg-comments__title {
	font-size: 1.6rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .comment-body {
	background: var(--zg-bg-alt);
	border: 1px solid var(--zg-border);
	border-radius: var(--zg-radius-sm);
	padding: 18px 20px;
	margin-bottom: 14px;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.comment-meta .avatar {
	border-radius: 50%;
}

.comment-author {
	font-weight: 600;
}

.comment-metadata {
	font-size: 0.8rem;
	color: var(--zg-text-muted);
}

.comment-form .form-submit {
	margin-top: 16px;
}

.comment-form label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--zg-text-soft);
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
}

/* --------------------------------------------------------------------------
   17. Errores / estados vacíos
   -------------------------------------------------------------------------- */
.zg-error {
	padding: clamp(70px, 12vw, 150px) 0;
	text-align: center;
}

.zg-error__code {
	font-family: var(--zg-font-heading);
	font-size: clamp(5rem, 16vw, 10rem);
	font-weight: 700;
	line-height: 1;
	margin: 0;
	background: var(--zg-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.zg-error__title {
	font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.zg-error__text {
	color: var(--zg-text-muted);
	max-width: 520px;
	margin: 0 auto 28px;
}

.zg-error__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-bottom: 34px;
}

.zg-error__search {
	max-width: 480px;
	margin: 0 auto;
}

.zg-empty {
	text-align: center;
	padding: 60px 0;
}

.zg-empty__title {
	font-size: 1.8rem;
}

.zg-search-again {
	max-width: 480px;
	margin: 26px 0;
}

/* --------------------------------------------------------------------------
   18. Pie de página
   -------------------------------------------------------------------------- */
.site-footer {
	margin-top: clamp(48px, 8vw, 90px);
	border-top: 1px solid var(--zg-border);
	background: var(--zg-bg-alt);
	padding: clamp(40px, 6vw, 64px) 0 26px;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 34px;
	margin-bottom: 40px;
}

.site-footer__heading {
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 16px;
}

.site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 9px;
}

.site-footer__menu a {
	color: var(--zg-text-muted);
	font-size: 0.94rem;
}

.site-footer__menu a:hover {
	color: var(--zg-accent-3);
}

.site-footer__desc {
	color: var(--zg-text-muted);
	font-size: 0.94rem;
	margin-top: 14px;
	max-width: 300px;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	border-top: 1px solid var(--zg-border);
	padding-top: 22px;
	font-size: 0.85rem;
	color: var(--zg-text-muted);
}

.site-footer__bottom p {
	margin: 0;
}

/* Volver arriba */
.back-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: var(--zg-radius-sm);
	background: var(--zg-grad);
	color: #fff;
	border: 0;
	box-shadow: var(--zg-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.zg-game__grid {
		grid-template-columns: 1fr;
	}

	.zg-filters {
		grid-template-columns: 1fr 1fr;
	}

	/* Menú móvil */
	.menu-toggle {
		display: flex;
	}

	.main-navigation {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(320px, 86vw);
		height: 100dvh;
		background: var(--zg-bg-alt);
		border-left: 1px solid var(--zg-border);
		transform: translateX(100%);
		visibility: hidden; /* Evita desbordes horizontales cuando está cerrado. */
		transition: transform 0.3s ease, visibility 0s linear 0.3s;
		z-index: 90;
		padding: 96px 24px 24px;
		overflow-y: auto;
	}

	.main-navigation.is-open {
		transform: translateX(0);
		visibility: visible;
		transition: transform 0.3s ease, visibility 0s linear 0s;
		box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
	}

	.main-navigation .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.main-navigation .sub-menu {
		position: static;
		opacity: 1;
		visibility: inherit; /* Hereda del nav: oculto si el menú está cerrado. */
		transform: none;
		box-shadow: none;
		background: transparent;
		border: 0;
		padding: 0 0 0 14px;
	}

	.main-navigation .menu-item > a {
		padding: 13px 16px;
		font-size: 1.1rem;
	}
}

@media (max-width: 768px) {
	.zg-game__hero-inner {
		grid-template-columns: 1fr;
	}

	.zg-game__cover {
		max-width: 220px;
	}

	.zg-filters {
		grid-template-columns: 1fr;
	}

	.zg-hero__stats {
		gap: 28px;
	}

	.zg-forum__row {
		grid-template-columns: 1fr auto;
	}

	.zg-forum__stat {
		display: none;
	}

	.zg-newsletter__form {
		flex-direction: column;
	}
}

@media (max-width: 560px) {
	.zg-grid,
	.zg-grid--posts,
	.zg-grid--games {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.zg-grid--posts {
		grid-template-columns: 1fr;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.zg-order {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
	}

	.zg-order a {
		flex: 1;
		text-align: center;
	}

	.zg-archive-tools {
		justify-content: space-between;
	}
}

/* --------------------------------------------------------------------------
   20. Accesibilidad: movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
