/* =======================================================================
 * ax-academy-gallery — AX Academy page gallery
 * Desktop (Figma 1863-428): staggered 2x2 collage, 25px radius,
 * 29px column gap, 27px row gap, bottom row shifted 42px right.
 * Mobile (Figma 2388-61): centered loop Splide, active slide full size,
 * neighbours peeking at .85 scale; zoom-style pagination (12px grey dots,
 * active = 31px purple pill, radius 16).
 * #top-prefixed to beat Enfold.
 * ==================================================================== */

#top .ax-acg {
	position: relative;
}

#top .ax-acg * {
	box-sizing: border-box;
}

/* ---- desktop collage ---- */
#top .ax-acg__grid {
	max-width: 601px;
	margin: 0 auto;
}

#top .ax-acg__row {
	display: flex;
	gap: 29px;
	width: calc(100% - 42px);
}

#top .ax-acg__row--2 {
	margin-top: 27px;
	margin-left: 42px;
}

#top .ax-acg__cell {
	flex: 1 1 0;
	min-width: 0;
	aspect-ratio: 265.27 / 311.36;
	border-radius: 25px;
	overflow: hidden;
}

#top .ax-acg__cell img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 25px;
}

/* ---- mobile splide (hidden on desktop) ---- */
#top .ax-acg__splide {
	display: none;
	visibility: visible;
}

#top .ax-acg__splide .splide__slide {
	width: 282px;
}

/* scale the image, not the slide — Splide measures slide rects for layout */
#top .ax-acg__splide .splide__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 282 / 331;
	object-fit: cover;
	border-radius: 25px;
	transform: scale(0.90);
	transition: transform 0.35s ease;
}

#top .ax-acg__splide .splide__slide.is-active img {
	transform: scale(1);
}

/* zoom-style pagination: grey 12px dots, active grows to a purple pill */
#top .ax-acg__splide .splide__pagination {
	position: static;
	margin-top: 28px;
	padding: 0;
	gap: 15px;
}

#top .ax-acg__splide .splide__pagination li {
	line-height: 0;
}

#top .ax-acg__splide .splide__pagination__page {
	width: 12px;
	height: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #d9d9d9;
	opacity: 1;
	transform: none;
	transition: width 0.3s ease, background 0.3s ease;
}

#top .ax-acg__splide .splide__pagination__page.is-active {
	width: 31px;
	background: #444192;
	transform: none;
}

#top.page-id-548 .ax-acg__row {
    align-items: center;
}

#top.page-id-548 .ax-acg__row--1 .ax-acg__cell:first-child, #top.page-id-548 .ax-acg__row--2 .ax-acg__cell:last-child {
	height: 356px;
}

#top.page-id-548 .ax-acg__row--1 .ax-acg__cell:last-child, #top.page-id-548 .ax-acg__row--2 .ax-acg__cell:first-child {
	height: 264px;
}

#top.page-id-548 .ax-acg__row--2 {
    margin-left: 0px;
	margin-top: -22px;
}

/* ---- breakpoint switch ---- */
@media only screen and (max-width: 767px) {
	#top .ax-acg__grid {
		display: none;
	}

	#top .ax-acg__splide {
        display: block;
        margin-top: 30px;
        margin-bottom: 30px;
    }
	
	#top .ax-acg__splide .splide__track {
		overflow: visible;
	}
}
