/*
 * Estilos para card e modal de solução
 */

.solucao-card {
    --solucao-blue: #0a74ad;
    --solucao-blue-dark: #045f90;
    --solucao-gold: #ffc20e;
    --solucao-text: #171717;
    --solucao-muted: #707070;
    --solucao-line: #d7d3ff;
    --solucao-card-padding: 1rem 1rem 0.95rem;
    --solucao-card-gap: 0.72rem;
    --solucao-icon-size: 58px;
    --solucao-card-border-width: 2px;
    --solucao-card-radius: 16px;
    --solucao-card-max-width: 250px;
    --solucao-card-border-color: #0a74ad;
    --solucao-card-background: #ffffff;
    --solucao-title-color: #0a74ad;
    --solucao-subtitle-color: #707070;
    --solucao-excerpt-spacing-bottom: 8px;
    --solucao-beneficios-spacing-bottom: 12px;
    --solucao-text-color: #171717;
    --solucao-muted-color: #8d8d8d;
    --solucao-button-bg: #ffc20e;
    --solucao-button-text: #0f4e87;
    --solucao-card-text-align: center;
    --solucao-card-align-items: center;
    --solucao-title-align: end;
    --solucao-title-lines: 2;

    display: flex;
    flex-direction: column;
    gap: var(--solucao-card-gap);
    max-width: var(--solucao-card-max-width);
    min-height: 100%;
    padding: var(--solucao-card-padding);
    border: var(--solucao-card-border-width) solid var(--solucao-card-border-color);
    border-radius: var(--solucao-card-radius);
    background: var(--solucao-card-background);
    box-shadow: 0 10px 24px rgba(3, 53, 84, 0.05);
    box-sizing: border-box;
    align-items: var(--solucao-card-align-items);
}

.solucao-card-header {
    display: grid;
    grid-template-columns: var(--solucao-icon-size) 1fr;
    gap: 0.65rem;
    align-items: flex-start;
}

.solucao-card-icon {
    width: var(--solucao-icon-size);
    height: var(--solucao-icon-size);
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.95) 0 16%, transparent 17%),
        linear-gradient(145deg, #eff8ff 0%, #d8ecff 100%);
    box-shadow:
        inset 0 0 0 1px rgba(10, 116, 173, 0.10),
        0 6px 14px rgba(10, 116, 173, 0.08);
}

.solucao-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.solucao-card-icon-fallback {
    display: block;
    width: 100%;
    height: 100%;
    /* background:
        radial-gradient(circle at 35% 32%, #ffffff 0 11%, transparent 12%),
        linear-gradient(135deg, #0a74ad 0%, #1c61ee 100%); */
}

.solucao-card-heading {
    min-width: 0;
    text-align: left;
    justify-self: stretch;
}

.solucao-card-title {
    margin: 0;
    color: var(--solucao-title-color);
    width: auto;
    font-size: 0.98rem;
    line-height: 1.12;
    font-weight: 800;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--solucao-title-lines);
    overflow: hidden;
    white-space: normal;
    text-wrap: balance;
}

.solucao-card-subtitle {
    margin: 0.35rem 0 0;
    color: var(--solucao-subtitle-color);
    font-size: 0.69rem;
    line-height: 1.25;
    color: #014cbb;
    background: #2196f391;
    float: left;
    padding: 2px 6px;
    border-radius: 10px;
}

.solucao-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    flex: 1 1 auto;
}

.solucao-card-excerpt {
    margin: 0 0 var(--solucao-excerpt-spacing-bottom);
    color: var(--solucao-text-color);
    text-align: var(--solucao-card-text-align);
    font-size: 0.84rem;
    line-height: 1.45;
}

.solucao-card-beneficios {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: var(--solucao-beneficios-spacing-bottom);
    display: grid;
    gap: 0.6rem;
}

.solucao-card-beneficios li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0.45rem;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--solucao-line);
    color: var(--solucao-muted-color);
    font-size: 0.77rem;
    line-height: 1.4;
}

.solucao-card-beneficios li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.solucao-card-benefit-icon,
.solucao-card-ideal-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6ec6f4;
    flex: 0 0 20px;
}

.solucao-card-benefit-icon svg,
.solucao-card-ideal-icon svg {
    width: 100%;
    height: 100%;
}

.solucao-card-benefit-icon svg {
    fill: #6ec6f4;
}

.solucao-card-benefit-icon svg path {
    fill: none;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.solucao-card-ideal-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.solucao-card-ideal-icon svg {
    fill: currentColor;
}

.solucao-card-ideal {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.45rem;
    align-items: center;
    margin-top: 0.1rem;
    color: var(--solucao-muted-color);
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    background: #f7fbff;
    border: 1px solid rgba(10, 116, 173, 0.10);
}

.solucao-card-ideal p {
    margin: 0;
}

.solucao-modal-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.02rem;
    min-height: 38px;
    padding: 0.7rem 0.95rem;
    background: var(--solucao-button-bg);
    color: var(--solucao-button-text);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.solucao-modal-open:hover {
    background: #ffcb25;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 194, 14, 0.26);
}

.solucao-modal-open-arrow {
    font-size: 0.95rem;
    line-height: 1;
}

/* Overlay */
.solucao-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 9999;
    padding: 32px 18px;
    box-sizing: border-box;
}

/* Modal container */
.solucao-modal {
    background: #fff;
    max-width: 840px;
    width: 100%;
    border-radius: 10px;
    overflow: visible;
    position: relative;
    box-shadow: 0 22px 56px rgba(10, 25, 41, 0.30);
}

.solucao-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #17212f;
    cursor: pointer;
    line-height: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(12, 31, 54, 0.10);
    z-index: 2;
}

.solucao-modal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(185px, 0.8fr);
    gap: 26px;
    align-items: start;
    padding: 30px 30px 0;
}

.solucao-modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.solucao-modal-title-icon {
    display: inline-flex;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 8px;
}

.solucao-modal-title-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.solucao-modal-title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.16;
    font-weight: 800;
    color: #0d2140;
}

.solucao-modal-subtitle {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    margin: 7px 0 0;
    padding: 0;
    color: #0e7d39;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    background: #d9f2db;
    border-radius: 5px;
}

.solucao-modal-excerpt {
    margin: 18px 0 0;
    color: #334155;
    font-size: 0.99rem;
    line-height: 1.55;
    max-width: 29rem;
}

.solucao-modal-hero-image {
    justify-self: end;
    width: 100%;
    max-width: 250px;
    margin-top: 2px;
}

.solucao-modal-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.solucao-modal-details {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(190px, 0.82fr);
    gap: 24px;
    padding: 18px 30px 12px;
    border-top: 1px solid #e9ecf2;
    align-items: start;
}

/* Protege páginas em cache geradas por versões anteriores do widget. */
.solucao-modal-benefits:not(:has(.solucao-modal-beneficios li)) {
    display: none;
}

.solucao-modal-details:not(:has(.solucao-modal-beneficios li, .solucao-modal-ideal)) {
    display: none;
}

.solucao-modal-benefits h3 {
    margin: 0 0 14px;
    color: #0d2140;
    font-size: 0.92rem;
    line-height: 1.2;
    font-weight: 700;
}

.solucao-modal-beneficios {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 13px;
}

.solucao-modal-beneficios li {
    display: grid;
    grid-template-columns: 16px 1fr;
    column-gap: 9px;
    align-items: start;
    color: #334155;
    font-size: 0.69rem;
    line-height: 1.35;
}

.solucao-modal-beneficios li strong,
.solucao-modal-beneficios li span {
    grid-column: 2;
}

.solucao-modal-beneficios li strong {
    color: #0d2140;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.solucao-modal-beneficios li span {
    margin-top: 2px;
    color: #526174;
    font-size: 0.66rem;
    line-height: 1.4;
}

.solucao-modal-beneficios li::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    width: 15px;
    height: 15px;
    margin-top: 0.15rem;
    border-radius: 50%;
    background: #d9f2db;
    box-shadow: inset 0 0 0 1px rgba(22, 122, 56, 0.15);
}

.solucao-modal-beneficios li::after {
    content: "";
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    width: 6px;
    height: 3px;
    border-left: 2px solid #1a7f3b;
    border-bottom: 2px solid #1a7f3b;
    transform: rotate(-45deg);
}

.solucao-modal-ideal {
    align-self: start;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 18px 16px;
    background: linear-gradient(180deg, #f7f9fe 0%, #f1f4fb 100%);
    border: 1px solid #e4eaf4;
    border-radius: 8px;
    text-align: center;
}

.solucao-modal-ideal .solucao-card-ideal-icon {
    width: 34px;
    height: 34px;
    color: #2c5fa6;
}

.solucao-modal-ideal h3 {
    margin: 0;
    color: #0d2140;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
}

.solucao-modal-ideal p {
    margin: 0;
    color: #31445d;
    font-size: 0.99rem;
    line-height: 1.45;
}

.solucao-modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 30px 26px;
}

.solucao-btn-primary,
.solucao-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0.7rem 1.15rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.15;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.solucao-btn-primary {
    background: #ffc20e;
    color: #123d72;
    box-shadow: 0 8px 18px rgba(255, 194, 14, 0.24);
    min-width: 166px;
}

.solucao-btn-primary:hover {
    background: #ffcb25;
    transform: translateY(-1px);
}

.solucao-btn-secondary {
    border: 1px solid #d5dbe6;
    background: #fff;
    color: #0d2140;
    min-width: 186px;
}

.solucao-btn-secondary:hover {
    border-color: #b9c4d4;
    transform: translateY(-1px);
}

.solucao-btn-secondary-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #25d366;
}

.solucao-btn-secondary-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.solucao-ecosistema {
    display: grid;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.solucao-ecosistema-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "filters filters filters"
        "search . sort";
    gap: 12px 16px;
    align-items: center;
}

.solucao-ecosistema-filters {
    grid-area: filters;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.solucao-filter-chip,
.solucao-order-select,
.solucao-search-input,
.solucao-load-more {
    font: inherit;
}

.solucao-filter-chip {
    min-height: 34px;
    padding: 0.45rem 0.88rem;
    border: 1px solid currentColor;
    background: transparent;
    line-height: 1;
    appearance: none;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.solucao-filter-chip:hover,
.solucao-filter-chip.is-active {
}

.solucao-ecosistema-sort {
    grid-area: sort;
    justify-self: end;
}

.solucao-ecosistema-search {
    grid-area: search;
    display: grid;
    width: 250px;
}
.solucao-search-field input{
    border: 0;
    font-size: 17px;
}
.solucao-search-field {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    align-items: center;
    height: 35px;
    border: 1px solid #e4e9f0;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.solucao-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 100%;
    padding: 0;
    color: #8290a3;
}

.solucao-search-icon svg {
    width: 26px;
    height: 21px;
    fill: currentColor;
}

.solucao-order-select,
.solucao-search-input {
    min-height: 42px;
    border: 1px solid #d7dce5;
    border-radius: 7px;
    background: #ffffff;
    color: #0d2140;
    padding: 0 14px;
    box-shadow: none;
    font-size: 0.82rem;
}

.solucao-order-select {
    min-width: 142px;
    min-height: 35px;
    padding: 0 8px;
    border-color: #e4e9f0;
    border-radius: 4px;
    color: #526178;
    font-size: 13px;
}

.solucao-search-input {
    width: 100%;
    min-height: 25px;
    border: 0;
    border-radius: 0;
    padding: 0 7px 0 0;
    background: transparent;
    color: #526178;
    font-size: 10px;
    line-height: 1.2;
}

.solucao-search-input::placeholder {
    color: #7f8a9d;
}

.solucao-search-input:focus {
    outline: none;
}

.solucao-search-field:focus-within {
    border-color: #c8d4e4;
}

.solucao-search-input::-webkit-search-decoration,
.solucao-search-input::-webkit-search-cancel-button,
.solucao-search-input::-webkit-search-results-button,
.solucao-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.solucao-search-input[type="search"] {
    appearance: none;
    border: 0;
}

.solucao-ecosistema-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    align-items: stretch;
}

.solucao-ecosistema-card {
    /* O catálogo usa uma versão compacta do card. O card único permanece inalterado. */
    --solucao-card-padding: 13px 12px 11px;
    --solucao-card-gap: 8px;
    --solucao-icon-size: 42px;
    --solucao-card-border-width: 1px;
    --solucao-card-radius: 7px;
    --solucao-card-border-color: #e6ebf2;
    --solucao-card-text-align: left;
    --solucao-card-align-items: stretch;
    --solucao-title-lines: 2;
    --solucao-excerpt-spacing-bottom: 0;
    --solucao-beneficios-spacing-bottom: 0;
    flex: 0 0 var(--solucao-card-max-width);
    max-width: var(--solucao-card-max-width);
    width: var(--solucao-card-max-width);
    min-height: 100%;
    background: #ffffff;
    justify-self: auto;
    margin: 0;
    padding: 17px;
}

.solucao-ecosistema-card .solucao-card-header {
    grid-template-columns: var(--solucao-icon-size) minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    margin-bottom: 14px;
}

.solucao-ecosistema-card .solucao-card-icon {
    border-radius: 8px;
    box-shadow: none;
}

.solucao-ecosistema-card .solucao-card-title {
    font-size: 15px !important;
    line-height: 1.22 !important;
}

.solucao-ecosistema-card .solucao-card-subtitle {
    margin-top: 2px;
    font-size: 11px !important;
}

.solucao-ecosistema-card .solucao-card-content {
    gap: 7px;
}

.solucao-ecosistema-card .solucao-card-excerpt {
    font-size: 15px !important;
    line-height: 1.42 !important;
}

.solucao-ecosistema-card .solucao-card-beneficios {
    gap: 5px;
}

.solucao-ecosistema-card .solucao-card-beneficios li {
    grid-template-columns: 13px minmax(0, 1fr);
    gap: 4px;
    padding-bottom: 0;
    border: 0;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.solucao-ecosistema-card .solucao-card-benefit-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
}

/* O bloco "Ideal para" pertence ao modal; no catálogo ele quebra a escala do grid. */
.solucao-ecosistema-card .solucao-card-ideal {
    display: none;
}

.solucao-ecosistema-card .solucao-modal-open {
    justify-content: flex-start;
    width: auto;
    min-height: 0;
    margin-top: auto;
    padding: 3px 0 0;
    border-radius: 0;
    background: transparent;
    color: #0a74ad;
    font-size: 12px !important;
    font-weight: 700;
    margin-top: 14px;
    margin-bottom: 14px;
}

.solucao-ecosistema-card .solucao-modal-open:hover {
    background: transparent;
    color: #045f90;
    box-shadow: none;
}

.solucao-ecosistema-empty {
    color: #526174;
    text-align: center;
    padding: 10px 0 4px;
}

.solucao-ecosistema-footer {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.solucao-load-more {
    min-width: 230px;
    min-height: 38px;
    border: 1px solid #d7dce5;
    border-radius: 4px;
    background: #ffffff;
    color: #0a74ad;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.solucao-load-more:hover {
    border-color: #0a74ad;
    color: #045f90;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(234, 75, 122, 0.12);
}

.solucao-load-more.is-loading,
.solucao-ecosistema.is-loading .solucao-search-input,
.solucao-ecosistema.is-loading .solucao-order-select {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .solucao-ecosistema {
        gap: 10px;
    }

    .solucao-ecosistema-toolbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "filters"
            "search"
            "sort";
    }

    .solucao-ecosistema-sort {
        width: 100%;
        justify-self: stretch;
    }

    .solucao-ecosistema-search {
        width: 100%;
    }

    .solucao-order-select {
        width: 100%;
    }

    .solucao-card {
        max-width: 100%;
        --solucao-icon-size: clamp(72px, 24vw, 96px);
    }

    .solucao-ecosistema-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .solucao-ecosistema-card {
        width: 100%;
        max-width: 100%;
        flex-basis: auto;
    }

    .solucao-card-header {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.55rem;
    }

    .solucao-card-icon {
        justify-self: center;
    }

    .solucao-card-heading {
        text-align: center;
        justify-self: center;
    }

    .solucao-card-title {
        text-align: center;
    }

    .solucao-card-excerpt {
        text-align: center;
    }

    .solucao-modal-hero,
    .solucao-modal-details {
        grid-template-columns: 1fr;
    }

    .solucao-modal-hero {
        padding: 28px 20px 18px;
    }

    .solucao-modal-hero-copy {
        order: 0;
    }

    .solucao-modal-details {
        padding: 18px 20px 10px;
    }

    .solucao-modal-actions {
        padding: 14px 20px 24px;
        gap: 10px;
    }

    .solucao-modal-hero-image {
        max-width: 140px;
        justify-self: start;
        order: 1;
    }

    .solucao-modal-title {
        font-size: 1.35rem;
    }

    .solucao-modal-title-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .solucao-modal-excerpt {
        max-width: none;
    }
}
