/* ============================================================
   Blog page styles
   ============================================================ */

/* --- Hero --- */
.blog-hero {
	padding: 2rem 0 3rem;
}
.blog-hero-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	align-items: center;
}
.blog-hero-intro {
	grid-column: 1 / 3;
	padding-right: 2rem;
}
.blog-hero-title-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}
.blog-hero-title-row h2 {
	font-size: 1.5rem;
	margin: 0;
}
.blog-icon {
	width: 64px;
	height: 64px;
}
.blog-hero-intro h1 {
	margin-bottom: 1rem;
}
.blog-hero-intro p {
	margin-bottom: 1rem;
}
.blog-hero-intro .btn {
	margin-top: 0.5rem;
}

/* --- Latest article label --- */
.blog-latest-label {
	font-size: 2rem;
	font-weight: 700;
	text-align: center;
	margin-bottom: 1rem;
}

/* --- Filter buttons --- */
.blog-filter-buttons {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}
.blog-filter-btn.active {
	background: var(--btn-bg-hover);
}

/* --- Blog grid --- */
.blog-listing {
	padding: 2rem 0 3rem;
}
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
.blog-card {
	border-radius: 15px;
	box-shadow: 0 0 14px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.blog-card-img-link {
	display: block;
	margin-bottom: 1rem;
}
.blog-card-img-link img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	display: block;
}

/* --- Card body --- */
.blog-card-body {
	width: 100%;
}
.blog-card-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
}
.blog-card-date {
	padding-right: 0.75rem;
	border-right: 1px solid var(--palette4);
	white-space: nowrap;
}
.blog-card-reading::before {
	content: 'Reading time: ';
}
.blog-card-body h2 {
	font-size: 2rem;
	margin-bottom: 1rem;
}
.blog-card-body h2 a {
	color: var(--palette4);
	text-decoration: none;
	transition: color 0.2s;
}
.blog-card-body h2 a:hover {
	color: var(--btn-bg-hover);
}
.blog-card-body p {
	margin-bottom: 1rem;
}
.blog-read-more {
	color: var(--palette1);
	text-decoration: none;
}

/* --- Bottom CTA --- */
.blog-cta {
	background: var(--palette7);
	border-radius: 15px;
	text-align: center;
	padding: 3rem 2rem;
	margin: 2rem 0 3rem;
}
.blog-cta h2 {
	font-size: 1.9rem;
	margin-bottom: 1rem;
}
.blog-cta p {
	max-width: 700px;
	margin: 0 auto 1.5rem;
}

/* ============================================================
   Blog article page styles
   ============================================================ */

/* --- Article hero --- */
.blog-article-hero {
	padding: 2rem 0 0;
}
.blog-article-hero h1 {
	margin-bottom: 1rem;
	-webkit-hyphens: none;
	hyphens: none;
}
.blog-article-hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: center;
}
.blog-article-hero-text {
	padding: 0 2rem;
}
.blog-article-hero-text .blog-card-meta {
	margin-bottom: 1.5rem;
}
.blog-article-hero-img {
	padding-right: 2rem;
	align-self: start;
}
.blog-article-hero-img img {
	width: 100%;
	max-width: 674px;
	border-radius: 15px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	margin-left: auto;
	display: block;
}

/* --- Article body layout (sidebar + content) --- */
.blog-article-body {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 2rem;
	padding: 100px 0 3rem;
}

/* --- Sidebar TOC --- */
.blog-toc {
	position: sticky;
	top: 100px;
	align-self: start;
}
.blog-toc h2 {
	font-size: 31px;
	margin-bottom: 1rem;
}
.blog-toc ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.blog-toc li {
	margin-bottom: 0.5rem;
}
.blog-toc a {
	color: var(--palette4);
	text-decoration: none;
	line-height: 2;
	transition: color 0.2s;
}
.blog-toc a:hover {
	color: var(--btn-bg-hover);
}
.blog-toc a strong {
	font-weight: 700;
}

/* --- Scroll offset for anchor links (clears fixed header) --- */
.blog-article-content h2[id],
.blog-article-content h3[id],
.blog-summary[id],
.blog-faq[id] {
	scroll-margin-top: 140px;
}

/* --- Article main content --- */
.blog-article-content {
	padding: 0 2rem;
}
.blog-article-content h2 {
	font-size: 55px;
	line-height: 75px;
	font-weight: 700;
	margin-top: 50px;
	margin-bottom: 1rem;
	-webkit-hyphens: none;
	hyphens: none;
}
.blog-article-content h3 {
	font-size: 24px;
	line-height: 36px;
	font-weight: 700;
	margin-top: 30px;
	margin-bottom: 0.75rem;
	-webkit-hyphens: none;
	hyphens: none;
}
.blog-article-content p {
	margin-bottom: 1rem;
	line-height: 1.7;
}
.blog-article-content a:not(.btn) {
	color: var(--palette1);
	text-decoration: underline;
}
.blog-article-content ul,
.blog-article-content ol {
	margin-bottom: 1rem;
	padding-left: 1.5em;
}
.blog-article-content li {
	margin-top: 0.5rem;
	line-height: 1.7;
}

/* --- Summary box --- */
.blog-summary {
	background: var(--palette7);
	border-radius: 15px;
	padding: 2rem;
	margin-bottom: 2rem;
}
.blog-summary-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.blog-summary-header h2 {
	margin: 0;
	font-size: 31px;
}
.blog-summary-header span {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.9rem;
	white-space: nowrap;
}
.blog-summary-header span img {
	width: 1.8em;
	height: 1.8em;
}

/* --- Article screenshots --- */
.blog-article-content .screenshot-large {
	margin: 1.5rem 4rem;
	text-align: center;
}
.blog-article-content .screenshot-large img {
	max-width: 100%;
	filter: drop-shadow(0 10px 25px rgba(0,0,0,.18));
	cursor: zoom-in;
}

/* --- Small feature icons row --- */
.blog-feature-icons {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1rem 0 1.5rem;
	justify-content: center;
}
.blog-feature-icons img {
	max-width: 280px;
	border-radius: 8px;
}

/* --- Image gallery in articles --- */
.blog-article-content .gallery {
	margin: 1.5rem 4rem;
}

/* --- Mid-article CTA --- */
.blog-mid-cta {
	background: var(--palette7);
	border-radius: 15px;
	text-align: center;
	padding: 2.5rem 2rem;
	margin: 8rem 0;
}
.blog-mid-cta h2 {
	font-size: 31px;
	margin: 0 0 1rem;
}
.blog-mid-cta p {
	max-width: 700px;
	margin: 0 auto 1.5rem;
}

/* --- Blog FAQ accordion --- */
.blog-faq {
	margin-top: 2.5rem;
}
.blog-faq > h2 {
	font-size: 1.9rem;
	margin-bottom: 1.5rem;
	color: var(--palette1);
}

/* --- Bottom CTA (article) --- */
.blog-article-bottom-cta {
	background: var(--palette7);
	border-radius: 15px;
	text-align: center;
	padding: 1rem 2rem 2rem;
	margin: 8rem 0;
}
.blog-article-bottom-cta h2 {
	font-size: 40px;
	margin-bottom: 1rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
	.blog-hero-grid {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.blog-hero-intro {
		padding-right: 0;
	}
	.blog-hero-title-row {
		justify-content: center;
	}
	.blog-grid {
		grid-template-columns: 1fr;
	}
	.blog-card-body h2 {
		font-size: 1.25rem;
		text-align: center;
	}
	.blog-card-meta {
		justify-content: center;
	}

	/* Article page responsive */
	.blog-article-hero-grid {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.blog-article-hero-img {
		padding-right: 0;
	}
	.blog-article-hero-img img {
		margin: 0 auto;
	}
	.blog-article-hero h1 {
		font-size: 1.75rem;
	}
	.blog-article-hero-text .blog-card-meta {
		justify-content: center;
	}
	.blog-article-body {
		grid-template-columns: 1fr;
	}
	.blog-toc {
		position: static;
		border-bottom: none;
		padding-bottom: 1.5rem;
		margin-bottom: 1rem;
	}
	.blog-article-content {
		padding: 0;
	}
	.blog-article-content h2 {
		margin-top: 30px;
	}
	.blog-article-content h3 {
		margin-top: 20px;
	}
	.blog-article-content .screenshot-large {
		margin: 1.5rem 0;
	}
	.blog-article-content .gallery {
		margin: 1.5rem 0;
	}
	.blog-feature-icons {
		justify-content: center;
	}
}
