/* Rich Carousel with Popup
   Adjust the variables to match the site. */
.so-widget-sow-anything-carousel.rich-carousel-popup .sow-carousel-container .sow-carousel-wrapper {
    overflow: visible;
}

.rich-carousel-popup {
	--rcp-gap: 24px;
	--rcp-ratio: 4 / 3;	
	--rcp-muted: #c9d0dd;
	--rcp-focus: #1a73e8;
	--rcp-card-bg: transparent;
	position: relative;
}

.rich-carousel-popup .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Equal-height items ---------- */
.rich-carousel-popup .slick-list { margin: 0 calc(var(--rcp-gap) / -2); }

.rich-carousel-popup .slick-track {
	display: flex;
	align-items: stretch;
}

.rich-carousel-popup .slick-initialized .sow-carousel-item.slick-slide {
	display: flex;
	float: none;
	height: auto;
	padding: 8px calc(var(--rcp-gap) / 2);  /* room for the focus ring */
	cursor: zoom-in;
	outline: none !important;
}

.rich-carousel-popup .sow-carousel-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	background: var(--rcp-card-bg);
}

/* ---------- Image ---------- */
.rich-carousel-popup .rcp-thumb {
	display: block;
	overflow: hidden;
	flex: 0 0 auto;
}
.rich-carousel-popup .rcp-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--rcp-ratio);
	object-fit: cover;
	transition: transform .3s ease;
}
.rich-carousel-popup .sow-carousel-item:hover .rcp-thumb img,
.rich-carousel-popup .sow-carousel-item:focus-visible .rcp-thumb img { transform: scale(1.03); }

/* ---------- Description under the image ---------- */
.rich-carousel-popup .rcp-card-caption {
	flex: 1 1 auto;               /* fills leftover height so every item matches */
	margin: 0;
	padding: 1.25rem .75rem 0;
	color: var(--ast-global-color-3);
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
	display: -webkit-box;         /* keep long text tidy: max 3 lines */
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Keyboard focus ---------- */
.rich-carousel-popup .sow-carousel-item:focus-visible .sow-carousel-content {
	outline: 3px solid var(--rcp-focus);
	outline-offset: 3px;
}
.rich-carousel-popup .rcp-arrow:focus-visible,
.rich-carousel-popup .rcp-toggle:focus-visible,
.rich-carousel-popup .rcp-dots button:focus-visible {
	outline: 3px solid var(--rcp-focus);
	outline-offset: 2px;
}

/* ---------- Navigation row: ‹  • • •  › ---------- */
.rich-carousel-popup .rcp-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	margin-top: 2rem;
}
.rich-carousel-popup .rcp-nav-center {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.rich-carousel-popup .rcp-nav .rcp-arrow {
	position: static;
	transform: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--ast-global-color-2);
	border-radius: 50%;
	background: transparent;
	color: var(--ast-global-color-2);
	font-size: 0;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.rich-carousel-popup .rcp-nav .rcp-arrow::before { content: none !important; }
.rich-carousel-popup .rcp-nav .rcp-arrow:hover {
	background: var(--ast-global-color-2);
	color: #fff;
}
.rich-carousel-popup .rcp-nav .rcp-arrow.slick-disabled {
	opacity: .3;
	cursor: default;
	background: transparent;
	color: var(--ast-global-color-2);
}
.rich-carousel-popup .rcp-nav .rcp-arrow.slick-hidden { display: none; }

/* Dots */
.rich-carousel-popup .rcp-dots .slick-dots {
	position: static;
	display: flex;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rich-carousel-popup .rcp-dots .slick-dots li {
	width: auto;
	height: auto;
	margin: 0;
}
.rich-carousel-popup .rcp-dots .slick-dots button {
	position: relative;
	width: 24px;                  /* comfortable target, small visible dot */
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 0;
	color: transparent;
	cursor: pointer;
}
.rich-carousel-popup .rcp-dots .slick-dots button::before {
	content: "" !important;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: var(--rcp-muted);
	opacity: 1;
	transition: background-color .15s ease, transform .15s ease;
}
.rich-carousel-popup .rcp-dots .slick-dots .slick-active button::before {
	background: var(--ast-global-color-2);
	transform: scale(1.2);
}

/* Pause / play (top right, above the carousel) */
.rich-carousel-popup .sow-carousel-container { display: flex; flex-direction: column; }
.rich-carousel-popup .rcp-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	width: 44px;
	height: 44px;
	margin: 0 0 8px;
	padding: 0;
	border: 2px solid var(--ast-global-color-2);
	border-radius: 50%;
	background: transparent;
	color: var(--ast-global-color-2);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}
.rich-carousel-popup .rcp-toggle .rcp-icon-play,
.rich-carousel-popup .rcp-toggle.is-paused .rcp-icon-pause { display: none; }
.rich-carousel-popup .rcp-toggle.is-paused .rcp-icon-play { display: inline; }

/* ---------- Popup: just the photo, white description strip exactly as wide as the photo ----------
   Scoped with :has() so other Fancybox popups (e.g. bankers) keep their look. */
#fancybox-wrap:has(.rcp-lightbox-content) {
	width: auto !important;          /* shrink to the photo */
	height: auto !important;
	padding: 0 !important;
}
#fancybox-wrap:has(.rcp-lightbox-content) #fancybox-outer {
	background: transparent !important;
	box-shadow: none !important;
}
#fancybox-wrap:has(.rcp-lightbox-content) #fancybox-content {
	height: auto !important;
	border-width: 0 !important;      /* removes Fancybox's white 10px frame */
	background: transparent !important;
}
#fancybox-wrap:has(.rcp-lightbox-content) #fancybox-content > div {
	overflow: visible !important;
}
#fancybox-wrap:has(.rcp-lightbox-content) .fancybox-bg,
#fancybox-wrap:has(.rcp-lightbox-content) #fancybox-title-wrap:empty { display: none !important; }

.rcp-lightbox-content {
	width: auto;
	background: transparent;
}

/* display: table + table-caption makes the caption exactly as wide as the image */
.rcp-lightbox-figure {
	display: table;
	margin: 0 auto;
	background: transparent;
}
.rcp-lightbox-img {
	display: block;
	width: auto;                     /* never upscale – keeps the photo sharp */
	height: auto;
	max-width: 90vw;
	max-height: 80vh;
}
.rcp-lightbox-caption {
	display: table-caption;
	caption-side: bottom;
	margin: 0;
	padding: 1rem 1.5rem;
	background: #fff;
	color: #1c2f5a;
	font-size: 1rem;
	line-height: 1.6;
	text-align: center;
}
.rcp-lightbox-caption > :first-child { margin-top: 0; }
.rcp-lightbox-caption > :last-child { margin-bottom: 0; }
.rcp-lightbox-caption a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.rich-carousel-popup .rcp-thumb img,
	.rich-carousel-popup .rcp-arrow,
	.rich-carousel-popup .rcp-dots .slick-dots button::before { transition: none; }
	.rich-carousel-popup .sow-carousel-item:hover .rcp-thumb img,
	.rich-carousel-popup .sow-carousel-item:focus-visible .rcp-thumb img { transform: none; }
}

/* Small phones: no arrows – swipe and dots only */
@media (max-width: 480px) {
	.rich-carousel-popup .rcp-nav .rcp-arrow { display: none !important; }

    .rcp-lightbox-img {
        max-width: calc(100vw - 20px);
    }
}