@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.agents-section {
    padding: 48px 0 54px;
    background: #f7f7f7;
    font-family: 'Poppins', sans-serif;
}

.agents-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 64px;
}

.agents-header {
    text-align: center;
    margin-bottom: 34px;
}

.agents-title {
    font-size: 32px;
    font-weight: 500;
    color: #28161a;
    margin: 0;
    line-height: 1.16;
}

.title-highlight {
    color: #c74444;
}

.title-city {
    color: #261518;
}

.agents-carousel-wrap {
    position: relative;
}

.agents-track {
    display: flex;
    scroll-behavior: smooth;
    overflow: hidden;
}

.agents-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: #ffffff;
    color: #7b2ab0;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.agents-nav:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.agents-nav-prev {
    left: -24px;
}

.agents-nav-next {
    right: -24px;
}

.agents-nav.agents-hidden {
    opacity: 0;
    pointer-events: none;
}

.agents-grid {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
    min-width: 0;
}

.agent-card {
    min-width: 0;
    min-height: 132px;
    height: auto;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 5px;
    padding: 10px 14px 10px;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.agent-card:hover,
.agent-card:focus-visible {
    border-color: #cfcfcf;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.agent-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.agent-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: 0 0 44px;
    background: #ffffff;
    border: 1px solid #dddddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.agent-logo span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.agent-logo-red span { background: linear-gradient(135deg, #e32f2f, #8b1f1f); }
.agent-logo-teal span { background: linear-gradient(135deg, #74c6c9, #3c91a0); }
.agent-logo-maroon span { background: linear-gradient(135deg, #b9202d, #7c1b22); }
.agent-logo-brown span { background: linear-gradient(135deg, #b77b51, #7d4b30); }
.agent-logo-black span { background: linear-gradient(135deg, #111111, #3d3d3d); }
.agent-logo-ink span { background: linear-gradient(135deg, #151515, #646464); }
.agent-logo-gold span { background: linear-gradient(135deg, #d7b85e, #a88a38); }

.agent-info {
    min-width: 0;
    flex: 1;
}

.agent-name {
    font-size: 17px;
    font-weight: 500;
    color: #2a2a2a;
    margin: 0 0 2px;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-location {
    font-size: 12px;
    color: #707070;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding-left: 56px;
    min-height: 30px;
    width: calc(100% - 56px);
    box-sizing: border-box;
}

.stat-item {
    min-width: 0;
    flex: 1 1 0;
    display: block;
    color: #707070;
    line-height: 1.2;
}

.stat-num {
    display: inline;
    font-size: 12px;
    font-weight: 700;
    color: #272727;
    margin-right: 4px;
}

.stat-label {
    display: inline;
    font-size: 12px;
    font-weight: 400;
    color: #707070;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: #dddddd;
    margin: 0 14px;
    flex: 0 0 1px;
}

.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    overflow: visible;
    min-height: 20px;
}

.tag {
    display: inline-flex;
    align-items: center;
    max-width: 116px;
    height: 20px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 400;
    color: #666666;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-more {
    border-color: #a8d2ff;
    background: #eff7ff;
    color: #096edb;
    font-weight: 500;
}

.agents-bottom-link {
    text-align: center;
    margin-top: 30px;
}

.agents-bottom-link a {
    color: #245df1;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agents-bottom-link a:hover {
    color: #1747ce;
}

.agents-bottom-link a i {
    font-size: 16px;
}

@media (max-width: 1199px) {
    .agents-container {
        padding: 0 28px;
    }

    .agents-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }

    .agents-nav-prev { left: -8px; }
    .agents-nav-next { right: -8px; }
}

@media (max-width: 767px) {
    .agents-section {
        padding: 38px 0 42px;
    }

    .agents-container {
        padding: 0 16px;
    }

    .agents-title {
        font-size: 25px;
    }

    .agents-header {
        margin-bottom: 24px;
    }

    .agents-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .agents-nav {
        display: none;
    }

    .agent-card {
        min-height: 132px;
    }

    .agent-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .agent-logo span {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .agent-name {
        font-size: 16px;
    }

    .agent-location,
    .stat-num,
    .stat-label,
    .tag {
        font-size: 13px;
    }

    .agent-stats {
        padding-left: 56px;
    }

    .stat-item {
        min-width: 0;
    }

    .stat-divider {
        margin: 0 12px;
    }

    .agents-bottom-link a {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .agent-stats {
        padding-left: 0;
    }

    .tag {
        padding: 0 8px;
    }
}


