/* ===== VARIABLES GLOBALES ===== */
:root {
	--navbar-height: 64px;
	--bg-dark: #0a0c10;
	--bg-surface: #14181f;
	--primary: #7c3aed;
	--primary-hover: #6d28d9;
	--text-light: #f3f4f6;
	--text-muted: #9ca3af;
	--border: #2d3748;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
	--transition: all 0.2s ease;
	--page-padding: 1.25rem;
}

/* ===== RESET Y BASE ===== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	width: 100%;
	min-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	font-family: 'Poppins', sans-serif;
}

body {
	padding-top: var(--navbar-height);
	background: linear-gradient(180deg, #050609 0%, #071018 100%);
	color: #e6f8ef;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.45;
}

/* ===== UTILIDADES ===== */
.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 var(--page-padding);
}

/* ===== NAVBAR REAL (CUANDO CARGA EL CONTENIDO) ===== */
#navbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 5001;
	background: rgba(10, 12, 16, 0.95);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
	padding: 0.75rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: var(--shadow);
}

#main-navbar {
	overflow: visible !important;
}

/* ===== LAYOUT CONTENEDORES ===== */
/* Hero full-width: el componente hero maneja su propio padding */
#main-hero {
	width: 100%;
	padding: 0;
}

/* main-content es full-width: los hijos manejan su propio láyout */
#main-content {
	width: 100%;
	padding-bottom: 0;
}

#main-footer {
	width: 100%;
	padding: 0;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.brand img {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	object-fit: cover;
	background: var(--primary);
}

.brand .title {
	font-weight: 700;
	font-size: 1.3rem;
	background: linear-gradient(135deg, #fff, var(--primary));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	letter-spacing: 0.5px;
	display: inline-block;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
	align-items: center;
}

.nav-links a {
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.5rem 0;
	position: relative;
	transition: var(--transition);
}

.nav-links a:hover {
	color: var(--text-light);
}

.nav-links a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--primary);
	transition: width 0.2s;
}

.nav-links a:hover::after {
	width: 100%;
}

.actions {
	display: flex;
	align-items: center;
	gap: 1.2rem;
}

.search-box {
	display: flex;
	align-items: center;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.4rem 0.8rem;
	transition: var(--transition);
}

.search-box:focus-within {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

.search-box .material-icons {
	color: var(--text-muted);
	font-size: 1.2rem;
	margin-right: 0.3rem;
}

.search-box input {
	background: transparent;
	border: none;
	outline: none;
	color: var(--text-light);
	font-size: 0.9rem;
	width: 180px;
}

.search-box input::placeholder {
	color: var(--text-muted);
	opacity: 0.7;
}

.avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid var(--primary);
	cursor: pointer;
	transition: var(--transition);
}

.avatar:hover {
	transform: scale(1.05);
	border-color: var(--primary-hover);
}

.avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hamburger {
	display: none;
	background: none;
	border: none;
	color: var(--text-light);
	cursor: pointer;
}

.hamburger .material-icons {
	font-size: 2rem;
}

/* Menú móvil (oculto por defecto) */
.mobile-menu {
	display: none;
	position: fixed;
	top: var(--navbar-height, 64px);
	left: 0;
	width: 100%;
	background: var(--bg-surface);
	border-top: 1px solid var(--border);
	padding: 1rem;
	flex-direction: column;
	gap: 1rem;
	z-index: 999;
	transform: translateY(-100%);
	transition: transform 0.3s ease;
	box-shadow: var(--shadow);
	overflow: hidden;
}

.mobile-menu.open {
	transform: translateY(0);
}

.mobile-menu a {
	color: var(--text-light);
	text-decoration: none;
	font-weight: 600;
	padding: 0.75rem;
	border-radius: 8px;
	transition: var(--transition);
}

.mobile-menu a:hover {
	background: rgba(124, 58, 237, 0.1);
	color: var(--primary);
}

.mobile-search {
	display: flex;
	align-items: center;
	background: var(--bg-dark);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.5rem 1rem;
	margin-top: 0.5rem;
}

.mobile-search .material-icons {
	color: var(--text-muted);
	margin-right: 0.5rem;
}

.mobile-search input {
	background: transparent;
	border: none;
	outline: none;
	color: var(--text-light);
	width: 100%;
}

/* ===== ANIMACIÓN SKELETON (SHIMMER) ===== */
@keyframes skeleton-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

/* ===== SKELETON NAVBAR ===== */
.skeleton-navbar {
	height: 64px;
	width: 100%;
	background: linear-gradient(90deg, #071018 25%, #0b1220 50%, #071018 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	gap: 1.2rem;
	padding: 0 1.5rem;
}

/* Variantes de líneas para navbar */
.skeleton-line.logo-line {
	width: 100px;
	height: 20px;
	margin-right: 1.5rem;
}

.skeleton-line.nav-item-line {
	width: 60px;
	height: 16px;
	margin: 0 0.5rem;
}

.skeleton-line.search-line {
	width: 120px;
	height: 16px;
	margin-right: 1rem;
}

.skeleton-spacer {
	flex: 1;
	min-width: 20px;
}

/* ===== SKELETON HERO ===== */
.skeleton-hero {
	aspect-ratio: 21 / 9;
	width: 100%;
	background: linear-gradient(90deg, #061018 25%, #081222 50%, #061018 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	border-radius: 16px;
	margin-top: 2rem;
	margin-bottom: 2rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 1rem;
	padding: 2.5rem;
}

.skeleton-line.hero-title-line {
	width: 60%;
	height: 32px;
}

.skeleton-line.hero-subtitle-line {
	width: 40%;
	height: 18px;
}

.skeleton-line.hero-button-line {
	width: 180px;
	height: 36px;
	border-radius: 18px;
}

/* ===== SKELETON CONTENIDO ===== */
.skeleton-content {
	min-height: 320px;
	max-width: 1100px;
	width: 100%;
	background: linear-gradient(90deg, #101a24 25%, #18222c 50%, #101a24 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	border-radius: 24px;
	margin: 0 auto 2rem auto;
	box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
	padding: 2rem 1.5rem;
}

.skeleton-content-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	justify-content: flex-start;
}

/* ===== SKELETON CARDS ===== */
.skeleton-card {
	background: rgba(16, 26, 36, 0.85);
	border-radius: 20px;
	width: 260px;
	min-height: 320px;
	box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
	padding: 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
}

.skeleton-thumb {
	width: 100%;
	aspect-ratio: 3/4;
	border-radius: 16px;
	background: linear-gradient(90deg, #23263a 25%, #353a4d 50%, #23263a 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	margin-bottom: 1rem;
}

.skeleton-line {
	height: 18px;
	width: 80%;
	border-radius: 8px;
	background: linear-gradient(90deg, #23263a 25%, #353a4d 50%, #23263a 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	margin-bottom: 0.5rem;
}

.skeleton-line.short {
	width: 40%;
}

.skeleton-avatar-sm {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(90deg, #23263a 25%, #353a4d 50%, #23263a 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	display: inline-block;
	margin-right: 0.7rem;
	vertical-align: middle;
}

.skeleton-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(90deg, #23263a 25%, #353a4d 50%, #23263a 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	display: inline-block;
	margin-right: 0.7rem;
	vertical-align: middle;
}

.skeleton-card-footer {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.skeleton-line.card-bottom-line {
	width: 60%;
	margin-top: 1rem;
}

/* ===== SKELETON FOOTER ===== */
.skeleton-footer {
	height: 120px;
	max-width: 1100px;
	width: 100%;
	background: linear-gradient(90deg, #050506 25%, #071018 50%, #050506 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s infinite linear;
	border-radius: 24px 24px 0 0;
	margin: 2rem auto 0 auto;
	display: block;
}

/* ===== RESPONSIVE (MÓVIL) ===== */
@media (max-width: 768px) {

	/* Navbar real: ocultamos enlaces y acciones, mostramos hamburguesa */
	.nav-links,
	.actions {
		display: none;
	}

	.hamburger {
		display: block;
	}

	/* Skeletons */
	.skeleton-navbar {
		flex-wrap: wrap;
		padding: 0.75rem 0.5rem !important;
		gap: 0.7rem !important;
	}

	.skeleton-navbar .skeleton-line {
		width: 40vw !important;
		min-width: 60px;
		max-width: 120px;
	}

	.skeleton-hero {
		padding: 2rem 0.5rem !important;
		gap: 0.7rem !important;
		width: 100%;
	}

	.skeleton-hero .skeleton-line {
		width: 80% !important;
		min-width: 80px;
		max-width: 95%;
	}

	.skeleton-content-inner {
		gap: 1rem;
		padding: 1rem 0.2rem;
		flex-direction: column;
		align-items: center;
	}

	.skeleton-card {
		width: 95%;
		min-width: 0;
		max-width: 400px;
		padding: 0.8rem;
	}
}

@media (max-width: 480px) {
	.skeleton-hero {
		aspect-ratio: 4 / 3;
	}

	.skeleton-hero .skeleton-line.hero-title-line {
		width: 80%;
	}
}