:root {
    --item_height: 400px;
    --item_width: 400px;
    --img_height_percent: 90%;
}

.art-gallery {
    margin: 32px 32px 32px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 10px;
    align-items: center;
}

.art-gallery-item {
    border: 5px solid #666;
    border-radius: 5px;
    height: calc(var(--item_height));
    width: calc(25% - 20px);
}
.art-gallery-item:hover {
    border: 5px double #ccc;
}

#gallery-item-detail-panel {
    /* padding-top: 10vh; */
    padding-top: 80px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
}
#gallery-item-detail-img-box{
    width: 80%;
    height: calc(90% - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
}
#gallery-item-detail-img {
    position: relative;
    width: auto;
    height: 100%;
    /* display: block;
    width: auto;
    height: auto; */
    /* max-height: calc(var(--img_height_percent)*var(--item_height));
    max-width: calc(100%); */
}
#gallery-item-detail-img-loading-icon{
    position: relative;
    width: 250px;
    height: auto;
    animation: loaderspin 1s infinite;
}

@keyframes grow {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}
/* HTML: <div class="loader"></div> */
/* https://css-loaders.com/spinner/ */
/* .loader {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 8px solid;
  border-color: #000 #0000;
  animation: l1 1s infinite;
}
@keyframes l1 {to{transform: rotate(.5turn)}} */
@keyframes loaderspin {
    to {transform: rotate(1.0turn);}
    /* from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    } */
}

.gallery-img-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* width: auto; */
    height: var(--img_height_percent);
}
.art-gallery-item .art-gallery-item-label {
    text-align: center;
    text-justify: center;
    height: calc((100%-var(--img_height_percent))/2);
    font-family: 'Fredoka';
    font-weight: 700;
    font-size: 1.2rem;
}
.art-gallery-item .art-gallery-item-date-label {
    color: #ccc;
    text-align: center;
    text-justify: center;
    height: calc((100%-var(--img_height_percent))/2);
    font-family: 'Fredoka';
    font-weight: 700;
    font-size: 1.0rem;
}
#gallery-item-detail-label {
    text-align: center;
    text-justify: center;
    /* height: 70px; */
    font-family: 'Fredoka';
    font-weight: 700;
    font-size: 1.2rem;
}
.gallery-item-detail-info {
    color: #ccc;
    text-align: center;
    text-justify: center;
    /* height: 50px; */
    font-family: 'Fredoka';
    font-weight: 700;
    font-size: 1.0rem;
}
.art-gallery-item img {
    /* display: block; */
    /* width: auto;
    height: auto; */
    /* max-height: calc(var(--img_height_percent)*var(--item_height)); */
    /* max-width: calc(var(--item_width)); */
    /* max-width: calc(100%); */

    width: 100%;
    /* height: 100%; */
    object-fit: contain;

    height: auto;
    max-height: var(--img_height_percent);
}
.art-gallery-item img:hover {
    animation: 0.1s forwards ease-out grow
}

@media only screen and (max-width: 1200px) {
    .art-gallery-item {
        width: calc(50% - 20px);
    }
}
/* @media only screen and (max-width: 480px) { */
@media only screen and (max-width: 720px) {
    .art-gallery-item {
        width: calc(100% - 20px);
    }
}