/* ---------- Album grid ---------- */
.eag-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.eag-album {
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.eag-cover {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #e5e5e5;
}

.eag-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.eag-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .25);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}

.eag-album:hover .eag-cover::after,
.eag-album:focus-visible .eag-cover::after {
	opacity: 1;
}

.eag-zoom-yes .eag-album:hover .eag-cover img {
	transform: scale(1.06);
}

.eag-album:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.eag-title {
	display: block;
	margin-top: 12px;
	font-size: 1.05em;
	font-weight: 600;
	line-height: 1.3;
	transition: color .2s ease;
}

.eag-count {
	opacity: .6;
	font-weight: 400;
}

/* ---------- Lightbox ---------- */
body.eag-lock {
	overflow: hidden;
}

.eag-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: rgba(10, 10, 10, .94);
	color: #fff;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	font-family: inherit;
}

.eag-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.eag-lb-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 20px;
	flex: 0 0 auto;
}

.eag-lb-title {
	font-size: 1rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eag-lb-counter {
	opacity: .7;
	font-size: .9rem;
	margin-left: 10px;
	font-weight: 400;
}

.eag-lightbox button {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 1;
	font-size: 0;
}

.eag-lb-close {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex: 0 0 auto;
	transition: background .2s ease;
}

.eag-lb-close:hover,
.eag-lb-nav:hover {
	background: rgba(255, 255, 255, .15) !important;
}

.eag-lightbox svg {
	width: 26px;
	height: 26px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.eag-lb-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 70px;
}

.eag-lb-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	opacity: 0;
	transition: opacity .25s ease;
}

.eag-lb-img.is-loaded {
	opacity: 1;
}

.eag-lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08) !important;
	transition: background .2s ease;
}

.eag-lb-prev { left: 10px; }
.eag-lb-next { right: 10px; }

.eag-lb-spinner {
	position: absolute;
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, .25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: eag-spin .8s linear infinite;
	pointer-events: none;
}

.eag-lb-stage.is-ready .eag-lb-spinner {
	display: none;
}

@keyframes eag-spin {
	to { transform: rotate(360deg); }
}

.eag-lb-thumbs {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 14px 20px 18px;
	overflow-x: auto;
	justify-content: safe center;
	scrollbar-width: thin;
}

.eag-lb-thumbs button {
	flex: 0 0 auto;
	width: 64px;
	height: 48px;
	opacity: .5;
	border: 2px solid transparent !important;
	border-radius: 3px;
	overflow: hidden;
	transition: opacity .2s ease, border-color .2s ease;
}

.eag-lb-thumbs button img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eag-lb-thumbs button:hover { opacity: .85; }
.eag-lb-thumbs button.is-active {
	opacity: 1;
	border-color: #fff !important;
}

/* Single-photo albums: hide arrows & thumbs */
.eag-lightbox.is-single .eag-lb-nav,
.eag-lightbox.is-single .eag-lb-thumbs,
.eag-lightbox.is-single .eag-lb-counter {
	display: none;
}

@media (max-width: 767px) {
	.eag-lb-stage { padding: 0 8px; }
	.eag-lb-nav { width: 42px; height: 42px; }
	.eag-lb-prev { left: 4px; }
	.eag-lb-next { right: 4px; }
	.eag-lb-thumbs button { width: 52px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.eag-cover img, .eag-lightbox, .eag-lb-img { transition: none; }
}
