/* 推荐专家列表页 */
.expert-page {
    padding-bottom: 48px;
}

.expert-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 600px;
    max-width: 100%;
    margin: 0 auto 28px;
    padding: 2px 2px 2px 18px;
    border: 1px solid #C31C25;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.expert-search .search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #C31C25;
}

.expert-search .search-icon svg {
    width: 18px;
    height: 18px;
}

.expert-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
}

.expert-search-input::placeholder {
    color: #bbb;
}

.expert-search .search-clear {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.expert-search .search-clear:hover {
    color: var(--text-secondary);
    background: #f5f5f5;
}

.expert-search .search-submit {
    flex-shrink: 0;
    min-width: 88px;
    height: 40px;
    padding: 0 24px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.expert-search .search-submit:hover {
    background: var(--primary-dark);
}

.expert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 20px;
    justify-content: center;
}

.expert-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 18px 20px;
    border: 1px solid #ececec;
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.expert-card:hover {
    border-color: rgba(200, 17, 31, 0.18);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.expert-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0ece8 center/cover no-repeat;
}

.expert-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.expert-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.expert-card-head strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.expert-card-title {
    font-size: 13px;
    color: var(--text-muted);
}

.expert-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.expert-card-dept {
    margin: 6px 0 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expert-card-cert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 12px;
}

.expert-card-cert svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.expert-empty {
    grid-column: 1 / -1;
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.expert-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.expert-pagination a,
.expert-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}

.expert-pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.expert-pagination .current {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.expert-pagination .ellipsis {
    border: none;
    min-width: auto;
    padding: 0 4px;
}

@media (max-width: 1200px) {
    .expert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .expert-grid {
        grid-template-columns: minmax(0, 600px);
    }

    .expert-card {
        width: 100%;
    }

    .expert-search {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .expert-card {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .expert-card-avatar {
        width: 56px;
        height: 56px;
    }

    .expert-search .search-submit {
        min-width: 72px;
        padding: 0 16px;
    }
}

/* 跟随门户 1280 最小宽度，低分辨率下不再压缩专家卡片布局 */
@media (max-width: 1279px) {
    .expert-grid {
        grid-template-columns: repeat(2, minmax(0, 600px));
    }

    .expert-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 14px;
        padding: 18px 20px;
    }

    .expert-card-avatar {
        width: 72px;
        height: 72px;
    }

    .expert-search .search-submit {
        min-width: 88px;
        padding: 0 24px;
    }
}
