/* =========================================
   404 Error Page — Styles
   Add this to your theme's style.css,
   or enqueue as a separate stylesheet.
========================================= */

.error-404 {
	padding: 80px 20px;
	background: #f9fafb;
	text-align: center;
}

.error-404 .container {
	max-width: 720px;
	margin: 0 auto;
}

/* ---------- Header ---------- */
.error-header .error-code {
	font-size: 110px;
	font-weight: 800;
	line-height: 1;
	margin: 0;
	background: linear-gradient(135deg, #2f855a, #38a169);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	letter-spacing: -2px;
}

.error-header .error-title {
	font-size: 28px;
	font-weight: 700;
	margin: 10px 0 12px;
	color: #1a202c;
}

.error-header .error-desc {
	font-size: 16px;
	color: #4a5568;
	max-width: 480px;
	margin: 0 auto 30px;
	line-height: 1.6;
}

/* ---------- Search ---------- */
.error-search {
	margin-bottom: 28px;
}

.error-search form {
	display: flex;
	max-width: 420px;
	margin: 0 auto;
}

.error-search input[type="search"] {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #cbd5e0;
	border-radius: 6px 0 0 6px;
	font-size: 15px;
	outline: none;
	transition: border-color 0.2s ease;
}

.error-search input[type="search"]:focus {
	border-color: #38a169;
}

.error-search button {
	padding: 12px 20px;
	background: #38a169;
	color: #fff;
	border: none;
	border-radius: 0 6px 6px 0;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.2s ease;
}

.error-search button:hover {
	background: #2f855a;
}

/* ---------- Action Buttons ---------- */
.error-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	margin-bottom: 50px;
	flex-wrap: wrap;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.2s ease;
}

.btn-primary {
	background: #38a169;
	color: #fff;
}

.btn-primary:hover {
	background: #2f855a;
	transform: translateY(-1px);
}

.btn-secondary {
	background: transparent;
	border-color: #cbd5e0;
	color: #2d3748;
}

.btn-secondary:hover {
	border-color: #38a169;
	color: #2f855a;
}

/* ---------- Popular Categories ---------- */
.error-categories {
	margin-bottom: 50px;
}

.error-categories h2 {
	font-size: 20px;
	margin-bottom: 18px;
	color: #1a202c;
}

.category-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	padding: 0;
	margin: 0;
}

.category-list a {
	display: inline-block;
	padding: 8px 16px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	color: #2d3748;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s ease;
}

.category-list a:hover {
	background: #38a169;
	border-color: #38a169;
	color: #fff;
}

.cat-count {
	color: #a0aec0;
	font-size: 12px;
	margin-left: 3px;
}

.category-list a:hover .cat-count {
	color: #e6fffa;
}

/* ---------- Recent Posts ---------- */
.recent-posts h2 {
	font-size: 20px;
	margin-bottom: 22px;
	color: #1a202c;
}

.recent-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	text-align: left;
}

.recent-post-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.recent-post-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.recent-post-thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.recent-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.recent-post-card:hover .recent-post-thumb img {
	transform: scale(1.05);
}

.recent-post-title {
	font-size: 15px;
	font-weight: 600;
	margin: 12px 14px 6px;
	color: #1a202c;
	line-height: 1.4;
}

.recent-post-date {
	display: block;
	font-size: 12px;
	color: #a0aec0;
	margin: 0 14px 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.error-header .error-code {
		font-size: 80px;
	}

	.error-header .error-title {
		font-size: 22px;
	}

	.error-search form {
		flex-direction: column;
	}

	.error-search input[type="search"],
	.error-search button {
		border-radius: 6px;
		width: 100%;
	}

	.error-actions {
		flex-direction: column;
		align-items: center;
	}
}
