/*
	Estilos globales del sitio
	- Paleta sobria: grises, negro, blanco, azul oscuro
	- Tipografía: Inter/Roboto/Open Sans
	- Soporte modo claro/oscuro (prefiere oscuro por defecto)
	- Sin animaciones de entrada; sólo transiciones suaves de hover/tema
*/

:root {
	--bg: #23324e;
	--bg-elev: #202d47;
	--text: #e7eaf0;
	--muted: #a5adba;
	--primary: #1e3a8a; /* azul oscuro */
	--primary-600: #27438f;
	--border: #232a37;
	--card: #121621;
	--shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Light theme overrides */
.light {
	--bg: #f7f8fa;
	--bg-elev: #ffffff;
	--text: #0e1320;
	--muted: #4b5563;
	--primary: #1e3a8a;
	--primary-600: #27438f;
	--border: #e5e7eb;
	--card: #ffffff;
	--shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 5%;
	font-family: Inter, Roboto, "Open Sans", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
svg { display: inline-block; vertical-align: middle; }

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

/* Header */
.header {
	position: fixed;
	top: 0;
	left: 0;
    width: 100%;      /* ocupa todo el ancho */
	z-index: 1000;
	backdrop-filter: saturate(120%) blur(8px);
	border-bottom: 1px solid var(--border);
	background: color-mix(in oklab, var(--bg) 84%, transparent);
}
.header--solid { background: var(--bg-elev); }

.navbar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
}
.navbar__logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
.navbar__logo svg { width: 28px; height: 28px; }

.navbar__menu {
	display: flex; gap: 18px; justify-content: center; align-items: center;
}
.navbar__menu a {
	color: var(--muted);
	text-decoration: none;
	font-weight: 600;
	letter-spacing: 0.2px;
	padding: 8px 10px;
	border-radius: 8px;
	transition: color .2s ease, background .2s ease;
}
.navbar__menu a:hover { color: var(--text); background: color-mix(in oklab, var(--primary) 12%, transparent); }
.navbar__menu a.active { color: var(--text); background: color-mix(in oklab, var(--primary) 18%, transparent); }

.navbar__actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.theme-toggle {
	border: 1px solid var(--border);
	background: var(--bg-elev);
	color: var(--text);
	padding: 8px 10px;
	border-radius: 10px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
/* Por defecto (tema claro) mostramos el sol */
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
/* Cuando el body tenga la clase dark-mode, mostramos la luna */
body.dark-mode .theme-toggle .icon-sun { display: none; }
body.dark-mode .theme-toggle .icon-moon { display: inline; }

/* Banner solo en Inicio */
.banner {
	height: 46vh;
	min-height: 320px;
	background: url('https://images.unsplash.com/photo-1525547719571-a2d4ac8945e2?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
	border-bottom: 1px solid var(--border);
	display: grid; place-items: center; text-align: center;
}
.banner__content { background: color-mix(in oklab, var(--bg) 30%, transparent); padding: 24px 28px; border-radius: 14px; box-shadow: var(--shadow); }
.banner__title { margin: 0 0 8px; font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
.banner__subtitle { margin: 0; color: var(--muted); }

/* Loader */
#loader {
	position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg);
	z-index: 2000; transition: opacity .3s ease, visibility .3s ease;
}
.loader__inner { display: grid; place-items: center; gap: 16px; }
.loader__ring { width: 56px; height: 56px; }
.loader__text { color: var(--muted); font-weight: 600; letter-spacing: 0.3px; }
#loader.hidden { opacity: 0; visibility: hidden; }

/* Secciones */
.section { padding: 48px 0; }
.section__title { font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 18px; }

/* Consolas: filtros y grid */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; justify-content: space-between;}
.input {
	background: var(--bg-elev);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 12px;
	border-radius: 10px;
	outline: none;
	transition: border-color .15s ease, background .15s ease;
}
.input:focus { border-color: color-mix(in oklab, var(--primary) 50%, var(--border)); }
.select { composes: input; }

.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
	grid-column: span 12;
	background: var(--card);
	border: 2px solid var(--primary);
	border-radius: 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);/*var(--shadow)*/;
	overflow: hidden;
	transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--primary)/*color-mix(in oklab, var(--primary) 35%, var(--border))*/; box-shadow: 0 12px 28px rgba(0,0,0,0.28); }
.card__media { /*height: 220px*/aspect-ratio: 4/3/*16/9*/; background: #0b0e15; display: grid; place-items: center; overflow: hidden; border-bottom: 2px solid var(--border);}
.card__media img { width: 100%; height: 100%; object-fit: /*contain*/cover; }
.card__body { padding: 14px 14px 16px; }
.card__title { margin: 0 0 6px; font-size: 18px; }
.card__desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.button {
	background: var(--primary);
	color: #fff;
	border: none;
	padding: 10px 14px;
	border-radius: 10px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background .2s ease, transform .1s ease;
}
.button:hover { background: var(--primary-600); transform: translateY(-1px); }

@media (min-width: 560px) { .card { grid-column: span 6; } }
@media (min-width: 960px) { .card { grid-column: span 4; } }

/* Paginación */
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 48px; }
.page-btn {
	border: 1px solid var(--border);
	font-size: 20px;
	background: var(--bg-elev);
	color: var(--text);
	padding: 18px 20px;
	border-radius: 10px;
	cursor: pointer;
	min-width: 40px;
	transition: background .2s ease;
}
.page-btn.active { background: color-mix(in oklab, var(--primary) 22%, transparent); }

/* Galería */
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.gallery-item { grid-column: span 12; border-radius: 12px; overflow: hidden; border: 2px solid var(--primary); background: var(--card); cursor: zoom-in; }
@media (min-width: 560px) { .gallery-item { grid-column: span 6; } }
@media (min-width: 960px) { .gallery-item { grid-column: span 4; } }

/* Modal */
.modal { position: fixed; inset: 0; background: color-mix(in oklab, var(--bg) 86%, black); display: none; place-items: center; z-index: 1500; }
.modal.open { display: grid; }
.modal__inner { width: min(1000px, 92%); }
.modal__image { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Curiosidades */
.fact-card { background: var(--card); border: 2px solid var(--primary); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.fact-card h3 { margin: 0 0 6px; font-size: 18px; }
.fact-card p { margin: 0; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 300px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 18px 0; align-items: center; }
.footer__menu { display: flex; gap: 14px; }
.footer__menu a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer__menu a:hover { color: var(--text); }
.footer__social { display: flex; gap: 12px; justify-content: flex-end; }
.footer__social a { color: var(--muted); border: 1px solid var(--border); padding: 8px; border-radius: 10px; display: inline-flex; }
.footer__social a:hover { color: var(--text); }

/* Utils */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; }

/* Aqui van los logos png de cada consola*/
.detail-header { display: flex; justify-content: space-between; /* título a la izq - img a la der */ align-items: center; margin-bottom: 12px; gap: 20px;}
.detail-title { display: flex; flex-direction: column; /* título y subtítulo uno bajo otro */}
.detail-icon { width: 200px;   /* ajusta el tamaño de tu PNG */ height: auto; }