﻿/* --- Slideshow Container --- */
.af-slideshow {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.af-slides {
	position: relative;
	width: 100%;
}

/* --- Individual Slide --- */
.af-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}

	.af-slide.is-active {
		opacity: 1;
		position: relative;
		z-index: 1;
	}

	.af-slide img {
		width: 100%;
		height: auto;
		display: block;
	}

	.af-slide figcaption {
		display: none;
	}

/* --- Hero Slideshow Image Behaviour --- */
.af-slideshow--hero .af-slide img {
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
}

.af-slideshow--hero .af-slides {
	min-height: 420px;
}

/* --- Single Image Slideshows --- */
.af-slideshow--single .af-prev,
.af-slideshow--single .af-next,
.af-slideshow--single .af-dots {
	display: none !important;
}

/* --- Overlay Text --- */
.af-slideshow-overlay {
	position: absolute;
	left:35px;
	bottom: 35px;
	z-index: 10;
	max-width: 720px;
	pointer-events: none;
}

.af-slideshow-overlay-inner {
	background: none;
	padding: 0;
	max-width: 720px;
	pointer-events: auto;
}

.af-slideshow-overlay h1 {
	margin: 0 0 2px 0;
	color: #ffffff;
	font-size: 1.7rem;
	font-weight: 500;
	line-height: 1.08em;
	text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 5px 16px rgba(0,0,0,0.65);
}

.af-slideshow-overlay-text {
	color: #ffffff;
	font-size: 1.7rem;
	font-weight: 500;
	line-height: 1.28em;
	text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 5px 16px rgba(0,0,0,0.65);
}

.af-slideshow-button {
	display: inline-block;
	margin-top: 24px;
	padding: 13px 34px;
	border-radius: 999px;
	background: #17488c;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2em;
	box-shadow: 0 3px 10px rgba(0,0,0,0.35);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

	.af-slideshow-button:hover {
		background: #0d3164;
		color: #ffffff;
		transform: translateY(-1px);
	}

/* Overlay position options from renderer */
.af-slideshow-overlay--left {
	left: 60px;
	right: auto;
	text-align: left;
}

.af-slideshow-overlay--center {
	left: 50%;
	right: auto;
	bottom: 45px;
	transform: translateX(-50%);
	text-align: center;
}

.af-slideshow-overlay--right {
	right: 60px;
	left: auto;
	text-align: right;
}

/* --- Reset button appearance inside slideshow --- */
.af-slideshow button,
.af-dots button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
}

/* --- Prev / Next Buttons --- */
.af-prev,
.af-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid black;
	background: rgba(255, 255, 255, 0.7);
	color: black;
	font-size: 1.5rem;
	font-weight: bold;
	line-height: 36px;
	text-align: center;
	z-index: 20;
	transition: background 0.3s ease, transform 0.2s ease;
}

	.af-prev:hover,
	.af-next:hover {
		background: rgba(255, 255, 255, 1);
		transform: translateY(-50%) scale(1.1);
	}

.af-prev {
	left: 15px;
}

.af-next {
	right: 15px;
}

/* --- Dots Navigation --- */
.af-slideshow .af-dots {
	position: absolute;
	bottom: 30px;
	right: 30px;
	transform: none;
	display: flex !important;
	justify-content: flex-end;
	gap: 6px;
	z-index: 20;
}

	.af-slideshow .af-dots button {
		all: unset;
		display: inline-block;
		width: 14px !important;
		height: 14px !important;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.8);
		box-shadow: 0 0 4px rgba(0,0,0,0.8);
		cursor: pointer;
		box-sizing: border-box;
		transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
	}

		.af-slideshow .af-dots button:hover {
			background: rgba(255, 255, 255, 1);
			transform: scale(1.15);
			box-shadow: 0 0 6px rgba(0,0,0,0.9);
		}

		.af-slideshow .af-dots button.is-active {
			background: white;
			box-shadow: 0 0 6px rgba(0,0,0,1);
		}

/* --- Reset figure defaults --- */
.af-slideshow,
.af-slideshow * {
	box-sizing: border-box;
}

	.af-slideshow figure {
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
	}

/* --- Mobile --- */
@media (max-width: 900px) {
	.af-slideshow--hero .af-slide img,
	.af-slideshow--hero .af-slides {
		min-height: 340px;
	}

	.af-slideshow-overlay,
	.af-slideshow-overlay--left,
	.af-slideshow-overlay--right {
		left: 25px;
		right: 25px;
		bottom: 25px;
		max-width: none;
		text-align: left;
	}

	.af-slideshow-overlay--center {
		left: 25px;
		right: 25px;
		bottom: 25px;
		transform: none;
		text-align: center;
	}

	.af-slideshow-overlay h1 {
		font-size: 2.2rem;
	}

	.af-slideshow-overlay-text {
		font-size: 1.25rem;
	}

	.af-slideshow-button {
		margin-top: 16px;
		padding: 11px 26px;
	}
}

@media (max-width: 520px) {
	.af-slideshow--hero .af-slide img,
	.af-slideshow--hero .af-slides {
		min-height: 300px;
	}

	.af-slideshow-overlay h1 {
		font-size: 1.2rem;
	}

	.af-slideshow-overlay-text {
		font-size: 1.1rem;
	}

	.af-prev,
	.af-next {
		width: 34px;
		height: 34px;
		line-height: 30px;
	}
}
