/* AJAX Gallery Pro — front-end styles */

.agp-gallery-wrap {
	--agp-gap: 14px;
	--agp-radius: 10px;
	--agp-accent: #1e293b;
	--agp-accent-contrast: #ffffff;
	box-sizing: border-box;
}
.agp-gallery-wrap *,
.agp-gallery-wrap *::before,
.agp-gallery-wrap *::after {
	box-sizing: inherit;
}

/* Filters */
.agp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}
.agp-filter-btn {
	background: #f1f3f5;
	border: 1px solid transparent;
	color: #333;
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 13px;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, transform .15s ease;
}
.agp-filter-btn:hover {
	background: #e5e7eb;
}
.agp-filter-btn.is-active {
	background: var(--agp-accent);
	color: var(--agp-accent-contrast);
}
.agp-filter-btn:focus-visible {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
}

/* Grid */
.agp-grid {
	display: grid;
	gap: var(--agp-gap);
	grid-template-columns: repeat(3, 1fr);
}
.agp-columns-2 { grid-template-columns: repeat(2, 1fr); }
.agp-columns-3 { grid-template-columns: repeat(3, 1fr); }
.agp-columns-4 { grid-template-columns: repeat(4, 1fr); }
.agp-columns-5 { grid-template-columns: repeat(5, 1fr); }
.agp-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
	.agp-columns-4, .agp-columns-5, .agp-columns-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	.agp-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
}

.agp-item {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--agp-radius);
	aspect-ratio: 1 / 1;
	background: #eee;
	cursor: pointer;
	opacity: 0;
	transform: translateY(10px);
	animation: agp-fade-in .4s ease forwards;
}
.agp-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.agp-item:hover img {
	transform: scale(1.06);
}
.agp-item:focus-visible {
	outline: 3px solid var(--agp-accent);
	outline-offset: 2px;
}

.agp-caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 10px 12px;
	background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
	color: #fff;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	font-size: 13px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease;
}
.agp-item:hover .agp-caption,
.agp-item:focus-visible .agp-caption {
	opacity: 1;
	transform: translateY(0);
}
.agp-caption-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.agp-zoom-icon {
	font-size: 16px;
	line-height: 1;
	margin-left: 8px;
}

@keyframes agp-fade-in {
	to { opacity: 1; transform: translateY(0); }
}

.agp-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #666;
	padding: 40px 0;
}

/* Status / live region (visually hidden, for screen readers) */
.agp-status {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Load more */
.agp-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 26px;
}
.agp-load-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--agp-accent);
	color: var(--agp-accent-contrast);
	border: none;
	padding: 11px 26px;
	border-radius: 999px;
	font-size: 14px;
	cursor: pointer;
	transition: opacity .2s ease, transform .15s ease;
}
.agp-load-more:hover { opacity: .9; }
.agp-load-more:active { transform: scale(.97); }
.agp-load-more:disabled { opacity: .6; cursor: default; }

.agp-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	display: none;
	animation: agp-spin .7s linear infinite;
}
.agp-load-more.is-loading .agp-spinner { display: inline-block; }
.agp-load-more.is-loading .agp-load-more-text { opacity: .8; }

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

/* Lightbox */
.agp-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 10, 12, .94);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
	padding: 40px 20px;
}
.agp-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}
.agp-lightbox-inner {
	position: relative;
	max-width: 1200px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.agp-lightbox img {
	max-width: 100%;
	max-height: 78vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
	opacity: 0;
	transform: scale(.97);
	transition: opacity .25s ease, transform .25s ease;
}
.agp-lightbox.is-open img {
	opacity: 1;
	transform: scale(1);
}
.agp-lightbox-caption {
	color: #f1f1f1;
	margin-top: 14px;
	text-align: center;
	max-width: 700px;
}
.agp-lightbox-caption strong {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}
.agp-lightbox-caption span {
	font-size: 13px;
	color: #bbb;
}
.agp-lightbox-close,
.agp-lightbox-prev,
.agp-lightbox-next {
	position: absolute;
	background: rgba(255,255,255,.08);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	transition: background .2s ease;
}
.agp-lightbox-close:hover,
.agp-lightbox-prev:hover,
.agp-lightbox-next:hover {
	background: rgba(255,255,255,.2);
}
.agp-lightbox-close { top: -50px; right: 0; }
.agp-lightbox-prev { left: -10px; top: 50%; transform: translateY(-50%); }
.agp-lightbox-next { right: -10px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
	.agp-lightbox-close { top: 6px; right: 6px; background: rgba(0,0,0,.4); }
	.agp-lightbox-prev { left: 6px; background: rgba(0,0,0,.4); }
	.agp-lightbox-next { right: 6px; background: rgba(0,0,0,.4); }
}

.agp-lightbox-counter {
	position: absolute;
	top: -50px;
	left: 0;
	color: #ccc;
	font-size: 13px;
}
