/*-------------- Photo Carousel (in-page image slideshow) --------------*/
/* Usage: <div class="carousel slide photo-carousel" ...>
   Default photo size is 900px wide x 450px tall. To change it for one
   carousel, add style="--photo-carousel-w: 500px; --photo-carousel-h: 357px;"
   to that carousel's div.
   Arrows sit in gutters beside the photo, not on top of it.
   On small screens the height scales down automatically (max 66vw).
   Overrides the global div.carousel rules in the Slideshow section above. */

div.carousel.photo-carousel {
    --photo-carousel-w: 900px;
    --photo-carousel-h: 700px;
    --photo-carousel-gutter: 4rem;
    --photo-carousel-gap: 1rem;
    --photo-carousel-bg: #e7e7e7;
    --photo-carousel-img-h: min(var(--photo-carousel-h), 66vw);
    height: auto;
    /*max-width: calc(var(--photo-carousel-w) + 2 * var(--photo-carousel-gutter));*/
    margin: 30px auto;
    padding: 0 var(--photo-carousel-gutter);
}

@media (max-width: 767px) {
    div.carousel.photo-carousel {
        --photo-carousel-gutter: 2.75rem;
    }
    div.carousel.photo-carousel .carousel-control-prev-icon,
    div.carousel.photo-carousel .carousel-control-next-icon {
        width: 2.25rem;
        height: 2.25rem;
        background-size: 1rem;
    }
}

div.carousel.photo-carousel .carousel-inner,
div.carousel.photo-carousel .carousel-item {
    height: auto;
}

/* Photos: same height on every slide, whole photo always visible */
div.carousel.photo-carousel .carousel-item img {
    display: block;
    width: 100%;
    height: var(--photo-carousel-img-h);
    margin: 0;
    object-fit: contain;
    background: var(--photo-carousel-bg);
}

/* Prev/next: fill the gutters beside the photo, same height as the photo */
div.carousel.photo-carousel .carousel-control-prev,
div.carousel.photo-carousel .carousel-control-next {
    top: 0;
    bottom: auto;
    height: var(--photo-carousel-img-h);
    width: var(--photo-carousel-gutter);
    opacity: .85;
}
div.carousel.photo-carousel .carousel-control-prev:hover,
div.carousel.photo-carousel .carousel-control-next:hover,
div.carousel.photo-carousel .carousel-control-prev:focus,
div.carousel.photo-carousel .carousel-control-next:focus {
    opacity: 1;
}

/* Indicators: pinned to the bottom of the photo, no list bullets */
div.carousel.photo-carousel .carousel-indicators {
    top: calc(var(--photo-carousel-img-h) - 2.5rem);
    bottom: auto;
    margin-bottom: 0;
    list-style: none !important;  /* beats #news .section-row ol on news pages */
    padding-left: 0 !important;
}
div.carousel.photo-carousel .carousel-indicators li::marker {
    content: none;
}

/* Optional caption below the photo */
div.carousel.photo-carousel .photo-carousel-caption {
    background: #f3f3f3;
    padding: 12px 20px;
    min-height: 4.5rem;
}
div.carousel.photo-carousel .photo-carousel-caption h3 {
    font-size: 1.1rem;
    margin: 0 0 4px;
}
div.carousel.photo-carousel .photo-carousel-caption p {
    font-size: .95rem;
    margin: 0;
    padding: 0;
}