/**
 * Custom Posts Types — visual parity with CME Content Sections cards.
 * Reuses .cme-* classes; this file only scopes layout for CPT archives.
 */

.cpt-posts-section.cme-section {
	margin: 0;
}

.cpt-posts-section .cme-cards {
	display: grid;
	grid-template-columns: repeat(var(--cme-columns, 3), minmax(0, 1fr));
	gap: 30px;
}

/* Keep equal-height cards when CME CSS is present or when it is not. */
.cpt-posts-section .cme-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid rgba(17, 41, 75, 0.08);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cpt-posts-section .cme-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.cpt-posts-section .cme-card-image {
	display: block;
	position: relative;
	height: 216px;
	overflow: hidden;
	aspect-ratio: var(--cme-image-ratio, 16 / 10);
}

.cpt-posts-section .cme-card-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.cpt-posts-section .cme-card:hover .cme-card-image img {
	transform: scale(1.05);
}

.cpt-posts-section .cme-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 30px;
	gap: 0;
}

.cpt-posts-section .cme-card-category {
	display: block;
	margin: 0 0 10px;
	font-family: Onest, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 0.16px;
	text-transform: none;
	color: var(--ies-primary-dark, #4d4285);
}

.cpt-posts-section .cme-card-title,
.cpt-posts-section .cme-card-title a {
	margin: 0 0 20px;
	font-family: Onest, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 120%;
	color: var(--ies-navy-text, #11294b);
	text-decoration: none;
}

.cpt-posts-section .cme-card-title a:hover,
.cpt-posts-section .cme-card-title a:focus-visible {
	color: var(--ies-primary, #5d43de);
}

.cpt-posts-section .cme-card-date {
	display: block;
	margin: 0;
	font-family: Onest, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--ies-navy, #11294b);
}

.cpt-posts-section .cme-card-footer {
	margin-top: auto;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;
	padding-top: 30px;
}

.cpt-posts-section .cpt-posts-pagination.cme-pagination,
.cpt-posts-section .cme-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 50px;
}

.cpt-posts-section .cme-pagination a,
.cpt-posts-section .cme-pagination span {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--ies-navy, #11294B);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cpt-posts-section .cme-pagination a:hover,
.cpt-posts-section .cme-pagination a:focus,
.cpt-posts-section .cme-pagination .current {
	background: var(--ies-navy, #11294B);
	color: var(--ies-white, #fff);
	text-decoration: none;
}

.cpt-posts-section .cme-pagination .dots {
	border: none;
	background: transparent;
	width: auto;
	padding: 0 5px;
}

@media (max-width: 991px) {
	.cpt-posts-section .cme-cards {
		column-gap: 15px;
	}
}

@media (max-width: 767px) {
	.cpt-posts-section.cme-section {
		margin: 0;
	}

	.cpt-posts-section .cme-cards {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}

	.cpt-posts-section .cme-card-body {
		padding: 22px;
	}

	.cpt-posts-section .cme-pagination {
		gap: 8px;
		margin-top: 35px;
	}

	.cpt-posts-section .cme-pagination a,
	.cpt-posts-section .cme-pagination span {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}
}
