/* Simple Elegant Gallery — front-end styles.
   Colors deliberately avoid hardcoded brand colors so the gallery
   inherits your active theme's fonts, text color and link color. */

.sga-albums-grid,
.sga-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--sga-cols, 4), 1fr);
	gap: 16px;
	margin: 24px 0;
}
@media (max-width: 780px) {
	.sga-albums-grid, .sga-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.sga-albums-grid, .sga-gallery-grid { grid-template-columns: 1fr; }
}

.sga-album-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid rgba(127,127,127,.25);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.sga-album-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-2px); }
.sga-album-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.sga-album-title { display: block; padding: 10px 12px; font-weight: 600; }

.sga-item { margin: 0; }
.sga-item-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid rgba(127,127,127,.2);
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	line-height: 0;
	transition: box-shadow .2s ease, transform .2s ease;
}
.sga-item-btn:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-2px); }
.sga-item-btn img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

.sga-adsense-below { margin: 28px 0; text-align: center; }

.sga-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0; }
.sga-page-link {
	padding: 6px 12px;
	border: 1px solid rgba(127,127,127,.3);
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
}
.sga-page-link.active { border-color: currentColor; font-weight: 700; }

/* Lightbox */
.sga-lightbox { position: fixed; inset: 0; z-index: 99999; display: none; }
.sga-lightbox.sga-open { display: block; }
.sga-lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.sga-lightbox-inner {
	position: relative;
	z-index: 2;
	max-width: min(92vw, 1000px);
	margin: 4vh auto;
	padding: 16px;
	background: #fff;
	color: #111;
	border-radius: 8px;
	text-align: center;
	max-height: 92vh;
	overflow-y: auto;
}
.sga-lb-media { display: flex; justify-content: center; align-items: center; }
.sga-lb-media img { max-width: 100%; max-height: 65vh; border-radius: 4px; }
.sga-lb-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}
.sga-lb-prev, .sga-lb-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.4);
	color: #fff;
	border: none;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
}
.sga-lb-prev { left: 6px; }
.sga-lb-next { right: 6px; }
.sga-lb-caption { margin-top: 10px; font-size: 14px; opacity: .85; }
.sga-lb-download {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 18px;
	border: 1px solid currentColor;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
}
.sga-lb-download:hover { background: rgba(0,0,0,.06); }
.sga-lb-ad { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(127,127,127,.25); }
