/*
|--------------------------------------------------------------------------
| Life Gallery
|--------------------------------------------------------------------------
*/

.cew-lg {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: #f9f9f8;
}

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

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

.cew-lg-header {
    text-align: center;
    margin-bottom: 64px;
}

.cew-lg-heading {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    color: #0f5238;
    margin: 0 0 8px 0;
}

.cew-lg-subheading {
    font-size: 16px;
    line-height: 1.6;
    color: #404943;
    margin: 0;
}

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

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

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

.cew-lg-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #e2e2e2;
}

.cew-lg-item--col-2 {
    grid-column: span 2;
}

.cew-lg-item--row-2 {
    grid-row: span 2;
}

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

    transition: transform 0.7s ease;
}

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

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

.cew-lg-overlay {
    position: absolute;
    inset: 0;

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

    padding: 16px;

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

.cew-lg-item--feature .cew-lg-overlay {
    padding: 24px;

    background-image: linear-gradient(
        to top,
        rgba(0,0,0,0.60) 0%,
        transparent 100%
    );
}

.cew-lg-caption {
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
}

.cew-lg-item--feature .cew-lg-caption {
    font-size: 16px;
    font-weight: 700;
}

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

@media (max-width: 900px) {

    .cew-lg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* a 2-col item would fill the whole row on a 2-col grid — keep it,
       but never let it exceed the track count */
    .cew-lg-item--col-2 {
        grid-column: span 2;
    }

}

@media (max-width: 768px) {

    .cew-lg {
        padding-top: 56px;
        padding-bottom: 56px;
    }

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

    .cew-lg-header {
        margin-bottom: 40px;
    }

    .cew-lg-heading {
        font-size: 28px;
    }

    .cew-lg-grid {
        grid-auto-rows: 140px;
    }

}
