/* Blog listing — responsive card grid */
.blog-page {
	padding: 48px 0 72px;
	background:
		radial-gradient(ellipse 80% 50% at 10% 0%, rgba(56, 89, 233, 0.08), transparent 55%),
		radial-gradient(ellipse 60% 40% at 95% 20%, rgba(255, 94, 20, 0.06), transparent 50%),
		#f7f8fc;
}

.blog-page__header {
	margin-bottom: 36px;
	max-width: 40rem;
}

.blog-page__title {
	margin: 0 0 8px;
	font-size: clamp(1.75rem, 2.5vw, 2.35rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1a1f36;
	line-height: 1.15;
}

.blog-page__lead {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.5;
	color: #5c6478;
}

.blog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 28px;
	}
}

@media (min-width: 992px) {
	.blog-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}
}

.blog-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	background: #fff;
	border: 1px solid #e6e9f2;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(26, 31, 54, 0.04);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.blog-card:hover,
.blog-card:focus-within {
	transform: translateY(-4px);
	border-color: rgba(56, 89, 233, 0.28);
	box-shadow: 0 14px 32px rgba(56, 89, 233, 0.12);
}

.blog-card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #eef1fc;
}

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

.blog-card:hover .blog-card__media img,
.blog-card:focus-within .blog-card__media img {
	transform: scale(1.04);
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 20px 22px;
	gap: 10px;
}

.blog-card__date {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--qsprimary, #3859e9);
}

.blog-card__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.015em;
}

.blog-card__title a {
	color: #1a1f36;
	text-decoration: none;
}

.blog-card__title a:hover,
.blog-card__title a:focus {
	color: var(--qsprimary, #3859e9);
}

.blog-card__intro {
	margin: 0;
	flex: 1;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #5c6478;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--qsprimary, #3859e9);
	text-decoration: none;
	transition: gap 0.2s ease;
}

.blog-card__more:hover,
.blog-card__more:focus {
	gap: 10px;
	color: #2c47c4;
	text-decoration: none;
}

/* Pagination */
#blog_pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

#blog_pagination > div {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

#blog_pagination .pages {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #e6e9f2;
	background: #fff;
	color: #1a1f36;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#blog_pagination .pages:hover,
#blog_pagination .pages:focus {
	border-color: var(--qsprimary, #3859e9);
	color: var(--qsprimary, #3859e9);
	text-decoration: none;
}

#blog_pagination .pages.selectedpage {
	background: var(--qsprimary, #3859e9);
	border-color: var(--qsprimary, #3859e9);
	color: #fff;
	pointer-events: none;
}

#blog_pagination .pages.backer {
	color: var(--qsprimary, #3859e9);
}

@media (max-width: 575.98px) {
	.blog-page {
		padding: 28px 0 48px;
	}

	.blog-page__header {
		margin-bottom: 24px;
	}

	.blog-card__body {
		padding: 16px;
	}
}

/* ============================================================
   Blog article detail (blog-template)
   ============================================================ */
.blog-article {
	padding: 48px 15px 72px;
	max-width: 1100px;
}

.blog-article__header {
	margin: 0 auto 28px;
	max-width: 46rem;
	text-align: center;
}

.blog-article > h1,
.blog-article__header h1 {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
	color: #1a1f36;
}

.blog-article__date,
.blog-article__lead {
	margin: 12px 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--qsprimary, #3859e9);
}

.blog-text-article {
	margin: 0 auto 40px;
	max-width: 42rem;
}

.blog-text-article .text-center {
	text-align: center;
}

.blog-text-article p {
	margin: 0 0 1.15em;
	font-size: 1.08rem;
	line-height: 1.7;
	color: #3d4558;
}

.blog-text-article p:last-child {
	margin-bottom: 0;
}

/* Lead / intro block — first centered paragraph can be longer body copy */
.blog-text-article .blog-article__date,
.blog-text-article .blog-article__lead {
	font-size: 1.12rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.7;
	color: #5c6478;
	text-align: center;
}

.blog-text-photo-article {
	margin: 0 0 40px;
}

.blog-text-photo-article:last-child {
	margin-bottom: 0;
}

.blog-text-photo-article .row {
	margin-left: -12px;
	margin-right: -12px;
}

.blog-text-photo-article .row > [class*="col-"] {
	padding-left: 12px;
	padding-right: 12px;
}


.blog-text-photo-article__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0 0 20px;
	overflow: hidden;
	border-radius: 12px;
	background:
		linear-gradient(145deg, #eef1fc 0%, #f7f8fc 100%);
	border: 1px solid #e6e9f2;
	box-shadow: 0 4px 18px rgba(26, 31, 54, 0.06);
}

@media (min-width: 768px) {
	.blog-text-photo-article__image {
		margin-bottom: 0;
		height: 100%;
		min-height: 0;
	}
}

/* Show full image at its natural ratio — no cropping */
.blog-text-photo-article__image img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
}

.blog-text-photo-article__image img[src$=".svg"] {
	padding: 12%;
	background: #fff;
}

.blog-text-photo-article__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 4px 0;
}

@media (min-width: 768px) {
	.blog-text-photo-article__text {
		padding: 8px 8px 8px 20px;
	}
}

.blog-text-photo-article__text p {
	margin: 0 0 1em;
	font-size: 1.05rem;
	line-height: 1.7;
	color: #3d4558;
}

.blog-text-photo-article__text p:last-child {
	margin-bottom: 0;
}

.blog-text-photo-article__text h2,
.blog-text-photo-article__text h3 {
	margin: 0 0 0.65em;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1a1f36;
	line-height: 1.25;
}

.blog-text-photo-article__text h2 {
	font-size: 1.35rem;
}

.blog-text-photo-article__text h3 {
	font-size: 1.15rem;
}

/* Generic images / content dropped into the article */
.blog-article img {
	max-width: 100%;
	height: auto;
}

.blog-article > p,
.blog-article > ul,
.blog-article > ol {
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
	font-size: 1.05rem;
	line-height: 1.7;
	color: #3d4558;
}

.blog-article > ul,
.blog-article > ol {
	padding-left: 1.25em;
}

@media (max-width: 767.98px) {
	.blog-article {
		padding: 28px 15px 48px;
	}

	.blog-article__header {
		margin-bottom: 20px;
		text-align: left;
	}

	.blog-text-article {
		margin-bottom: 28px;
	}

	.blog-text-article .blog-article__date,
	.blog-text-article .blog-article__lead {
		text-align: left;
		font-size: 1.05rem;
	}

	.blog-text-photo-article {
		margin-bottom: 28px;
	}
}
