/* =============================================================================
BADGE STYLES
============================================================================= */

.top-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.8rem;
    border-radius: var(--border-radius-p-2);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 2.5 !important;
    color: var(--color-black);
}

.top-badge-overall {
    background: #24433a;
    color: var(--color-white);
}

.top-badge-value {
    background: #d2f2d7;
}

.top-badge-smb {
    background: #c6e8e3;
}

.top-badge-enterprise {
    background: #e4f6d9;
}

.top-badge-midmarket {
    background: #cbe1f3;
}

.top-badge-default {
    background: var(--color-gray-light);
    color: var(--color-black);
}

.top-companies-quick-list .top-badge-overall {
    order: 2;
}

/* =============================================================================
SECTION 4: SUPPLIER CARDS WITH FILTERS
============================================================================= */
.supplier-cards-col {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-companies-cards {
    padding: 4rem 0;
}

.top-companies-cards .section-header {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 5rem;
    max-width: var(--max-width-50);
}

.top-companies-cards .section-header-left {
    flex: 0 0 75%;
}

.top-companies-cards .section-header-right {
    flex: 0 0 25%;
    display: flex;
    justify-content: flex-end;
}

.top-companies-cards .section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.top-companies-card .key-differentiators li:empty {
    display: none;
}

.top-company-card-rank-reason {
    margin: 1rem 0 0 !important;
    padding: 1rem 1.25rem;
    background: #f3f9f7;
    border-radius: var(--border-radius-p);
}

.top-company-card-rank-reason.is-in-card {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.top-company-card-rank-reason-section,
.top-company-card-buyer-fit,
.top-company-card-buyer-fit-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.top-company-card-buyer-fit {
    gap: 1.3rem;
}

.top-company-card-rank-reason-label {
    color: var(--text-link);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    margin: 0 !important;
    padding: 0;
    text-transform: uppercase;
}

.top-company-card-rank-reason p:not(.top-company-card-rank-reason-label) {
    color: #32483f;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    padding: 0;
}

.filter-switcher {
    align-items: center;
    gap: 2rem;
}

.no-results-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-results-message a {
    color: var(--color-primary);
}

.supplier-card-container-0>.supplier-card>.col>.col>.vc_column-inner>.wpb_wrapper>.img-with-aniamtion-wrap:before,
.supplier-card-container-1>.supplier-card>.col>.col>.vc_column-inner>.wpb_wrapper>.img-with-aniamtion-wrap:before,
.supplier-card-container-2>.supplier-card>.col>.col>.vc_column-inner>.wpb_wrapper>.img-with-aniamtion-wrap:before {
    content: none;
}

.card-match-score {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    background: #e5f7da;
    padding: 0.4rem 0.7rem;
}

.card-match-score span {
    font-size: 1.2rem;
}

.card-name h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 0;
}

.card-action-row {
    right: 5rem;
}

#clear-filters {
    margin: 1.5rem auto !important;
}

@media (max-width: 640px) {

    .card-name h2 {
        font-size: 2.2rem;
    }

    .project-filters-container .filter-dropdown {
        display: flex;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-switcher {
        flex-wrap: wrap;
    }

    .filter-switcher .view-switcher-btn[data-view="half"] {
        display: none;
    }

    .filter-switcher .find-a-supplier {
        width: 100% !important;
        order: 2;
        height: 44px !important;
    }

    .card-match-score span {
        font-size: 1.2rem;
        line-height: 1.7;
    }

}

/* =============================================================================
RUNNERS-UP SECTION
============================================================================= */

.runners-up-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light, #e5e7eb);
}

.runners-up-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.runners-up-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.runners-up-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.runners-up-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.6rem 1rem 1.2rem;
    background: #fff;
    box-shadow: 0 3px 16px rgba(37, 40, 39, 0.08);
    border-radius: var(--border-radius-p-2, 0.75rem 0.75rem 0.75rem 0);
    text-decoration: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.runners-up-item:hover {
    box-shadow: 0 3px 16px rgba(37, 40, 39, 0.16);
}

.runners-up-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 100%;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.8);
}

.runners-up-name {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.runners-up-score {
    font-size: 1.1rem;
    color: var(--text-link);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .runners-up-grid {
        grid-template-columns: 1fr;
    }

    .runners-up-title {
        font-size: 1.5rem;
    }
}
