:root {
	--dpsg-accent: #1a2f5a;
	--dpsg-heading: #14213d;
	--dpsg-text: #5c6578;
	--dpsg-gap: 30px;
}

/* ---------- Gallery page: 3 cards per row ---------- */
.dpsg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--dpsg-gap);
	margin: 0 0 2rem;
}
@media (max-width: 991px) { .dpsg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (max-width: 575px) { .dpsg-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.dpsg-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(20, 33, 61, .08);
	transition: box-shadow .3s ease, transform .3s ease;
}
.dpsg-card:hover { box-shadow: 0 8px 26px rgba(20, 33, 61, .14); transform: translateY(-3px); }

.dpsg-card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #e7e9ee; }
.dpsg-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.dpsg-card:hover .dpsg-card-media img { transform: scale(1.05); }

.dpsg-card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 20px 22px 24px; }
.dpsg-card-title { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; color: var(--dpsg-heading); }
.dpsg-card-line { margin: 0 0 18px; line-height: 1.6; color: var(--dpsg-text); }
.dpsg-btn {
	margin-top: auto;
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background: var(--dpsg-accent);
	color: #fff;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.2;
	text-decoration: none;
	transition: filter .2s ease;
}
.dpsg-btn:hover, .dpsg-btn:focus-visible { filter: brightness(1.18); color: #fff; }
.dpsg-btn:focus-visible { outline: 3px solid var(--dpsg-accent); outline-offset: 3px; }
.dpsg-empty { color: var(--dpsg-text); }

/* ---------- Single gallery: 3 photos per row ---------- */
.dpsg-single-line { font-size: 1.15rem; line-height: 1.6; color: var(--dpsg-text); max-width: 65ch; margin: 0 0 1.5rem; }
.dpsg-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 991px) { .dpsg-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 575px) { .dpsg-photos { grid-template-columns: minmax(0, 1fr); } }
.dpsg-photo { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: #e7e9ee; cursor: zoom-in; }
.dpsg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.dpsg-photo:hover img { transform: scale(1.05); }
.dpsg-photo:focus-visible { outline: 3px solid var(--dpsg-accent); outline-offset: 2px; }

/* ---------- Lightbox ---------- */
.dpsg-lb { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(8, 12, 22, .94); }
.dpsg-lb.is-open { display: flex; }
.dpsg-lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.dpsg-lb button {
	position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff;
	width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer;
}
.dpsg-lb button:hover, .dpsg-lb button:focus-visible { background: rgba(255,255,255,.28); outline: none; }
.dpsg-lb-close { top: 16px; right: 16px; }
.dpsg-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.dpsg-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.dpsg-lb-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #cfd5e3; font-size: .9rem; }
@media (max-width: 575px) { .dpsg-lb-prev { left: 8px; } .dpsg-lb-next { right: 8px; } }

@media (prefers-reduced-motion: reduce) {
	.dpsg-card, .dpsg-card-media img, .dpsg-photo img, .dpsg-btn { transition: none; }
	.dpsg-card:hover { transform: none; }
	.dpsg-card:hover .dpsg-card-media img, .dpsg-photo:hover img { transform: none; }
}
