/**
 * Trekteurke Polaroid Carousel
 *
 * Styles for polaroid-style photo cards in a Swiper carousel.
 * Mimics scattered physical polaroid prints with white frames and slight rotation.
 * Full viewport width with images bleeding off left and right edges.
 */

/* Wrapper: full viewport width, horizontal padding so polaroid shadows are not clipped */
.trekteurke-polaroid-carousel-wrapper {
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	max-width: 100%;
	padding: 4rem 0;
	box-sizing: border-box;
}

/* Container: clips overflow; padding above keeps shadows inside visible area */
.trekteurke-polaroid-carousel {
	width: 100%;
}
.trekteurke-polaroid-carousel .swiper{
	overflow: visible;
}

/* Swiper: allow slides to extend beyond bounds for bleed effect */
.trekteurke-polaroid-swiper {
	overflow: visible;
	padding: 1rem 0;
}

.trekteurke-polaroid-swiper .swiper-wrapper {
	align-items: center;
}

/* Each slide: variable width, centered, overlapping */
.trekteurke-polaroid-swiper .swiper-slide {
	width: auto;
	height: auto;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Overlap for scattered polaroid effect */
	margin-right: -8vw;
	position: relative;
	z-index: 1;
}

/* Hover: bring polaroid to front */
.trekteurke-polaroid-swiper .swiper-slide:hover {
	z-index: 10;
}

/* Polaroid frame: white border, thicker bottom, shadow */
.trekteurke-polaroid-frame {
	position: relative;
	background: #fff;
	padding: 1vw 1vw 4vw;
	box-shadow: 2px 4px 20px rgba(0, 0, 0, 0.18);
	transform: rotate(var(--rotation, 0deg));
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Odd polaroids: smaller via scale */
.trekteurke-polaroid-slide.trekteurke-polaroid-odd .trekteurke-polaroid-frame {
	transform: rotate(var(--rotation, 0deg)) scale(0.72);
}

/* Hover: slight lift for interactivity */
.trekteurke-polaroid-slide:hover .trekteurke-polaroid-frame {
	box-shadow: 4px 8px 28px rgba(0, 0, 0, 0.22);
}

.trekteurke-polaroid-slide.trekteurke-polaroid-even:hover .trekteurke-polaroid-frame {
	transform: rotate(var(--rotation, 0deg)) scale(1.02);
}

.trekteurke-polaroid-slide.trekteurke-polaroid-odd:hover .trekteurke-polaroid-frame {
	transform: rotate(var(--rotation, 0deg)) scale(0.74);
}

/* Base: all same size (3:2), even = larger, odd = scaled down */
.trekteurke-polaroid-frame img {
	display: block;
	width: clamp(200px, 32vw, 480px);
	aspect-ratio: 3/2;
	object-fit: cover;
	vertical-align: middle;
}

/* Caption area: bottom white strip, handwriting font, typing animation target */
.trekteurke-polaroid-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.4vw 1vw 0.8vw;
	font-family: 'Caveat', cursive;
	font-size: clamp(0.875rem, 1.8vw, 1.25rem);
	font-weight: 400;
	color: #333;
	text-align: center;
	line-height: 1.3;
	pointer-events: none;
	min-height: 1.5em;
}

/* Blinking cursor while typing */
.trekteurke-polaroid-caption.typing::after {
	content: '|';
	animation: trekteurke-cursor-blink 0.8s step-end infinite;
	margin-left: 1px;
}

@keyframes trekteurke-cursor-blink {
	50% {
		opacity: 0;
	}
}

/* Hide pagination dots */
.trekteurke-polaroid-swiper .swiper-pagination {
	display: none;
}

/* Responsive: adjust for smaller screens */
@media (max-width: 768px) {
	.trekteurke-polaroid-carousel-wrapper {
		padding: 1.5rem 1.5rem 3rem;
	}

	.trekteurke-polaroid-swiper .swiper-slide {
		margin-right: -12vw;
	}

	.trekteurke-polaroid-frame {
		padding: 1.5vw 1.5vw 5vw;
	}

	.trekteurke-polaroid-frame img {
		width: clamp(140px, 40vw, 280px);
		aspect-ratio: 3/2;
	}

	.trekteurke-polaroid-slide.trekteurke-polaroid-odd .trekteurke-polaroid-frame {
		transform: rotate(var(--rotation, 0deg)) scale(0.72);
	}

	.trekteurke-polaroid-slide.trekteurke-polaroid-odd:hover .trekteurke-polaroid-frame {
		transform: rotate(var(--rotation, 0deg)) scale(0.74);
	}
}
