/* A filmstrip of complete photographs; the active photograph sits in the centre. */
.tes-gallery-post { padding: 150px 0 64px; min-height: 65vh; }
.tes-gallery-post--carousel > .section-inner { width: min(1600px, calc(100% - 64px)); }
.tes-post-title { margin: 0 0 30px; color: var(--dusty-pink); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.12; letter-spacing: .04em; }
.tes-post-carousel { --tes-photo-height: clamp(260px, 52vh, 580px); --tes-photo-height: clamp(260px, 52svh, 580px); --tes-photo-max-width: 82%; --tes-photo-gap: 16px; width: 100%; min-width: 0; }
.tes-post-carousel__track { display: flex; align-items: flex-start; gap: var(--tes-photo-gap); position: relative; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tes-post-carousel__track::-webkit-scrollbar { display: none; }
/* End spacing centres the first and last photograph in the native-scroll fallback. */
.tes-post-carousel__track::before, .tes-post-carousel__track::after { content: ''; flex-shrink: 0; }
.tes-post-carousel__track::before { flex-basis: max(0px, calc((100% - min(calc(var(--tes-photo-height) * var(--tes-first-ratio, 1)), var(--tes-photo-max-width))) / 2 - var(--tes-photo-gap))); }
.tes-post-carousel__track::after { flex-basis: max(0px, calc((100% - min(calc(var(--tes-photo-height) * var(--tes-last-ratio, 1)), var(--tes-photo-max-width))) / 2 - var(--tes-photo-gap))); }
.tes-post-carousel.is-enhanced .tes-post-carousel__track::before, .tes-post-carousel.is-enhanced .tes-post-carousel__track::after { content: none; }
.tes-post-carousel__slide { flex: 0 0 auto; width: min(calc(var(--tes-photo-height) * var(--tes-photo-ratio, 1)), var(--tes-photo-max-width)); min-width: 0; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.tes-post-carousel__image { display: block; width: 100%; height: var(--tes-photo-height); object-fit: contain; transition: opacity 180ms ease; }
.tes-post-carousel__open { display: block; width: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: inherit; cursor: zoom-in; }
.tes-post-carousel.is-enhanced .tes-post-carousel__image { opacity: .75; }
.tes-post-carousel.is-enhanced .is-active .tes-post-carousel__image { opacity: 1; }
.tes-post-carousel__slide figcaption { padding: 12px 4px; text-align: center; color: var(--off-white); font-size: .9rem; line-height: 1.5; }
.tes-post-carousel__controls { display: flex; justify-content: center; align-items: center; gap: 20px; padding-top: 18px; }
.tes-post-carousel__controls[hidden] { display: none; }
.tes-post-carousel__arrow { display: grid; place-items: center; width: 48px; height: 48px; padding: 8px; border: 0; border-radius: 0; background: transparent; color: var(--off-white); line-height: 1; cursor: pointer; }
.tes-post-carousel__arrow:hover { color: var(--dusty-pink); }
.tes-post-carousel__arrow svg { display: block; width: 32px; height: 32px; }
.tes-post-carousel__arrow:focus-visible, .tes-post-carousel__track:focus-visible, .tes-post-carousel__open:focus-visible, .tes-photo-lightbox__close:focus-visible { outline: 2px solid var(--dusty-pink); outline-offset: -2px; }
.tes-post-carousel__count { min-width: 5ch; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
body.tes-photo-lightbox-open { overflow: hidden; }
.tes-photo-lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: max(68px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom)); border: 0; background: rgba(5, 10, 11, .97); color: var(--off-white); overflow: hidden; }
.tes-photo-lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.tes-photo-lightbox::backdrop { background: rgba(5, 10, 11, .97); }
.tes-photo-lightbox__close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: grid; place-items: center; width: 48px; height: 48px; padding: 8px; border: 0; border-radius: 0; background: transparent; color: var(--off-white); cursor: pointer; }
.tes-photo-lightbox__close:hover { color: var(--dusty-pink); }
.tes-photo-lightbox__stage { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 0; max-width: 1800px; }
.tes-photo-lightbox__image { display: block; min-height: 0; max-height: 100%; width: 100%; flex: 1; object-fit: contain; touch-action: pan-y pinch-zoom; }
.tes-photo-lightbox__caption { flex: 0 0 auto; max-height: 18vh; overflow-y: auto; margin: 12px 0 0; text-align: center; font-size: .9rem; line-height: 1.5; }
.tes-photo-lightbox__caption[hidden] { display: none; }
.tes-photo-lightbox__controls { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; gap: 20px; }
.tes-post-carousel__image, .tes-photo-lightbox__image { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
@media (max-width: 600px) {
  .tes-gallery-post { padding: 112px 0 40px; }
  .tes-gallery-post > .section-inner { width: calc(100% - 32px); }
  .tes-post-title { margin-bottom: 22px; }
  .tes-post-carousel { --tes-photo-height: clamp(240px, 48vh, 440px); --tes-photo-height: clamp(240px, 48svh, 440px); --tes-photo-gap: 10px; }
  .tes-photo-lightbox { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tes-post-carousel__track { scroll-behavior: auto; }
  .tes-post-carousel__image { transition: none; }
}
