/* Homepage "From Our Blog" cards ([sai_blog_latest] in functions.php).
   Same look as the blog's own post grid; share button via js/post-share.js. */

.sai-blog-latest {
	clear: both;
	padding: 45px 0 30px;
	/* the builder's divider (85px) follows; together they keep the cards
	   clear of the school section's slanted green edge */
}

#top .sai-blog-latest-title {
	margin: 0 0 34px;
	text-align: center;
	font-family: 'lora-regular', Georgia, serif;
	font-size: 30px;
	line-height: 1.2;
	color: #3d332a;
}

.sai-blog-latest-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 4.5%;
}

.sai-blog-card {
	display: flex;
	flex-direction: column;
	text-align: left;
	background: #fffefe;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.sai-blog-card-image {
	display: block;
	border: 0;
	line-height: 0;
}

.sai-blog-card-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 720 / 432;
	object-fit: cover;
	clip-path: polygon(0 0, 100% 0, 100% 89.32%, 0 100%);
}

.sai-blog-card-body {
	padding: 22px 26px 0;
}

#top .sai-blog-card .slide-entry-title {
	margin: 0 0 6px;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

#top .sai-blog-card .slide-entry-title a {
	color: #222;
	border: 0;
	text-decoration: none;
}

#top .sai-blog-card .slide-entry-title a:hover { color: #6d1a2c; }

#top .sai-blog-card-cat {
	display: inline-block;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 11px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: #888;
	border: 0;
	text-decoration: none;
}

#top .sai-blog-card-cat:hover { color: #6d1a2c; }

/* .sai-blog-card prefix outranks the legacy ".template-page p" (centered, 18px Ubuntu) */
#top .sai-blog-card .sai-blog-card-excerpt {
	margin: 22px 0 0;
	text-align: left;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 14.5px;
	line-height: 1.85;
	color: #666;
}

/* Footer: date + share (date pinned to the bottom so rows line up) */
#top .sai-blog-card .entry-footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	padding: 6px 26px 12px;
}

#top .sai-blog-card .slide-meta { margin: 0; padding: 0; }

#top .sai-blog-card .slide-meta time {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #8a8075;
}

/* Share button (markup added by js/post-share.js) */
.sai-blog-card .sai-share {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.sai-blog-card .sai-share-list {
	display: none;
	align-items: center;
}

.sai-blog-card .sai-share svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: #8a8075;
}

.sai-blog-card .sai-share svg.sai-share-stroke {
	fill: none;
	stroke: #8a8075;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#top .sai-blog-card .sai-share-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	text-decoration: none;
}

#top .sai-blog-card .sai-share-list a:hover svg { fill: #6d1a2c; }
#top .sai-blog-card .sai-share-list a:hover svg.sai-share-stroke { fill: none; stroke: #6d1a2c; }

#top .sai-blog-card .sai-share-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#top .sai-blog-card .sai-share-toggle:hover { background: #f3eee6; }

#top .sai-blog-card .entry-footer.sai-share-open { padding-left: 14px; padding-right: 14px; }
#top .sai-blog-card .sai-share-open .slide-meta { display: none; }

#top .sai-blog-card .sai-share-open .sai-share {
	flex: 1;
	min-width: 0;
	justify-content: space-between;
	padding: 4px 4px 4px 8px;
	border-radius: 8px;
	background: #f6f2ec;
}

#top .sai-blog-card .sai-share-open .sai-share-list {
	display: flex;
	flex: 1;
	min-width: 0;
	justify-content: space-between;
	max-width: 220px;
	gap: 2px;
}

#top .sai-blog-card .sai-share-open .sai-share-toggle { flex: none; margin-left: 6px; }
#top .sai-blog-card .sai-share-open .sai-share-toggle:hover { background: #ebe4d9; }

@media only screen and (max-width: 989px) {
	.sai-blog-latest-grid { gap: 32px 3%; }
	.sai-blog-card-body { padding: 18px 18px 0; }
	#top .sai-blog-card .entry-footer { padding-left: 18px; padding-right: 18px; }
	#top .sai-blog-card .slide-entry-title { font-size: 17px; letter-spacing: 1px; }
}

@media only screen and (max-width: 767px) {
	.sai-blog-latest-grid { grid-template-columns: 1fr; }
	#top .sai-blog-latest-title { font-size: 26px; margin-bottom: 24px; }
	.sai-blog-latest { padding-bottom: 0; }
}
