/* Horizon DB Variables */
:root {
	/* Dark Mode Colors (Default) */
	--bg-body: #1a1a1a;
	--bg-sidebar: #000000; /* Updated to pure black */
	--bg-card: #2a2a2a;
	--text-primary: #e0e0e0;
	--text-secondary: #aaaaaa;
	--border-color: #444444;
	--accent-color: #4da3ff;
	
	/* Dimensions */
	--hero-height: 400px;
	--sidebar-width: 260px;
	--font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sidebar-z: 1000;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-stack);
	background-color: var(--bg-body);
	color: var(--text-primary);
	min-height: 100vh;
	display: block;
	transition: background-color 0.3s, color 0.3s;
}

/* --- Hero Image (Full Width Top) --- */
.hero-container {
	width: 100%;
	height: var(--hero-height);
	overflow: hidden;
	position: relative;
	z-index: 1;
}
.hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 20%;
}

/* --- Layout Container --- */
.layout-container {
	display: flex;
	width: 100%;
	min-height: calc(100vh - var(--hero-height));
	position: relative;
}

/* --- Sidebar (Sticky) --- */
.sidebar {
	width: var(--sidebar-width);
	background-color: var(--bg-sidebar);
	border-right: 1px solid var(--border-color);
	padding: 20px;
	display: flex;
	flex-direction: column;
	z-index: 100;
	
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

/* --- Main Content --- */
.main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 2rem;
}

/* Navigation Styles */
.brand {
	font-size: 1.5rem;
	font-weight: bold;
	margin-bottom: 2rem;
	color: var(--text-primary);
	text-decoration: none;
	display: block;
}

.nav-section { margin-bottom: 2rem; }
.nav-header {
	text-transform: uppercase;
	font-size: 0.75rem;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
	letter-spacing: 1px;
	font-weight: 600;
}

.nav-link {
	display: block;
	padding: 8px 0;
	color: var(--text-primary);
	text-decoration: none;
	transition: color 0.2s;
}
.nav-link:hover { color: var(--accent-color); }
.nav-link.active { font-weight: bold; color: var(--accent-color); }

/* Theme Toggle */
.theme-toggle {
	margin-top: auto;
	padding: 10px;
	background: transparent;
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	cursor: pointer;
	border-radius: 4px;
	width: 100%;
}
.theme-toggle:hover { background-color: var(--border-color); }

/* Hamburger (Mobile) */
.hamburger {
	display: none;
	position: fixed;
	top: 15px;
	left: 15px;
	z-index: 1100;
	background: rgba(0,0,0,0.6);
	color: white;
	border: none;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1.2rem;
}
.overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 900;
}

/* Header & Search */
.header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	gap: 1rem;
}
.page-title { margin: 0; }
.search-input {
	padding: 10px 16px;
	border: 1px solid var(--border-color);
	background-color: var(--bg-card);
	color: var(--text-primary);
	border-radius: 24px;
	width: 280px;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.25);
}

/* Grid */
.masonry-grid {
	column-count: 4;
	column-gap: 1.5rem;
}

/* Cards */
.card {
	background-color: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
	break-inside: avoid;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-image {
	width: 100%;
	display: block;
	border-bottom: 1px solid var(--border-color);
	aspect-ratio: 16/9;
	object-fit: cover;
	object-position: 50% 20%;
}
.card-body { padding: 1rem; }
.card-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	color: var(--text-primary);
}
.card-desc {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 1rem;
	line-height: 1.4;
}

/* Tags */
.tag-container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.tag-pill {
	background-color: var(--bg-body);
	border: 1px solid var(--border-color);
	color: var(--text-secondary);
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	text-decoration: none;
	transition: background 0.2s;
	z-index: 2;
	position: relative;
}
.tag-pill:hover {
	background-color: var(--accent-color);
	color: white;
	border-color: var(--accent-color);
}

/* Responsive */
@media (max-width: 1200px) { .masonry-grid { column-count: 3; } }
@media (max-width: 900px) { .masonry-grid { column-count: 2; } }
@media (max-width: 768px) {
	.layout-container { flex-direction: column; }
	.hamburger { display: block; }
	
	.sidebar { 
		position: fixed; 
		top: 0; left: 0; bottom: 0;
		transform: translateX(-100%); 
		z-index: 2000;
		width: 260px;
		transition: transform 0.3s ease;
		height: 100%;
	}
	.sidebar.open { transform: translateX(0); box-shadow: 5px 0 15px rgba(0,0,0,0.5); }
	.overlay.active { display: block; }
	
	.main-content { width: 100%; padding: 1rem; }
	.masonry-grid { column-count: 1; }
	.hero-container { height: 250px; }
	.header-row { flex-direction: column; align-items: flex-start; }
	.search-input { width: 100%; }
}
