/* ── DSG Gallery Base ──────────────────── */

.dsg-gallery {
	margin: 0 auto;
	width: 100%;
}

.dsg-gallery-item {
	overflow: hidden;
	cursor: pointer;
}

.dsg-gallery-image-wrap {
	line-height: 0;
}

.dsg-gallery-image {
	width: 100%;
	height: auto;
	display: block;
}

.dsg-gallery-meta {
	padding: 8px 10px;
	background: #f9f9f9;
}

.dsg-gallery-title {
	margin: 0 0 4px;
	font-size: 14px;
	line-height: 1.3;
}

.dsg-gallery-caption {
	font-size: 12px;
	color: #666;
	line-height: 1.4;
	margin: 0;
}

/* ── Masonry ──────────────────────────── */

.dsg-gallery-masonry {
	display: flex;
	flex-wrap: wrap;
}

.dsg-gallery-masonry .dsg-gallery-item {
	padding: 5px;
	box-sizing: border-box;
}

.dsg-gallery-masonry .dsg-gallery-image-wrap {
	border-radius: 4px;
	overflow: hidden;
}

/* Default responsive columns fallback (before Isotope init) */
.dsg-gallery-masonry[data-columns="1"] .dsg-gallery-item { width: 100%; }
.dsg-gallery-masonry[data-columns="2"] .dsg-gallery-item { width: 50%; }
.dsg-gallery-masonry[data-columns="3"] .dsg-gallery-item { width: 33.333%; }
.dsg-gallery-masonry[data-columns="4"] .dsg-gallery-item { width: 25%; }
.dsg-gallery-masonry[data-columns="5"] .dsg-gallery-item { width: 20%; }
.dsg-gallery-masonry[data-columns="6"] .dsg-gallery-item { width: 16.666%; }
.dsg-gallery-masonry[data-columns="7"] .dsg-gallery-item { width: 14.285%; }
.dsg-gallery-masonry[data-columns="8"] .dsg-gallery-item { width: 12.5%; }

/* ── Justified ────────────────────────── */

.dsg-gallery-justified .dsg-gallery-item {
	display: inline-block;
}

.dsg-gallery-justified .dsg-gallery-image {
	height: 100%;
	width: auto;
}

/* ── Carousel ─────────────────────────── */

.dsg-gallery-carousel {
	position: relative;
}

.dsg-gallery-carousel .swiper-slide {
	height: auto;
}

.dsg-gallery-carousel .dsg-gallery-image-wrap {
	border-radius: 4px;
	overflow: hidden;
}

.dsg-gallery-carousel .swiper-button-next,
.dsg-gallery-carousel .swiper-button-prev {
	color: #333;
}

.dsg-gallery-carousel .swiper-pagination-bullet-active {
	background: #333;
}

/* ── Video Items ──────────────────────── */

.dsg-gallery-item-video .dsg-gallery-image-wrap {
	position: relative;
}

.dsg-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	pointer-events: none;
	z-index: 2;
}

.dsg-gallery-item-video:hover .dsg-play-overlay {
	background: rgba(0, 0, 0, 0.8);
}

.dsg-play-icon {
	color: #fff;
	font-size: 24px;
	line-height: 1;
	margin-left: 3px;
}

.dsg-video-placeholder {
	position: relative;
	width: 100%;
	padding-top: 100%;
	background: #f0f0f1;
}
.dsg-video-placeholder-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	color: #b4b9be;
}

.dsg-video-lightbox {
	max-width: 900px;
	margin: 0 auto;
	background: #000;
}

.dsg-video-lightbox video {
	display: block;
}

/* ── Album ────────────────────────────── */

.dsg-album {
	margin: 0 auto;
	width: 100%;
}

.dsg-album-title {
	margin: 0 0 20px;
	font-size: 24px;
}

.dsg-album-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}

a.dsg-album-item,
a.dsg-album-item:hover,
a.dsg-album-item:focus {
	text-decoration: none;
	color: inherit;
}

.dsg-album-item {
	display: block;
	border-radius: 6px;
	overflow: hidden;
	background: #f9f9f9;
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
}

.dsg-album-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dsg-album-thumb {
	position: relative;
	padding-top: 66.666%;
	overflow: hidden;
	background: #e0e0e0;
}

.dsg-album-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dsg-album-placeholder-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 40px;
	color: #ccc;
}

.dsg-album-info {
	padding: 12px 15px;
}

.dsg-album-gallery-name {
	margin: 0 0 4px;
	font-size: 16px;
	line-height: 1.3;
}

.dsg-album-gallery-count {
	font-size: 13px;
	color: #888;
}

/* ── Album Gallery View ──────────────── */

.dsg-album-back {
	display: inline-block;
	margin-bottom: 20px;
	font-size: 15px;
	color: #0073aa;
	text-decoration: none;
}

.dsg-album-back:hover {
	color: #005a87;
	text-decoration: underline;
}

/* ── Responsive ───────────────────────── */

@media (max-width: 768px) {
	.dsg-gallery-masonry[data-columns] .dsg-gallery-item {
		width: 50%;
	}
	.dsg-gallery-masonry[data-columns="1"] .dsg-gallery-item {
		width: 100%;
	}
	.dsg-album-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.dsg-gallery-masonry[data-columns] .dsg-gallery-item {
		width: 100%;
	}
	.dsg-album-grid {
		grid-template-columns: 1fr;
	}
}
