/**
 * Copyright © Caravel. All rights reserved.
 *
 * "Faixa de vantagens" closing the Black Cassol home, built from Page Builder elements so the client edits each item
 * in the editor: Row (full-width, CSS classes "bf-row bf-row--perks") > Columns > one Column per item
 * ("bf-perks__item") with an Image ("bf-perks__icon"), a Heading ("bf-perks__title") and a Text ("bf-perks__text").
 * The circle around the icon is drawn here, so any transparent icon uploaded in the Image sits inside it. Every rule
 * starts at the row with #html-body to beat the "#html-body [data-pb-style]" rules the Page Builder writes and the
 * theme rules that reach into a Text or a heading.
 */

#html-body [data-content-type="row"].bf-row--perks {
    background-color: var(--bf-surface);
    border-block: 1px solid var(--bf-line);
}

/* The items line up with the content of the widgets (their __wrap: 1360px with the mockup gutter), not with the
   theme container; widget-rows.css zeroes the margin and padding of the "bf-row" children, so both are set here.
   The theme sets the max-width of the home full-width rows (1536px) with !important. */
#html-body [data-content-type="row"].bf-row--perks > .row-full-width-inner {
    max-width: 1360px !important;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
}

#html-body [data-content-type="row"].bf-row--perks .pagebuilder-column-group,
#html-body [data-content-type="row"].bf-row--perks .pagebuilder-column-line {
    margin: 0;
    padding: 0;
}

#html-body [data-content-type="row"].bf-row--perks .pagebuilder-column-line {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__item {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 16px;
    align-content: start;
    width: auto;
    margin: 0;
    padding: 34px 24px;
    border-left: 1px solid var(--bf-line);
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__item:first-child {
    border-left: 0;
    padding-left: 0;
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bf-line-2) !important; /* the Page Builder writes border-style:none inline on the figure */
    border-radius: 50%;
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__icon img {
    width: 24px;
    height: 24px;
    max-width: none;
    object-fit: contain;
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__title {
    margin: 0 0 2px;
    padding: 0;
    color: var(--bf-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
}

#html-body [data-content-type="row"].bf-row--perks .bf-perks__text,
#html-body [data-content-type="row"].bf-row--perks .bf-perks__text p {
    margin: 0;
    padding: 0;
    color: var(--bf-muted);
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    #html-body [data-content-type="row"].bf-row--perks .pagebuilder-column-line {
        grid-template-columns: repeat(2, 1fr);
    }

    #html-body [data-content-type="row"].bf-row--perks .bf-perks__item:nth-child(3) {
        border-left: 0;
        padding-left: 0;
    }

    #html-body [data-content-type="row"].bf-row--perks .bf-perks__item:nth-child(n+3) {
        border-top: 1px solid var(--bf-line);
    }
}

@media (max-width: 640px) {
    #html-body [data-content-type="row"].bf-row--perks .pagebuilder-column-line {
        grid-template-columns: 1fr;
    }

    #html-body [data-content-type="row"].bf-row--perks .bf-perks__item {
        border-left: 0;
        padding: 20px 0;
    }

    #html-body [data-content-type="row"].bf-row--perks .bf-perks__item + .bf-perks__item {
        border-top: 1px solid var(--bf-line);
    }
}
