.fg-gallery {
    display: flex;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.fg-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: flex .5s ease, height .4s ease;
    cursor: pointer;
}

.fg-item.is-active {
    flex: var(--grow, 3);
}

.fg-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
}

.fg-item.is-active .fg-bg {
    transform: scale(1.05);
}

.fg-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-color, rgba(0,0,0,.6));
    opacity: var(--overlay-strength, .6);
    transition: opacity .3s ease;
}

.fg-item.is-active .fg-overlay {
    opacity: 0;
}

.fg-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
    color: #fff;
}

@media(max-width:768px){
    .fg-gallery {
        flex-direction: column;
        height: auto;
    }
    .fg-item {
        height: 80px;
        flex: none;
        transition: height .5s ease;
    }
    .fg-item.is-active {
        height: 240px;
    }
    .fg-content {
        bottom: 10px;
        left: 10px;
    }
}
