/* Eagan Project Gallery Slider
 * Layout: large featured image (left) + 2x2 grid (right), grayscale, carousel.
 */

.eagan-pg {
	position: relative;
	width: 100%;
}

/* Carousel viewport + track */
.eagan-pg__viewport {
	overflow: hidden;
	width: 100%;
}

.eagan-pg__track {
	display: flex;
	transition: transform 0.5s ease;
	will-change: transform;
}

.eagan-pg__slide {
	flex: 0 0 100%;
	min-width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: stretch;
}

/* Featured (left) */
.eagan-pg__featured {
	display: flex;
}

.eagan-pg__featured .eagan-pg__figure {
	width: 100%;
	height: 100%;
	min-height: 100%;
}

/* Auto mode: featured image's own ratio anchors the row height so the
 * grid has something to stretch against. */
.eagan-pg--featured-auto .eagan-pg__featured .eagan-pg__figure {
	height: auto;
	min-height: 0;
	aspect-ratio: 1 / 1;
}

.eagan-pg__featured .eagan-pg__img {
	width: 100%;
	height: 100%;
}

/* 2x2 grid (right) — always stretches to match the featured column's height
 * so the four images fill the container even when the featured image is
 * resized via fixed height or aspect ratio. */
.eagan-pg__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 20px;
	height: 100%;
	min-height: 0;
}

.eagan-pg__grid .eagan-pg__figure {
	min-height: 0;
	height: 100%;
}

/* Figures + images */
.eagan-pg__figure {
	position: relative;
	display: block;
	overflow: hidden;
	text-decoration: none;
	line-height: 0;
}

.eagan-pg__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: filter 0.4s ease, transform 0.6s ease;
}

a.eagan-pg__figure:hover .eagan-pg__img {
	filter: grayscale(0%) !important;
	transform: scale(1.03);
}

.eagan-pg__caption {
	position: absolute;
	left: 0;
	bottom: 0;
	right: 0;
	padding: 14px 16px;
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
	opacity: 0;
	transition: opacity 0.3s ease;
}

.eagan-pg__figure:hover .eagan-pg__caption {
	opacity: 1;
}

/* Arrows */
.eagan-pg__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #111;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	transition: background 0.2s ease, transform 0.2s ease;
}

.eagan-pg__arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.06);
}

.eagan-pg__arrow--prev { left: 12px; }
.eagan-pg__arrow--next { right: 12px; }

/* Dots */
.eagan-pg__dots {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

.eagan-pg__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #c9c9c9;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.eagan-pg__dot.is-active {
	background: #111;
	transform: scale(1.2);
}

/* Lightbox */
.eagan-pg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.eagan-pg-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.eagan-pg-lightbox__img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.eagan-pg-lightbox__close,
.eagan-pg-lightbox__nav {
	position: absolute;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.eagan-pg-lightbox__close:hover,
.eagan-pg-lightbox__nav:hover { opacity: 1; }

.eagan-pg-lightbox__close {
	top: 24px;
	right: 28px;
	font-size: 40px;
	line-height: 1;
}

.eagan-pg-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 56px;
	height: 56px;
}

.eagan-pg-lightbox__nav--prev { left: 20px; }
.eagan-pg-lightbox__nav--next { right: 20px; }

/* Responsive */
@media (max-width: 1024px) {
	.eagan-pg__slide {
		grid-template-columns: 1fr;
	}
	.eagan-pg__featured .eagan-pg__img {
		aspect-ratio: 4 / 3;
		height: auto;
	}
}

@media (max-width: 600px) {
	.eagan-pg__grid {
		grid-template-columns: 1fr 1fr;
	}
	.eagan-pg__arrow {
		width: 40px;
		height: 40px;
	}
}
