/* ==========================================================================
   BLOG — archive listing, cards, sidebar, pagination
   ========================================================================== */

/* ────────────────────────────────────────
   BLOG HEADER (dark hero)
──────────────────────────────────────── */
.blog-header {
	background: var(--eln-midnight);
	padding: 80px 0 0;
	position: relative;
	overflow: hidden;
}

.blog-header__glow {
	position: absolute;
	top: -40%;
	right: -5%;
	width: 700px;
	height: 700px;
	border-radius: var(--radius-pill);
	background: var(--eln-rainbow);
	filter: blur(120px);
	opacity: 0.14;
	pointer-events: none;
}

.blog-header__inner {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 64px;
	align-items: end;
	padding-bottom: 72px;
}

.blog-header__copy { position: relative; }

.blog-header__title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(2.4rem, 4vw, 3.6rem);
	color: #fff;
	line-height: 1.04;
	letter-spacing: -0.02em;
	margin: 8px 0 20px;
	text-wrap: balance;
}

.blog-header__title .script-accent {
	font-family: var(--font-script);
	font-weight: 400;
	color: var(--eln-gold);
	font-size: 1.05em;
	letter-spacing: 0;
	display: inline-block;
	line-height: 1.1;
}

.blog-header__lead {
	font-size: 1.05rem;
	color: rgba(255, 255, 255, 0.65);
	line-height: 1.65;
	margin: 0;
	max-width: 480px;
}

/* Search box */
.blog-header__search {
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-xl);
	padding: 24px;
}

.blog-header__search-label {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	display: block;
	margin-bottom: 10px;
}

.blog-search-wrap { position: relative; }

.blog-search-wrap input[type="search"] {
	width: 100%;
	padding: 12px 44px 12px 16px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-md);
	color: #fff;
	font-family: var(--font-body);
	font-size: 14px;
	transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.blog-search-wrap input[type="search"]::placeholder { color: rgba(255, 255, 255, 0.35); }

.blog-search-wrap input[type="search"]:focus {
	outline: 0;
	border-color: var(--eln-cyan);
	background: rgba(255, 255, 255, 0.12);
}

.blog-search-wrap button[type="submit"] {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 44px;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Category tabs */
.blog-header__cats {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 0;
}

.cat-tab {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 13px;
	padding: 16px 20px;
	color: rgba(255, 255, 255, 0.5);
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	transition: color var(--dur) var(--ease-out);
	text-decoration: none;
	display: inline-block;
	white-space: nowrap;
}

.cat-tab:hover { color: rgba(255, 255, 255, 0.85); }

.cat-tab.active,
.cat-tab[aria-current="page"] {
	color: #fff;
	border-bottom-color: var(--eln-cyan);
}

/* ────────────────────────────────────────
   BLOG MAIN LAYOUT
──────────────────────────────────────── */
.blog-main {
	padding: 72px 0 96px;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 64px;
	align-items: start;
}

/* ────────────────────────────────────────
   FEATURED POST
──────────────────────────────────────── */
.post-featured {
	background: #fff;
	border: 1px solid var(--border-1);
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin-bottom: 32px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
	text-decoration: none;
	color: inherit;
}

.post-featured:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.post-featured__thumb {
	min-height: 280px;
	position: relative;
	overflow: hidden;
}

.post-featured__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: luminosity;
	opacity: 0.7;
}

.post-featured__thumb-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(10, 71, 89, 0.6) 0%, rgba(27, 154, 163, 0.3) 100%);
}

.post-featured__thumb-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--eln-magenta);
	color: #fff;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: var(--radius-pill);
}

.post-featured__body { padding: 40px; }

.post-featured__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.post-featured__body h2 {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(1.3rem, 1.8vw, 1.6rem);
	color: var(--eln-midnight);
	line-height: 1.15;
	margin: 0 0 14px;
	text-wrap: balance;
	transition: color var(--dur) var(--ease-out);
}

.post-featured:hover .post-featured__body h2 { color: var(--eln-magenta); }

.post-featured__body p {
	font-size: 0.95rem;
	color: var(--fg-2);
	line-height: 1.65;
	margin: 0 0 24px;
}

.post-featured__read {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 13px;
	color: var(--eln-cyan);
	transition: gap var(--dur) var(--ease-out);
}

.post-featured:hover .post-featured__read { gap: 10px; }

/* ────────────────────────────────────────
   POSTS GRID
──────────────────────────────────────── */
.posts-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.post-card {
	background: #fff;
	border: 1px solid var(--border-1);
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
	text-decoration: none;
	color: inherit;
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.post-card__thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	position: relative;
}

.post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-out);
}

.post-card:hover .post-card__thumb img { transform: scale(1.04); }

.post-card__thumb-bg {
	position: absolute;
	inset: 0;
}

.post-card__body {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.post-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.post-card__body h3 {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1rem;
	color: var(--eln-midnight);
	line-height: 1.3;
	margin: 0 0 10px;
	text-wrap: balance;
	transition: color var(--dur) var(--ease-out);
	flex: 1;
}

.post-card:hover h3 { color: var(--eln-magenta); }

.post-card__excerpt {
	font-size: 0.875rem;
	color: var(--fg-2);
	line-height: 1.6;
	margin: 0;
}

.post-card__footer {
	padding: 14px 24px;
	border-top: 1px solid var(--border-1);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.post-card__read {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 12px;
	color: var(--eln-cyan);
	display: flex;
	align-items: center;
	gap: 5px;
	transition: gap var(--dur) var(--ease-out);
}

.post-card:hover .post-card__read { gap: 8px; }

/* Shared meta atoms */
.meta-cat {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--eln-cyan);
	text-decoration: none;
}

.meta-dot {
	width: 3px;
	height: 3px;
	border-radius: var(--radius-pill);
	background: var(--border-2);
	flex-shrink: 0;
}

.meta-date { font-size: 12px; color: var(--fg-3); }

.meta-time {
	font-size: 12px;
	color: var(--fg-3);
	display: flex;
	align-items: center;
	gap: 4px;
}

/* ────────────────────────────────────────
   BLOG SIDEBAR
──────────────────────────────────────── */
.blog-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: sticky;
	top: 88px;
}

.sidebar-card {
	background: var(--bg-paper);
	border: 1px solid var(--border-1);
	border-radius: var(--radius-xl);
	padding: 28px;
}

.sidebar-card__title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-3);
	margin: 0 0 18px;
}

/* Newsletter */
.sidebar-newsletter {
	background: var(--eln-midnight);
	border-color: var(--eln-midnight);
}

.sidebar-newsletter .sidebar-card__title { color: rgba(255, 255, 255, 0.4); }

.sidebar-newsletter h4 {
	font-family: var(--font-script);
	color: var(--eln-gold);
	font-size: 1.3rem;
	font-weight: 400;
	margin: 0 0 8px;
}

.sidebar-newsletter p {
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.55;
	margin: 0 0 16px;
}

.sidebar-newsletter input[type="email"] {
	width: 100%;
	padding: 11px 14px;
	border-radius: var(--radius-md);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	font-family: var(--font-body);
	font-size: 14px;
	margin-bottom: 10px;
}

.sidebar-newsletter input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.3); }
.sidebar-newsletter input[type="email"]:focus { outline: 0; border-color: var(--eln-cyan); }
.sidebar-newsletter .btn { width: 100%; justify-content: center; font-size: 14px; padding: 12px; }

/* Popular posts */
.popular-list {
	display: flex;
	flex-direction: column;
}

.popular-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--border-1);
	text-decoration: none;
}

.popular-item:last-child { border-bottom: 0; padding-bottom: 0; }
.popular-item:first-child { padding-top: 0; }

.popular-item__num {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.4rem;
	color: var(--eln-teal-100);
	line-height: 1;
	flex-shrink: 0;
	width: 28px;
}

.popular-item__title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 0.88rem;
	color: var(--eln-midnight);
	line-height: 1.35;
	transition: color var(--dur) var(--ease-out);
}

.popular-item:hover .popular-item__title { color: var(--eln-magenta); }
.popular-item__meta { font-size: 0.75rem; color: var(--fg-3); margin-top: 4px; }

/* Tag cloud */
.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-cloud a,
.tag {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 12px;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: var(--bg-2);
	color: var(--fg-2);
	border: 1px solid var(--border-1);
	text-decoration: none;
	transition: all var(--dur) var(--ease-out);
	display: inline-block;
}

.tag-cloud a:hover,
.tag:hover {
	background: var(--eln-teal-100);
	color: var(--eln-midnight);
	border-color: var(--eln-cyan);
}

/* ────────────────────────────────────────
   PAGINATION
──────────────────────────────────────── */
.blog-pagination {
	margin-top: 48px;
}

.blog-pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.blog-pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--radius-md);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 14px;
	background: #fff;
	border: 1px solid var(--border-1);
	color: var(--fg-2);
	text-decoration: none;
	transition: all var(--dur) var(--ease-out);
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
	background: var(--eln-midnight);
	color: #fff;
	border-color: var(--eln-midnight);
}

.blog-pagination .page-numbers.dots {
	border: 0;
	background: none;
	cursor: default;
	color: var(--fg-3);
}

/* Empty state */
.blog-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 64px 24px;
	color: var(--fg-3);
}

.blog-empty__script {
	font-family: var(--font-script);
	font-size: 1.4rem;
	margin-bottom: 8px;
	color: var(--eln-magenta);
	font-weight: 400;
}

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 1000px) {
	.blog-main {
		grid-template-columns: 1fr;
		gap: 48px;
		padding: 48px 0 72px;
	}

	.blog-sidebar { position: static; top: auto; }
}

@media (max-width: 860px) {
	.blog-header { padding: 60px 0 0; }

	.blog-header__inner {
		grid-template-columns: 1fr;
		gap: 36px;
		padding-bottom: 48px;
	}

	.blog-header__search { display: none; }
}

@media (max-width: 680px) {
	.post-featured { grid-template-columns: 1fr; }
	.post-featured__thumb { min-height: 200px; }
}

@media (max-width: 600px) {
	.posts-grid { grid-template-columns: 1fr; }
}
