/* AME Galeria de Evento — hero + mosaico + lightbox */

.ame-eg-wrap { width: 100%; }

/* ---------- Hero ---------- */
.ame-eg-hero {
	position: relative;
	min-height: 68vh;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
}

.ame-eg-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 20, 33, 0.72) 100%);
}

.ame-eg-hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding: 48px 56px;
}

.ame-eg-title {
	margin: 0 0 8px;
	color: #ffffff;
	font-size: clamp(30px, 4.6vw, 54px);
	line-height: 1.08;
}

.ame-eg-date {
	color: rgba(255, 255, 255, 0.85);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.ame-eg-btn {
	flex: 0 0 auto;
	display: inline-block;
	padding: 13px 26px;
	background-color: #ffffff;
	color: #1f1f1f;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.ame-eg-btn:hover {
	background-color: #ffc605;
	color: #1f1f1f;
}

/* ---------- Mosaico ---------- */
.ame-eg-grid {
	columns: 4;
	column-gap: 10px;
	padding-top: 10px;
}

.ame-eg-item {
	margin: 0 0 10px;
	break-inside: avoid;
	cursor: zoom-in;
	overflow: hidden;
	background: #f3f4f6;
}

.ame-eg-item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.ame-eg-item:hover img,
.ame-eg-item:focus-visible img {
	transform: scale(1.02);
	opacity: 0.92;
}

.ame-eg-item:focus-visible {
	outline: 2px solid #003e63;
	outline-offset: 2px;
}

/* ---------- Modal / Lightbox ---------- */
.ame-eg-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(8, 10, 12, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ame-eg-modal[hidden] { display: none; }

.ame-eg-stage {
	max-width: 92vw;
	max-height: 86vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ame-eg-modal-img {
	max-width: 92vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	transition: opacity 0.25s ease;
}

.ame-eg-modal-img.is-loading { opacity: 0.25; }

.ame-eg-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	padding: 0;
	z-index: 2;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.ame-eg-nav:hover {
	background-color: #ffc605;
	border-color: #ffc605;
	color: #1f1f1f;
}

.ame-eg-prev { left: 24px; }
.ame-eg-next { right: 24px; }

.ame-eg-close,
.ame-eg-download {
	position: fixed;
	top: 22px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	cursor: pointer;
	z-index: 2;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.ame-eg-close { right: 24px; }
.ame-eg-download { right: 80px; }

.ame-eg-close:hover,
.ame-eg-download:hover {
	background-color: #ffc605;
	color: #1f1f1f;
}

.ame-eg-count {
	position: fixed;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	font-variant-numeric: tabular-nums;
	z-index: 2;
}

body.ame-eg-open { overflow: hidden; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
	.ame-eg-grid { columns: 3; }
}

@media (max-width: 767px) {
	.ame-eg-grid { columns: 2; }
	.ame-eg-hero-inner { flex-direction: column; align-items: flex-start; padding: 28px 20px; }
	.ame-eg-nav { width: 40px; height: 40px; }
	.ame-eg-prev { left: 10px; }
	.ame-eg-next { right: 10px; }
	.ame-eg-download { right: 74px; }
}

@media (prefers-reduced-motion: reduce) {
	.ame-eg-item img, .ame-eg-modal-img, .ame-eg-btn, .ame-eg-nav { transition: none; }
}
