/* ============================================
   AGENTS PAGE CSS
   Clean, modern design for agent listing
============================================ */

:root {
    --hc-navy: #001f49;
    --hc-sky: #00aeef;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --radius: 16px;
}

.agents-page {
    background: var(--bg);
    min-height: 100vh;
}

/* ============================================
   HERO SECTION
============================================ */
.agents-hero {
    position: relative;
    background: linear-gradient(135deg, var(--hc-navy) 0%, #003366 100%);
    padding: 60px 0 80px;
    overflow: hidden;
}

.agents-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 174, 239, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 174, 239, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.agents-hero .hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 174, 239, 0.2);
    color: var(--hc-sky);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-badge i {
    font-size: 14px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--hc-sky);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 32px;
}

/* Search Form */
.search-form {
    margin-bottom: 32px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.search-icon {
    padding-left: 16px;
    color: var(--text-muted);
    font-size: 20px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 16px;
    outline: none;
    background: transparent;
    min-width: 0;
}

.search-input::placeholder {
    color: #94a3b8;
}

.sort-select {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    outline: none;
    min-width: 160px;
}

.sort-select:focus {
    border-color: var(--hc-sky);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--hc-navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--hc-sky);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   AGENTS SECTION
============================================ */
.agents-section {
    padding: 48px 0 80px;
}

.search-result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.search-result-info p {
    margin: 0;
    color: var(--text-muted);
}

.clear-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.clear-search:hover {
    opacity: 0.8;
}

/* Agent Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Agent Card */
.agent-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.agent-card:hover .view-profile {
    color: var(--hc-sky);
}

.agent-card:hover .view-profile i {
    transform: translateX(4px);
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.agent-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex: 1;
}

.agent-name {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.agent-position {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--hc-sky);
    font-weight: 600;
}

.agent-office {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.agent-office i {
    font-size: 12px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.view-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--hc-navy);
    transition: color 0.2s;
}

.view-profile i {
    transition: transform 0.2s;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: var(--text);
}

.empty-state p {
    margin: 0 0 24px;
    color: var(--text-muted);
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--hc-navy);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: var(--hc-sky);
    color: #fff;
}

/* Pagination */
.pagination-nav {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination-nav .pagination {
    gap: 8px;
}

.pagination-nav .page-link {
    border-radius: 10px !important;
    border: 2px solid var(--border);
    padding: 10px 16px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s ease;
}

.pagination-nav .page-link:hover {
    background: var(--hc-sky);
    border-color: var(--hc-sky);
    color: #fff;
}

.pagination-nav .page-item.active .page-link {
    background: #00aeef !important;
    border-color: #00aeef !important;
    color: #fff !important;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--hc-navy);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--hc-sky);
    transform: translateY(-4px);
}

.scroll-top-btn i {
    font-size: 20px;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .agents-hero {
        padding: 40px 0 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .search-icon {
        display: none;
    }

    .search-input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid var(--border);
        border-radius: 10px;
    }

    .sort-select {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 12px;
    }

    .agents-section {
        padding: 32px 0 60px;
    }

    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card-content {
        padding: 14px;
    }

    .agent-name {
        font-size: 0.95rem;
    }

    .agent-position {
        font-size: 12px;
    }

    .agent-office {
        font-size: 11px;
    }

    .card-footer {
        padding: 12px 14px;
    }

    .view-profile {
        font-size: 12px;
    }

    .search-result-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .scroll-top-btn {
        bottom: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

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

    .card-image {
        padding-top: 100%;
    }

    .card-content {
        padding: 12px;
    }

    .agent-name {
        font-size: 0.85rem;
    }
}
