*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}
input{
    display: none;
}
.container{
    width: 100%;
    text-align: center;
}
h1{
    font-weight: normal;
    font-size: 35px;
    position: relative;
    margin: 40px 0;
}
h1::before{
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background-color: aqua;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    animation: animate 4s linear infinite;
}
@keyframes animate{
    0%{
        width: 100px;
    }
    50%{
        width: 200px;
    }
    100%{
        width: 100px;
    }
}
.top-content{
    background-color: rgb(228, 226, 226);
    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: lightgrey;
    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;
}
.photo-gallery {
    width: 90%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}
.pic {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 10px;
    box-shadow: 3px 3px 5px lightgray;
    cursor: pointer;
    overflow: visible;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 1;
}

.pic img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.pic .hover-text {
    display: none; /* Hidden by default */
    position: absolute;
    top: 120%;
    left: 15%; /* To appear beside the image */
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 16px;
    z-index: 15;
}

.pic:hover {
    z-index: 10;
}

.pic:hover img {
    transform: scale(1.8);
    z-index: 11;
}

.pic:hover .hover-text {
    display: block; /* Show the text when hovered */
}


.pic:hover img {
    transform: scale(1.8); /* Enlarge the image */
    z-index: 11; /* Make sure the enlarged image stays above everything */
}
.pic::before {
    content: "PHOTO GALLERY";
    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 .photo-gallery .pic{
    opacity: 1;
    transform: scale(1);
    position: relative;
    transition: .5s;
}
#check2:checked ~ .container .photo-gallery .sae-supra{
    transform: scale(1);
    opacity: 1;
    position: relative;
}
#check2:checked ~ .container .photo-gallery .ffs-india-season-5,
#check2:checked ~ .container .photo-gallery .vroom-drag-meet{
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: 0s;
}

#check3:checked ~ .container .photo-gallery .ffs-india-season-5{
    transform: scale(1);
    opacity: 1;
    position: relative;
}
#check3:checked ~ .container .photo-gallery .sae-supra,
#check3:checked ~ .container .photo-gallery .vroom-drag-meet{
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: 0s;
}

#check4:checked ~ .container .photo-gallery .vroom-drag-meet{
    transform: scale(1);
    opacity: 1;
    position: relative;
}
#check4:checked ~ .container .photo-gallery .sae-supra,
#check4:checked ~ .container .photo-gallery .ffs-india-season-5{
    opacity: 0;
    transform: scale(0);
    position: absolute;
    transition: 0s;
}
@media screen and (max-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    h1 {
        font-size: 28px;
    }
    h3 {
        padding: 0 20px;
        font-size: 18px;
    }
    label {
        font-size: 16px;
        margin: 0 10px;
    }
    .pic {
        height: 220px; /* Adjust height for tablets */
    }
}

/* For mobile screens */
@media screen and (max-width: 600px) {
    .photo-gallery {
        grid-template-columns: repeat(1, 1fr);
        grid-gap: 10px;
    }
    .top-content {
        flex-direction: column; /* Stack labels below title */
        height: auto;
        padding: 10px 0;
    }
    h3 {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 16px;
    }
    label {
        font-size: 14px;
        margin: 5px 10px;
    }
    .pic {
        height: 200px; /* Reduce height for mobile */
    }
    .pic img {
        max-height: 250px; /* Slightly reduce max height for mobile */
    }
    .pic::before {
        font-size: 18px;
    }
}
