#carousel {
	background-color: #eee;
	border: 1px solid #ccc;
	height: auto;
	margin-bottom: 1em;
	position: relative;
}

#carousel .carousel-item {
	height: 300px;
	overflow: hidden;
}

#carousel .carousel-item a.btn {
	color: white;
}

#carousel .normal img {
	float: left;
	max-width: 375px;
	max-height: 250px;
	margin: 0 15px 15px 0;
	border: 10px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,.4);
}

#carousel .fullwidth img {
	position: absolute;
	top: 0;
	width: 100%;
	display: block;
	height: auto;
}

#carousel .rightalign img {
	float: right;
	max-width: 375px;
	max-height: 250px;
	margin: 0 0 15px 15px;
	border: 10px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,.4);
}

#carousel .carousel-caption {
	position: relative;
	text-align: left;
	margin: 15px 15px 0 15px;
	right: auto;
	left: auto;
	color: var(--caption-color, black);
	text-shadow: none;
	font-size: 14px;
	z-index: 100;
}

#carousel .fullwidth .carousel-caption {
	margin: 0;
}

#carousel h3 {
	font-size: 22px;
	color: var(--caption-color, #01246c);
	margin-top: 0.3em;
}

#carousel .carousel-caption ul, #carousel .carousel-caption ol {
	overflow: hidden;
}

#carousel .super {
	text-transform: uppercase;
	color: var(--caption-color, #666);
	font-size: 14px;
	margin: 0;
}

/* ============================================================
   Caption placement for make()/make2() — CarouselSlide::CAPTION_POSITIONS
   (set via the .cap-* class and --caption-color custom property from
   CarouselSlide::getCaptionPositionClass()/getCaptionStyle()). Upper Left
   (.cap-ul, the default) is the original flow layout above and is left
   untouched. make3()'s .carousel-contain caption uses the same classes
   but its own layout — see the make3() section below.
   ============================================================ */
#carousel:not(.carousel-contain) .carousel-caption.cap-ur,
#carousel:not(.carousel-contain) .carousel-caption.cap-ll,
#carousel:not(.carousel-contain) .carousel-caption.cap-lr,
#carousel:not(.carousel-contain) .carousel-caption.cap-tc,
#carousel:not(.carousel-contain) .carousel-caption.cap-bc {
	position: absolute;
	margin: 0;
	z-index: 100;
	/* Reset all four offsets so nothing leaks in from Bootstrap's own
	   .carousel-caption (right:15%; bottom:1.25rem; left:15%) — each rule
	   below then sets only the two edges its corner/center needs. Without
	   this, the leftover Bootstrap edges over-constrain the box and it
	   silently stretches to the slide's full height (invisible today since
	   there's no border/background here, but it still sits over — and can
	   intercept clicks meant for — whatever's underneath). */
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
}

#carousel:not(.carousel-contain) .carousel-caption.cap-ur,
#carousel:not(.carousel-contain) .carousel-caption.cap-ll,
#carousel:not(.carousel-contain) .carousel-caption.cap-lr {
	max-width: 55%;
}

#carousel:not(.carousel-contain) .carousel-caption.cap-ur { top: 15px; right: 15px; text-align: right; }
#carousel:not(.carousel-contain) .carousel-caption.cap-ll { bottom: 2rem; left: 15px; }
#carousel:not(.carousel-contain) .carousel-caption.cap-lr { bottom: 2rem; right: 15px; text-align: right; }

#carousel:not(.carousel-contain) .carousel-caption.cap-tc,
#carousel:not(.carousel-contain) .carousel-caption.cap-bc {
	left: 50%;
	transform: translateX(-50%);
	max-width: 80%;
	text-align: center;
}
#carousel:not(.carousel-contain) .carousel-caption.cap-tc { top: 15px; }
#carousel:not(.carousel-contain) .carousel-caption.cap-bc { bottom: 15px; }

#carousel .btn-default {
	background-color: #C2282D;
	border-radius: 0;
	box-shadow: rgba(0, 0, 0, 0.329412) 0px 1px 5px 0px;
	color: white;
	text-transform: uppercase;
	margin-bottom: 1em;

}

.carousel-indicators {
	bottom: 0;
}

.carousel-indicators li {
	background-color: #666;
	border-color: #666;
	margin-right: 4px;
}

.carousel-indicators li.active {
	background-color: black;
	border-color: black;
	margin-right: 4px;
}

.carousel-control-prev, .carousel-control-next {
	top: 40%;
	bottom: 40%;
}

/* ============================================================
   make3() / .carousel-contain
   Aspect-ratio-aware slides: the photo is shown whole
   (object-fit: contain) over a blurred fill of itself, so it
   works at any screen shape. Height follows a responsive
   aspect-ratio instead of a fixed pixel value.
   ============================================================ */

#carousel.carousel-contain {
	background: #111;
	border: 0;
}

/* --slide-ratio is set inline by CarouselSlide::make3() from the widest/tallest
   (most-extreme-from-square) photo in the club's slide set, so the box fits the
   actual photos instead of a generic guess. Falls back to 16:9 when unset
   (e.g. no slide had usable image dimensions). */
#carousel.carousel-contain .carousel-item {
	position: relative;
	height: auto;
	overflow: hidden;
	aspect-ratio: var(--slide-ratio, 16 / 9);
	max-height: 78vh;
}

#carousel.carousel-contain .carousel-slide-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

#carousel.carousel-contain .carousel-slide-backdrop {
	position: absolute;
	inset: 0;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	filter: blur(18px) brightness(0.65);
	transform: scale(1.1);
}

#carousel.carousel-contain .carousel-slide-image {
	position: relative;
	z-index: 1;
	display: block;
	float: none;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	box-shadow: none;
	max-width: none;
	max-height: none;
	object-fit: contain;
	object-position: center;
}

/* opt-in edge-to-edge crop: slide flagged "Full Width" (img_type = 1) */
#carousel.carousel-contain .fullwidth .carousel-slide-image { object-fit: cover; }
#carousel.carousel-contain .fullwidth .carousel-slide-backdrop { display: none; }

/* Base box model, valid at every width. Placement is set per breakpoint:
   mobile always stacks the caption under the photo (see the max-width:575px
   block below — text is never shown over the photo on phones), and
   min-width:576px positions it per CarouselSlide::CAPTION_POSITIONS via the
   .cap-* class (defaulting to Upper Left), same mechanism as make()/make2(). */
#carousel.carousel-contain .carousel-caption {
	z-index: 2;
	margin: 0;
	text-align: left;
	color: var(--caption-color, #fff);
}

#carousel.carousel-contain .carousel-caption .text {
	max-width: 62ch;
	margin: 0;
}

#carousel.carousel-contain .carousel-caption h3,
#carousel.carousel-contain .carousel-caption h4 { color: var(--caption-color, #fff) }
#carousel.carousel-contain .carousel-caption h3 { margin-bottom: 0; }
#carousel.carousel-contain .carousel-caption h4 { font-size: 18px; }

#carousel.carousel-contain .carousel-caption .super { color: var(--caption-color, rgba(255, 255, 255, 0.82)); }

#carousel.carousel-contain .carousel-caption p:last-child { margin-bottom: 0; }

#carousel.carousel-contain .carousel-indicators { z-index: 3; }

/* Desktop/tablet: the caption floats over the photo in the chosen corner or
   center (CarouselSlide::CAPTION_POSITIONS); a text-shadow stands in for a
   background so it stays legible over any photo. This replaces what used to
   be a copy-pasted per-page override (top-left, width 60%, text-shadow) on
   every views/site/*.php template that calls make3() — it's now just the
   Upper Left default here. */
@media (min-width: 576px) {
	#carousel.carousel-contain .carousel-caption {
		position: absolute;
		padding: 0;
		background: none;
		text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
		/* Reset all four offsets — see the matching comment in the make()/
		   make2() section above for why (Bootstrap's own .carousel-caption
		   otherwise leaks right:15%/bottom:1.25rem in here too). */
		top: auto;
		right: auto;
		bottom: auto;
		left: auto;
	}
	#carousel.carousel-contain .carousel-caption.cap-ul,
	#carousel.carousel-contain .carousel-caption.cap-ur,
	#carousel.carousel-contain .carousel-caption.cap-ll,
	#carousel.carousel-contain .carousel-caption.cap-lr {
		width: 60%;
	}
	#carousel.carousel-contain .carousel-caption.cap-ul { top: 1rem; left: 1rem; }
	#carousel.carousel-contain .carousel-caption.cap-ur { top: 1rem; right: 1rem; left: auto; text-align: right; }
	#carousel.carousel-contain .carousel-caption.cap-ll { bottom: 2rem; left: 1rem; }
	#carousel.carousel-contain .carousel-caption.cap-lr { bottom: 2rem; right: 1rem; left: auto; text-align: right; }

	#carousel.carousel-contain .carousel-caption.cap-tc,
	#carousel.carousel-contain .carousel-caption.cap-bc {
		left: 50%;
		transform: translateX(-50%);
		width: 70%;
		text-align: center;
	}
	/* The inner text block is capped at 62ch. Anchor that narrower block to
	   the same horizontal edge/center as its caption; leaving margin: 0 makes
	   right and centered captions look shifted toward the left. */
	#carousel.carousel-contain .carousel-caption.cap-ur .text,
	#carousel.carousel-contain .carousel-caption.cap-lr .text {
		margin-left: auto;
		margin-right: 0;
	}
	#carousel.carousel-contain .carousel-caption.cap-tc .text,
	#carousel.carousel-contain .carousel-caption.cap-bc .text {
		margin-left: auto;
		margin-right: auto;
	}
	#carousel.carousel-contain .carousel-caption.cap-tc { top: 1rem; }
	#carousel.carousel-contain .carousel-caption.cap-bc { bottom: 1rem; }
}

/* phones: portrait image, caption stacked beneath it (never text over photo) */
@media (max-width: 575px) {
	#carousel.carousel-contain .carousel-item {
		aspect-ratio: auto;
		max-height: none;
	}
	#carousel.carousel-contain .carousel-slide-media {
		position: relative;
		aspect-ratio: var(--slide-ratio, 4 / 5);
	}
	#carousel.carousel-contain .carousel-caption {
		position: static;
		padding: 1rem 1.1rem 1.2rem;
		background: #111;
	}
}

/* honour reduced-motion: drop the cross-fade */
@media (prefers-reduced-motion: reduce) {
	#carousel.carousel-contain.carousel-fade .carousel-item { transition: none; }
}

/* mobile */
@media (max-width: 767px) {
	#carousel .item {
		height: 400px;
	}

	#carousel .carousel-caption {
		margin: 0;
	}
	#carousel .normal img, #carousel .rightalign img {
		max-width: 50%;
		border: none;
		box-shadow: none;
 	}
 	#carousel .carousel-caption .text {
		margin: 15px 15px 0 15px;
 	}
}

/* tablets */
@media (max-width: 991px) and (min-width: 768px) {
}

/* laptops */
@media (max-width: 1199px) and (min-width: 992px) {
}

/* desktops */
@media (min-width: 1200px) {
}
