/**
 * Recent Posts Block Styles
 *
 * Structural/foundational styles only.
 * Design polish to follow in a subsequent pass.
 */

.aspirion-recent-posts {
	width: 100%;
	padding-top: 4rem;
	padding-bottom: 4rem;
	background-color: var(--wp--preset--color--background-alt);
}

.aspirion-recent-posts__inner {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 1200px);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Section heading */
.aspirion-recent-posts__heading {
	text-align: center;
	margin: 0 0 2.5rem;
}

/* Three-column card grid */
.aspirion-recent-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem;
}

@media (max-width: 768px) {
	.aspirion-recent-posts__grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.aspirion-recent-posts__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Card — full anchor wrap */
.aspirion-recent-posts__card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s ease;
}

.aspirion-recent-posts__card:hover,
.aspirion-recent-posts__card:focus {
	text-decoration: none;
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.25);
}

/* Featured image */
.aspirion-recent-posts__image {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.aspirion-recent-posts__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Content-type label badge — overlaid on featured image.
   Mirrors .knowledge-center-recent-posts__content-type in
   assets/css/components/recent-posts-card.css; keep the two in sync. */
.aspirion-recent-posts__label {
	position: absolute;
	bottom: 1rem;
	left: 0.5rem;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 0.25rem;
	line-height: 0.875rem;
	padding: 0.3rem 0.5rem 0.25rem;
	z-index: 2;
}

/* Label colors per content type */
.aspirion-recent-posts__card.case-study .aspirion-recent-posts__label {
	background-color: #0076BB;
	color: #FFF;
}
.aspirion-recent-posts__card.webinar .aspirion-recent-posts__label,
.aspirion-recent-posts__card.upcoming-webinar .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--primary);
	color: #FFF;
}
.aspirion-recent-posts__card.guide .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}
.aspirion-recent-posts__card.blog .aspirion-recent-posts__label,
.aspirion-recent-posts__card.podcast .aspirion-recent-posts__label,
.aspirion-recent-posts__card.article .aspirion-recent-posts__label,
.aspirion-recent-posts__card.insights .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary);
}
.aspirion-recent-posts__card.ebook .aspirion-recent-posts__label {
	background-color: #FFFFFF;
	color: var(--wp--preset--color--primary);
}
.aspirion-recent-posts__card.service-summary .aspirion-recent-posts__label,
.aspirion-recent-posts__card.white-paper .aspirion-recent-posts__label {
	background-color: #CCD7DC;
	color: var(--wp--preset--color--primary);
}
.aspirion-recent-posts__card.infographic .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--primary);
}
.aspirion-recent-posts__card.tech-summary .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--accent);
}
.aspirion-recent-posts__card.panels .aspirion-recent-posts__label {
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
}

/* Card content */
.aspirion-recent-posts__content {
	flex: 1;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	height: inherit;
	background-color: #fff;
	justify-content: space-between;
}

.aspirion-recent-posts__title {
	font-size: 1.25rem;
	line-height: 1.2;
	margin: 0 0 1rem;
	padding: 0;
}

/* CTA text */
.aspirion-recent-posts__cta {
	margin: 0;
	padding-bottom: 0;
	font-size: 0.88rem;
	color: #255890;
}

/* Empty state */
.aspirion-recent-posts__empty {
	text-align: center;
	color: var(--wp--preset--color--foreground);
}

/* Editor Preview */
.aspirion-recent-posts__preview {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--background);
	border: 2px dashed var(--wp--preset--color--secondary);
	border-radius: 4px;
}

.aspirion-recent-posts__preview-icon {
	font-size: 2.5rem;
	color: var(--wp--preset--color--primary);
}

.aspirion-recent-posts__preview-text {
	margin: 0;
	color: var(--wp--preset--color--foreground);
}
