.grid-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 262px;
    grid-auto-rows: 262px;
    grid-auto-flow: dense;
    gap: 30px;
}

.grid-box-2 {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 30px;
}

.grid-box-2 .image-box {
    height: 460px !important;
    object-fit: cover;
}

.grid-box-2 .image-box:nth-child(even) {
    margin-top: 80px;
}

.image-box {
    position: relative;
    overflow: hidden;
}

.grid-box .image-box.flex-2 {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: relative;
    overflow: hidden;
}

.grid-box .image-box.flex-4 {
    grid-column: 4;
    grid-row: 1 / span 2;
    position: relative;
    overflow: hidden;
}

.image-box img{
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.image-box:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary);
    transition: all 0.3s ease;
    opacity: 0;
}

.image-box:hover:before {
    opacity: 0.8;
}

.image-box .gallery-content {
    position: absolute;
    width: 100%;
    bottom: 20%;
    left: 50%;
    transform: translate(-50%, 50%);
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-box:hover .gallery-content {
    visibility: visible;
    bottom: 50%;
}

.image-box .gallery-content .title {
    font-size: 24px;
    color: #fff;
    font-weight: 800;
    margin: 0;
    margin-top: 25px;
    line-height: 1.5;
}

.image-box .gallery-content .icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 55px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 1px solid #fff;
    color: white;
    cursor: pointer;
    transition: transform 0.3s linear;
}

.image-box .gallery-content .icon:hover {
    transform: rotate(-45deg);
}

@media screen and (max-width: 1024px) {
    .grid-box {
        grid-template-columns: auto auto auto;
    }

    .grid-box .image-box.flex-2,
    .grid-box .image-box.flex-4 {
        grid-column: auto / auto;
        grid-row: auto / auto;
    }

    .grid-box-2 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .grid-box-2 .image-box:nth-child(even) {
        margin-top: 0px;
     
    }
}

@media screen and (max-width: 767px) {
    .grid-box {
        grid-template-columns: auto auto;
    }

    .grid-box-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 600px) {
    .grid-box {
        grid-template-columns: auto;
    }

    .grid-box-2 {
        grid-template-columns: 1fr;
    }
}