	/* The Modal (background) */
.mmodal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

/* Modal content (image) */
.mmodal-content {
  position: relative;
  height: auto;
  max-height: 99%;
  border-radius: 5px;
  overflow: hidden;
  animation: zoomIn 0.5s;
}

@keyframes zoomIn {
  from {transform: scale(0.6);}
  to {transform: scale(1);}
}

.mmodal.show {
  display: flex;
  opacity: 1;
}

/* Close button */
.mclose {
  position: fixed;
  top: 25px;
  right: 25px;
  color: #ffffff;
  font-size: 85px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.3s;
  z-index:100;
}

/* Caption of modal image */
.mcaption {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: 24px;
}

@mixin aspect-ratio($width, $height) {
  position: relative;
    
  &:before {
    display: block;
    content: "";
    width: 100%;
    padding-top: ($height / $width) * 100%;
  }
    
  > img {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
  }
}

label {
	margin:0;
	padding:0;
}

.container__new {
    max-width: 100%;
    margin: 0 auto;
}

.carousel__new {
    display: block;
    text-align: left;
    position: relative;
    margin-bottom: 22px;
    
    > input {
        clip: rect(1px, 1px, 1px, 1px);
        clip-path: inset(20%);
        height: 1px;
        width: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: fixed;
		pointer-events: none;
        
        &:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:first-of-type { margin-left: -300%; }
        &:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:first-of-type { margin-left: -200%; }
        &:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:first-of-type { margin-left: -100%; }
        &:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:first-of-type { margin-left: 0%; }
        
        &:nth-of-type(1):checked ~ .carousel__thumbnails li:nth-of-type(1) { border-radius:5px; box-shadow: 0px 0px 5px 5px var(--color-gold); }
        &:nth-of-type(2):checked ~ .carousel__thumbnails li:nth-of-type(2) { border-radius:5px; box-shadow: 0px 0px 5px 5px var(--color-gold); }
        &:nth-of-type(3):checked ~ .carousel__thumbnails li:nth-of-type(3) { border-radius:5px; box-shadow: 0px 0px 5px 5px var(--color-gold); }
        &:nth-of-type(4):checked ~ .carousel__thumbnails li:nth-of-type(4) { border-radius:5px; box-shadow: 0px 0px 5px 5px var(--color-gold); }
    }
}

.carousel__slides {
    position: relative;
    z-index: 1;
    padding: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    display: flex;
}

.carousel__slide {
    position: relative;
    display: block;
    flex: 1 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: all 300ms ease-out;
    vertical-align: top;
    box-sizing: border-box;
    white-space: normal;
    
    figure {
        display: flex;
        margin: 0;
    }
    
    div {
        @include aspect-ratio(3, 2);
        width: 100%;
    }
    
    img {
        display: block;
        flex: 1 1 auto;
        object-fit: cover;
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.08' numOctaves='4' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='2.5'/%3E%3C/filter%3E%3C/defs%3E%3Crect x='3' y='3' width='94' height='94' fill='white' filter='url(%23t)' rx='1' ry='1'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.08' numOctaves='4' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='2.5'/%3E%3C/filter%3E%3C/defs%3E%3Crect x='3' y='3' width='94' height='94' fill='white' filter='url(%23t)' rx='1' ry='1'/%3E%3C/svg%3E");
		-webkit-mask-size: 102% 102%;
		mask-size: 102% 102%;
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
		height: 120vw;
		max-height: 500px;
    }

	@media (min-width: 768px) {
		img {
			height: 40vw;
			max-height: 500px;
		}
	}

	@media (min-width: 1200px) {
		img {
			height: 60vw;
			max-height: 600px;
		}
	}
    
    &.scrollable {
        overflow-y: scroll;
    }
}

.carousel__thumbnails {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    margin: 0 auto;
    width: 100%;
		
    .carousel__slides + & {
        margin-top: 20px;
    }
    
    li {        
        flex: 1 1 auto;
        max-width: calc((100% / 4) - 10px); 
        margin: 0 5px;
        transition: all 300ms ease-in-out;
    }
    
    img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-height: 130px;
        border-radius: 5px;
        box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.25);
        border: 1px solid var(--color-gold-dark);
        height: 20vw;
	}

	@media (min-width: 768px) {
		img {
			height: 10vw;
			max-height: 240px;
		}
	}
}