/* ==========================================================================
   ESG — Governança e Responsabilidade (Section VIII)
   ========================================================================== */

.esg {
    padding: var(--section-pad-xl) 0;
    background-color: #EDF1F7;
    overflow: hidden;
}

.esg__inner {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
}

/* ===== Coluna visual (esquerda) ===== */

.esg__visual {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esg__badge {
    max-width: clamp(324px, 21.5vw, 414px);
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Coluna de texto (direita) ===== */

.esg__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-card);
}

@media (min-width: 769px) {
    .esg__inner {
        --esg-visual-w: clamp(324px, 22vw, 414px);
        gap: var(--gap-lg);
    }

    .esg__visual {
        flex: 0 0 var(--esg-visual-w);
        justify-content: flex-end;
    }

    .esg__badge {
        max-width: 100%;
    }

    .esg__content {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.esg__label {
    display: flex;
    align-items: center;
    gap: clamp(10px, 0.63vw, 12px);
    font-family: var(--font-text);
    font-weight: 400;
    font-size: var(--fs-label);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #252B37;
}

.esg__line {
    display: inline-block;
    width: var(--line-width);
    height: 0;
    border-top: 1px solid var(--color-primary);
    flex-shrink: 0;
}

.esg__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-section-lg);
    line-height: 1.19;
    color: #252B37;
}

.esg__description {
    display: flex;
    flex-direction: column;
    gap: var(--gap-content);
}

.esg__description p {
    font-family: var(--font-text);
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #414651;
}

/* CTA */
.esg__cta-wrapper {
    padding: clamp(6px, 0.42vw, 8px);
    align-self: flex-start;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(#EDF1F7, #EDF1F7) padding-box,
        linear-gradient(302.1deg, rgba(21, 94, 239, 0.39) 24.57%, rgba(21, 94, 239, 0) 70.33%) border-box;
}

.esg__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: fit-content;
    height: var(--cta-height);
    gap: clamp(10px, 0.63vw, 12px);
    padding: var(--cta-pad-y) var(--cta-pad-x);
    background: #1F3A5F;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--cta-font);
    line-height: 1.33;
    border-radius: 12px;
    transition: background var(--transition-fast);
}

@media(max-width: 768px){
    .esg__cta {
        font-size: var(--cta-font-small);
    }
}

.esg__cta:hover {
    background: #2a4f7a;
}

.esg__cta svg {
    width: var(--cta-icon);
    height: var(--cta-icon);
}

/* ===== Responsivo ===== */

@media (max-width: 768px) {
    .esg__inner {
        flex-direction: column;
        gap: 24px;
    }

    .esg__content {
        display: contents;
    }

    .esg__visual { order: 1; max-width: 340px; width: 85%; align-self: center; }
    .esg__label { order: 2; align-self: center; }
    .esg__title { order: 3; align-self: center; text-align: center; }
    .esg__description { order: 4; align-self: center; text-align: center; }
    .esg__cta-wrapper { order: 5; align-self: center; }

    .esg__badge {
        max-width: 320px;
    }

    .esg__cta {
        width: 100%;
        padding: 16px 24px;
    }
}
