/**
 * KG Labs gallery carousel styling.
 *
 * Sits on top of Splide's base CSS (assets/vendor/splide/splide.min.css).
 * Keeps a calm, witness-voice aesthetic: clean white background, restrained
 * accents, comfortable padding, no harsh shadows.
 */

.kg-gallery-carousel {
	margin: 2.5rem 0;
	padding: 0;
	background: transparent;
}

.kg-gallery-carousel .splide__track {
	background: #f8f7f5;
	border: 1px solid #e8e5e0;
	border-radius: 4px;
	padding: 0;
	overflow: hidden;
}

.kg-gallery-carousel .splide__slide {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 320px;
}

.kg-gallery-carousel .splide__slide figure {
	margin: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.kg-gallery-carousel .splide__slide img {
	max-width: 100%;
	max-height: 70vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.kg-gallery-carousel .splide__slide figcaption {
	text-align: center;
	font-size: 0.875rem;
	color: #555;
	margin-top: 0.75rem;
	padding: 0 1rem 1rem;
	font-style: italic;
}

/* Arrow buttons — translucent dark circles. */
.kg-gallery-carousel .splide__arrow {
	background: rgba(20, 20, 20, 0.55);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	opacity: 1;
	transition: background-color 200ms ease;
}

.kg-gallery-carousel .splide__arrow:hover:not(:disabled) {
	background: rgba(20, 20, 20, 0.8);
}

.kg-gallery-carousel .splide__arrow svg {
	fill: #fff;
	width: 16px;
	height: 16px;
}

.kg-gallery-carousel .splide__arrow--prev { left: 0.75rem; }
.kg-gallery-carousel .splide__arrow--next { right: 0.75rem; }

/* Pagination dots — minimal. */
.kg-gallery-carousel .splide__pagination {
	bottom: -1.75rem;
	padding: 0;
}

.kg-gallery-carousel .splide__pagination__page {
	background: #cfc9bf;
	width: 7px;
	height: 7px;
	margin: 0 4px;
	opacity: 1;
	transition: background-color 200ms ease, transform 200ms ease;
}

.kg-gallery-carousel .splide__pagination__page.is-active {
	background: #1f1f1f;
	transform: scale(1.3);
}

/* Mobile: tighten padding, smaller arrows. */
@media (max-width: 640px) {
	.kg-gallery-carousel .splide__slide { min-height: 220px; }
	.kg-gallery-carousel .splide__slide img { max-height: 55vh; }
	.kg-gallery-carousel .splide__arrow { width: 36px; height: 36px; }
	.kg-gallery-carousel .splide__arrow--prev { left: 0.5rem; }
	.kg-gallery-carousel .splide__arrow--next { right: 0.5rem; }
}

/* Heading above the carousel — works for the "Photo gallery" h2 from the
 * inject script. Adds a quiet rule beneath it. */
.wp-block-heading + .kg-gallery-carousel {
	margin-top: 1.5rem;
}
