/* styles.css - Mobile-first, bordes tenues, sin fondos */
:root {
	/* Palette variables (dark theme canvas on body) */
	--bg: #0f1724; /* dark slate, not pure black */
	--surface: rgba(
		255,
		255,
		255,
		0.02
	); /* subtle surface if needed (kept transparent by default) */
	--text: #e6eef6; /* main text color */
	--muted: rgba(230, 238, 246, 0.7);
	--accent: #60a5fa; /* azul tenue para focos */
	--border-color: rgba(255, 255, 255, 0.06);
	--border: 1px solid var(--border-color);
	--radius: 8px;
	--gap: 12px;
	--max-width: 980px;
}

/* Reset ligero */
* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
}
body {
	margin: 0 auto;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
		Arial;
	color: var(--text);
	background: var(--bg); /* lienzo oscuro (no negro puro) */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.35;
	padding: 16px;
	max-width: var(--max-width);
}

/* === HEADER STICKY === */
header.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--bg);
	border-bottom: var(--border);
	padding: 12px 16px;
}

.header-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: var(--max-width);
	margin: 0 auto;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-brand img {
	width: 40px;
	height: 40px;
}

.header-brand h1 {
	font-size: 1.1rem;
	margin: 0;
	line-height: 1.2;
}

.header-brand p {
	margin: 0;
	color: var(--muted);
	font-size: 0.75rem;
	line-height: 1;
}

/* Botón hamburguesa */
.menu-toggle {
	background: transparent;
	border: none;
	color: var(--text);
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background 0.2s;
}

.menu-toggle:hover {
	background: var(--surface);
}

/* === MENÚ FULLSCREEN OVERLAY === */
.menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--bg);
	z-index: 2000;
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.menu-overlay.active {
	display: block;
	opacity: 1;
}

/* Botón cerrar menú */
.menu-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: transparent;
	border: none;
	color: var(--text);
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background 0.2s;
	z-index: 10;
}

.menu-close:hover {
	background: var(--surface);
	color: var(--accent);
}

.menu-content {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 40px 24px;
	text-align: center;
}

/* Header del menú */
.menu-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.menu-header img {
	width: 64px;
	height: 64px;
}

.menu-header h2 {
	font-size: 1.5rem;
	margin: 0;
}

.menu-header p {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Navegación del menú */
.menu-nav {
	display: flex;
	flex-direction: column;
	gap: 24px;
	flex: 1;
	justify-content: center;
	align-items: center;
}

.menu-nav a {
	color: var(--text);
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: 500;
	transition: color 0.2s;
	padding: 12px 24px;
	border-radius: 8px;
}

.menu-nav a:hover {
	color: var(--accent);
	background: var(--surface);
}

/* Redes sociales del menú */
.menu-social {
	display: flex;
	gap: 24px;
	justify-content: center;
	padding-bottom: 20px;
}

.menu-social a {
	color: var(--muted);
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	border-radius: 50%;
}

.menu-social a:hover {
	color: var(--accent);
	background: var(--surface);
	transform: scale(1.1);
}

/* === DESKTOP: Header en 3 columnas === */
@media (min-width: 768px) {
	/* Ocultar botón hamburguesa en desktop */
	.menu-toggle {
		display: none;
	}

	/* Ocultar botón cerrar en desktop */
	.menu-close {
		display: none;
	}

	/* Ocultar overlay y mostrar contenido inline */
	.menu-overlay {
		position: static;
		display: block !important;
		opacity: 1 !important;
		background: transparent;
		z-index: auto;
	}

	/* Header top en 3 columnas: logo | nav | social */
	.header-top {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		gap: 24px;
		padding: 0;
	}

	/* Logo en primera columna */
	.header-brand {
		grid-column: 1;
		justify-self: start;
	}

	/* Contenido del menú inline */
	.menu-content {
		position: static;
		display: grid;
		grid-template-columns: subgrid;
		grid-column: 1 / -1;
		height: auto;
		padding: 0;
		align-items: center;
	}

	/* Ocultar header del menú en desktop */
	.menu-header {
		display: none;
	}

	/* Nav en segunda columna (centro) */
	.menu-nav {
		flex-direction: row;
		gap: 16px;
		flex: none;
		justify-content: center;
		grid-column: 2;
		padding: 0;
	}

	.menu-nav a {
		font-size: 0.95rem;
		padding: 8px 16px;
		font-weight: 400;
	}

	/* Redes sociales en tercera columna (derecha) */
	.menu-social {
		padding-bottom: 0;
		gap: 12px;
		justify-content: flex-end;
		grid-column: 3;
	}

	.menu-social a {
		padding: 8px;
	}
}

.toolbar {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	align-items: center;
}
input[type="search"] {
	flex: 1;
	padding: 10px;
	border-radius: 8px;
	border: var(--border);
	background: transparent;
	color: var(--text);
	outline: none;
}
input[type="search"]::placeholder {
	color: rgba(230, 238, 246, 0.45);
}
input[type="search"]:focus {
	box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.08);
	border-color: rgba(96, 165, 250, 0.3);
}
button {
	padding: 8px 12px;
	border-radius: 8px;
	border: var(--border);
	background: transparent;
	color: var(--text);
}

section.directory {
	display: grid;
	gap: var(--gap);
}

article.card {
	padding: 12px;
	border-radius: 10px;
	border: var(--border);
	background: transparent;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.card h3 {
	margin: 0;
	font-size: 1rem;
}
.card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Progress + stepper (global) */
.progress-wrap {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 0;
	background: var(--bg);
	margin: 10px 0;
	/*border: 1px solid green; /* dev */
}
.stages {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 6px;
	margin: 0;
	list-style: none;
}
.stage {
	position: relative;
	text-align: center;
	flex: 0 0 auto;
	width: calc(100% / var(--steps));
}
.stage::before {
	content: "";
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--border-color);
	display: block;
	margin: 0 auto 8px;
}
.stage.completed::before {
	background: linear-gradient(90deg, var(--accent), rgba(96, 165, 250, 0.6));
	border-color: transparent;
}
.stage.current::before {
	box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.06);
	background: linear-gradient(90deg, var(--accent), rgba(96, 165, 250, 0.6));
}
.stage[title]:hover::after {
	content: attr(title);
	position: absolute;
	top: -36px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: var(--text);
	padding: 6px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	white-space: nowrap;
	pointer-events: none;
}
.stage__date {
	display: block;
	font-size: 0.75rem;
	color: var(--muted);
}

/* Mobile adjustments: allow horizontal scrolling if needed */
@media (max-width: 600px) {
	.progress-wrap {
		overflow-x: auto;
		padding-bottom: 12px; /* espacio para el scrollbar */
	}
	.progress {
		min-width: calc(
			90px * var(--steps)
		); /* ancho mínimo basado en los stages */
		margin: 0 6px; /* alinear con el padding de stages */
	}
	.stages {
		gap: 8px;
		padding: 0 6px;
		min-width: calc(90px * var(--steps)); /* mismo ancho que el progress */
	}
	.stage {
		flex: 0 0 auto;
		min-width: 90px;
	}
}

/* Progress bar styles */
.progress {
	height: 12px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.02),
		rgba(255, 255, 255, 0.01)
	);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.03);
	position: relative;
	z-index: 1;
}
.progress__bar {
	height: 100%;
	background: linear-gradient(90deg, var(--accent), rgba(96, 165, 250, 0.6));
	width: 0;
	transition: width 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}
.card .progress {
	margin-top: 10px;
}

.meta {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	color: var(--muted);
	font-size: 0.85rem;
}

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

footer.site-footer {
	margin-top: 18px;
	padding: 12px;
	border-radius: 8px;
	border: var(--border);
	text-align: center;
	color: var(--muted);
}

/* small utility for subtle dividers */
.divider {
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--border-color) 50%,
		transparent
	);
	opacity: 0.5;
}

/* Responsive: tablet and up */
@media (min-width: 700px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.brand h1 {
		font-size: 1.4rem;
	}
}

@media (min-width: 1000px) {
	.grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.progress-wrap {
	padding-top: 22px;
	position: relative;
	z-index: 1;
}

.progress {
	width: 100%;
	display: block;
	position: relative;
	z-index: 1;
}

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