* {
    font-family: Arial, Helvetica, sans-serif;
}


div.gallery_container {
    margin: auto;
}


li.gallery-element {
    border: 1px solid white;
}

li.gallery-element:hover {
    border: 1px solid #777;
}

.detail-caption {
    column-count: 2;
    column-width: 200px;
    width: 50%;
    column-gap: 20px;
    display: block;
    margin: auto;
}

.detail-table-label {
    text-align: left;
}

.detail-table-value {
    text-align: right;
    font-weight: normal;
}

.detail-table {
    min-width: 50%;
}

tr {
    outline: solid thin black;
}

.detail-image {
    max-height: 75vh;
    display: block;
    margin: auto;
    padding: 10px;
}

div.gallery img {
    width: 100%;
    height: auto;
}

div.desc {
    padding: 15px;
    text-align: center;
}

/* fade in from https://codepen.io/gschier/pen/kyRXVx */

.imgbox {
    display: grid;
    height: 100%;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.lightbox {
    /* Default to hidden */
    display: none;

    /* Overlay entire screen */
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* A bit of padding around image */
    padding: 1em;

    /* Translucent background */
    background: rgba(0, 0, 0, 0.8);

    animation: fadeIn 0.2s;
}

.lightbox-img {
}

.lightbox-footer {
    height: 10px;
}

.center-fit {
    max-width: 100%;
    max-height: 100vh;
    margin: auto;
}

/* Unhide the lightbox when it's the target */
.lightbox:target {
    display: block;

}

.lightbox span {
/* Full width and height */
display: block;
width: 100%;
height: 100%;

/* Size and position background image */
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}

/* flexbox gallery from https://css-tricks.com/adaptive-photo-layout-with-flexbox/ */

ul {
    display: flex;
    flex-wrap: wrap;
  }

li {
    height: 40vh;
    flex-grow: 1;
    list-style-type: none;
    margin: 1em;
}

.gallery-image {
    max-height: 100%;
    min-width: 100%;
    object-fit: contain;
    vertical-align: bottom;
}

li:last-child {
    flex-grow: 10;
}

.title {
    display: block;
    width: 100%;
    margin: auto;
    padding: 1em;
}

h2 {
    text-align: center;
    width: 80%;
    display: block;
    margin: auto;
    padding: .1em;
    background: gainsboro;
    border-radius: 4px;
}

@media (max-aspect-ratio: 1/1) {
    li {
        height: 30vh;
    }
}

@media (max-height: 480px) {
    li {
        height: 80vh;
    }
}

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
ul {
    flex-direction: row;
}

li {
    height: auto;
    width: 100%;
}

.gallery-image img {
    width: 100%;
    max-height: 75vh;
    min-width: 0;
}
}