:root {
    --imperial-red: #e63946;
    --prussin-blue: #1d3557;
    --eladon-blue: #457b9d;
    --honeydew: #f1faee;
}

input {
    display: none;
}

h1 {
    font-weight: normal;
    font-size: 35px;
    position: relative;
    margin: 40px 0;
    color: var(--prussin-blue);
}

h1::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background-color: var(--imperial-red);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    animation: animate 4s linear infinite;
}

@keyframes animate {
    0% {
        width: 100px;
    }
    50% {
        width: 200px;
    }
    100% {
        width: 100px;
    }
}

.photo-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 5rem;
    text-align: center;
}

.top-content {
    background-color: rgb(243, 243, 243);
    width: 90%;
    margin: 0 auto 20px auto;
    height: 60px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    box-shadow: 3px 3px 5px lightgray;
}

h3 {
    height: 100%;
    background-color: rgb(221, 221, 221);
    line-height: 60px;
    padding: 0 50px;
    color: white;
}

label {
    display: inline-block;
    height: 100%;
    margin: 0 20px;
    line-height: 60px;
    font-size: 18px;
    color: gray;
    cursor: pointer;
    transition: color .5s;
}

label:hover {
    color: black;
}

.gallery {
    width: 90%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}

.pic {
    position: relative;
    height: 230px;
    border-radius: 10px;
    box-shadow: 3px 3px 5px lightgray;
    cursor: pointer;
    transition: .5s;
}

.pic img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: .5s;
}

.pic::before {
    content: "JOM KAZA";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 22px;
    font-weight: bold;
    width: 100%;
    margin-top: -100px;
    opacity: 0;
    transition: .3s;
    transition-delay: .2s;
    z-index: 1;
}

.pic:after {
    content: '';
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    border-radius: 10px;
    height: 0;
    background-color: rgba(0, 0, 0, .4);
    transition: .3s;
}

.pic:hover::after {
    height: 100%;
}

.pic:hover::before {
    margin-top: 0;
    opacity: 1;
}

#check1:checked~.container .gallery .pic {
    opacity: 1;
    transform: scale(1);
    position: relative;
    transition: .5s;
}

#check2:checked~.container .gallery .comercial {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

#check2:checked~.container .gallery .industrial,
#check2:checked~.container .gallery .residencial {
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: .0s;
}

#check3:checked~.container .gallery .industrial {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

#check3:checked~.container .gallery .comercial,
#check3:checked~.container .gallery .residencial {
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: .0s;
}

#check4:checked~.container .gallery .residencial {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

#check4:checked~.container .gallery .comercial,
#check4:checked~.container .gallery .industrial {
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: .0s;
}

@media(max-width:1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    label {
        margin: 0 10px;
    }
}

@media(max-width:560px) {
    .top-bar {
        display: none;
    }
    .gallery {
        grid-template-columns: repeat(1, 1fr);
    }
    .top-content {
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    label {
        margin: auto;
        line-height: 40px;
    }
}


.gallery .image span{
  display: flex;
  width: 100%;
  overflow: hidden;
}
.gallery .image img{
  width: 100%;
  transition: all 0.3s ease;
}

.preview-box{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  max-width: 700px;
  width: 100%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  border-radius: 3px;
  padding: 0 5px 5px 5px;
  box-shadow: 0px 0px 15px rgba(0,0,0,0.2);
}
.preview-box.show{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition: all 0.3s ease;
}
.preview-box .details{
  display: flex;
  align-items: center;
  padding: 12px 15px 12px 10px;
  justify-content: space-between;
}
.preview-box .details .title{
  display: flex;
  font-size: 18px;
  font-weight: 400;
}
.details .title p{
  margin: 0 5px;
}
.details .title p.current-img{
  font-weight: 500;
}
.details .icon{
  color: #007bff;
  font-size: 20px;
  cursor: pointer;
}
.preview-box .image-box{
  display: flex;
  width: 100%;
  position: relative;
}
.image-box .slide{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  height: 50px;
  width: 60px;
  line-height: 50px;
  text-align: center;
  border-radius: 3px;
}
.slide.prev{
  left: 0px;
}
.slide.next{
  right: 0px;
}
.image-box img{
  width: 100%;
  border-radius: 0 0 3px 3px;
}
.shadow{
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 2;
  display: none;
  background: rgba(0,0,0,0.45);
}
@media(max-width: 1000px){
  .gallery .image{
    width: calc(100% / 2);
  }
}
@media(max-width: 600px){
  .gallery .image{
    width: 100%;
    padding: 4px;
  }
}