/* Synchronize sidebar and main content for overlap */
body.sidebar-open main.main-content {
	margin-left: 0 !important;
	padding-left: 0 !important;
}
body.sidebar-open header.site-header {
	margin-left: 0 !important;
	padding-left: 0 !important;
}

/* Global Reset and Box Model */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
}
html, body {
	height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
	box-sizing: border-box;
}

body {
	display: flex; /* Ensures full height for layout */
	flex-direction: column; /* Ensures full height for layout */
	min-height: 100vh; /* Ensures full height for layout */
	background-color: #181a1b; /* or your preferred color */

}

main.main-content {
	flex: 1 0 auto; /* Ensures main content takes available space */
}

footer.site-footer {
	flex-shrink: 0; /* Prevents footer from shrinking */
	width:100%; 
	margin: 0; 
	padding: 0; 
	border: none; 
	box-shadow: none; 
}

/* Header */
header.site-header {
	width: 100%;
	display: flex; 
	justify-content: space-between; 
	align-items: center; 
	position: sticky; 
	top: 0; 
	background: #222;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	z-index: 100; 
	margin-left: 0;
	padding-left: 0;
}
.header-icons button:hover i {
	color: #fff;
}

/* Navigation Bar Below Header */
.nav-bar {
	width: 100%; 
	z-index: 99; 
}
nav.main-nav {
	width: 100%;
	display: flex; 
	justify-content: center;
}
nav.main-nav ul {
	display: flex; 
	gap: 24px; 
	list-style: none; 
	padding: 0 32px;
	margin: 0;
}
nav.main-nav a {
	padding: 12px 8px;
	display: block; 
}

.header-row {
	display: flex; 
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
}
.header-left {
		display: flex;
		align-items: center;
		gap: 8px;
		flex: 0 0 auto;
}

.header-center {
	display: flex;
	align-items: center;
	flex: 1 1 0%;
	justify-content: center;
}
.header-center .search-box {
	margin: 0 auto;
}

/* Sidebar */
aside.sidebar {
	width: 220px;
}
.header-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	justify-content: flex-end;
	padding-right: 16px;
}
/* Ensure search box expands in center */
.header-center .search-box {
	width: 100%;
    min-width: 180px;
	max-width: 358px;
	height: 32px;
	display: flex;
	align-items: center;
	background: var(--color-bg-input);
	border-radius: 6px;
	border: 1px solid #444;
	padding: 0 4px;
}
.header-center .search-box input[type="text"],
.header-center .search-box input[type="search"] {
	height: 28px;
	font-size: 1em;
	padding: 0 8px;
	border: none;
	background: transparent;
	color: #e0e0e0;
	outline: none;
	width: 100%;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.header-center .search-box input[type="text"]:-webkit-autofill,
.header-center .search-box input[type="text"]:-webkit-autofill:hover,
.header-center .search-box input[type="text"]:-webkit-autofill:focus,
.header-center .search-box input[type="search"]:-webkit-autofill,
.header-center .search-box input[type="search"]:-webkit-autofill:hover,
.header-center .search-box input[type="search"]:-webkit-autofill:focus {
	-webkit-text-fill-color: #e0e0e0;
	caret-color: #e0e0e0;
	-webkit-box-shadow: 0 0 0 1000px #181a1b inset;
	box-shadow: 0 0 0 1000px #181a1b inset;
	transition: background-color 9999s ease-in-out 0s;
}
.header-center .search-box button[type="submit"] {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 64px;
	height: 32px;
	background: none;
	border: none;
	border-left: 1px solid #444;
	border-radius: 4px;
	cursor: pointer;
	position: relative;
}
.header-center .search-box button[type="submit"]:hover {
	background: none;
	color: #fff;
}
/* Pseudo-element for small circular highlight on hover */
.header-center .search-box button[type="submit"]:hover::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 28px;
	height: 28px;
	background: #222;
	border-radius: 50%;
	z-index: 0;
}
.header-center .search-box button[type="submit"] i {
	position: relative;
	z-index: 1;
	font-size: 1.2em;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	width: 100%;
	height: 100%;
}


/* Main Content */
main.centered-content {
	flex: 1 0 auto;
	width: 100%;
	min-width: 0;
	padding: 0 16px;
}

main.main-content {
	flex: 1 0 auto;
	display: block !important;
	min-height: 300px;
	width: 100%;
	min-width: 0;
	/* Removed background and border-radius for layout/positioning test */
}

/* Footer */
footer.main {
    width: 100%;
    outline: none;
    display: flex;
    align-items: center;
	justify-content: space-between;
    position: relative;
    flex-shrink: 0;
	padding: 16px 16px;
	line-height: 12px;
}
nav.footer ul {
	display: flex;
	gap: 16px;
	list-style: none;
	margin-right: 16px;
}

@media (max-width: 900px) {
	body {
		min-width: 0;
		overflow-x: hidden;
	}

	.header-row {
		flex-wrap: wrap;
		gap: 12px;
		padding-right: 12px;
	}

	.header-left,
	.header-center,
	.header-right {
		width: 100%;
	}

	.header-center {
		justify-content: stretch;
		order: 3;
	}

	.header-center .search-box {
		max-width: none;
		width: 100%;
	}

	.header-right {
		justify-content: flex-end;
		padding-right: 0;
	}

	nav.main-nav ul {
		gap: 12px;
		padding: 0 12px;
	}

	footer.main {
		flex-direction: column;
		gap: 12px;
		text-align: center;
		line-height: 1.4;
	}

	nav.footer ul {
		flex-wrap: wrap;
		justify-content: center;
		margin-right: 0;
		padding: 0;
	}

	main.centered-content {
		padding: 0 12px;
	}
}

/* Utility Classes */
.container {
	max-width: 1200px;
	margin: 0;
	padding: 0;
}

