/* =========================================================
   República45 Galeria de Fotos
   ========================================================= */
.r45g {
	--r45g-laranja: #FE5000;
	--r45g-cols: 4;
	box-sizing: border-box;
	width: 100%;
	/* Sem fundo/padding: usa o container do teu tema/página. */
}

.r45g__titulo {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 26px;
}

.r45g__grid {
	display: grid;
	grid-template-columns: repeat( var(--r45g-cols), 1fr );
	gap: 16px;
}

.r45g__item {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
	background: #222;
}
.r45g__item.is-hidden { display: none; }

.r45g__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.r45g__item:hover img { transform: scale( 1.04 ); }

/* Botão de download por imagem (canto inferior direito). */
.r45g__dl {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba( 0, 0, 0, .65 );
	color: #fff;
	text-decoration: none;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 6px 10px;
	border-radius: 5px;
	backdrop-filter: blur( 2px );
	transition: background .15s, color .15s;
}
.r45g__dl:hover { background: var(--r45g-laranja); color: #fff; }
.r45g__dl-ico { font-size: 13px; line-height: 1; }

/* Ver mais. */
.r45g__mais-wrap { text-align: center; margin-top: 24px; }
.r45g__mais {
	appearance: none;
	cursor: pointer;
	background: transparent;
	border: 1px solid rgba( 255, 255, 255, .4 );
	color: #fff;
	border-radius: 6px;
	padding: 9px 22px;
	font-size: 13px;
	font-weight: 700;
	transition: background .15s, color .15s, border-color .15s;
}
.r45g__mais:hover {
	background: var(--r45g-laranja);
	border-color: var(--r45g-laranja);
	color: #fff;
}

/* Responsivo. */
@media (max-width: 900px) {
	.r45g__grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media (max-width: 520px) {
	.r45g { padding: 20px; }
	.r45g__grid { grid-template-columns: 1fr; }
}

/* ---------- Admin (preview das miniaturas) ---------- */
.r45g-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
	padding: 0;
	list-style: none;
}
.r45g-preview li {
	position: relative;
	width: 100px;
	height: 100px;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	cursor: move;
	background: #f6f6f6;
}
.r45g-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r45g-preview .r45g-remove {
	position: absolute;
	top: 2px; right: 2px;
	width: 20px; height: 20px;
	border: 0;
	border-radius: 50%;
	background: rgba( 0, 0, 0, .7 );
	color: #fff;
	cursor: pointer;
	line-height: 1;
	font-size: 14px;
}
