/* ===== Nexa Gallery Pro — Frontend Styles ===== */

body.nexa-lb-noscroll { overflow: hidden !important; }

.nexa-gallery-wrap {
	font-family: var(--nexa-font, inherit);
	box-sizing: border-box;
}
.nexa-gallery-wrap *,
.nexa-gallery-wrap *::before,
.nexa-gallery-wrap *::after { box-sizing: border-box; }

/* ---- Tabs ---- */
.nexa-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}
.nexa-tab {
	background: transparent;
	border: 1.5px solid rgba(0,0,0,0.08);
	color: var(--nexa-tab-text, #333);
	font-size: var(--nexa-tab-size, 14px);
	font-weight: 600;
	padding: 8px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}
.nexa-tab:hover { border-color: var(--nexa-accent, #0e8b6e); }
.nexa-tab.is-active {
	background: var(--nexa-accent, #0e8b6e);
	border-color: var(--nexa-accent, #0e8b6e);
	color: var(--nexa-tab-active-text, #fff);
}

/* ---- Grid ---- */
.nexa-grid {
	display: grid;
	grid-template-columns: repeat(var(--nexa-cols, 4), 1fr);
	gap: var(--nexa-gap, 20px);
}
@media (max-width: 1024px) {
	.nexa-grid { grid-template-columns: repeat(var(--nexa-cols-tablet, 3), 1fr); }
}
@media (max-width: 640px) {
	.nexa-grid { grid-template-columns: repeat(var(--nexa-cols-mobile, 2), 1fr); }
}

.nexa-card {
	border-radius: var(--nexa-radius, 12px);
	overflow: hidden;
	background: var(--nexa-card-bg, #fff);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.nexa-card.nexa-hidden { display: none !important; }
.nexa-gallery-wrap.nexa-has-shadow .nexa-card { box-shadow: 0 6px 22px rgba(0,0,0,0.10); }

.nexa-card-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	overflow: hidden;
	border-radius: var(--nexa-radius, 12px);
}

.nexa-thumb-ratio { display: block; width: 100%; position: relative; overflow: hidden; border-radius: var(--nexa-radius, 12px); }
.nexa-thumb-ratio::before { content: ''; display: block; padding-top: 75%; } /* default 4:3 */
.nexa-ratio-1-1 .nexa-thumb-ratio::before { padding-top: 100%; }
.nexa-ratio-4-3 .nexa-thumb-ratio::before { padding-top: 75%; }
.nexa-ratio-16-9 .nexa-thumb-ratio::before { padding-top: 56.25%; }

.nexa-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, filter 0.3s ease;
}

/* Hover effects (toggled via body class set by JS from options) */
.nexa-hover-zoom .nexa-card-trigger:hover .nexa-thumb { transform: scale(1.09); }
.nexa-hover-fade .nexa-card-trigger:hover .nexa-thumb { filter: brightness(0.65); }

.nexa-play-badge {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 56px; height: 56px;
	border-radius: 50%;
	background: rgba(15,25,35,0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
	pointer-events: none;
}
.nexa-play-badge svg { margin-left: 3px; }

.nexa-caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 10px 12px;
	font-size: var(--nexa-title-size, 15px);
	font-weight: 600;
	color: #fff;
	text-align: left;
	background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.nexa-card-trigger:hover .nexa-caption,
.nexa-card-trigger:focus-visible .nexa-caption {
	opacity: 1;
	transform: translateY(0);
}

/* ---- Pagination ---- */
.nexa-pagination { margin-top: 26px; display: flex; justify-content: center; }
.nexa-load-more {
	background: var(--nexa-accent, #0e8b6e);
	color: #fff;
	border: none;
	padding: 11px 30px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	font-family: inherit;
}
.nexa-load-more:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.nexa-load-more[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.nexa-page-numbers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nexa-page-numbers button {
	width: 36px; height: 36px;
	border-radius: 8px;
	border: 1.5px solid rgba(0,0,0,0.08);
	background: #fff;
	cursor: pointer;
	font-weight: 600;
	font-family: inherit;
}
.nexa-page-numbers button.is-active {
	background: var(--nexa-accent, #0e8b6e);
	border-color: var(--nexa-accent, #0e8b6e);
	color: #fff;
}

.nexa-gallery-empty { opacity: 0.7; }

/* ================= LIGHTBOX ================= */
.nexa-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}
.nexa-lightbox.is-open { display: flex; }

.nexa-lb-backdrop {
	position: absolute;
	inset: 0;
	background: var(--nexa-overlay-bg, rgba(10,15,25,0.95));
}

.nexa-lb-inner {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
}

.nexa-lb-stage {
	position: relative;
	width: 100%;
	max-width: 1100px;
	height: calc(100vh - 190px);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
}

.nexa-lb-zoomwrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: zoom-in;
}
.nexa-lb-zoomwrap.is-zoomed { cursor: grab; }
.nexa-lb-zoomwrap.is-dragging { cursor: grabbing; }

.nexa-lb-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
	transition: transform 0.15s ease-out;
}

.nexa-lb-video-wrap {
	position: relative;
	width: 100%;
	max-width: 1000px;
	aspect-ratio: 16 / 9;
}
.nexa-lb-video, .nexa-lb-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #000;
	border-radius: 8px;
}

.nexa-lb-close, .nexa-lb-prev, .nexa-lb-next, .nexa-lb-share {
	position: absolute;
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}
.nexa-lb-close:hover, .nexa-lb-prev:hover, .nexa-lb-next:hover, .nexa-lb-share:hover {
	background: rgba(255,255,255,0.25);
}
.nexa-lb-close {
	top: 18px; right: 18px;
	width: 42px; height: 42px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	z-index: 3;
}
.nexa-lb-prev, .nexa-lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 46px; height: 46px;
	border-radius: 50%;
	font-size: 16px;
	z-index: 3;
}
.nexa-lb-prev { left: 18px; }
.nexa-lb-next { right: 18px; }

.nexa-lb-footer {
	position: absolute;
	bottom: 16px; left: 0; right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	color: #fff;
	font-size: 14px;
	padding: 0 20px;
}
.nexa-lb-title { font-weight: 600; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexa-lb-counter { opacity: 0.7; }

.nexa-lb-share-wrap { position: relative; }
.nexa-lb-share { position: static; width: 36px; height: 36px; border-radius: 50%; }
.nexa-lb-share-menu {
	position: absolute;
	bottom: 46px;
	right: 0;
	background: #fff;
	border-radius: 10px;
	padding: 8px;
	display: none;
	flex-direction: column;
	min-width: 150px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.nexa-lb-share-menu.is-open { display: flex; }
.nexa-lb-share-menu a, .nexa-lb-share-menu button {
	background: none;
	border: none;
	text-align: left;
	padding: 8px 10px;
	border-radius: 6px;
	color: #1a3a6b;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
}
.nexa-lb-share-menu a:hover, .nexa-lb-share-menu button:hover { background: #f1f5f4; }

@media (max-width: 640px) {
	.nexa-lb-stage { height: calc(100vh - 150px); }
	.nexa-lb-title { max-width: 40%; font-size: 12px; }
	.nexa-lb-prev, .nexa-lb-next { width: 38px; height: 38px; }
	.nexa-lb-inner { padding: 40px 8px; }
}
