/* ==========================================================================
   Bon Mot Component
   Figma: B.com Upper Funnel | Redesign – Visual, node 3511:24830
   ========================================================================== */

/* Desktop layout: proportional – heading col (max 292px) | fluid gap (max 140px) | cards col
   All three share the same vw ratio (÷ 1375px) so they shrink at the same rate as the
   viewport narrows. Columns are flex:1, heading is capped at clamp(180px,21.24vw,292px),
   gap is capped at clamp(20px,10.18vw,140px). */
.bon-mot__inner {
    display: flex;
    flex-direction: row;
    gap: clamp(20px, 10.18vw, 140px);
    max-width: 1264px;
    width: 100%;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: flex-start;
    padding: 0 24px;
    font-feature-settings: 'liga' off, 'clig' off;
}

/* Left column – Section Heading */
.bon-mot__heading-col {
    flex: 1;
    min-width: 0;
    max-width: clamp(180px, 21.24vw, 292px);
    position: sticky;
    top: 120px;
}

/* Section heading – Figma: Heading/MD Bold, #009FDB, 30px/36px
   Scoped under .bon-mot to beat #baem-container.baem-wrapper h2 rules */
#baem-container.baem-wrapper .bon-mot .bon-mot__section-heading {
    color: #009fdb;
    font-family: var(--bs-font-attAleckSansBold, attAleckSans-Bold, Helvetica, Arial, sans-serif);
    font-weight: normal;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: -0.9px;
    text-indent: 0;
    margin-top: 0;
}

/* Section body text – Figma: 16px/22.4px, attAleckSans-Regular
   Color (#1D2329) supplied by the global color-gray-800 class in HTL. */
#baem-container.baem-wrapper .bon-mot .bon-mot__section-body {
    font-size: 16px;
}

/* Right column – single-column card list */
.bon-mot__grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Individual card – content bottom-aligned with image */
.bon-mot__card {
    display: flex;
    gap: 32px;
    align-items: flex-end;
}

/* Image – equal share of card width */
.bon-mot__image-container {
    flex: 1;
    height: 230px;
    border-radius: 16px;
    position: relative;
}

.bon-mot__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Content side */
.bon-mot__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Icon */
.bon-mot__icon-container {
    height: 32px;
}

.bon-mot__icon {
    width: 32px;
    height: 32px;
}

/* Card divider – 1px rule between icon and body text.
   mar-t-xxxs (4px) + parent gap (12px) = 16px from icon above;
   parent gap (12px) = 12px to body text below. */
.bon-mot__divider {
    width: 100%;
    height: 1px;
    background-color: #d2d2d2;
    border-radius: var(--border-radius-rounded-lg, 8px) 0 0 0;
}

/* Texts */
.bon-mot__texts {
    gap: 12px;
}

/* RTE checkmark – matches pattern used across all baem components */
#baem-container.baem-wrapper .bon-mot__inner span.checkmark {
    background: url('../../../../../content/dam/attbusiness/images/icons/icon-checkmark-blue.svg') no-repeat;
    max-height: 20px;
    margin-right: 6px;
    padding-left: 22px;
    max-width: 100%;
}

/* Body – Figma: 16px, attAleckSans-Regular; margin reset ensures p tags don't carry default browser margin.
   Font-family + font-weight on `a` override the global `b a` rule (attAleckSans-Bold !important)
   which fires when authors wrap links in bold markdown syntax. */
#baem-container.baem-wrapper .bon-mot .bon-mot__body {
    font-size: 16px;
    margin: 0;
}

/* Last paragraph flush-bottom so text aligns with the image base.
   Multi-paragraph cards keep the 10px gap between paragraphs. */
#baem-container.baem-wrapper .bon-mot .bon-mot__body p:last-child {
    margin-bottom: 0;
}

/* Prevent the global `b a` rule (attAleckSans-Bold !important) from making link text bold
   when authors wrap a link in bold markdown syntax inside the RTE. */
#baem-container.baem-wrapper .bon-mot .bon-mot__body a,
#baem-container.baem-wrapper .bon-mot .bon-mot__body a strong,
#baem-container.baem-wrapper .bon-mot .bon-mot__body a b,
#baem-container.baem-wrapper .bon-mot__inner a.modal-anchor {
    font-family: var(--bs-font-attAleckSans, attAleckSans, Helvetica, Arial, sans-serif) !important;
    font-weight: normal !important;
}

/* Standalone bold / strong from RTE – use the bold face explicitly */
#baem-container.baem-wrapper .bon-mot .bon-mot__body strong,
#baem-container.baem-wrapper .bon-mot .bon-mot__body b {
    font-family: var(--bs-font-attAleckSansBold, attAleckSans-Bold, Helvetica, Arial, sans-serif) !important;
    font-weight: normal !important;
}

/* ==========================================================================
   Responsive – desktop safety: ensure text columns don't overflow at narrow widths
   Gap and heading max-width are handled by clamp() in base rules above.
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1253px) {
    .bon-mot__texts {
        width: 100%;
        min-width: 0;
    }
}

/* ==========================================================================
   Responsive – tablet (≤1024px): heading above cards, image left / content right
   ========================================================================== */
@media (max-width: 1024px) {
    .bon-mot__inner {
        flex-direction: column;
        gap: 60px;
        max-width: 732px;
    }

    .bon-mot__heading-col {
        flex: none;
        width: 100%;
        max-width: none;
        position: static;
    }

    .bon-mot__section-heading {
        font-size: 24px;
        line-height: 30px;
    }

    .bon-mot__section-body {
        text-align: center;
    }

    .bon-mot__grid {
        flex: none;
        width: 100%;
        grid-template-columns: 1fr;
    }

    /* Keep image-left / content-right layout at tablet, same as desktop */
    .bon-mot__card {
        flex-direction: row;
        align-items: flex-end;
        gap: 32px;
    }

    .bon-mot__image-container {
        flex: 0 0 340px;
        width: 340px;
        height: 230px;
    }
}

/* ==========================================================================
   Responsive – mobile (≤767px): single column, cards stack vertically
   ========================================================================== */
@media (max-width: 767px) {
    .bon-mot__inner {
        gap: 60px;
    }

    #baem-container.baem-wrapper .bon-mot .bon-mot__body p {
        margin-bottom: 0;
    }

    .bon-mot__section-heading {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 16px;
    }

    .bon-mot__section-body {
        text-align: center;
    }

    .bon-mot__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .bon-mot__card {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .bon-mot__image-container {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .bon-mot__image {
        position: relative;
        inset: unset;
        width: 100%;
        height: 100%;
    }

    .bon-mot__content {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    /* Divider becomes a vertical strip in the row layout */
    .bon-mot__divider {
        width: 1px;
        height: auto;
        align-self: stretch;
        margin-top: 0;
    }

}
