/*
 * Post Gallery Carousel – front-end styles.
 * Slides-to-show and spacing are driven by CSS variables that the Elementor
 * widget sets per breakpoint (--pgc-slides, --pgc-gap). Values below are
 * fallbacks only; Elementor's selectors are more specific and win.
 */
.pgc-carousel {
	--pgc-slides: 3;
	--pgc-gap: 20px;
	position: relative;
	width: 100%;
	max-width: 100%;
}

@media (max-width: 1024px) {
	.pgc-carousel {
		--pgc-slides: 2;
		--pgc-gap: 15px;
	}
}

@media (max-width: 767px) {
	.pgc-carousel {
		--pgc-slides: 1;
		--pgc-gap: 10px;
	}
}

.pgc-carousel [hidden] {
	display: none !important;
}

/* Layout is forced LTR so the translate maths is direction-safe; captions keep the site direction. */
.pgc-carousel__stage {
	position: relative;
	direction: ltr;
}

.pgc-carousel__viewport {
	overflow: hidden;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	cursor: grab;
}

.pgc-carousel.is-dragging .pgc-carousel__viewport {
	cursor: grabbing;
}

.pgc-carousel__track {
	position: relative;
	display: flex;
	gap: var(--pgc-gap);
	transition-property: transform;
	transition-duration: 500ms;
	transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.pgc-carousel__slide {
	flex: 0 0 calc((100% - (var(--pgc-slides) - 1) * var(--pgc-gap)) / var(--pgc-slides));
	min-width: 0;
	margin: 0;
}

.pgc-carousel__slide a {
	display: block;
}

.pgc-carousel .pgc-carousel__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	-webkit-user-drag: none;
}

body.rtl .pgc-carousel__caption {
	direction: rtl;
}

.pgc-carousel__caption {
	margin-top: 8px;
	font-size: 0.875em;
}

/* Arrows (theme button styles are reset defensively). */
.pgc-carousel .pgc-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	color: #fff;
	line-height: 1;
	background-color: rgba(0, 0, 0, 0.5);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	transform: translateY(-50%);
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.pgc-carousel .pgc-carousel__arrow--prev {
	left: 10px;
}

.pgc-carousel .pgc-carousel__arrow--next {
	right: 10px;
}

.pgc-carousel .pgc-carousel__arrow:hover:not(:disabled),
.pgc-carousel .pgc-carousel__arrow:focus-visible {
	color: #fff;
	background-color: rgba(0, 0, 0, 0.8);
}

.pgc-carousel .pgc-carousel__arrow:focus-visible,
.pgc-carousel .pgc-carousel__dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.pgc-carousel .pgc-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.pgc-carousel__arrow svg {
	width: 50%;
	height: 50%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Dots (generated by JS). */
.pgc-carousel .pgc-carousel__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 15px;
}

.pgc-carousel .pgc-carousel__dot {
	position: relative;
	width: 10px;
	height: 10px;
	min-height: 0;
	margin: 0;
	padding: 0;
	background-color: #c4c4c4;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.2s;
}

/* Larger invisible touch target. */
.pgc-carousel .pgc-carousel__dot::after {
	position: absolute;
	inset: -7px;
	content: "";
}

.pgc-carousel .pgc-carousel__dot.is-active,
.pgc-carousel .pgc-carousel__dot:hover {
	background-color: #1e1e1e;
}

.pgc-carousel-placeholder {
	padding: 24px;
	color: #6d7882;
	text-align: center;
	background: #f4f4f5;
	border: 1px dashed #c3c4c7;
}

@media (prefers-reduced-motion: reduce) {
	.pgc-carousel__track {
		transition-duration: 0ms !important;
	}
}
