/* ============================================
   BookNova Blog — Light Theme
   Fiction writing & AI author guides
   ============================================ */

/* --- Blog Layout --- */
.blog-wrapper {
	background: #faf9f7;
	min-height: 100vh;
	padding: 40px 0 60px;
}

.blog-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
}

/* --- Blog Header --- */
.blog-header {
	grid-column: 1 / -1;
	text-align: center;
	padding: 20px 0 30px;
}

.blog-header h1 {
	font-size: 2.25rem;
	font-weight: 800;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

.blog-header p {
	font-size: 1.1rem;
	color: #666;
	max-width: 600px;
	margin: 0 auto;
}

/* --- Category Badge --- */
.blog-category-badge {
	display: inline-block;
	background: linear-gradient(135deg, #df108c, #ff730f);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
}

.blog-category-badge:hover {
	opacity: 0.9;
	color: #fff;
}

/* --- Post Grid --- */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}

/* --- Post Card --- */
.blog-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
	transition: box-shadow 0.3s ease;
}

.blog-card:hover {
	box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.blog-card a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.blog-card-thumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	display: block;
	background: #eee;
}

.blog-card-body {
	padding: 20px;
}

.blog-card-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	font-size: 0.8rem;
	color: #999;
}

.blog-card-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.4;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-card:hover .blog-card-title {
	color: #df108c;
}

.blog-card-excerpt {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --- Sidebar --- */
.blog-sidebar {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.sidebar-block {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sidebar-block h3 {
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid #f0f0f0;
}

/* Sidebar: Recent & Featured posts */
.sidebar-post {
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f5f5f5;
	text-decoration: none;
	color: inherit;
}

.sidebar-post:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.sidebar-post:first-of-type {
	padding-top: 0;
}

.sidebar-post-thumb {
	width: 64px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: #eee;
}

.sidebar-post-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sidebar-post:hover .sidebar-post-title {
	color: #df108c;
}

.sidebar-post-date {
	font-size: 0.75rem;
	color: #999;
	margin-top: 4px;
}

/* Sidebar: Categories */
.sidebar-categories {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-categories li {
	padding: 8px 0;
	border-bottom: 1px solid #f5f5f5;
}

.sidebar-categories li:last-child {
	border-bottom: none;
}

.sidebar-categories a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-decoration: none;
	font-size: 0.9rem;
	color: #444;
	font-weight: 500;
}

.sidebar-categories a:hover {
	color: #df108c;
}

.sidebar-categories .cat-count {
	background: #f0f0f0;
	color: #888;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
}

/* --- Pagination --- */
.blog-pagination {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 40px 0 0;
}

.blog-pagination a,
.blog-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.blog-pagination a {
	background: #fff;
	color: #444;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.blog-pagination a:hover {
	background: #df108c;
	color: #fff;
}

.blog-pagination .current {
	background: #df108c;
	color: #fff;
}

.blog-pagination .dots {
	background: none;
	box-shadow: none;
	color: #999;
}

/* --- Single Post --- */
.blog-post-wrapper {
	background: #faf9f7;
	min-height: 100vh;
	padding: 40px 0 60px;
}

.blog-post-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
}

.blog-post-main {
	background: #fff;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.blog-post-breadcrumb {
	font-size: 0.85rem;
	color: #999;
	margin-bottom: 20px;
}

.blog-post-breadcrumb a {
	color: #df108c;
	text-decoration: none;
}

.blog-post-breadcrumb a:hover {
	text-decoration: underline;
}

.blog-post-title {
	font-size: 2rem;
	font-weight: 800;
	color: #1a1a1a;
	line-height: 1.3;
	margin-bottom: 16px;
	letter-spacing: -0.02em;
}

.blog-post-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 0.85rem;
	color: #888;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.blog-post-cover {
	width: 100%;
	border-radius: 10px;
	margin-bottom: 30px;
}

/* Post content typography */
.blog-post-content {
	font-size: 1.05rem;
	line-height: 1.8;
	color: #333;
}

.blog-post-content h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 2rem 0 1rem;
}

.blog-post-content h3 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 1.5rem 0 0.75rem;
}

.blog-post-content p {
	margin-bottom: 1.25rem;
}

.blog-post-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5rem 0;
}

.blog-post-content a {
	color: #df108c;
	text-decoration: underline;
}

.blog-post-content ul,
.blog-post-content ol {
	margin: 1rem 0 1.25rem 1.5rem;
}

.blog-post-content li {
	margin-bottom: 0.5rem;
}

.blog-post-content blockquote {
	border-left: 4px solid #df108c;
	margin: 1.5rem 0;
	padding: 1rem 1.5rem;
	background: #fdf2f8;
	border-radius: 0 8px 8px 0;
	font-style: italic;
	color: #555;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
	.blog-container,
	.blog-post-container {
		grid-template-columns: 1fr;
	}
	.blog-sidebar {
		order: 2;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.blog-wrapper,
	.blog-post-wrapper {
		padding: 20px 0 40px;
	}
	.blog-header h1 {
		font-size: 1.75rem;
	}
	.blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.blog-sidebar {
		grid-template-columns: 1fr;
	}
	.blog-post-main {
		padding: 24px;
	}
	.blog-post-title {
		font-size: 1.5rem;
	}
	.blog-post-content {
		font-size: 1rem;
	}
}
