/* ================================================================
   Home page only: blog section (#Blog) cards, plus keeping the sticky header visible.
   Blog cards: the same design as the Blog page (blog.css), on the home page's dark section.
   Markup: template-home.php.
   ================================================================ */

/* The legacy home styles fade the header out (opacity 0, z-index -1) once the full-page
   scroller leaves the first section; the header must stay visible and sticky. */
body .header_block,
body.home .header_block,
body[class*="fp-viewing"] .header_block {
	opacity: 1 !important;
	visibility: visible !important;
	z-index: 9980 !important;
	pointer-events: auto !important;
}

.blog-sec .pi-home-blog {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
	width: 100%;
	margin: 0 0 26px;
	text-align: left;
}
body .blog-sec .pi-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid #e3eaf0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(2, 8, 30, 0.35);
	transition: box-shadow 0.25s, transform 0.25s;
}
body .blog-sec .pi-card:hover {
	box-shadow: 0 24px 50px rgba(2, 8, 30, 0.5);
	transform: translateY(-4px);
}
.blog-sec .pi-card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 8.4;
	overflow: hidden;
	background: #0c2236;
}
.blog-sec .pi-card__media .thumbnail {
	margin: 0;
	height: 100%;
}
.blog-sec .pi-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.blog-sec .pi-card:hover .pi-card__media img {
	transform: scale(1.05);
}
.blog-sec .pi-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 20px;
	background: linear-gradient(135deg, #0c2236, #0b88b5);
	color: #fff;
	font-size: 18px;
	text-align: center;
}
.blog-sec .pi-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 22px 22px;
}
.blog-sec .pi-card__cat {
	align-self: flex-start;
	margin: 0 0 10px;
	padding: 4px 11px;
	border-radius: 999px;
	background: #e8f7fd;
	color: #0b88b5;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 1.4;
	text-decoration: none;
	text-transform: uppercase;
}
.blog-sec .pi-card__cat:hover {
	background: #1bbcf3;
	color: #fff;
}
body .blog-sec .pi-card .post-title {
	margin: 0 0 8px;
	padding: 0;
	color: #12263a;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
}
body .blog-sec .pi-card .post-title::before,
body .blog-sec .pi-card .post-title::after {
	display: none;
}
body .blog-sec .pi-card .post-title a {
	display: -webkit-box;
	overflow: hidden;
	color: #12263a;
	text-decoration: none;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	background: linear-gradient(#1bbcf3, #1bbcf3) 0 100% / 0 2px no-repeat;
	transition: background-size 0.3s, color 0.2s;
}
body .blog-sec .pi-card .post-title a:hover {
	color: #0b88b5;
	background-size: 100% 2px;
}
body .blog-sec .pi-card .post-name {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin: 0;
	padding: 0 0 10px;
	border: 0;
	color: #5b6b7a;
	font-size: 13px;
	font-style: normal;
}
body .blog-sec .pi-card .post-name > span + span::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 10px 2px -12px;
	border-radius: 50%;
	background: #b5c3cf;
}
body .blog-sec .pi-card .pi-card__excerpt {
	display: -webkit-box;
	margin: 0 0 14px;
	overflow: hidden;
	color: #5b6b7a;
	font-size: 14.5px;
	line-height: 1.6;
	text-align: left;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
body .blog-sec .pi-card .pi-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	color: #0b88b5;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
body .blog-sec .pi-card .pi-card__more::after {
	content: "\2192";
	transition: transform 0.2s;
}
body .blog-sec .pi-card .pi-card__more:hover::after {
	transform: translateX(4px);
}

/* Desktop (one screen per section): keep the cards below the sticky header and within the
   screen height. */
@media (min-width: 993px) {
	.blog-sec > .container {
		padding-top: 96px;
	}
}
@media (min-width: 993px) and (max-height: 820px) {
	.blog-sec .pi-card__media {
		aspect-ratio: 16 / 6.6;
	}
	body .blog-sec .pi-card .pi-card__excerpt {
		-webkit-line-clamp: 2;
	}
	.blog-sec .pi-card__body {
		padding: 16px 20px 18px;
	}
}

@media (max-width: 992px) {
	.blog-sec .pi-home-blog {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 640px) {
	.blog-sec .pi-home-blog {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}
@media (prefers-reduced-motion: reduce) {
	body .blog-sec .pi-card,
	.blog-sec .pi-card__media img {
		transition: none !important;
	}
}
