/* ==========================================================================
   ESG ODS — Grid dos Objetivos de Desenvolvimento Sustentável
   ========================================================================== */

.esg-ods {
    padding: 88px 0 148px;
    background-color: var(--color-white);
}

/* ===== Header centralizado ===== */
.esg-ods__header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 32px;
}

.esg-ods__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-text);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #252B37;
    margin: 0 auto;
}

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

.esg-ods__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 32px;
    line-height: normal;
    color: #252B37;
    text-align: center;
    margin: 0;
}

.esg-ods__description {
    font-family: var(--font-text);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #414651;
    text-align: center;
    margin: 0;
}

/* ===== CTA (mesmo visual do botão "Ir para o Blog") ===== */
.esg-ods__cta-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 64px;
}

.esg-ods__cta-border {
    padding: 8px;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        linear-gradient(302.1deg, rgba(21, 94, 239, 0.39) 24.57%, rgba(21, 94, 239, 0) 70.33%) border-box;
}

.esg-ods__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 32px;
    background: #1F3A5F;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.esg-ods__cta:hover {
    background: #2a4f7a;
}

@media (max-width: 768px) {
    .esg-ods__cta {
        padding: 16px 28px;
        font-size: 16px;
    }

    .esg-ods__cta-wrapper {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .esg-ods__cta-wrapper {
        margin-top: 32px;
    }
}

/* ===== Grid de cards ===== */
.esg-ods__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 13px;
    justify-content: center;
    align-items: center;
    width: 984px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
}

/* ===== Card ===== */
.esg-ods__card {
    position: relative;
    flex-shrink: 0;
    width: 153px;
    height: 142px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 8px;
    overflow: hidden;
    color: var(--color-white);
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
}

/* Topo do card: número + título lado a lado (flex) */
.esg-ods__card-top {
    position: absolute;
    top: 10px;
    left: 14px;
    right: 9px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    z-index: 2;
}

.esg-ods__card-number {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 38px;
    line-height: 0.85;
    color: var(--color-white);
    letter-spacing: -0.03em;
    font-feature-settings: 'lnum' 1;
    flex-shrink: 0;
}

.esg-ods__card-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.esg-ods__card-title span {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1;
    color: var(--color-white);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

/* Variação tamanho médio (cards com texto curto/médio) */
.esg-ods__card--md .esg-ods__card-title span {
    font-size: 13px;
    letter-spacing: -0.03em;
}

/* Variação tamanho pequeno (cards com texto longo) */
.esg-ods__card--sm .esg-ods__card-title span {
    font-size: 10px;
    letter-spacing: -0.05em;
}

/* Ícone — posicionamento absoluto na metade inferior */
.esg-ods__card-icon {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.esg-ods__card-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
}

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

@media (max-width: 1024px) {
    .esg-ods {
        padding: 72px 0 100px;
    }

    .esg-ods__title {
        font-size: 28px;
    }

    .esg-ods__grid {
        width: 100%;
        gap: 16px 12px;
    }

    .esg-ods__card {
        width: calc((100% - 60px) / 5);
        max-width: 153px;
        height: 142px;
    }
}

@media (max-width: 768px) {
    .esg-ods {
        padding: 56px 0 80px;
    }

    .esg-ods__title {
        font-size: 24px;
    }

    .esg-ods__grid {
        gap: 12px;
    }

    .esg-ods__card {
        width: calc((100% - 24px) / 3);
        max-width: 153px;
        height: auto;
        aspect-ratio: 153 / 142;
    }

    .esg-ods__card-number {
        top: 6px;
        left: 12px;
        font-size: 32px;
    }

    .esg-ods__card-top {
        top: 8px;
        right: 8px;
        width: calc(100% - 50px);
    }

    .esg-ods__card-icon {
        height: 60px;
        bottom: 4px;
    }
}

@media (max-width: 480px) {
    .esg-ods {
        padding: 48px 0 64px;
    }

    .esg-ods__card {
        width: calc((100% - 12px) / 2);
    }
}
