/* ==========================================================================
   BLOG ARCHIVE, CARDS & ARTICLE STYLING
   ========================================================================== */

/* Blog Archive Header Banner */
.blog-archive-header {
	background: linear-gradient(180deg, #0f1c30 0%, #0a1628 100%);
	padding: 4rem 1.5rem 3.5rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	color: #ffffff;
}

.blog-archive-badge {
	display: inline-block;
	background: rgba(59, 130, 246, 0.18);
	color: #60a5fa;
	border: 1px solid rgba(59, 130, 246, 0.35);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.35rem 0.9rem;
	border-radius: 9999px;
	margin-bottom: 1.25rem;
}

.blog-archive-title {
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 1rem 0;
	letter-spacing: -0.025em;
	line-height: 1.2;
}

.blog-archive-subtitle {
	font-size: 1.125rem;
	color: #94a3b8;
	max-width: 680px;
	margin: 0 auto;
	line-height: 1.6;
}

/* Category Filter Pills */
.blog-category-filter-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 2rem;
}

.category-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 1.15rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.06);
	color: #cbd5e1;
	border: 1px solid rgba(255, 255, 255, 0.12);
	text-decoration: none;
	transition: all 0.2s ease;
}

.category-pill:hover {
	border-color: #3b82f6;
	color: #ffffff;
	background: rgba(59, 130, 246, 0.15);
	transform: translateY(-2px);
}

.category-pill.active {
	background: #3b82f6;
	color: #ffffff;
	border-color: #3b82f6;
	box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.pill-count {
	font-size: 0.75rem;
	opacity: 0.8;
	margin-left: 0.35rem;
}

/* Blog Container */
.blog-archive-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3.5rem 1.5rem;
}

/* Blog Grid */
.blog-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
	gap: 2rem !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Blog Card Component */
.blog-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	position: relative;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .blog-card {
	background: #0f1c30;
	border-color: rgba(255, 255, 255, 0.1);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
	transform: translateY(-5px);
	border-color: #3b82f6;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .blog-card:hover {
	border-color: #60a5fa;
	box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.5);
}

/* Thumbnail Wrap */
.blog-card-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, #0a1628 0%, #1e3a66 100%);
	display: block;
}

.blog-card-thumb-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.blog-card-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

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

.blog-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #60a5fa;
	background: linear-gradient(135deg, #0a1628 0%, #162a4a 100%);
}

.blog-card-category-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background: rgba(10, 22, 40, 0.88);
	backdrop-filter: blur(8px);
	color: #60a5fa;
	border: 1px solid rgba(96, 165, 250, 0.35);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.3rem 0.75rem;
	border-radius: 9999px;
	pointer-events: none;
	z-index: 2;
}

/* Card Body */
.blog-card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.blog-card-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: #64748b;
	margin-bottom: 0.75rem;
}

[data-theme="dark"] .blog-card-meta {
	color: #94a3b8;
}

.blog-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.blog-meta-dot {
	opacity: 0.5;
}

.blog-card-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 0.75rem 0;
}

.blog-card-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.15s ease;
}

[data-theme="dark"] .blog-card-title a {
	color: #f1f5f9;
}

.blog-card-title a:hover {
	color: #3b82f6;
}

.blog-card-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #475569;
	margin: 0 0 1.5rem 0;
	flex: 1;
}

[data-theme="dark"] .blog-card-excerpt {
	color: #94a3b8;
}

.blog-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
	font-size: 0.875rem;
}

[data-theme="dark"] .blog-card-footer {
	border-top-color: rgba(255, 255, 255, 0.08);
}

.blog-card-author {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #64748b;
	font-weight: 500;
}

[data-theme="dark"] .blog-card-author {
	color: #94a3b8;
}

.author-avatar-badge {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #3b82f6;
	color: #ffffff;
	font-weight: 700;
	font-size: 0.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.blog-card-read-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #3b82f6;
	font-weight: 600;
	text-decoration: none;
	transition: gap 0.2s ease;
}

.blog-card-read-link:hover {
	gap: 0.6rem;
	color: #2563eb;
}

/* Pagination */
.blog-pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.blog-pagination .page-numbers {
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #0f172a;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.875rem;
	transition: all 0.2s ease;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
	background: #3b82f6;
	color: #ffffff;
	border-color: #3b82f6;
}

/* Single Post Specific Styles */
.single-post-container {
	max-width: 860px;
	margin: 0 auto;
	padding: 3.5rem 1.5rem 5rem 1.5rem;
}

.post-meta-bar {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
	color: #64748b;
}

.meta-badge-cat {
	background: rgba(59, 130, 246, 0.12);
	color: #2563eb;
	font-weight: 600;
	font-size: 0.8125rem;
	padding: 0.3rem 0.85rem;
	border-radius: 9999px;
	text-decoration: none;
	border: 1px solid rgba(59, 130, 246, 0.25);
}

.post-featured-image {
	margin: 2rem 0 2.5rem 0;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
}

.post-hero-image {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	display: block;
}

.article-figure {
	margin: 2.5rem auto;
	max-width: 820px;
	text-align: center;
}

.article-img {
	width: 100%;
	height: auto;
	border-radius: 0.75rem;
	border: 1px solid #e2e8f0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	display: block;
	margin: 0 auto;
}

.article-figure figcaption {
	font-size: 0.875rem;
	color: #64748b;
	margin-top: 0.85rem;
	font-style: italic;
	line-height: 1.4;
}

.article-table-wrap {
	overflow-x: auto;
	margin: 2.5rem 0;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	background: #ffffff;
}

.article-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	text-align: left;
}

.article-table th {
	background: #f8fafc;
	padding: 0.875rem 1.25rem;
	font-weight: 700;
	color: #0f172a;
	border-bottom: 2px solid #e2e8f0;
}

.article-table td {
	padding: 0.875rem 1.25rem;
	border-bottom: 1px solid #e2e8f0;
	color: #475569;
}

.article-table tr:last-child td {
	border-bottom: none;
}

.post-tags {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e2e8f0;
}

.post-tags .tag-links a {
	display: inline-block;
	background: #f1f5f9;
	color: #475569;
	padding: 0.35rem 0.85rem;
	border-radius: 9999px;
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	margin: 0 0.5rem 0.5rem 0;
	border: 1px solid #e2e8f0;
	transition: all 0.2s ease;
}

.post-tags .tag-links a:hover {
	background: #3b82f6;
	color: #ffffff;
	border-color: #3b82f6;
}

.blog-cta-banner {
	background: linear-gradient(135deg, #0a1628 0%, #162a4a 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 1.25rem;
	padding: 3rem 2rem;
	color: #ffffff;
	text-align: center;
	margin-top: 4rem;
}

.blog-cta-banner h2 {
	color: #ffffff;
	margin-bottom: 0.75rem;
}

.blog-cta-banner p {
	color: #94a3b8;
	margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
	.blog-grid {
		grid-template-columns: 1fr !important;
	}
	.blog-archive-header {
		padding: 3rem 1rem 2rem 1rem;
	}
}
