:root {
	--pgs-anim-speed: 600ms;
}

.pgs-wrapper {
	position: relative;
	width: 100%;
	background-color: transparent;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: sans-serif;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Hero Area */
.pgs-hero {
	position: relative;
	width: 100%;
	background-color: #ffffff;
	overflow: hidden;
}

.pgs-hero-media {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.pgs-hero-media .pgs-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transform: scale(1.02);
	transition: opacity var(--pgs-anim-speed) ease, transform var(--pgs-anim-speed) ease;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
}

.pgs-hero-media .pgs-slide.is-active {
	opacity: 1;
	transform: scale(1);
	z-index: 2;
}

.pgs-hero-media img,
.pgs-hero-media iframe {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border: none;
}

/* Arrows */
.pgs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 20; /* Ensure arrows are above the image */
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	background-color: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(6px);
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	transition: opacity 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
	padding: 0;
}

.pgs-hero:hover .pgs-arrow {
	opacity: 1;
}

.pgs-arrow:hover {
	transform: translateY(-50%) scale(1.1);
	background-color: rgba(255, 255, 255, 1);
}

.pgs-arrow svg {
	width: 24px;
	height: 24px;
	stroke: #333333; /* Darker stroke for light bg */
}

.pgs-arrow-prev {
	left: 16px;
}

.pgs-arrow-next {
	right: 16px;
}

/* Caption */
.pgs-caption {
	position: absolute;
	bottom: 20px;
	left: 20px;
	padding: 8px 16px;
	border-radius: 4px;
	z-index: 10;
	font-size: 14px;
	line-height: 1.4;
	max-width: 80%;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
	background-color: rgba(255, 255, 255, 0.9);
	color: #333;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pgs-caption.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Filmstrip */
.pgs-filmstrip-wrapper {
	width: 100%;
	background: #ffffff;
	padding: 15px;
	border-top: 1px solid #eeeeee;
}

.pgs-filmstrip {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 5px; /* slight padding for active state scale */
}

.pgs-filmstrip::-webkit-scrollbar {
	display: none;
}

.pgs-thumb {
	position: relative;
	cursor: pointer;
	scroll-snap-align: start;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	background: #f0f0f0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pgs-thumb-inner {
	position: relative;
	width: 100%;
	height: 100%;
}

.pgs-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.7;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.pgs-thumb:hover {
	transform: translateY(-2px);
	z-index: 2;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pgs-thumb:hover img {
	opacity: 1;
}

.pgs-thumb.is-active {
	border-color: #0073aa; /* More neutral active color */
	transform: scale(1.02);
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.pgs-thumb.is-active img {
	opacity: 1;
}

.pgs-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	background: rgba(255,255,255,0.8);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.pgs-play-icon svg {
	width: 16px;
	height: 16px;
	fill: #333;
}
