/* CPT Listing Block Styles */

.cpt-listing {
	background: #ffffff;
}

.cpt-listing.bg-cream {
	background: #f6f4ee;
}

.cpt-listing.bg-light-gray {
	background: #f8f9fa;
}

/* Header Section */

.cpt-listing__header {
	margin-bottom: 48px;
	text-align: center;
}

.cpt-listing__heading {
	margin: 0 0 32px 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: #000000;
}

/* Grid Layout */

.cpt-listing__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
}

.cpt-item {
	flex: 1 1 100%;
	max-width: 100%;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

.cpt-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.cpt-item__content {
	flex-grow: 1;
}

.cpt-item__image {
	margin-bottom: 24px;
	border-radius: 6px;
	overflow: hidden;
}

.cpt-item__image img {
	width: 100%;
	height: auto;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.cpt-item__image a:hover img {
	transform: scale(1.05);
}

.cpt-item__categories {
	margin-bottom: 30px;
}

.cpt-item__category {
	display: inline-block;
	padding: 10px 16px;
	background: #fed141;
	color: #000;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 16px;
	line-height: 1.2;
}

.cpt-item__title {
	margin: 0 0 16px 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	text-wrap: pretty;
}

.cpt-item__title a {
	color: #000000;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cpt-item__title a:hover {
	color: #4582c3;
	background: none;
}

.cpt-item__date {
	margin-bottom: 16px;
	font-size: 14px;
	color: #666666;
	font-weight: 500;
}

.cpt-item__excerpt {
	margin-bottom: 24px;
	font-size: 16px;
	line-height: 1.5;
	color: #333333;
}

.cpt-item__footer {
	margin-top: auto;
}

.cpt-item__read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 30px 12px 12px;
	background: #4582c3;
	color: #ffffff;
	text-decoration: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	position: relative;
}

.cpt-item__read-more::after {
	content: "›";
	color: #ffffff;
	font-size: 16px;
	line-height: 1;
	top: 44%;
	right: 16px;
	transition: transform 0.3s ease;
}

.cpt-item__read-more:hover {
	background: #3a6fa5;
	color: #ffffff;
	transform: translateY(-1px);
}

.white-paper-description .container {
	padding-inline: 0;
}

/* Hidden Items (Load More) */

.cpt-item--hidden {
	display: none;
}

.cpt-item--loading {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.6s ease forwards;
}

.one-third-image-text-card .img-wrapper img {
	max-width : 260px;
}

@keyframes fadeInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Load More Section */

.cpt-listing__load-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-top: 48px;
	text-align: center;
	width: 100%;
	position: relative; /* allow wrapper-level spinner */
}

.cpt-listing__counter {
	font-size: 16px;
	color: #666666;
	font-weight: 500;
}

.cpt-counter__current,
.cpt-counter__total {
	font-weight: 700;
	color: #000000;
}

.cpt-load-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 42px 16px 32px;
	background: transparent;
	color: #4582c3;
	text-decoration: none;
	border: 2px solid #4582c3;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	cursor: pointer;
	min-width: 200px;
	position: relative;
}

.cpt-load-more-btn::after {
	content: "›";
	color: #4582c3;
	font-size: 18px;
	line-height: 1;
	transition: all 0.3s ease;
	top: 44%;
	right: 16px;
}

.cpt-load-more-btn:hover {
	background: #4582c3;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(69, 130, 195, 0.3);
}

.cpt-load-more-btn:hover::after {
	color: #ffffff;
}

.cpt-load-more-btn:active {
	transform: translateY(0);
}

.cpt-load-more-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.cpt-load-more-btn:disabled:hover {
	background: transparent;
	color: #4582c3;
}

.cpt-load-more-btn.completed {
	background: #28a745;
	border-color: #28a745;
	color: #ffffff;
	cursor: default;
}

.cpt-load-more-btn.completed::after {
	color: #ffffff;
}

.cpt-load-more-btn.completed:hover {
	background: #28a745;
	border-color: #28a745;
	color: #ffffff;
	transform: none;
	box-shadow: none;
}

.cpt-load-more-btn.completed:hover::after {
	color: #ffffff;
}

.cpt-load-more-btn.loading {
	color: transparent;
	text-shadow: none;
	pointer-events: none;
	transform: none;
	box-shadow: none;
}
.cpt-load-more-btn.loading::after {
	content: none;
}
.cpt-listing__load-more.loading::before {
	content: "";
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	width: 24px;
	height: 24px;
	margin-left: -12px;
	border: 3px solid #4582c3;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	transition: none;
	transform-origin: 50% 50%;
	will-change: transform;
	z-index: 1;
}

/* No Results State */

.cpt-listing__no-results {
	width: 100%;
	text-align: center;
	padding: 64px 24px;
	color: #666666;
}

.cpt-listing__no-results p {
	font-size: 18px;
	margin: 0;
}

/* Mobile Column Layouts */

.cpt-listing--mobile-1 .cpt-item {
	flex: 1 1 100%;
	max-width: 100%;
}

.cpt-listing--mobile-2 .cpt-item {
	flex: 1 1 calc(50% - 16px);
	max-width: calc(50% - 16px);
}

.cpt-listing--mobile-3 .cpt-item {
	flex: 1 1 calc(33.333% - 21px);
	max-width: calc(33.333% - 21px);
}

/* Tablet Styles */

@media (min-width: 768px) {
	.cpt-listing__header {
		text-align: left;
		margin-bottom: 56px;
	}
	.cpt-listing__heading {
		margin-bottom: 0;
		font-size: 40px;
	}
	.cpt-item__title {
		font-size: 22px;
	}
	.cpt-listing__load-more {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin-top: 56px;
	}
	.cpt-listing__counter {
		font-size: 18px;
	}
	/* Tablet Column Layouts */
	.cpt-listing--tablet-1 .cpt-item {
		flex: 1 1 100%;
		max-width: 100%;
	}
	.cpt-listing--tablet-2 .cpt-item {
		flex: 1 1 calc(50% - 16px);
		max-width: calc(50% - 16px);
	}
	.cpt-listing--tablet-3 .cpt-item {
		flex: 1 1 calc(33.333% - 21px);
		max-width: calc(33.333% - 21px);
	}
}

/* Desktop Styles */

@media (min-width: 1200px) {
	.cpt-listing__header {
		margin-bottom: 64px;
	}
	.cpt-listing__heading {
		font-size: 48px;
	}
	.cpt-listing__grid {
		gap: 40px;
	}
	.cpt-item {
		padding: 32px;
	}
	.cpt-item__title {
		font-size: 24px;
		margin-bottom: 16px;
	}
	.cpt-item__excerpt {
		font-size: 16px;
		margin-bottom: 32px;
	}
	.cpt-listing__load-more {
		margin-top: 64px;
	}
	/* Desktop Column Layouts */
	.cpt-listing--desktop-1 .cpt-item {
		flex: 1 1 100%;
		max-width: 100%;
	}
	.cpt-listing--desktop-2 .cpt-item {
		flex: 1 1 calc(50% - 20px);
		max-width: calc(50% - 20px);
	}
	.cpt-listing--desktop-3 .cpt-item {
		flex: 1 1 calc(33.333% - 27px);
		max-width: calc(33.333% - 27px);
	}
}

/* Large Desktop Styles */

@media (min-width: 1400px) {
	.cpt-listing__grid {
		gap: 48px;
	}
	/* Large Desktop Column Layouts */
	.cpt-listing--desktop-1 .cpt-item {
		flex: 1 1 100%;
		max-width: 100%;
	}
	.cpt-listing--desktop-2 .cpt-item {
		flex: 1 1 calc(50% - 24px);
		max-width: calc(50% - 24px);
	}
	.cpt-listing--desktop-3 .cpt-item {
		flex: 1 1 calc(33.333% - 32px);
		max-width: calc(33.333% - 32px);
	}
}

/* Animation for filter changes */

.cpt-item {
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.cpt-item.filtering {
	opacity: 0.3;
	transform: scale(0.95);
}

.cpt-item.filtered-out {
	display: none;
}

/* Loading state */

.cpt-listing__grid.loading {
	position: relative;
	min-height: 400px;
}

.cpt-listing__grid.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 3px solid #e5e5e5;
	border-top-color: #4582c3;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.cpt-item__gap {
	gap: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.cpt-item__gap h3 {
	padding: 0;
	margin: 0;
}

.whitepaper-post .img-wrapper {
	margin-bottom: 20px;
	text-align: center;
}

/*
 * Podcast Episode Styles
 */

.podcast-episode {
	padding: 0;
	border-radius: 0;
	border: none;
	background: #fff;
	box-shadow: none;
}

.podcast-episode .cpt-item__image {
	position: relative;
	margin-bottom: 0;
	border-radius: 0;
	border-bottom: 7px solid #fed141;
	max-height: 170px;
	background-color: #000;
}

.podcast-episode .cpt-item__image svg {
	position: absolute;
	width: 90px;
	height: 90px;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	z-index: 10;
	transition: all 0.3s;
}

.podcast-episode .cpt-item__categories {
	margin-bottom: 0;
}

.podcast-episode .cpt-item__body {
	padding: 20px;
	background: var(--white);
	border: 1px solid #d9d9d9;
	border-top: none;
}

.podcast-episode .cpt-item__title {
	color: var(--black);
	margin-bottom: 0;
}

.podcast-episode p {
	margin-top: 10px;
	font-size: 16px;
	font-weight: 400;
}

@media (min-width: 1200px) {
	.podcast-episode:hover {
		background-color: #fed141;
	}
	.podcast-episode:hover .cpt-item__image {
		border-bottom-color: #fff;
	}
	.podcast-episode .cpt-item__image a:hover img {
		transform: none;
	}
	.podcast-episode:hover .cpt-item__image svg {
		transform: scale(1.1);
	}
	.podcast-episode .cpt-item__title {
		font-size: 18px;
	}
	.podcast-episode .cpt-item__content {
		display: flex;
		flex-direction: column;
	}
	.podcast-episode .cpt-item__body {
		flex-grow: 1;
		display: flex;
		justify-content: flex-start;
		flex-direction: column;
	}
}
