﻿@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

.agents-page {
    --navy: #071b2d;
    --navy-light: #0c2940;
    --green: #0d5c4a;
    --green-light: #13745e;
    --white: #ffffff;
    --background: #f4f7f6;
    --text: #17252f;
    --muted: #71808a;
    --border: #e2e9e6;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: "Vazirmatn", sans-serif;
}

.agents-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.agents-hero {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    padding: 55px 0 85px;
    color: var(--white);
}

    .agents-hero .agents-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
    }

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    margin-bottom: 15px;
}

.hero-content h1 {
    margin: 0 0 12px;
    font-size: clamp(27px, 4vw, 42px);
    font-weight: 800;
}

.hero-content p {
    margin: 0;
    color: #c7d5dc;
    font-size: 15px;
    line-height: 2;
}

.hero-stat {
    min-width: 145px;
    padding: 20px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

    .hero-stat strong {
        display: block;
        font-size: 30px;
        color: #fff;
    }

    .hero-stat span {
        color: #b8c9d1;
        font-size: 13px;
    }

.agents-filter {
    position: relative;
    z-index: 5;
    margin-top: -38px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 190px 220px auto;
    gap: 10px;
    align-items: center;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(7, 27, 45, 0.12);
}

.filter-search,
.filter-city,
.filter-sort {
    position: relative;
}

    .filter-search input,
    .filter-city select,
    .filter-sort select {
        width: 100%;
        height: 52px;
        box-sizing: border-box;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: #fafcfb;
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        transition: .2s;
    }

    .filter-search input {
        padding: 0 45px 0 15px;
    }

    .filter-city select,
    .filter-sort select {
        padding: 0 14px;
    }

        .filter-search input:focus,
        .filter-city select:focus,
        .filter-sort select:focus {
            border-color: var(--green);
            background: #fff;
        }

.search-icon {
    position: absolute;
    right: 16px;
    top: 13px;
    font-size: 22px;
    color: var(--green);
}

.filter-button {
    height: 52px;
    padding: 0 25px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

    .filter-button:hover {
        background: var(--green-light);
        transform: translateY(-1px);
    }

.clear-filter {
    grid-column: 1 / -1;
    width: fit-content;
    color: var(--green);
    font-size: 12px;
    text-decoration: none;
    padding: 4px 6px;
}

.agents-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 45px 0 22px;
    gap: 20px;
}

    .agents-header h2 {
        margin: 0 0 5px;
        font-size: 23px;
        color: var(--navy);
    }

    .agents-header span {
        color: var(--muted);
        font-size: 12px;
    }

.current-sort {
    padding: 8px 13px;
    border-radius: 8px;
    background: #e8f0ed;
    color: var(--green) !important;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.agent-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    transition: .25s;
}

    .agent-card:hover {
        transform: translateY(-5px);
        border-color: #cbdad5;
        box-shadow: 0 18px 45px rgba(7, 27, 45, 0.1);
    }

.agent-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 18px;
    overflow: hidden;
    background: #e5eeeb;
}

    .agent-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: #fff;
    font-size: 27px;
    font-weight: 700;
}

.agent-main-info {
    min-width: 0;
}

    .agent-main-info h3 {
        margin: 0 0 7px;
        color: var(--navy);
        font-size: 17px;
        font-weight: 700;
    }

.agent-city,
.experience {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
}

.agent-city {
    margin-left: 8px;
}

    .agent-city span {
        color: var(--green);
        font-size: 14px;
    }

.experience {
    padding-right: 8px;
    border-right: 1px solid var(--border);
}

.agent-bio {
    height: 66px;
    margin: 18px 0;
    color: #65747d;
    font-size: 12px;
    line-height: 2;
    overflow: hidden;
}

.property-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f5f8f7;
    border-radius: 13px;
    padding: 13px 5px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-left: 1px solid var(--border);
}

    .stat-item:last-child {
        border-left: 0;
    }

    .stat-item strong {
        color: var(--navy);
        font-size: 18px;
    }

    .stat-item span {
        color: var(--muted);
        font-size: 10px;
    }

.agent-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 17px;
}

.agent-views {
    color: #89959b;
    font-size: 10px;
}

.agent-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 9px;
    background: var(--navy);
    color: #fff;
    font-size: 11px;
    text-decoration: none;
    transition: .2s;
}

    .agent-button:hover {
        background: var(--green);
    }

    .agent-button span {
        font-size: 14px;
    }

.empty-agents {
    margin: 50px 0;
    padding: 70px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.empty-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf1ef;
    color: var(--green);
    font-size: 27px;
}

.empty-agents h3 {
    margin: 0 0 8px;
    color: var(--navy);
}

.empty-agents p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.empty-agents a {
    display: inline-block;
    padding: 10px 17px;
    border-radius: 9px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 40px 0 60px;
}

    .pagination a {
        min-width: 36px;
        height: 36px;
        padding: 0 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        border-radius: 9px;
        background: #fff;
        border: 1px solid var(--border);
        color: var(--navy);
        font-size: 12px;
        text-decoration: none;
    }

        .pagination a.active {
            background: var(--green);
            color: #fff;
            border-color: var(--green);
        }

        .pagination a:hover {
            border-color: var(--green);
        }

    .pagination .page-arrow {
        font-size: 17px;
    }

@media (max-width: 1000px) {
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agents-filter {
        grid-template-columns: 1fr 1fr;
    }

    .filter-button {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .agents-container {
        width: min(100% - 24px, 600px);
    }

    .agents-hero {
        padding: 40px 0 70px;
    }

        .agents-hero .agents-container {
            flex-direction: column;
            align-items: flex-start;
        }

    .hero-stat {
        width: 100%;
        box-sizing: border-box;
    }

    .agents-filter {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .clear-filter {
        grid-column: auto;
    }

    .agents-grid {
        grid-template-columns: 1fr;
    }

    .agents-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .current-sort {
        width: fit-content;
    }
}

@media (max-width: 430px) {
    .agents-container {
        width: calc(100% - 20px);
    }

    .agent-card {
        padding: 15px;
    }

    .agent-avatar {
        width: 62px;
        height: 62px;
        min-width: 62px;
    }

    .agent-city {
        display: flex;
    }

    .experience {
        display: flex;
        margin-top: 5px;
        padding-right: 0;
        border-right: 0;
    }
}
