*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: poppins, sans-serif;
    background-color: hsl(0, 0%, 65%);
}
input{
    display: none;
}
.container {
    width: 100%;
    text-align: center;
    position: relative;
    padding: 20px;
}   
.container h1 {
    color: hsl(0, 0%, 0%);
    font-size: 2.5rem;
    margin: 20px 0;
}
.container h1:before{
    content:"";
    position:absolute;
    width:100%;
    background-color: hsl(187, 100%, 50%);
    bottom:-10px;
    top:90px;
    left:50%;
    height: 5px;
    transform:translateX(-50%);
    animation: animate 2s linear infinite;
}
@keyframes animate {
    0%{
        width:100%;
    }
    50%{
        width:200%;
    }
    100%{
        width:0;
    }
}

.container h3{
    color: hsl(0, 0%, 0%);
    font-size: 1.5rem;
    margin: 20px 0;
    background-color: hsl(185, 5%, 55%);
} 
label{
    cursor: pointer; 
    display: inline-block;
    height:100%;
    margin:0 10px;
    padding:0 5px;
    line-height:60px;
    transition: 0.3s;
}
label:hover{
    color: hsl(185, 8%, 26%);
    border-radius:20px;
    transform: translateY(-5px);
}
.images{
    width:70%;
    margin:auto;
    display: grid;
    grid-template-columns: repeat(3 ,1fr);
    grid-gap: 20px;
    position: relative;
    padding: 20px;
}
.images .pic{
    position:relative;
    width: 100%;
    height: 100%;
    margin-top: 30px;;
    border-radius: 7px;
    transition: transform 0.3s ease;
    box-shadow:  0 0 10px rgba(0, 0, 0, 0.5);
}
.images .pic:hover{
    transform: scale(1.05);
    transition: transform 0.8s ease;
}
.images .pic img{
    width: 100%;
    height: 100%;
    border-radius: 7px;
}
.images .pic img:hover{
    transform: scale(1.05);
    transition: transform 0.8s ease;
}
.images .pic::before{
    content:"PHOTO GALLERY";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    color: hsl(0, 0%, 100%);
    font-style: italic;
}
#gallery1:checked ~ .container .images .pic {
    opacity:1;
    transform: scale(1);
    transition: transform 0.8s ease;
    position:relative;
}
#gallery1:checked ~ .container .images .nature {
    opacity: 1;
    transform: scale(1);
    position:relative;
}
#gallery2:checked ~ .container .images .group, 
#gallery2:checked ~ .container .images .selfie,
#gallery2:checked ~ .container .images .food {
    opacity: 0;
    transform: scale(0.8);
    position:absolute;
}
#gallery3:checked ~ .container .images .group, 
#gallery3:checked ~ .container .images .selfie,
#gallery3:checked ~ .container .images .nature{
    opacity: 0;
    transform: scale(0.8);
    position:absolute;
}
#gallery4:checked ~ .container .images .food, 
#gallery4:checked ~ .container .images .selfie,
#gallery4:checked ~ .container .images .nature{
    opacity: 0;
    transform: scale(0.8);
    position:absolute;
}
#gallery5:checked ~ .container .images .group, 
#gallery5:checked ~ .container .images .food,
#gallery5:checked ~ .container .images .nature{
    opacity: 0;
    transform: scale(0.8);
    position:absolute;
}
