/* ==========================================================================
   Technical Feature 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). */
.technical-feature__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 24px;
    font-feature-settings: 'liga' off, 'clig' off;
}

/* Left column – Section Heading */
.technical-feature__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 .technical-feature to beat #baem-container.baem-wrapper h2 rules */
#baem-container.baem-wrapper .technical-feature .technical-feature__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: 0;
}

.technical-feature__section-heading {
    position: static;
}

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

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

/* Image – equal share of card width */
.technical-feature__image-container {
    flex: 1;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.technical-feature__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 16px;
}

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

/* Icon */
.technical-feature__icon-container {
    height: 32px;
    display: flex;
    align-items: flex-start;
}

.technical-feature__icon {
    width: 32px;
    height: 32px;
}

/* Texts */
.technical-feature__texts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card heading – Figma: Heading/XS Bold, 20px/28px
   Scoped under .technical-feature to beat h3:not(.heading-seo) and [class*="heading-"] */
#baem-container.baem-wrapper .technical-feature .technical-feature__heading {
    font-family: var(--bs-font-attAleckSansBold, attAleckSans-Bold, Helvetica, Arial, sans-serif);
    font-weight: normal;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.6px;
    color: var(--heading-color, #1d2329);
    text-indent: 0;
    margin: 0;
}

/* Supportive (body + legal) */
.technical-feature__supportive {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #dcdfe3;
    padding-top: 12px;
}

/* Body – Figma: Body/Base Regular, 16px/24px
   Scoped under .technical-feature to beat p and [class*="type-"] rules */
#baem-container.baem-wrapper .technical-feature .technical-feature__body {
    font-family: var(--bs-font-attAleckSans, attAleckSans-Regular, Helvetica, Arial, sans-serif);
    font-size: 16px;
    font-weight: normal;
    line-height: 24px;
    letter-spacing: -0.48px;
    color: var(--baem-text-body, #454b52);
    margin: 0;
}

/* Remove the <p> margin-bottom injected by MarkDownModel so the 10px gap
   between body and legal text comes solely from the flex gap on __supportive. */
#baem-container.baem-wrapper .technical-feature .technical-feature__body p {
    margin-bottom: 0;
}

/* Legal – global class type-legal-wysiwyg-editor handles font, size, color.
   No custom override needed. */

/* ==========================================================================
   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) {
    .technical-feature__texts {
        width: 100%;
        min-width: 0;
    }
}

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

    .technical-feature__heading-col {
        flex: none;
        width: 100%;
        max-width: none;
        position: static;
    }

    .technical-feature__section-heading {
        position: static;
        font-size: 24px;
        line-height: 30px;
        text-align: center;
    }

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

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

    .technical-feature__image-container {
        flex: 0 0 340px;
        width: 340px;
        height: 300px;
    }
}

/* ==========================================================================
   Responsive – mobile (≤768px): single column, cards stack vertically
   ========================================================================== */
@media (max-width: 768px) {
    .technical-feature__section-heading {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 8px;
        text-align: center;
    }

    .technical-feature__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .technical-feature__card {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .technical-feature__image-container {
        flex: none;
        width: 100%;
        height: auto;
        max-height: 200px;
        aspect-ratio: 4 / 3;
    }

    .technical-feature__image {
        position: relative;
        inset: unset;
        width: 100%;
        height: 100%;
    }

    .technical-feature__content {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .technical-feature__icon-container {
        flex-shrink: 0;
    }
}
