/* =========================================================
   CONVÊNIOS — FINANCIEL
   visual elegante com a paleta original
========================================================= */

.convenios-section {
    position: relative;
    overflow: hidden;
    padding: 110px 0;
    background:
        radial-gradient(circle at 85% 10%, rgba(174, 215, 54, 0.10), transparent 22%),
        radial-gradient(circle at 10% 90%, rgba(27, 166, 126, 0.12), transparent 26%),
        linear-gradient(135deg, #031331 0%, #062255 52%, #0a3475 100%);
    color: #ffffff;
}

.convenios-section::before {
    content: "";
    position: absolute;
    right: -180px;
    bottom: -180px;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.convenios-section::after {
    content: "";
    position: absolute;
    right: 40px;
    bottom: 40px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.convenios-container {
    position: relative;
    z-index: 2;
    width: min(1380px, calc(100% - 56px));
    margin: 0 auto;
}

/* =========================================================
   HEADER
========================================================= */

.convenios-header {
    max-width: 900px;
    margin-bottom: 46px;
}

.convenios-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    min-height: 42px;
    margin-bottom: 20px;
    border-radius: 999px;
    border: 1px solid rgba(205, 221, 52, 0.24);
    background: rgba(255, 255, 255, 0.05);
    color: #d7e649;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.convenios-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cddd34;
    box-shadow: 0 0 14px rgba(205, 221, 52, 0.85);
}

.convenios-header h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(2.6rem, 4.5vw, 4.8rem);
    font-weight: 850;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.convenios-header h2 span {
    background: linear-gradient(90deg, #54c782 0%, #1aa276 45%, #c9dc39 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.convenios-header p {
    max-width: 800px;
    margin: 0;
    color: rgba(231, 239, 247, 0.76);
    font-size: 1.04rem;
    line-height: 1.75;
}

/* =========================================================
   GRID
========================================================= */

.convenios-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* =========================================================
   CARD
========================================================= */

.convenio-card {
    position: relative;
    display: grid;
    grid-template-columns: 45% 55%;
    min-height: 230px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    backdrop-filter: blur(12px);
}

.convenio-card:hover {
    transform: translateY(-8px);
    border-color: rgba(78, 193, 132, 0.45);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.28),
        0 0 24px rgba(46, 178, 111, 0.10);
}

.convenio-image {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.convenio-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-position: center center;
    transition: transform 0.55s ease, filter 0.35s ease;
}

.convenio-card:hover .convenio-image img {
    transform: scale(1.04);
    filter: saturate(1.04) contrast(1.02);
}

.convenio-image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 65%, rgba(4, 22, 52, 0.18) 100%);
    pointer-events: none;
}

.convenio-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 24px;
    background: linear-gradient(135deg, rgba(23, 52, 109, 0.92), rgba(22, 50, 104, 0.88));
}

.convenio-category {
    display: block;
    margin-bottom: 10px;
    color: #73d696;
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.convenio-content h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 820;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.convenio-content p {
    margin: 0;
    color: rgba(229, 237, 247, 0.78);
    font-size: 0.94rem;
    line-height: 1.6;
}

.convenio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}

.convenio-status {
    display: inline-flex;
    align-items: center;
    min-height: 33px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(77, 194, 131, 0.24);
    background: rgba(21, 157, 118, 0.16);
    color: #8ce0ab;
    font-size: 0.78rem;
    font-weight: 800;
}

.convenio-arrow {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #d8e847;
    font-size: 1rem;
    transition: transform 0.25s ease, background 0.25s ease;
}

.convenio-card:hover .convenio-arrow {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   AJUSTES DAS IMAGENS
========================================================= */

/* 1 - INSS */
.convenio-card:nth-child(1) .convenio-image img {
    object-fit: contain;
    padding: 22px;
    background: linear-gradient(90deg, #f2f2f2 0%, #ffffff 50%, #d9d9d9 100%);
}

/* 2 - GOVERNO MA */
.convenio-card:nth-child(2) .convenio-image img {
    object-fit: contain;
    padding: 10px;
    background: #f4f4f4;
}

/* 3 - GOVERNO RN */
.convenio-card:nth-child(3) .convenio-image img {
    object-fit: contain;
    padding: 12px;
    background: linear-gradient(90deg, #f5f5f5 0%, #ffffff 50%, #d8d8d8 100%);
}

/* 4 - IMPERATRIZ */
.convenio-card:nth-child(4) .convenio-image {
    background: #234999;
}

.convenio-card:nth-child(4) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    padding: 14px;
    background: #234999;
}

/* 5 - SÃO LUÍS */
.convenio-card:nth-child(5) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    padding: 10px;
    background: #f6f6f6;
}

/* 6 - TERESINA */
.convenio-card:nth-child(6) .convenio-image {
    background: #164398;
}

.convenio-card:nth-child(6) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    padding: 0;
    background: #164398;
}

/* 7 - TUTÓIA */
.convenio-card:nth-child(7) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    padding: 14px;
    background: #f6f6f6;
}

/* 8 - BOM JARDIM */
.convenio-card:nth-child(8) .convenio-image img {
    object-fit: cover;
    object-position: center center;
    padding: 0;
}

/* 9 - PAÇO DO LUMIAR */
.convenio-card:nth-child(9) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    padding: 10px;
    background: #f6f6f6;
}

/* =========================================================
   AÇÃO FINAL
========================================================= */

.convenios-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 28px 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(120deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
}

.convenios-action-text strong {
    display: block;
    margin-bottom: 8px;
    color: #d8e946;
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.convenios-action-text span {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
}

.convenios-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #159d76 0%, #32b56f 56%, #90bf16 100%);
    color: #ffffff;
    font-size: 0.97rem;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 18px 36px rgba(21, 157, 118, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.convenios-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(21, 157, 118, 0.35);
    color: #ffffff;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 1180px) {
    .convenios-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .convenios-section {
        padding: 80px 0;
    }

    .convenios-container {
        width: calc(100% - 28px);
    }

    .convenios-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .convenio-card {
        grid-template-columns: 42% 58%;
        min-height: 200px;
    }

    .convenio-image,
    .convenio-image img {
        min-height: 200px;
    }

    .convenio-content {
        padding: 20px 18px;
    }

    .convenio-content h3 {
        font-size: 1.05rem;
    }

    .convenio-status {
        display: none;
    }

    .convenios-action {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }

    .convenios-button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .convenio-card {
        display: block;
    }

    .convenio-image,
    .convenio-image img {
        width: 100%;
        height: 220px;
        min-height: 220px;
    }

    .convenio-content {
        padding: 22px 20px;
    }
}

/* =========================================================
   REFINAMENTO VISUAL FINAL DOS CONVÊNIOS
========================================================= */

/* Cards mais equilibrados */
.convenio-card {
    grid-template-columns: 43% 57%;
    min-height: 220px;
    border-radius: 22px;
}

/* Área da imagem menos clara e mais integrada */
.convenio-image {
    background:
        linear-gradient(
            135deg,
            #f7f8fa 0%,
            #ffffff 55%,
            #e3e7ec 100%
        );
}

/* Conteúdo com mais respiro */
.convenio-content {
    padding: 26px 25px;
}

/* Títulos */
.convenio-content h3 {
    font-size: 1.16rem;
    line-height: 1.2;
}

/* Descrição */
.convenio-content p {
    font-size: 0.91rem;
    line-height: 1.55;
}

/* Selo sem quebrar linha */
.convenio-status {
    min-width: max-content;
    min-height: 32px;
    padding: 0 13px;
    white-space: nowrap;
    font-size: 0.73rem;
}

/* Rodapé do card */
.convenio-footer {
    margin-top: 17px;
}

/* Seta */
.convenio-arrow {
    width: 35px;
    height: 35px;
}

/* =========================================================
   AJUSTE INDIVIDUAL DOS LOGOTIPOS
========================================================= */

/* INSS */
.convenio-card:nth-child(1) .convenio-image img {
    padding: 16px;
    transform: scale(1.08);
}

/* Governo do Maranhão */
.convenio-card:nth-child(2) .convenio-image img {
    padding: 8px;
    transform: scale(1.03);
}

/* Governo do Rio Grande do Norte */
.convenio-card:nth-child(3) .convenio-image img {
    padding: 8px;
    transform: scale(1.04);
}

/* Imperatriz */
.convenio-card:nth-child(4) .convenio-image img {
    padding: 8px;
    transform: scale(1.04);
}

/* São Luís */
.convenio-card:nth-child(5) .convenio-image img {
    padding: 6px;
    transform: scale(1.04);
}

/* Teresina */
.convenio-card:nth-child(6) .convenio-image img {
    padding: 0;
    transform: scale(1.02);
}

/* Tutóia */
.convenio-card:nth-child(7) .convenio-image img {
    padding: 10px;
    transform: scale(1.08);
}

/* Bom Jardim */
.convenio-card:nth-child(8) .convenio-image img {
    object-fit: cover;
    object-position: 55% center;
    transform: scale(1);
}

/* Paço do Lumiar */
.convenio-card:nth-child(9) .convenio-image img {
    padding: 6px;
    transform: scale(1.1);
}

/* Evita aumento excessivo no hover dos logotipos */
.convenio-card:hover .convenio-image img {
    transform: scale(1.07);
}

/* Bom Jardim com zoom mais discreto */
.convenio-card:nth-child(8):hover .convenio-image img {
    transform: scale(1.04);
}

/* =========================================================
   TELAS MENORES
========================================================= */

@media (max-width: 1180px) {
    .convenio-card {
        grid-template-columns: 42% 58%;
    }
}

@media (max-width: 760px) {
    .convenio-card {
        grid-template-columns: 40% 60%;
        min-height: 190px;
    }

    .convenio-content {
        padding: 20px 17px;
    }

    .convenio-content h3 {
        font-size: 1.02rem;
    }

    .convenio-status {
        display: none;
    }
}

/* =========================================================
   REFINAMENTO VISUAL FINAL DOS CONVÊNIOS
========================================================= */

/* Cards mais equilibrados */
.convenio-card {
    grid-template-columns: 43% 57%;
    min-height: 220px;
    border-radius: 22px;
}

/* Área da imagem menos clara e mais integrada */
.convenio-image {
    background:
        linear-gradient(
            135deg,
            #f7f8fa 0%,
            #ffffff 55%,
            #e3e7ec 100%
        );
}

/* Conteúdo com mais respiro */
.convenio-content {
    padding: 26px 25px;
}

/* Títulos */
.convenio-content h3 {
    font-size: 1.16rem;
    line-height: 1.2;
}

/* Descrição */
.convenio-content p {
    font-size: 0.91rem;
    line-height: 1.55;
}

/* Selo sem quebrar linha */
.convenio-status {
    min-width: max-content;
    min-height: 32px;
    padding: 0 13px;
    white-space: nowrap;
    font-size: 0.73rem;
}

/* Rodapé do card */
.convenio-footer {
    margin-top: 17px;
}

/* Seta */
.convenio-arrow {
    width: 35px;
    height: 35px;
}

/* =========================================================
   AJUSTE INDIVIDUAL DOS LOGOTIPOS
========================================================= */

/* INSS */
.convenio-card:nth-child(1) .convenio-image img {
    padding: 16px;
    transform: scale(1.08);
}

/* Governo do Maranhão */
.convenio-card:nth-child(2) .convenio-image img {
    padding: 8px;
    transform: scale(1.03);
}

/* Governo do Rio Grande do Norte */
.convenio-card:nth-child(3) .convenio-image img {
    padding: 8px;
    transform: scale(1.04);
}

/* Imperatriz */
.convenio-card:nth-child(4) .convenio-image img {
    padding: 8px;
    transform: scale(1.04);
}

/* São Luís */
.convenio-card:nth-child(5) .convenio-image img {
    padding: 6px;
    transform: scale(1.04);
}

/* Teresina */
.convenio-card:nth-child(6) .convenio-image img {
    padding: 0;
    transform: scale(1.02);
}

/* Tutóia */
.convenio-card:nth-child(7) .convenio-image img {
    padding: 10px;
    transform: scale(1.08);
}

/* Bom Jardim */
.convenio-card:nth-child(8) .convenio-image img {
    object-fit: cover;
    object-position: 55% center;
    transform: scale(1);
}

/* Paço do Lumiar */
.convenio-card:nth-child(9) .convenio-image img {
    padding: 6px;
    transform: scale(1.1);
}

/* Evita aumento excessivo no hover dos logotipos */
.convenio-card:hover .convenio-image img {
    transform: scale(1.07);
}

/* Bom Jardim com zoom mais discreto */
.convenio-card:nth-child(8):hover .convenio-image img {
    transform: scale(1.04);
}

/* =========================================================
   TELAS MENORES
========================================================= */

@media (max-width: 1180px) {
    .convenio-card {
        grid-template-columns: 42% 58%;
    }
}

@media (max-width: 760px) {
    .convenio-card {
        grid-template-columns: 40% 60%;
        min-height: 190px;
    }

    .convenio-content {
        padding: 20px 17px;
    }

    .convenio-content h3 {
        font-size: 1.02rem;
    }

    .convenio-status {
        display: none;
    }
}

/* =========================================================
   AJUSTE FINO DE ENQUADRAMENTO DAS IMAGENS DOS CONVÊNIOS
   Cole no final do convenios.css
========================================================= */

/* Base da área da imagem */
.convenio-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base padrão da imagem */
.convenio-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.35s ease;
}

/* =========================
   AJUSTES INDIVIDUAIS
========================= */

/* 1 - INSS */
.convenio-card:nth-child(1) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.84);
}

/* 2 - Governo do Maranhão */
.convenio-card:nth-child(2) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.94);
}

/* 3 - Governo do Rio Grande do Norte */
.convenio-card:nth-child(3) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.92);
}

/* 4 - Prefeitura de Imperatriz */
.convenio-card:nth-child(4) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.92);
}

/* 5 - Prefeitura de São Luís */
.convenio-card:nth-child(5) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.90);
}

/* 6 - Prefeitura de Teresina */
.convenio-card:nth-child(6) .convenio-image img {
    object-fit: cover;
    object-position: center center;
    transform: scale(1.00);
}

/* 7 - Prefeitura de Tutóia */
.convenio-card:nth-child(7) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.86);
}

/* 8 - Prefeitura de Bom Jardim */
.convenio-card:nth-child(8) .convenio-image img {
    object-fit: cover;
    object-position: center center;
    transform: scale(1.00);
}

/* 9 - Prefeitura de Paço do Lumiar */
.convenio-card:nth-child(9) .convenio-image img {
    object-fit: contain;
    object-position: center center;
    transform: scale(0.88);
}

/* Hover suave sem desalinhar */
.convenio-card:hover .convenio-image img {
    transform: scale(1.03);
}

/* Mantém o enquadramento específico no hover */
.convenio-card:nth-child(1):hover .convenio-image img { transform: scale(0.88); }
.convenio-card:nth-child(2):hover .convenio-image img { transform: scale(0.98); }
.convenio-card:nth-child(3):hover .convenio-image img { transform: scale(0.96); }
.convenio-card:nth-child(4):hover .convenio-image img { transform: scale(0.96); }
.convenio-card:nth-child(5):hover .convenio-image img { transform: scale(0.94); }
.convenio-card:nth-child(6):hover .convenio-image img { transform: scale(1.03); }
.convenio-card:nth-child(7):hover .convenio-image img { transform: scale(0.90); }
.convenio-card:nth-child(8):hover .convenio-image img { transform: scale(1.03); }
.convenio-card:nth-child(9):hover .convenio-image img { transform: scale(0.92); }

/* =========================================================
   ÚLTIMO AJUSTE DE TAMANHO DOS LOGOTIPOS
========================================================= */

/* INSS — aumenta sem cortar */
.convenio-card:nth-child(1) .convenio-image img {
    object-fit: contain;
    object-position: center;
    padding: 4px;
    transform: scale(1.13);
}

/* Tutóia — amplia e mantém centralizada */
.convenio-card:nth-child(7) .convenio-image img {
    object-fit: contain;
    object-position: center;
    padding: 3px;
    transform: scale(1.17);
}

/* Paço do Lumiar — amplia o brasão */
.convenio-card:nth-child(9) .convenio-image img {
    object-fit: contain;
    object-position: center;
    padding: 2px;
    transform: scale(1.14);
}

/* Hover sem exagerar */
.convenio-card:nth-child(1):hover .convenio-image img {
    transform: scale(1.17);
}

.convenio-card:nth-child(7):hover .convenio-image img {
    transform: scale(1.21);
}

.convenio-card:nth-child(9):hover .convenio-image img {
    transform: scale(1.18);
}

/* Reduz levemente o fundo branco dos logotipos */
.convenio-card:nth-child(1) .convenio-image,
.convenio-card:nth-child(2) .convenio-image,
.convenio-card:nth-child(3) .convenio-image,
.convenio-card:nth-child(5) .convenio-image,
.convenio-card:nth-child(7) .convenio-image {
    background: linear-gradient(
        135deg,
        #f7f8fa 0%,
        #ffffff 55%,
        #e6e9ed 100%
    );
}

/* Deixa o selo mais limpo e menos largo */
.convenio-status {
    padding: 0 12px;
    font-size: 0.7rem;
}
/* PAÇO DO LUMIAR - fundo todo azul */
.convenio-card:nth-child(9) .convenio-image {
    background: linear-gradient(135deg, #1787d9 0%, #0f5fb8 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
}

/* imagem do Paço do Lumiar */
.convenio-card:nth-child(9) .convenio-image img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent !important;
}

/* Deixa os logotipos com área visual maior */
.convenio-card:nth-child(1) .convenio-image img,
.convenio-card:nth-child(2) .convenio-image img,
.convenio-card:nth-child(3) .convenio-image img,
.convenio-card:nth-child(5) .convenio-image img,
.convenio-card:nth-child(7) .convenio-image img {
    transform: scale(1.08);
}

/* Bom Jardim um pouco mais claro */
.convenio-card:nth-child(8) .convenio-image img {
    filter: brightness(1.08) saturate(1.05);
}