.portfolio {
    width: 100%;
    padding: 30px 8%;
    background-color: var(--body-clr);
}
.button-group {
    text-align: center;
    margin-bottom: 40px;
}
.button-group .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #c8d1d8;
    color: var(--primary-clr);
    font-style: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s;
    border: none;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}
.button-group .button.active {
    background-color: var(--primary-clr);
    color: var(--body-clr);
}
.button-group .button:hover {
    background-color: var(--primary-clr);
    color: var(--body-clr);
}
div.gallery {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}
div.gallery .item {
    position: relative;
    margin: 4px;
    width: calc(33.33% - 8px);
    overflow: hidden;
    cursor: pointer;
}
.item img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
    display: block;
    transition: 0.3s;
    border-radius: 5px;
}
div.gallery .item:hover img {
    /* border-radius: 75px; */
    transform: scale(1.15);
}
.item .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    border-radius: 5px;
    align-items: center;
    background-color: rgba(235, 238, 255, 0.542);
    color: var(--body-clr);
    padding: 15px;
    overflow: hidden;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}
.item:hover .overlay {
    opacity: 1;
}
.item .overlay a {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid var(--body-clr);
    color: var(--body-clr);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}
.item .overlay a:hover {
    background-color: var(--body-clr);
    color: var(--primary-clr);
}
@media(max-width: 1024px) {
    div.gallery .item {
        width: calc(50% - 8px);
    }
}
@media(max-width: 600px) {
    div.gallery .item {
        width: 100%;
        margin: 4px 0px;
    }
}
