/*
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-container {
	width: 100%;
	text-align: center;
	display: inline-block; /* new */
}

.gallery {
   	width: 100%;
    max-width: 1024px; /* orig: 768px */
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 0 auto; /* new */
}
.gallery figure {
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
}
.gallery .box {
	flex: 1 auto;
	position: relative;
	width: 100%;
	height: auto;
	-webkit-border-radius: 0.5rem; /* new */
	-moz-border-radius: 0.5rem; /* new */
	border-radius: 0.5rem; /* new */
	margin: 0 auto;
	overflow: hidden;
}

@media only screen and (min-width : 320px) {
	.gallery figure {
		width: 144px; /* new */
		height: 144px; /* new */
	}
    .gallery .box {		
        width: 150px;
		height: 150px;
    }
}

@media only screen and (min-width : 480px) {
	.gallery figure {
		width: 144px; /* new */
		height: 144px; /* new */
	}
    .gallery .box {
		width: 154px;
		height: 154px;
		margin: 0 auto;
    }
}
@media only screen and (min-width : 600px) {
	.gallery figure {
		width: 144px; /* new */
		height: 144px; /* new */
	}
    .gallery .box { 
		width: 164px;
		height: 164px;
    }
}
/*
@media all and (min-width: 800px) {
	.gallery {
		width: calc(100% - 4rem);
		width: -webkit-calc(100% - 4rem);
		width: -moz-calc(100% - 4rem);
	}	
}

@media all and (min-width: 1280px) {
	.gallery {
		width: calc(100% - 6rem);
		width: -webkit-calc(100% - 6rem);
		width: -moz-calc(100% - 6rem);
	}
}
*/

/*
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: relative;
	-webkit-border-radius: 0.5rem; /* new */
	-moz-border-radius: 0.5rem; /* new */
	border-radius: 0.5rem; /* new */
	margin: 0 auto; /* new: center image */
}
.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;
    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;
}

/*
figcaption styles
*/
.gallery figcaption,
.fancy-figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #FFF;
    text-align: center;
    font-size: 0.8rem; /* orig: 75% */
    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 */
}

