/* ============================================
   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 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

.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: 56px 0 64px;
    overflow: hidden;
}

.agents-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300aeef' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    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.12);
    color: var(--hc-sky);
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 174, 239, 0.2);
}

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

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 32px;
    font-weight: 400;
}

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

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

.search-icon {
    padding-left: 16px;
    color: #94a3b8;
    font-size: 18px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: transparent;
    min-width: 0;
    color: var(--text);
}

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

.sort-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    min-width: 150px;
    margin-right: 6px;
    transition: border-color 0.2s;
}

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

.search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: var(--hc-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

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

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

.stat-item {
    text-align: center;
    padding: 0 28px;
}

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

.stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

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

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

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

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

.clear-search:hover {
    opacity: 0.7;
    color: #ef4444;
}

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

/* Agent Card */
.agent-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 31, 73, 0.12);
    border-color: transparent;
}

.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: 110%;
    background: linear-gradient(145deg, #f0f4f8, #e2e8f0);
    overflow: hidden;
}

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

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

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

.agent-name {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

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

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

.agent-office i {
    font-size: 11px;
    color: #94a3b8;
}

.card-footer {
    padding: 14px 18px;
    border-top: 1px solid #f1f5f9;
}

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

.view-profile i {
    transition: transform 0.2s;
    font-size: 14px;
}

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

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

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    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: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s;
}

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

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

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

.pagination-nav .page-link {
    border-radius: 8px !important;
    border: 1.5px solid var(--border);
    padding: 9px 15px;
    font-weight: 600;
    font-size: 14px;
    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: var(--hc-navy) !important;
    border-color: var(--hc-navy) !important;
    color: #fff !important;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--hc-navy);
    color: #fff;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 31, 73, 0.25);
    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(-3px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.3);
}

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

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

    .hero-badge {
        font-size: 10px;
        padding: 6px 12px;
        margin-bottom: 16px;
    }

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

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

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

    .search-icon {
        display: none;
    }

    .search-input {
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
    }

    .sort-select {
        width: 100%;
        margin-right: 0;
    }

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

    .hero-stats {
        gap: 0;
    }

    .stat-item {
        padding: 0 16px;
    }

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

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

    .stat-divider {
        height: 28px;
    }

    .agents-section {
        padding: 24px 0 6rem;
    }

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

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

    .card-content {
        padding: 12px;
    }

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

    .agent-position {
        font-size: 11px;
        margin-bottom: 4px;
    }

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

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

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

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

    .scroll-top-btn {
        bottom: 6rem;
        right: 12px;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

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

    .agent-card:hover {
        transform: none;
        box-shadow: none;
    }

    .agent-card:hover .card-image img {
        transform: none;
    }
}

/* ============================================
   RESPONSIVE - Small phones
============================================ */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.4rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 0;
    }

    .stat-divider {
        display: none;
    }

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

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

    .agents-grid {
        gap: 10px;
    }

    .card-content {
        padding: 10px;
    }

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

    .card-footer {
        padding: 8px 10px;
    }
}
