/* Center logo, slogan, and main navigation menu + Rounded Outer Container */
.container--outer {
	border-radius: 16px;
}

.header {
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
}

.footer {
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
}

.logo {
	text-align: center;
}

.logo__link {
	display: inline-block;
	text-align: center;
}

.logo__text {
	text-align: center;
}

@media screen and (min-width: 768px) {
	.menu__list {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
	}
}

/* Centered Homepage Layout & Hide Right Sidebar + Main Menu on Homepage */
body:has(.home-centered) .menu,
body:has(.home-centered) .divider {
	display: none !important;
}

body:has(.home-centered) .header {
	border-bottom: 0 !important;
}

body:has(.home-centered) .sidebar {
	display: none !important;
}

body:has(.home-centered) .primary {
	-webkit-flex: 1 0 100% !important;
	flex: 1 0 100% !important;
	max-width: 100% !important;
}

.home-centered {
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

.home-section-title {
	position: relative;
	display: inline-block;
	margin: 0 auto 1.5rem;
	padding-bottom: 0.5rem;
	font-size: 1.35rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 3px solid #e22d30;
}

/* 1. Google-style AJAX Search Section */
.home-search-section {
	padding: 2rem 1rem 2.5rem;
	margin-bottom: 1.5rem;
}

.home-search-lead {
	font-size: 1.15rem;
	color: var(--color-text-muted, #666);
	margin-bottom: 1.5rem;
}

.home-search-box {
	position: relative;
	max-width: 620px;
	margin: 0 auto;
}

.home-search-input-wrap {
	display: flex;
	align-items: center;
	background: var(--color-surface, #fff);
	border: 1px solid var(--color-border, #dfe1e5);
	border-radius: 999px;
	padding: 0.45rem 1.15rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-search-input-wrap:focus-within {
	border-color: #e22d30;
	box-shadow: 0 4px 14px rgba(226, 45, 48, 0.16);
}

.home-search-icon {
	flex-shrink: 0;
	color: #888;
	margin-right: 0.75rem;
}

.home-search-input {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--color-text, #222);
	padding: 0.35rem 0;
}

.home-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.home-search-clear {
	background: transparent;
	border: 0;
	color: #888;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.25rem;
	margin-left: 0.5rem;
}

.home-search-clear:hover {
	color: #e22d30;
}

.home-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 50;
	background: var(--color-surface, #fff);
	border: 1px solid var(--color-border, #dfe1e5);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	max-height: 420px;
	overflow-y: auto;
	text-align: left;
}

.home-search-result-item {
	display: block;
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid var(--color-border, #eee);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.home-search-result-item:last-child {
	border-bottom: 0;
}

.home-search-result-item:hover {
	background-color: var(--color-surface-alt, #f8f9fa);
}

.home-search-result-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.25rem;
}

.home-search-result-title {
	font-weight: 700;
	color: var(--color-text, #222);
	font-size: 0.98rem;
}

.home-search-result-item:hover .home-search-result-title {
	color: #e22d30;
}

.home-search-cat,
.home-search-badge {
	flex-shrink: 0;
	font-size: 0.75rem;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--color-surface-alt, #f1f3f5);
	color: var(--color-text-muted, #666);
	font-weight: 600;
}

.home-search-result-snippet {
	font-size: 0.85rem;
	color: var(--color-text-muted, #666);
	line-height: 1.45;
}

.home-search-empty {
	padding: 1.25rem;
	text-align: center;
	color: var(--color-text-muted, #666);
}

/* 2. Latest 5 Posts + Load More */
.home-posts-section {
	margin-bottom: 3rem;
}

.home-posts-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 1.75rem;
}

.home-post-card {
	padding: 1.35rem 1.5rem;
	background: var(--color-surface, #fff);
	border: 1px solid var(--color-border, #eaeaea);
	border-radius: 10px;
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.home-post-card:hover {
	border-color: #e22d30;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.home-post-card__title {
	font-size: 1.2rem;
	margin: 0 0 0.45rem;
}

.home-post-card__title a {
	color: var(--color-text, #222);
	text-decoration: none;
}

.home-post-card__title a:hover {
	color: #e22d30;
}

.home-post-card__meta {
	font-size: 0.85rem;
	color: var(--color-text-muted, #777);
	margin-bottom: 0.65rem;
}

.home-post-card__sep {
	margin: 0 0.4rem;
}

.home-post-card__cat {
	color: #e22d30;
	font-weight: 600;
	text-decoration: none;
}

.home-post-card__cat:hover {
	text-decoration: underline;
}

.home-post-card__excerpt {
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--color-text, #444);
	max-width: 680px;
	margin: 0 auto;
}

.home-load-more-wrap {
	text-align: center;
	margin-top: 1.25rem;
}

.home-load-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 2.25rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background: #e22d30;
	color: #fff;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.home-load-more-btn:hover {
	background: #c41e21;
}

.home-load-more-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

/* 3. Centered Categories List */
.home-categories-section {
	margin-bottom: 2.5rem;
	padding-top: 1rem;
}

.home-categories-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.home-category-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 1.1rem;
	background: var(--color-surface-alt, #f5f5f5);
	border: 1px solid var(--color-border, #e0e0e0);
	border-radius: 999px;
	color: var(--color-text, #333);
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	transition: all 0.2s ease;
}

.home-category-item:hover {
	background: #e22d30;
	border-color: #e22d30;
	color: #fff;
}

.home-category-item__count {
	font-size: 0.8rem;
	opacity: 0.75;
}

/* Hide Hugo & Roadster footer credits */
.footer__copyright-credits {
	display: none !important;
}

/* Circular Dark/Light Icon Theme Toggle Button */
.theme-toggle {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border-radius: 50% !important;
}

.theme-toggle__label {
	font-size: 0 !important;
	line-height: 0;
}

.theme-toggle::before {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	/* Moon icon (shown in light mode to switch to dark) */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .theme-toggle::before {
	/* Sun icon (shown in dark mode to switch to light) */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
}

/* Single Post & Category List Fullwidth (Hide Right Sidebar) & Related/Category Posts Grid */
.sidebar {
	display: none !important;
}

.primary {
	-webkit-flex: 1 0 100% !important;
	flex: 1 0 100% !important;
	max-width: 100% !important;
}

.category-posts__grid {
	margin-top: 1.25rem;
	margin-bottom: 2rem;
}

.pagination {
	text-align: center;
	margin-top: 1.5rem;
}

.related-posts {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 2px solid var(--color-border, #eaeaea);
}

.related-posts__heading {
	display: inline-block;
	font-size: 1.25rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding-bottom: 0.4rem;
	margin-bottom: 1.25rem;
	border-bottom: 3px solid #e22d30;
}

.related-posts__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.15rem;
}

.related-posts__item {
	padding: 1.15rem 1.25rem;
	background: var(--color-surface, #fff);
	border: 1px solid var(--color-border, #eaeaea);
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-posts__item:hover {
	border-color: #e22d30;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.related-posts__title {
	font-size: 1.02rem;
	line-height: 1.4;
	margin: 0 0 0.4rem;
}

.related-posts__title a {
	color: var(--color-text, #222);
	text-decoration: none;
}

.related-posts__title a:hover {
	color: #e22d30;
}

.related-posts__meta {
	font-size: 0.8rem;
	color: var(--color-text-muted, #777);
	margin-bottom: 0.5rem;
}

.related-posts__cat {
	color: #e22d30;
	font-weight: 600;
	text-decoration: none;
}

.related-posts__cat:hover {
	text-decoration: underline;
}

.related-posts__excerpt {
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--color-text-muted, #555);
	margin: 0;
}


