/*
 Divi Supreme / DSM Post Carousel: equal-height cards (title + excerpt + CTA align across slides).
 Scoped to projects carousel markup (.dsm-post-carousel-item).
*/

.dsm-post-carousel .swiper-wrapper,
.dsm-post-carousel-wrapper.swiper-wrapper {
	align-items: stretch !important;
}

.dsm-post-carousel-item.swiper-slide {
	height: auto !important;
	display: flex !important;
	align-self: stretch !important;
	box-sizing: border-box;
}

.dsm-post-carousel-item .dsm-grid-post-holder-inner {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	min-height: 0;
	width: 100%;
	box-sizing: border-box;
}

/* Image block: consistent footprint so rows align visually */
.dsm-post-carousel-item .dsm-entry-image {
	flex-shrink: 0;
	align-self: stretch;
	position: relative;
	overflow: hidden;
	/* Contain floated thumbnails (plugin/Divi often float left → shrink-wrap → gap on the right). */
	display: flow-root;
	width: 100%;
	box-sizing: border-box;
}

/*
 * DSM prints overlay before thumbnail; the overlay link only wraps the icon (e.g. "L"),
 * so it shrink-wraps and leaves empty space on the right. Stretch overlay + link to the
 * full image box without changing Divi borders, heights, or full-bleed layout.
 */
.dsm-post-carousel-item .dsm-entry-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

.dsm-post-carousel-item .dsm-entry-overlay a {
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

.dsm-post-carousel-item .dsm-entry-thumbnail > a {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.dsm-post-carousel-item .dsm-entry-thumbnail {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #f0f0f0;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: both;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

.dsm-post-carousel-item .dsm-entry-thumbnail img {
	width: 100% !important;
	height: 100% !important;
	min-width: 100%;
	object-fit: cover !important;
	object-position: center center;
	display: block !important;
}

.dsm-post-carousel-item .dsm-entry-wrapper {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	min-height: 0;
}

.dsm-post-carousel-item .dsm-entry-header {
	flex-shrink: 0;
}

.dsm-post-carousel-item .dsm-entry-content {
	flex: 1 1 auto !important;
	min-height: 0;
}

.dsm-post-carousel-item .dsm-post-excerpt {
	margin-bottom: 0;
}

.dsm-post-carousel-item .dsm-readmore-wrap {
	margin-top: auto !important;
	padding-top: 0.75rem;
	flex-shrink: 0;
}
