.pmh-sgw {
	--pmh-sgw-border: #d4d4d8;
	--pmh-sgw-accent: #121212;
	--pmh-sgw-muted: #5f6368;
	--pmh-sgw-bg: #ffffff;
	--pmh-sgw-chip: #f5f5f5;
	position: relative;
	padding: 12px 0;
}

.pmh-sgw-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.pmh-sgw-tab {
	border: 1px solid var(--pmh-sgw-border);
	background: var(--pmh-sgw-bg);
	color: var(--pmh-sgw-muted);
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: all 0.2s ease;
}

.pmh-sgw-tab:hover,
.pmh-sgw-tab.is-active {
	background: var(--pmh-sgw-accent);
	border-color: var(--pmh-sgw-accent);
	color: #fff;
}

.pmh-sgw-grid {
	display: grid;
	gap: 16px;
}

.pmh-sgw-grid.columns-1 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.pmh-sgw-grid.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pmh-sgw-grid.columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pmh-sgw-grid.columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pmh-sgw-grid.columns-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pmh-sgw-grid.columns-6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
	.pmh-sgw-grid.columns-tablet-1 {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-tablet-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-tablet-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-tablet-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-tablet-5 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-tablet-6 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Responsive - Mobile */
@media (max-width: 768px) {
	.pmh-sgw-grid.columns-mobile-1 {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-mobile-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-mobile-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-mobile-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-mobile-5 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	.pmh-sgw-grid.columns-mobile-6 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Masonry mode */
.pmh-sgw-grid.masonry {
	display: block;
}

.pmh-sgw-grid.masonry.columns-2 { columns: 2; }
.pmh-sgw-grid.masonry.columns-3 { columns: 3; }
.pmh-sgw-grid.masonry.columns-4 { columns: 4; }
.pmh-sgw-grid.masonry.columns-5 { columns: 5; }
.pmh-sgw-grid.masonry.columns-6 { columns: 6; }

.pmh-sgw-grid.masonry.columns-1 { columns: 1; }

@media (max-width: 1024px) {
	.pmh-sgw-grid.masonry.columns-tablet-2 { columns: 2; }
	.pmh-sgw-grid.masonry.columns-tablet-3 { columns: 3; }
	.pmh-sgw-grid.masonry.columns-tablet-4 { columns: 4; }
	.pmh-sgw-grid.masonry.columns-tablet-5 { columns: 5; }
	.pmh-sgw-grid.masonry.columns-tablet-6 { columns: 6; }
}

@media (max-width: 768px) {
	.pmh-sgw-grid.masonry.columns-mobile-1 { columns: 1; }
	.pmh-sgw-grid.masonry.columns-mobile-2 { columns: 2; }
	.pmh-sgw-grid.masonry.columns-mobile-3 { columns: 3; }
	.pmh-sgw-grid.masonry.columns-mobile-4 { columns: 4; }
	.pmh-sgw-grid.masonry.columns-mobile-5 { columns: 5; }
	.pmh-sgw-grid.masonry.columns-mobile-6 { columns: 6; }
}

/* Elementor editor preview often uses device classes instead of viewport width */
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.elementor-device-tablet .pmh-sgw-grid.columns-tablet-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.elementor-device-mobile .pmh-sgw-grid.columns-mobile-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-1 { columns: 1; }
body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-2 { columns: 2; }
body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-3 { columns: 3; }
body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-4 { columns: 4; }
body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-5 { columns: 5; }
body.elementor-device-tablet .pmh-sgw-grid.masonry.columns-tablet-6 { columns: 6; }

body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-1 { columns: 1; }
body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-2 { columns: 2; }
body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-3 { columns: 3; }
body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-4 { columns: 4; }
body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-5 { columns: 5; }
body.elementor-device-mobile .pmh-sgw-grid.masonry.columns-mobile-6 { columns: 6; }

.pmh-sgw-grid.masonry .pmh-sgw-item {
	break-inside: avoid;
	margin-bottom: 16px;
}

.pmh-sgw-grid.masonry .pmh-sgw-media {
	aspect-ratio: unset;
	min-height: 120px;
}

.pmh-sgw-item {
	overflow: hidden;
	background: transparent;
}

.pmh-sgw-media {
	aspect-ratio: 16 / 10;
	background: #000;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pmh-sgw-open-lightbox {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: #000 !important;
	cursor: pointer;
	position: relative;
	box-shadow: none !important;
}

.pmh-sgw-inline-embed {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
	pointer-events: none;
}

.pmh-sgw-item.pmh-sgw-video-short .pmh-sgw-media {
	aspect-ratio: 9 / 16;
}

.pmh-sgw-item.pmh-sgw-video-vertical .pmh-sgw-media {
	aspect-ratio: 9 / 16;
}

.pmh-sgw-media img,
.pmh-sgw-media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pmh-sgw-open-lightbox video {
	pointer-events: none;
}

.pmh-sgw-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	pointer-events: none;
}

.pmh-sgw-video-fallback {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
	color: #fff;
	font-size: 14px;
	letter-spacing: 0.03em;
}

.pmh-sgw-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 12px 0;
}

.pmh-sgw-pill {
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--pmh-sgw-chip);
	border: 1px solid #ececec;
	line-height: 1;
}

.pmh-sgw-title {
	font-size: 14px;
	line-height: 1.35;
	margin: 8px 12px 12px;
	color: #18181b;
}

.pmh-sgw-load-more-wrap {
	margin-top: 18px;
	text-align: center;
}

.pmh-sgw-load-more {
	border: 1px solid var(--pmh-sgw-accent);
	background: var(--pmh-sgw-accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pmh-sgw-empty {
	padding: 16px;
	border: 1px dashed var(--pmh-sgw-border);
	border-radius: 8px;
	color: var(--pmh-sgw-muted);
	margin: 0;
}

.pmh-sgw.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.pmh-sgw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.pmh-sgw-lightbox.is-open {
	display: block;
}

.pmh-sgw-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.pmh-sgw-lightbox-dialog {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 70px;
}

.pmh-sgw-lb-stage {
	max-width: min(1100px, 90vw);
	max-height: min(78vh, 900px);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 3;
}

.pmh-sgw-lb-stage img,
.pmh-sgw-lb-stage video,
.pmh-sgw-lb-stage iframe,
.pmh-sgw-lb-stage .pmh-sgw-external-link {
	max-width: 100%;
	max-height: 78vh;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	background: #000;
}

.pmh-sgw-lb-stage iframe {
	width: min(1100px, 90vw);
	aspect-ratio: 16 / 9;
	height: auto;
	max-height: 78vh;
	border: 0;
}

.pmh-sgw-lb-stage iframe.pmh-sgw-lb-iframe.is-portrait {
	width: min(440px, 92vw);
	aspect-ratio: 9 / 16;
	height: auto;
	max-height: 78vh;
}

.pmh-sgw-lb-stage .pmh-sgw-external-link {
	position: relative;
	display: block;
	text-decoration: none;
	overflow: hidden;
}

.pmh-sgw-lb-stage .pmh-sgw-external-link .pmh-sgw-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.pmh-sgw-lb-close,
.pmh-sgw-lb-nav {
	position: absolute;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	cursor: pointer;
	z-index: 4;
	backdrop-filter: blur(4px);
  padding: 0 !important;
}

.pmh-sgw-lb-close {
	top: 20px;
	right: 20px;
	width: 42px;
	height: 42px;
	font-size: 28px;
	line-height: 1;
}

.pmh-sgw-lb-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	font-size: 24px;
	line-height: 1;
}

.pmh-sgw-lb-prev {
	left: 20px;
}

.pmh-sgw-lb-next {
	right: 20px;
}

.pmh-sgw-lb-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	text-align: center;
	color: #fff;
	font-size: 14px;
	padding: 0 16px;
	z-index: 4;
}

body.pmh-sgw-lb-open {
	overflow: hidden;
}

@keyframes pmh-sgw-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.pmh-sgw.is-loading .pmh-sgw-load-more::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: pmh-sgw-spin 0.8s linear infinite;
	vertical-align: middle;
}

@media (max-width: 1024px) {
	.pmh-sgw-grid.columns-4,
	.pmh-sgw-grid.columns-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.pmh-sgw-grid.columns-4,
	.pmh-sgw-grid.columns-3,
	.pmh-sgw-grid.columns-2 {
		grid-template-columns: 1fr;
	}
}