/*
|--------------------------------------------------------------------------
| MKS Gallery
|--------------------------------------------------------------------------
*/

.cew-mks-gal {
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: #f9f9f8;
}

.cew-mks-gal-container {
    max-width: 1200px;
    margin: auto;
    padding-left: 48px;
    padding-right: 48px;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.cew-mks-gal-header {
    margin-bottom: 32px;
    border-left: 4px solid transparent;
}

.cew-mks-gal-header--bar {
    border-left-color: #2D6A4F;
    padding-left: 16px;
}

.cew-mks-gal-heading {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    color: #0f5238;
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| Grid
|--------------------------------------------------------------------------
*/

.cew-mks-gal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 200px;
    gap: 16px;
}

/*
|--------------------------------------------------------------------------
| Item
|--------------------------------------------------------------------------
*/

.cew-mks-gal-item {
    position: relative;
    overflow: hidden;
    margin: 0;

    border-radius: 12px;
    background-color: #e2e2e2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cew-mks-gal-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10);
}

.cew-mks-gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transition: transform 0.7s ease;
}

.cew-mks-gal-item:hover img {
    transform: scale(1.1);
}

/*
|--------------------------------------------------------------------------
| Caption
|--------------------------------------------------------------------------
*/

.cew-mks-gal-scrim {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 16px;

    background-image: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.40) 0%,
        transparent 100%
    );
}

.cew-mks-gal-item--emphasis .cew-mks-gal-scrim {
    background-image: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.60) 0%,
        transparent 100%
    );
}

.cew-mks-gal-caption {
    font-size: 12px;
    line-height: 1.4;
    color: #ffffff;
}

.cew-mks-gal-item--emphasis .cew-mks-gal-caption {
    font-size: 14px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    /* spans are inline per item, so the narrower grid has to override them */
    .cew-mks-gal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cew-mks-gal-item {
        grid-column: span 1 !important;
    }

    .cew-mks-gal-item--emphasis {
        grid-column: span 2 !important;
    }

}

@media (max-width: 768px) {

    .cew-mks-gal {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .cew-mks-gal-container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .cew-mks-gal-grid {
        grid-auto-rows: 160px;
    }

    .cew-mks-gal-item {
        grid-row: span 1 !important;
    }

}
