/* Before & After Gallery (Hakimi-style layout, Dr Thomas styling) */

.block--archive-gallery {
	padding: 40px 0 20px;
}

/* The page columns have no side padding on small screens, so the nested
   row must not pull outward either. */
.block--archive-gallery > .row {
	margin-left: 0;
	margin-right: 0;
}

/* ---- Sidebar ---------------------------------------------------------- */

.block--archive-gallery #gallery-treatments {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0 0 30px;
	padding: 0 0 10px;
	background: transparent;
	border: none;
	border-bottom: 1px solid #538b9c;
	border-radius: 0;
	box-shadow: none;
	color: #000;
	font-family: 'Libre Baskerville', serif;
	font-size: 16px;
}

.block--archive-gallery #gallery-treatments:focus {
	outline: none;
	border-bottom-color: #000;
}

.block--archive-gallery .list--holder {
	display: none;
}

.block--archive-gallery .list--holder h3 {
	margin: 0 0 12px;
	padding-right: 20px;
	color: #000;
	font-family: 'Libre Baskerville', serif;
	font-size: 14px;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
}

.block--archive-gallery .list--holder ul {
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
	border-right: 3px solid #538b9c;
}

.block--archive-gallery .list--holder h3 a {
	color: inherit;
	text-decoration: none;
}

.block--archive-gallery .list--holder h3 a:hover,
.block--archive-gallery .list--holder h3 a.active {
	color: #538b9c;
}

.block--archive-gallery .list--holder ul ul {
	margin: 0;
	border-right: none;
}

.block--archive-gallery .list--holder ul ul a {
	padding-right: 35px;
	font-size: 12px;
}

.block--archive-gallery .list--holder li a {
	display: block;
	padding: 8px 20px 8px 10px;
	color: #737373;
	font-family: 'Libre Baskerville', serif;
	font-size: 13px;
	line-height: 1.5;
	text-decoration: none;
	transition: all 0.3s ease;
}

.block--archive-gallery .list--holder li a:hover,
.block--archive-gallery .list--holder li a.active {
	background: rgba(83, 139, 156, 0.12);
	color: #538b9c;
}

.block--archive-gallery .list--holder li a.active {
	font-weight: 700;
}

/* ---- Stage ------------------------------------------------------------ */

#content .block--archive-gallery .gallery-title-name {
	margin: 0 0 25px;
	color: #000;
	font-family: 'Libre Baskerville', serif;
	font-size: 23px;
	letter-spacing: 7px;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

.block--archive-gallery .gallery-stage {
	display: grid;
	grid-template-columns: 1fr;
	grid-gap: 35px 0;
	text-align: center;
}

.block--archive-gallery .gallery--single {
	position: relative;
	padding: 20px 20px 25px;
	background: #fff;
	border: 1px solid rgba(83, 139, 156, 0.25);
	transition: background 0.4s ease, color 0.4s ease;
}

.block--archive-gallery .large-item {
	display: flex;
	justify-content: center;
	margin-bottom: 15px;
}

.block--archive-gallery .large-item .before-after,
.block--archive-gallery .large-item img {
	display: block;
	width: 100%;
	height: auto;
}

.block--archive-gallery .small--images {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.block--archive-gallery .small-item {
	display: flex;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	line-height: 0;
	background: none;
	border: 3px solid transparent;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.block--archive-gallery .small-item img,
#content .block--archive-gallery .gallery--single img {
	margin: 0;
}

.block--archive-gallery .small-item img {
	display: block;
	width: auto;
	height: 40px;
}

.block--archive-gallery .small-item.active {
	border-color: #538b9c;
}

.block--archive-gallery .small-item:focus {
	outline: 1px dotted #538b9c;
	outline-offset: 2px;
}

.block--archive-gallery .content h4 {
	margin: 20px 0 10px;
	color: #538b9c;
	font-family: 'Libre Baskerville', serif;
	font-size: 16px;
	letter-spacing: 3px;
	line-height: 1.5;
	text-transform: uppercase;
	transition: color 0.4s ease;
}

#content .block--archive-gallery .content p {
	margin: 0 0 8px;
	color: #737373;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	transition: color 0.4s ease;
}

#content .block--archive-gallery .content p.disclaimer {
	margin: 0;
	font-size: 12px;
}

/* Hover state, same idea as Hakimi: card darkens to the brand colour. */
.block--archive-gallery .gallery--single:hover {
	background: #538b9c;
}

.block--archive-gallery .gallery--single:hover .small-item.active {
	border-color: #fff;
}

.block--archive-gallery .gallery--single:hover .content h4,
#content .block--archive-gallery .gallery--single:hover .content p {
	color: #fff;
}

/* Loading / Continue button */
.block--archive-gallery .gallery-loading,
.gallery-warning .gallery-loading {
	display: block;
	margin: 35px auto 0;
	padding: 0 40px;
	height: 45px;
	background: #fff;
	border: 2px solid #000;
	border-radius: 5px;
	color: #000;
	font-family: 'Libre Baskerville', serif;
	font-size: 14px;
	letter-spacing: 4px;
	line-height: 41px;
	text-transform: uppercase;
}

/* ---- Breakpoints ------------------------------------------------------ */

@media (max-width: 991px) {
	.block--archive-gallery .gallery--single {
		padding: 10px 10px 20px;
	}
}

@media (min-width: 768px) {
	.block--archive-gallery .small-item img {
		height: 55px;
	}
}

@media (min-width: 992px) {
	.block--archive-gallery #gallery-treatments {
		display: none;
	}

	.block--archive-gallery .list--holder {
		display: block;
		text-align: right;
	}
}

@media (min-width: 1200px) {
	.block--archive-gallery .gallery-stage {
		grid-gap: 50px 0;
	}

	.block--archive-gallery .small-item img {
		height: 65px;
	}
}

/* ---- Content warning popup ------------------------------------------- */

.gallery-warning {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 15px;
	background: rgba(0, 0, 0, 0.7);
}

.gallery-warning[hidden] {
	display: none;
}

.gallery-warning__box {
	width: 100%;
	max-width: 450px;
	padding: 30px 25px;
	background: #fff;
	text-align: center;
	font-family: 'Lato', sans-serif;
	font-size: 17px;
	color: #737373;
}

.gallery-warning__box .header-text {
	color: #000;
	font-family: 'Libre Baskerville', serif;
	font-size: 18px;
	letter-spacing: 4px;
	text-transform: uppercase;
}

.gallery-warning__box img {
	max-width: 100%;
	height: auto;
}

.gallery-warning__label {
	color: #c00;
}

.gallery-warning .gallery-warning__close {
	margin-top: 20px;
}

body.gallery-warning-open {
	overflow: hidden;
}

/* ---- Gallery page layout ---------------------------------------------- */
/* No left-hand menu column: the sticky nav is always shown instead, and the
   header and gallery run full width. */

body.dt-gallery-page .front-page-nav {
	display: none;
}

@media (min-width: 991px) {
	/* On other pages the sticky nav only fades in once you scroll past the
	   left-hand menu. This page has no left-hand menu, so keep it shown and
	   in the page flow so it doesn't cover the header. */
	body.dt-gallery-page .sticky__header--container,
	body.dt-gallery-page .sticky__header--container.clearHeader {
		position: sticky;
		opacity: 1 !important;
		visibility: visible !important;
	}
}

/* Show the whole header image (contain, so the line-art logo is never cut
   off). Its edges are pure white, so a white base under the same teal
   gradient blends the empty sides into the image. Kept short so the first
   photos show without scrolling. */
body.dt-gallery-page .sub-header {
	width: 100%;
	min-height: clamp(110px, 14vw, 210px);
	margin-left: 0;
	overflow: hidden;
	background-color: #fff !important;
	background-size: 100% 100%, contain !important;
	background-position: center, center !important;
}

body.dt-gallery-page .sub-header .subpage-header-content {
	width: 100%;
	margin-left: 0;
	padding: 15px 0;
}

body.dt-gallery-page .subpage-content {
	float: none;
	max-width: 1660px;
	margin: 20px auto 0;
	padding: 0 30px;
}

body.dt-gallery-page .block--archive-gallery {
	padding-top: 15px;
}

/* Below 992px the fixed black mobile bar sits over the top of the page. */
@media (max-width: 991px) {
	body.dt-gallery-page .sub-header {
		margin-top: 65px;
	}
}

@media (max-width: 767px) {
	body.dt-gallery-page .subpage-content {
		padding: 0 15px;
	}
}

@media (min-width: 1200px) {
	body.dt-gallery-page .block--archive-gallery .small-item img {
		height: 80px;
	}
}

/* ---- Disclaimer text under the gallery -------------------------------- */

.gallery-disclaimer {
	margin: 40px 0 20px;
	text-align: center;
}

#content .gallery-disclaimer p {
	margin: 15px auto 0;
	max-width: 640px;
	font-size: 13px;
	line-height: 1.6;
}

/* ---- Large image opens the slider ------------------------------------- */

.block--archive-gallery .large-item .gallery-open {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	background: none;
	border: none;
	cursor: zoom-in;
	line-height: 0;
}

.gallery-open__icon {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	transition: background 0.3s ease;
}

.gallery-open:hover .gallery-open__icon,
.gallery-open:focus .gallery-open__icon {
	background: #538b9c;
}

/* ---- Fullscreen slider ------------------------------------------------ */

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	flex-direction: column;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	box-sizing: border-box;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	background: #0b0b0b;
	color: #fff;
}

.gallery-lightbox[hidden] {
	display: none;
}

.gallery-lightbox *,
.gallery-lightbox *::before,
.gallery-lightbox *::after {
	box-sizing: border-box;
}

body.gallery-lightbox-open {
	overflow: hidden;
}

.gallery-lightbox__top {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 0 10px 0 20px;
}

.gallery-lightbox__counter {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	letter-spacing: 2px;
}

.gallery-lightbox button {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.gallery-lightbox__close {
	width: 46px;
	height: 46px;
	font-size: 40px;
}

.gallery-lightbox__stage {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0 70px;
}

.gallery-lightbox__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	user-select: none;
}

.gallery-lightbox__nav {
	position: absolute;
	top: 50%;
	z-index: 1;
	width: 50px;
	height: 50px;
	margin-top: -25px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.12) !important;
	font-size: 36px;
	transition: background 0.3s ease;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus {
	background: #538b9c !important;
}

.gallery-lightbox__prev {
	left: 10px;
}

.gallery-lightbox__next {
	right: 10px;
}

.gallery-lightbox.is-single .gallery-lightbox__nav {
	display: none;
}

.gallery-lightbox.is-single .gallery-lightbox__stage {
	padding: 0 20px;
}

.gallery-lightbox__caption {
	flex: 0 0 auto;
	max-height: 22vh;
	overflow-y: auto;
	padding: 12px 20px 18px;
	text-align: center;
}

.gallery-lightbox__caption h4 {
	margin: 0 0 6px;
	color: #83abb7;
	font-family: 'Libre Baskerville', serif;
	font-size: 15px;
	letter-spacing: 3px;
	text-transform: uppercase;
}

.gallery-lightbox__caption p {
	max-width: 800px;
	margin: 0 auto;
	color: #ddd;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.gallery-lightbox__caption p:empty {
	display: none;
}

/* Phones: arrows sit over the photo edges so the photo can use the full width. */
@media (max-width: 767px) {
	.gallery-lightbox__stage {
		padding: 0 6px;
	}

	.gallery-lightbox__nav {
		width: 40px;
		height: 40px;
		margin-top: -20px !important;
		background: rgba(0, 0, 0, 0.5) !important;
		font-size: 28px;
	}

	.gallery-lightbox__prev {
		left: 4px;
	}

	.gallery-lightbox__next {
		right: 4px;
	}

	.gallery-lightbox__caption p {
		font-size: 13px;
	}
}
