.nf5g-gallery,
.nf5g-gallery * {
	box-sizing: border-box;
}

.nf5g-gallery {
	position: relative;
	width: 100%;
	margin: 1.5rem 0;
}

.nf5g-gallery-items {
	display: grid;
	grid-template-columns: repeat(var(--nf5g-columns, 3), minmax(0, 1fr));
	gap: var(--nf5g-gap, 12px);
}

.nf5g-item {
	position: relative;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border-radius: var(--nf5g-radius, 10px);
	background: #f2f4f7;
}

.nf5g-image-link {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
	overflow: hidden;
}

.nf5g-image {
	display: block;
	width: 100%;
	height: var(--nf5g-height, 280px);
	margin: 0;
	object-fit: var(--nf5g-fit, cover);
	transition: transform 0.35s ease;
}

.nf5g-item:hover .nf5g-image {
	transform: scale(1.03);
}

.nf5g-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	margin: 0;
	padding: 28px 14px 12px;
	font-size: 14px;
	line-height: 1.35;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.nf5g-model-grid .nf5g-item { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.nf5g-model-cards .nf5g-item { display:flex; flex-direction:column; overflow:hidden; border:1px solid #e4e7ec; background:#fff; box-shadow:0 8px 24px rgba(16,24,40,.09); }
.nf5g-model-cards .nf5g-image-link { height:auto; }
.nf5g-model-cards .nf5g-caption { position:static; padding:12px 14px; color:#344054; background:#fff; border-top:1px solid #eef0f3; }
.nf5g-model-masonry .nf5g-gallery-items { display:block; columns:var(--nf5g-columns,3); column-gap:var(--nf5g-gap,12px); }
.nf5g-model-masonry .nf5g-item { display:inline-block; width:100%; margin:0 0 var(--nf5g-gap,12px); break-inside:avoid; }
.nf5g-model-masonry .nf5g-image { height:auto; max-height:none; object-fit:contain; }
.nf5g-model-mosaic .nf5g-gallery-items { grid-auto-flow:dense; grid-auto-rows:calc(var(--nf5g-height,280px)/2); }
.nf5g-model-mosaic .nf5g-item { grid-row:span 2; }
.nf5g-model-mosaic .nf5g-item:first-child { grid-column:span 2; grid-row:span 4; }
.nf5g-model-mosaic .nf5g-image { height:100%; }

/* Slider profissional */
.nf5g-model-slider {
	padding: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nf5g-slider-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #fff;
}

.nf5g-slider-track {
	display: flex;
	align-items: stretch;
	gap: 0;
	transform: translate3d(0, 0, 0);
	transition: transform var(--nf5g-speed, 450ms) cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.nf5g-model-slider .nf5g-item {
	flex: 0 0 100%;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.nf5g-model-slider .nf5g-image {
	height: clamp(260px, 36vw, 430px);
	min-height: 260px;
	object-fit: cover;
	background: #eef2f6;
}

.nf5g-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255,255,255,.88);
	border-radius: 999px;
	color: #d81f35;
	background: rgba(255,255,255,.94);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
	backdrop-filter: blur(4px);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background .2s ease, color .2s ease, opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nf5g-arrow:hover,.nf5g-arrow:focus-visible { background:#d81f35; color:#fff; box-shadow:0 12px 30px rgba(216,31,53,.28); transform:translateY(-50%) scale(1.03); }
.nf5g-arrow:disabled { opacity:.35; cursor:default; box-shadow:none; }
.nf5g-arrow span { font-size:28px; line-height:1; transform:translateY(-1px); }
.nf5g-prev { left:14px; }
.nf5g-next { right:14px; }

.nf5g-model-slider .nf5g-thumbs-shell {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 0 42px;
	width: 100%;
}

.nf5g-model-slider .nf5g-thumbs-shell.is-centered {
	justify-content: center;
	padding-left: 0;
	padding-right: 0;
}

.nf5g-model-slider .nf5g-thumbs-wrap {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.nf5g-model-slider .nf5g-thumbs-wrap::-webkit-scrollbar { display:none; }

.nf5g-model-slider .nf5g-thumbs-shell.is-centered .nf5g-thumbs-wrap {
	flex: 0 1 auto;
	width: auto;
	max-width: 100%;
	overflow: visible;
}

.nf5g-model-slider .nf5g-thumbs {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: max-content;
	min-width: 100%;
}

.nf5g-model-slider .nf5g-thumbs-shell.is-centered .nf5g-thumbs {
	justify-content: center;
	min-width: 0;
}

.nf5g-model-slider .nf5g-thumb {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 72px !important;
	min-width: 72px !important;
	max-width: 72px !important;
	width: 72px !important;
	height: 72px !important;
	min-height: 72px !important;
	max-height: 72px !important;
	padding: 4px !important;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), inset 0 0 0 1px rgba(255,255,255,.35);
	transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease, transform .2s ease;
}
.nf5g-model-slider .nf5g-thumb:hover,
.nf5g-model-slider .nf5g-thumb:focus-visible { border-color:#d81f35; transform:translateY(-2px); }
.nf5g-model-slider .nf5g-thumb.is-active { border-color:#d81f35; box-shadow:0 0 0 1px #d81f35 inset, 0 8px 18px rgba(216,31,53,.14); }
.nf5g-model-slider .nf5g-thumb-image {
	display:block;
	width:100% !important;
	height:100% !important;
	min-width:100% !important;
	max-width:100% !important;
	border-radius: 2px;
	object-fit:cover !important;
	aspect-ratio:1/1;
}

.nf5g-model-slider .nf5g-thumbs-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background: rgba(255,255,255,.96);
	box-shadow: 0 8px 20px rgba(15,23,42,.14);
	color: #d81f35;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.nf5g-model-slider .nf5g-thumbs-arrow:hover,
.nf5g-model-slider .nf5g-thumbs-arrow:focus-visible { background:#d81f35; color:#fff; box-shadow:0 10px 22px rgba(216,31,53,.24); transform:translateY(-50%) scale(1.04); }
.nf5g-model-slider .nf5g-thumbs-prev { left:2px; }
.nf5g-model-slider .nf5g-thumbs-next { right:2px; }
.nf5g-model-slider .nf5g-thumbs-arrow[hidden] { display:none; }
.nf5g-model-slider .nf5g-thumbs-arrow:disabled { opacity:.35; cursor:default; box-shadow:none; }
.nf5g-model-slider .nf5g-thumbs-arrow span { font-size:18px; line-height:1; }

.nf5g-lightbox { position:fixed; inset:0; z-index:999999; display:none; align-items:center; justify-content:center; padding:28px 72px; background:rgba(5,8,14,.94); }
.nf5g-lightbox.is-open { display:flex; }
.nf5g-lightbox-dialog { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; height:100%; outline:none; }
.nf5g-lightbox-image { display:block; max-width:100%; max-height:calc(100vh - 130px); border-radius:6px; object-fit:contain; box-shadow:0 12px 42px rgba(0,0,0,.5); }
.nf5g-lightbox-caption { max-width:900px; margin:12px auto 0; font-size:15px; line-height:1.45; text-align:center; color:#f2f4f7; }
.nf5g-lightbox-close,.nf5g-lightbox-nav { position:absolute; z-index:2; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; color:#fff; background:rgba(255,255,255,.12); cursor:pointer; }
.nf5g-lightbox-close { top:0; right:0; width:42px; height:42px; border-radius:50%; font-size:30px; }
.nf5g-lightbox-nav { top:50%; width:46px; height:58px; border-radius:8px; font-size:36px; transform:translateY(-50%); }
.nf5g-lightbox-prev { left:0; }
.nf5g-lightbox-next { right:0; }
body.nf5g-lightbox-open { overflow:hidden; }

@media (max-width:1024px) {
	.nf5g-gallery-items { grid-template-columns: repeat(var(--nf5g-columns-tablet, 2), minmax(0, 1fr)); }
	.nf5g-model-masonry .nf5g-gallery-items { columns: var(--nf5g-columns-tablet, 2); }
	.nf5g-model-slider .nf5g-image { height: clamp(240px, 42vw, 380px); }
}

@media (max-width:600px) {
	.nf5g-gallery-items { grid-template-columns: repeat(var(--nf5g-columns-mobile, 1), minmax(0, 1fr)); }
	.nf5g-model-masonry .nf5g-gallery-items { columns: var(--nf5g-columns-mobile, 1); }
	.nf5g-model-mosaic .nf5g-gallery-items { grid-auto-rows: var(--nf5g-height, 280px); }
	.nf5g-model-mosaic .nf5g-item,.nf5g-model-mosaic .nf5g-item:first-child { grid-column:auto; grid-row:auto; }
	.nf5g-model-slider { padding:8px; }
	.nf5g-model-slider .nf5g-image { height:54vw; min-height:200px; }
	.nf5g-arrow { width:38px; height:38px; }
	.nf5g-arrow span { font-size:24px; }
	.nf5g-prev { left:10px; }
	.nf5g-next { right:10px; }
	.nf5g-model-slider .nf5g-thumbs-shell { padding:0 28px; gap:6px; }
	.nf5g-model-slider .nf5g-thumbs-shell.is-centered { padding-left:0; padding-right:0; }
	.nf5g-model-slider .nf5g-thumbs { gap:6px; }
	.nf5g-model-slider .nf5g-thumb { flex:0 0 58px !important; min-width:58px !important; max-width:58px !important; width:58px !important; height:58px !important; min-height:58px !important; max-height:58px !important; padding:3px !important; }
	.nf5g-model-slider .nf5g-thumbs-arrow { width:26px; height:26px; }
	.nf5g-lightbox { padding:60px 14px 22px; }
	.nf5g-lightbox-image { max-height:calc(100vh - 145px); }
	.nf5g-lightbox-close { top:-48px; }
	.nf5g-lightbox-nav { top:auto; bottom:-2px; width:42px; height:42px; transform:none; }
}

@media (prefers-reduced-motion:reduce) {
	.nf5g-image,.nf5g-slider-track,.nf5g-arrow,.nf5g-thumb,.nf5g-thumbs-arrow { transition:none !important; }
}

/* =========================================================
 * Galerias de fotos independentes — versão 2
 * ======================================================= */
.nf5pg-gallery-list,
.nf5pg-gallery-list * ,
.nf5pg-single-gallery,
.nf5pg-single-gallery * {
	box-sizing: border-box;
}

.nf5pg-gallery-list {
	display: grid;
	grid-template-columns: repeat(var(--nf5pg-list-columns, 4), minmax(0, 1fr));
	gap: var(--nf5pg-list-gap, 20px);
	width: 100%;
	margin: 24px 0;
}

.nf5pg-card {
	min-width: 0;
	margin: 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.nf5pg-card:hover {
	transform: translateY(-4px);
	border-color: rgba(28, 76, 156, .28);
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
}

.nf5pg-card-link {
	display: block;
	color: inherit;
	text-decoration: none !important;
}

.nf5pg-card-cover {
	position: relative;
	overflow: hidden;
	background: #eef2f6;
}

.nf5pg-ratio-1-1 .nf5pg-card-cover { aspect-ratio: 1 / 1; }
.nf5pg-ratio-4-3 .nf5pg-card-cover { aspect-ratio: 4 / 3; }
.nf5pg-ratio-16-9 .nf5pg-card-cover { aspect-ratio: 16 / 9; }

.nf5pg-card-image,
.nf5pg-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.nf5pg-card:hover .nf5pg-card-image { transform: scale(1.045); }

.nf5pg-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	background: linear-gradient(135deg, #eef2f6, #dfe7ef);
}
.nf5pg-card-placeholder span { font-size: 48px; }

.nf5pg-card-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	color: #fff;
	background: linear-gradient(to top, rgba(5, 13, 28, .68), rgba(5, 13, 28, .08));
	opacity: 0;
	transition: opacity .25s ease;
}

.nf5pg-card-overlay span {
	padding: 9px 15px;
	border: 1px solid rgba(255,255,255,.7);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .02em;
	background: rgba(255,255,255,.14);
	backdrop-filter: blur(5px);
}

.nf5pg-card:hover .nf5pg-card-overlay { opacity: 1; }

.nf5pg-card-body { padding: 15px 16px 16px; }
.nf5pg-card-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.28;
	color: #111827;
}

.nf5pg-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
	font-size: 13px;
	color: #667085;
}

.nf5pg-empty-list,
.nf5pg-empty-gallery {
	padding: 22px;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	text-align: center;
	color: #64748b;
	background: #f8fafc;
}

.nf5pg-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 7px;
	margin: 28px 0;
}

.nf5pg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	color: #334155;
	background: #fff;
	text-decoration: none;
	box-shadow: 0 3px 10px rgba(15,23,42,.05);
}

.nf5pg-pagination .page-numbers.current,
.nf5pg-pagination .page-numbers:hover {
	border-color: var(--nf5g-accent, #1c4c9c);
	color: #fff;
	background: var(--nf5g-accent, #1c4c9c);
}

.nf5pg-single-gallery { margin: 30px 0; }
.nf5pg-single-heading {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #667085;
}

.nf5pg-photo-grid {
	display: grid;
	grid-template-columns: repeat(var(--nf5pg-photo-columns, 4), minmax(0, 1fr));
	gap: var(--nf5pg-photo-gap, 12px);
	margin: 0;
}

.nf5pg-photo-item {
	position: relative;
	min-width: 0;
	margin: 0;
	border-radius: 9px;
	background: #eef2f6;
	box-shadow: 0 4px 15px rgba(15,23,42,.08);
	overflow: hidden;
}

.nf5pg-photo-link {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.nf5pg-photo-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.nf5pg-photo-item:hover .nf5pg-photo-image { transform: scale(1.04); }

.nf5pg-photo-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 26px 12px 10px;
	font-size: 13px;
	line-height: 1.35;
	color: #fff;
	background: linear-gradient(to top, rgba(0,0,0,.76), transparent);
	pointer-events: none;
}

@media (max-width: 1024px) {
	.nf5pg-gallery-list { grid-template-columns: repeat(var(--nf5pg-list-columns-tablet, 2), minmax(0, 1fr)); }
	.nf5pg-photo-grid { grid-template-columns: repeat(var(--nf5pg-photo-columns-tablet, 3), minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.nf5pg-gallery-list { grid-template-columns: repeat(var(--nf5pg-list-columns-mobile, 1), minmax(0, 1fr)); }
	.nf5pg-photo-grid { grid-template-columns: repeat(var(--nf5pg-photo-columns-mobile, 2), minmax(0, 1fr)); }
	.nf5pg-card-title { font-size: 17px; }
}
