/*--------------------------------------------------------------
# Block contents
--------------------------------------------------------------*/
.lp-content-surrounds-image {
    display: flex;
    position: relative;
    padding-block: 5rem;
    padding-inline: 4vw;
    overflow: hidden;
}

.lp-content-surrounds-image .block-contents {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--content-width-narrow);
    margin-inline: auto;
}

/* Header section
--------------------------------------------- */
.lp-content-surrounds-image__header {
    text-align: center;
    font-size: var(--font-size-h2);
    margin-bottom: .5em;
}

.lp-content-surrounds-image__sub-header {
    text-align: center;
    margin-bottom: 1em;
}

.lp-content-surrounds-image__body {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Surround layout
--------------------------------------------- */
.lp-content-surrounds-image__layout {
    display: grid;
    grid-template-columns: 1fr minmax(0, 1.2fr) 1fr;
    align-items: start;
    gap: 3rem;
    margin-top: 2rem;
}

.lp-content-surrounds-image__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.lp-content-surrounds-image__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.lp-content-surrounds-image__column {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
}


.lp-content-surrounds-image__column--right .lp-content-surrounds-image__item:nth-child(odd), .lp-content-surrounds-image__column--left .lp-content-surrounds-image__item:nth-child(odd) {
    border-color: var(--color-primary);
}

.lp-content-surrounds-image__column--right .lp-content-surrounds-image__item:nth-child(even), .lp-content-surrounds-image__column--left .lp-content-surrounds-image__item:nth-child(even) {
    border-color: var(--color-accent);
}

.lp-content-surrounds-image__column--right .lp-content-surrounds-image__item {
    padding-right: 1rem;
    border-width:  0 4px 0 0;
    text-align: right;
}

.lp-content-surrounds-image__column--left .lp-content-surrounds-image__item {
    padding-left: 1rem;
    border-width: 0 0 0 4px;
}

.lp-content-surrounds-image__item {
    background-color: white;
    border-style: solid;
    line-height: 1.6;
    padding: 1.5rem;
    max-width: 320px;
}

/* Grid layout items (top/bottom image positions) */

.lp-content-surrounds-image__grid .lp-content-surrounds-image__item {
    border-style: solid;
    border-width: 4px 0 0 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-top: 1em;
    text-align: center;
    max-width: none;
}

.lp-content-surrounds-image__grid .lp-content-surrounds-image__item:nth-child(odd) {
    border-color: var(--color-primary);
}

.lp-content-surrounds-image__grid .lp-content-surrounds-image__item:nth-child(even) {
    border-color: var(--color-accent);
}

.lp-content-surrounds-image__item-headline {
    font-weight: 700;
    font-size: var(--font-size-h6);
    font-family: var(--font-family-heading);
    margin-bottom: 1em;
}

/* Center image
--------------------------------------------- */
.lp-content-surrounds-image__center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(310px, 100%);
    aspect-ratio: 1 / 1;
    min-width: 180px;
    margin-inline: auto;
    align-self: center;
}

.lp-content-surrounds-image__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--color-primary);
}

/*--------------------------------------------------------------
# Background image
--------------------------------------------------------------*/
.lp-content-surrounds-image.anchor {
    position: relative;
}

.lp-content-surrounds-image__cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Block editor fix
--------------------------------------------- */
.editor-styles-wrapper .lp-content-surrounds-image__cover {
    height: 100%;
}

.lp-content-surrounds-image__tint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, rgba(4, 12, 36, 0.9) 0%, rgba(4, 12, 36, 0.7) 100%);
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/

/* Default Font Style
--------------------------------------------- */
.lp-content-surrounds-image__header {
    color: var(--color-secondary-light);
}

.lp-content-surrounds-image__sub-header {
    color: var(--color-secondary-light);
}

.lp-content-surrounds-image__body {
    color: var(--color-body-light);
}

.lp-content-surrounds-image__item {
    color: var(--color-body-light);
}

/* Dark Font Style
--------------------------------------------- */
.no_bg .lp-content-surrounds-image__header {
    color: var(--color-secondary-darker);
}

.no_bg .lp-content-surrounds-image__sub-header {
    color: var(--color-secondary-darker);
}

.no_bg .lp-content-surrounds-image__body {
    color: var(--color-body-dark);
}

.no_bg .lp-content-surrounds-image__item {
    color: var(--color-body-dark);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media screen and (max-width: 1024px) {
    .lp-content-surrounds-image__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    
    .lp-content-surrounds-image__column--right .lp-content-surrounds-image__item {
        padding-right: 0;
        padding-left: 1rem;
        border-width: 0 0 0 4px;
        text-align: left;
    }

    .lp-content-surrounds-image__column {
        gap: 2rem;
    }
    
    .lp-content-surrounds-image__item {
        max-width: none;
    }

    .lp-content-surrounds-image__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .lp-content-surrounds-image__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .lp-content-surrounds-image__column--left,
    .lp-content-surrounds-image__column--right {
        text-align: left;
    }

    .lp-content-surrounds-image__center {
        order: -1;
    }
}
