/**
 * Location Gallery Slider — front-end styles.
 *
 * Conventions: BEM naming, mobile-first, no inline styles.
 * Splide supplies its own .splide / .splide__* structural styles via the
 * enqueued Splide stylesheet; these rules only handle presentation of the
 * slide contents (images, links, spacing, hover).
 */

/* Root: contain the track so nothing bleeds horizontally. */
.location-gallery-slider {
	overflow: hidden;
}

.splide__list {
    align-items: center;
}

/* Give the arrows / pagination room beneath the slides. */
.location-gallery-slider.splide {
	padding: 0 0 2.5rem;
}

/* Each slide tile: clipped corners so the zoom stays inside. */
.location-gallery-slider__slide {
	overflow: hidden;
	border-radius: 12px;
}

/* Link wrapper doubles as the image frame. */
.location-gallery-slider__link {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	line-height: 0;            /* Remove the inline-image descender gap. */
	background-color: #f2f2f2; /* Placeholder tone before the image paints. */
}

/*
 * Image: fixed aspect ratio + object-fit gives uniform tiles and, together
 * with the width/height attributes wp_get_attachment_image() outputs,
 * reserves space up front so there is no cumulative layout shift (CLS).
 */
.location-gallery-slider__image {
	display: block;
	width: 100%;
	height: auto;          /* natural aspect ratio */
	transition: transform 0.4s ease;
	will-change: transform;
}

/* Hover / keyboard-focus zoom animation. */
.location-gallery-slider__link:hover .location-gallery-slider__image,
.location-gallery-slider__link:focus-visible .location-gallery-slider__image {
	transform: scale( 1.06 );
}

/* Visible keyboard focus ring for accessibility. */
.location-gallery-slider__link:focus-visible {
	outline: 3px solid #1a73e8;
	outline-offset: 2px;
}

/* Honour users who prefer reduced motion. */
@media ( prefers-reduced-motion: reduce ) {
	.location-gallery-slider__image {
		transition: none;
	}

	.location-gallery-slider__link:hover .location-gallery-slider__image,
	.location-gallery-slider__link:focus-visible .location-gallery-slider__image {
		transform: none;
	}
}
