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

.cew-cg {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: #f3f4f3;
}

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

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

.cew-cg-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;

    margin-bottom: 32px;
}

.cew-cg-header-text {
    max-width: 672px;
}

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

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

.cew-cg-btn {
    display: inline-block;
    flex-shrink: 0;

    padding: 8px 24px;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;

    text-decoration: none;
    color: #2D6A4F;
    border: 2px solid #2D6A4F;

    transition: background-color 0.3s ease;
}

.cew-cg-btn:hover {
    background-color: rgba(45, 106, 79, 0.05);
}

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

.cew-cg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.cew-cg-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cew-cg-col--2 {
    padding-top: 32px;
}

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

.cew-cg-item {
    overflow: hidden;

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

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

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

.cew-cg-image {
    height: 256px;
    overflow: hidden;
    background-color: #e2e2e2;
}

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

    transition: transform 0.5s ease;
}

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

.cew-cg-caption-wrap {
    padding: 16px;
    background-color: inherit;
}

.cew-cg-caption {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.4;
    color: #0f5238;
}

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

@media (max-width: 900px) {

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

    /* the stagger only reads as intentional in a multi-column layout */
    .cew-cg-col--2 {
        padding-top: 0 !important;
    }

}

@media (max-width: 768px) {

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

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

    .cew-cg-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

}
