/* Card Slider — frontend styles */

.csld-wrapper {
	position: relative;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 8px;
	box-sizing: border-box;
}

.csld-track {
	display: flex;
	align-items: stretch;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}

/* Hide scrollbar cross-browser, keep it scrollable */
.csld-track {
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.csld-track::-webkit-scrollbar {
	display: none;
}

/* Mouse click-and-drag scrolling (see frontend.js). Touch keeps the
   browser's native thumb-drag behaviour, which needs none of this. */
.csld-track {
	cursor: grab;
}
.csld-track.csld-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}
.csld-track.csld-dragging .csld-card,
.csld-track.csld-dragging .csld-tpl-slide {
	pointer-events: none;
}
.csld-track img,
.csld-track a {
	-webkit-user-drag: none;
}

.csld-card {
	scroll-snap-align: start;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	background: #fff;
}

/* --- Desktop: 3 full cards + a peek of the 4th (≈3.4 visible) --- */
.csld-card,
.csld-tpl-slide {
	width: calc((100% - 3 * 16px) / 3.4);
}

.csld-tpl-slide {
	scroll-snap-align: start;
	flex: 0 0 auto;
}

.csld-card-image {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #eee7e0;
}

.csld-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.csld-caption {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.3;
	color: #1a1a1a;
}

a.csld-card-image-wrap:hover .csld-caption {
	text-decoration: underline;
}

.csld-caption-link {
	text-decoration: underline;
	text-underline-offset: 3px;
	display: inline-block;
	cursor: pointer;
}

/* --- Text card (e.g. "Wedding Week: We're here for all your fall events") --- */
.csld-card-text {
	position: relative;
	aspect-ratio: 3 / 4;
	background: #f2ece3;
	overflow: hidden;
	display: block;
}

.csld-card-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.9;
}

.csld-text-inner {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	padding: 40px 32px;
	box-sizing: border-box;
}

.csld-heading {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(24px, 2.4vw, 40px);
	line-height: 1.15;
	color: #1a1a1a;
	margin-bottom: 24px;
	white-space: pre-line;
}

.csld-card-text .csld-caption {
	margin-top: auto;
	font-size: 15px;
	font-weight: 600;
}

/* --- Nav arrows ---
   Selectors are prefixed with .csld-wrapper (not just .csld-nav) so their
   specificity beats the theme/Elementor global ".elementor-kit-* button"
   style, which otherwise overrides our width/height/padding/border-radius
   and turns the circle into the theme's default rectangular button. */
.csld-wrapper .csld-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	min-width: 0;
	padding: 0;
	margin: 0;
	flex-shrink: 0;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #1a1a1a;
	line-height: 0;
	font-size: 0;
	z-index: 2;
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.csld-wrapper .csld-nav:hover {
	background: #fff;
	color: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.csld-wrapper .csld-nav:active,
.csld-wrapper .csld-nav:focus {
	color: #1a1a1a;
}

.csld-wrapper .csld-nav:active {
	transform: translateY(-50%) scale(0.94);
}

.csld-nav-prev {
	left: 4px;
}

.csld-nav-next {
	right: calc((100% / 3.4) * 0.4 + 4px);
}

.csld-nav-prev {
	display: none; /* hidden until user scrolls, handled by JS */
}

/* --- Tablet: exactly 3 cards visible --- */
@media (max-width: 1024px) {
	.csld-card,
	.csld-tpl-slide {
		width: calc((100% - 2 * 16px) / 3);
	}
	.csld-nav-next {
		right: 8px;
	}
}

/* --- Mobile: exactly 2 cards visible --- */
@media (max-width: 767px) {
	.csld-track {
		gap: 12px;
	}
	.csld-card,
	.csld-tpl-slide {
		width: calc((100% - 1 * 12px) / 2);
	}
	.csld-text-inner {
		padding: 20px 16px;
	}
	.csld-heading {
		font-size: 20px;
		margin-bottom: 14px;
	}
	.csld-caption {
		font-size: 13px;
		margin-top: 8px;
	}
	.csld-wrapper .csld-nav {
		width: 30px;
		height: 30px;
	}
	.csld-nav-next {
		right: 6px;
	}
	.csld-tpl-heading {
		font-size: 20px;
		margin-bottom: 10px;
	}
	.csld-tpl-paragraph {
		font-size: 13px;
	}
}

/* --- Template Slider: multi-image slide with heading/paragraph/CTA --- */
.csld-tpl-slide {
	display: flex;
	flex-direction: column;
}

.csld-tpl-desktop {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.csld-tpl-mobile {
	display: none;
	flex-direction: column;
	height: 100%;
}

@media (max-width: 767px) {
	.csld-tpl-desktop {
		display: none;
	}
	.csld-tpl-mobile {
		display: flex;
	}
}

.csld-tpl-images {
	display: flex;
	gap: 8px;
}

.csld-tpl-image {
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: #eee7e0;
	text-decoration: none;
}

.csld-tpl-images-2 .csld-tpl-image {
	width: calc((100% - 8px) / 2);
}

.csld-tpl-images-3 .csld-tpl-image {
	width: calc((100% - 2 * 8px) / 3);
}

.csld-tpl-images-1 .csld-tpl-image {
	width: 100%;
}

.csld-tpl-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.csld-tpl-mobile-images {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #eee7e0;
	text-decoration: none;
}

.csld-tpl-mobile-images img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.csld-tpl-mobile-images img.is-active {
	opacity: 1;
}

.csld-tpl-text {
	margin-top: 12px;
}

.csld-tpl-heading {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(20px, 2vw, 28px);
	line-height: 1.2;
	color: #1a1a1a;
	margin-bottom: 8px;
	white-space: pre-line;
}

.csld-tpl-paragraph {
	font-size: 14px;
	line-height: 1.4;
	color: #444;
	margin: 0 0 10px;
}

.csld-tpl-cta {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: #1a1a1a;
}
