/*
Put this file in /static/css/hugo-easy-gallery.css
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
*/

/*
Grid Layout Styles
*/
.gallery {
    overflow: hidden;
    margin: 0px;
    margin-bottom: 1em;
    /*    max-width: 768px; that is not necessary in our case */
}

.gallery .img {
    border-radius: 4px;
}
.gallery .box {
    /* Default: 1 tile wide */
    width: 50%;
    float: left;
    position: relative;
    padding-bottom: 50%;
    border: none;
    margin-bottom: 0;
}
.gallery .box.fig-w-50 {
    width: 50%;
}
.gallery .box.fig-w-33 {
    width: 33%;
}
@media only screen and (min-width: 365px) {
    /* Tablet view: 2 tiles */
    .gallery .box {
        width: 50%;
        float: left;
        padding-bottom: 50%;
    }
}
@media only screen and (min-width: 480px) {
    /* Small desktop / ipad view: 3 tiles */
    .gallery .box {
        width: 33.3%;
        padding-bottom: 33.3%;
    }
}
@media only screen and (min-width: 1024px) {
    /* Medium desktop: 4 tiles */
    .gallery .box {
        width: 25%;
        padding-bottom: 25%;
    }
}

/*
Transition styles
*/
.gallery.hover-transition figure,
.gallery.hover-effect-zoom .img,
.gallery:not(.caption-effect-appear) figcaption,
.fancy-figure:not(.caption-effect-appear) figcaption {
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}
/*
figure styles
*/
figure {
    position: relative; /* purely to allow absolution positioning of figcaption */
    overflow: hidden;
}
.gallery figure {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    bottom: 5px;
}
.gallery.hover-effect-grow figure:hover {
    transform: scale(1.05);
}
.gallery.hover-effect-shrink figure:hover {
    transform: scale(0.95);
}
.gallery.hover-effect-slidedown figure:hover {
    transform: translateY(5px);
}
.gallery.hover-effect-slideup figure:hover {
    transform: translateY(-5px);
}

/*
img / a styles
*/

.gallery .img {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-size: contain; /* was cover for crop, problematic with resize */
    background-position: 50% 50%;
    background-repeat: no-repeat;
}
.gallery.hover-effect-zoom figure:hover .img {
    transform: scale(1.05);
}
.gallery img {
    display: none; /* only show the img if not inside a gallery */
}
figure a {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-bottom: none;
}

/*
figcaption styles
*/
.gallery figcaption,
.fancy-figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 75%; /* change this if you want bigger text */
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    cursor: pointer;
}
.gallery.caption-position-none figcaption,
.fancy-figure.caption-position-none figcaption {
    display: none;
}
.gallery.caption-position-center figcaption,
.fancy-figure.caption-position-center figcaption {
    top: 0;
    padding: 40% 5px;
}
.gallery.caption-position-bottom figcaption,
.fancy-figure.caption-position-bottom figcaption {
    padding: 5px;
}
.gallery.caption-effect-fade figure:not(:hover) figcaption,
.gallery.caption-effect-appear figure:not(:hover) figcaption,
.fancy-figure.caption-effect-fade figure:not(:hover) figcaption,
.fancy-figure.caption-effect-appear figure:not(:hover) figcaption {
    background: rgba(0, 0, 0, 0);
    opacity: 0;
}
.gallery.caption-effect-slide.caption-position-bottom
    figure:not(:hover)
    figcaption,
.fancy-figure.caption-effect-slide.caption-position-bottom
    figure:not(:hover)
    figcaption {
    margin-bottom: -100%;
}
.gallery.caption-effect-slide.caption-position-center
    figure:not(:hover)
    figcaption,
.fancy-figure.caption-effect-slide.caption-position-center
    figure:not(:hover)
    figcaption {
    top: 100%;
}
figcaption p {
    margin: auto; /* override style in theme */
}

.fig-float-left {
    float: left;
    width: 25%;
    margin-right: 20px;
}

.fig-float-left figure {
    margin: 0;
    width: 100%;
    position: relative;
}

.fig-float-left figure a {
    position: relative;
    display: block;
    width: 100%;
}

.fig-float-left figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Clear floats */
.fig-float-left::after {
    content: "";
    display: table;
    clear: both;
}

/* unused float clear <div class="float-clear"></div> */
.float-clear {
    clear: both;
    display: block;
    height: 0;
    visibility: hidden;
}

.fig-w-35 {
    width: 35%;
}

.fig-w-30 {
    width: 30%;
}

.fig-w-25 {
    width: 25%;
}

.fig-w-20 {
    width: 40%;
}

/* responsive hack only for one size so far */
@media only screen and (min-width: 500px) {
    .fig-w-20 {
        width: 20%;
    }
}

.fig-w-15 {
    width: 15%;
}

.fig-w-10 {
    width: 10%;
}

/* mast picture for section, 100% width */
.fig-float-mast {
    width: 100%;
}
.fig-float-mast figure {
    margin: 0;
    width: 100%;
    position: relative;
}

.fig-float-mast figure a {
    position: relative;
    display: block;
    width: 100%;
}
.fig-float-mast figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* this is a pretty brutal way to fix the stacking float issue
p {
    clear: both;
    } */
