.glider-contain {
    margin: 0 2.5rem 1.5rem;
    width: unset;
}
.glider {
    display: flex;
    flex-wrap: wrap;
}
:not(.no-scroll) .glider .glider-slide {
    align-content: flex-start;
    margin: 0.5rem;
}
.species-carousel-item, .gallery-item {
    max-width: calc(80% - 2rem);
    margin: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
}
.species-carousel-item.glider-slide, .gallery-item.glider-slide {
    max-width: none;
}
.glider-track {
    padding: 0.5rem 0;
}
.glider figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.glider figure img {
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    margin: 0;
}
.glider figure img:hover {
    cursor: pointer;
}
.glider .glider-slide:focus-within {
    outline: var(--outline-thickness) solid var(--brand-light-focus);
    outline-offset: var(--outline-offset);
}
.glider figure figcaption {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.glider .rights-holder {
    margin-bottom: 0;
    margin-top: 1rem;
    font-size: 0.75rem;
}

.glider-prev, .glider-next, #galleryModal .modal-content .btn.close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--brand-dark-background-alt-shade);
    color: var(--brand-dark-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.25rem;
}
.glider-next.disabled, .glider-prev.disabled {
    color: var(--brand-dark-text-muted);
}
.glider-prev, .glider-next {
    top: calc(50% - 2.5rem);
}
.glider-prev {
    margin-left: -1rem;
}
.glider-next {
    margin-right: -1rem;
}
.glider-contain.no-scroll {
    margin: 0 0 1.5rem;
}
.glider-contain.no-scroll button {
    display: none;
}

#galleryModal .modal-dialog {
    margin: 2rem auto;
    max-width: 70vw;
}
#galleryModal figure.image-caption-modal {
    margin: 0;
}
#galleryModal figure.image-caption-modal img {
    max-height: 80vh;
    margin-bottom: 0;
}
#galleryModal figure.image-caption-modal figcaption {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #f6f6f6;
    border: 1px solid #e6e6e6;
}
#galleryModal figure.image-caption-modal figcaption p.caption {
    line-height: 1.5;
    margin-bottom: 1rem;
}
#galleryModal figure.image-caption-modal figcaption p.rights-holder {
    margin-bottom: 0;
    font-size: 0.875rem;
}
#galleryModal .modal-content .modal-body {
    padding: 0.5rem 0.5rem 0;
}
#galleryModal button.btn-next, #galleryModal button.btn-prev {
    opacity: 1;
    background: transparent;
    font-size: 2.5rem;
    height: auto;
    width: auto;
    position: absolute;
    top: calc(50% - 4rem);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--brand-dark-text);
}
#galleryModal .btn-next {
    right: 0;
    margin-right: -3rem;
}
#galleryModal .btn-prev {
    left: 0;
    margin-left: -3rem;
}
#galleryModal .modal-dialog {
    max-width: 70vw;
    min-height: 250px;
    min-width: 225px;
}
#galleryModal .modal-dialog-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 3rem);
}
#galleryModal .modal-content button:focus {
    outline: var(--outline-thickness) solid var(--brand-dark-focus) !important; 
    outline-offset: var(--outline-offset);
}
#galleryModal .btn-wrapper button[disabled] {
    color: var(--brand-light-text-muted);
}
#galleryModal .modal-content .btn.close {
    background: var(--brand-dark-action-alt);
    top: -1.25rem;
    right: -1.25rem;
}
#galleryModal .modal-content .btn.close span {
    text-shadow: none;
    font-size: 1.5rem;
}
#galleryModal .modal-content button:focus, #galleryModal .modal-content button:hover {
    text-decoration: none;
}
#galleryModal .modal-content button:not[disabled]:hover {
    background: lightgrey;
    color: var(--brand-light-text);
}
#galleryModal .modal-footer {
    padding: 0.25rem;
    height: 0.25rem;
    border-top: none;
}
#galleryModal .modal-footer.hide-buttons button {
    display: none;
}
.modal-backdrop.in {
    background: var(--brand-dark-background-alt-shade);
    opacity: 0.9;
    filter: alpha(opacity=90);
}
#galleryModal .btn-wrapper-prev,
#galleryModal .btn-wrapper-next{
    position: absolute;
    top: 0;
    height: 100%;
    width: 10em;
    background: transparent;
}
#galleryModal .btn-wrapper-prev{
    left: 0;
}
#galleryModal .btn-wrapper-next {
    right: 0;
}

@media (min-width: 400px){
    #galleryModal button.btn-next, #galleryModal button.btn-prev {
        font-size: 3rem;
    }
    #galleryModal .btn-next {
        margin-right: -4rem;
    }
    #galleryModal .btn-prev {
        margin-left: -4rem;
    }
}
@media (min-width: 510px){ 
    .gallery-item {
        max-width: calc((100% / 2) - 2rem);
    }
}
@media (min-width: 768px){
    .gallery-item {
        max-width: calc((100% / 3) - 2rem);
    }
    .glider-contain {
        margin: 0 1.5rem 2rem;
        max-width: 800px;
    }
    .glider-prev {
        margin-left: -1.5rem;
    }
    .glider-next {
        margin-right: -1.5rem;
    }
    #galleryModal .modal-dialog {
        max-width: 80vw;
    }
    #galleryModal .modal-content .modal-body {
        padding: 1rem 1rem 0.5rem;
    }
    #galleryModal button.btn-next, #galleryModal button.btn-prev {
        font-size: 4rem;
        padding: 1rem 1.5rem;
    }
    #galleryModal .btn-next {
        margin-right: -6rem;
    }
    #galleryModal .btn-prev {
        margin-left: -6rem;
    }
}