/* ==========================================================================
   SPECIALISTS SEARCH PAGE
   ========================================================================== */

.experts-catalog-page {
    background: #FFFFFF;
}


/* ==========================================================================
   CATALOG
   ========================================================================== */

.experts-catalog {
    padding: 64px 0 100px;
}


/* ==========================================================================
   FILTERS
   ========================================================================== */

.experts-filters {
    display: flex;
    flex-direction: column;
    gap: 32px;

    margin-bottom: 48px;
}


/* ==========================================================================
   FILTER GROUP
   ========================================================================== */

.experts-filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.experts-filters-label {
    color: #64748b;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.01em;
}


/* ==========================================================================
   FILTER OPTIONS
   ========================================================================== */

.experts-filter-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================================
   FILTER BUTTON
   ========================================================================== */

.experts-filter {
    position: relative;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.experts-filter:hover {
    color: #1d4ed8;
    background: #f1f5f9;
}

/* ==========================================================================
   TYPE FILTERS
   ========================================================================== */

.experts-filter-options:has(.experts-filter[data-type]) {
    width: fit-content;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 13px;
}

.experts-filter[data-type] {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition:
            background-color 0.18s ease,
            color 0.18s ease,
            box-shadow 0.18s ease;
}

.experts-filter[data-type]:hover {
    background: transparent;
    color: #334155;
}

.experts-filter[data-type].active {
    background: #ffffff;
    color: #0f172a;
    box-shadow:
            0 1px 2px rgba(15, 23, 42, 0.06),
            0 1px 3px rgba(15, 23, 42, 0.04);
}


/* ==========================================================================
   CATEGORY FILTERS
   ========================================================================== */

.experts-filter[data-category] {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition:
            background-color 0.18s ease,
            border-color 0.18s ease,
            color 0.18s ease
}

.experts-filter[data-category]:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
}

.experts-filter[data-category].active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

/* ==========================================================================
   RESULTS HEADING
   ========================================================================== */

.experts-results-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 8px;
}

.experts-results-heading h2 {
    margin: 0 0 5px;
    color: var(--primary);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
    font-weight: 600;
}

.experts-results-heading p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
    line-height: 1.5;
}


/* ==========================================================================
   GRID
   ========================================================================== */

.experts-catalog .experts-grid {
    padding: 20px 0 0;
}


/* ==========================================================================
   CARD LINKS
   ========================================================================== */

.experts-catalog .expert-avatar {
    text-decoration: none;
}

.experts-catalog .expert-main-info h3 a {
    color: inherit;
    text-decoration: none;
}

.experts-catalog .expert-main-info h3 a:hover {
    color: var(--primary);
}

.experts-catalog .expert-more {
    cursor: pointer;
}


/* ==========================================================================
   LOAD ERROR
   ========================================================================== */

.experts-load-error {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.experts-load-error h3 {
    margin: 0 0 8px;

    color: #1e293b;

    font-size: 17px;
    font-weight: 600;
}

.experts-load-error p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
}


/* ==========================================================================
   EMPTY
   ========================================================================== */

.experts-empty {
    padding: 56px 24px;

    text-align: center;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.experts-empty h3 {
    margin: 0 0 8px;

    color: #0f172a;

    font-size: 20px;
    font-weight: 600;
}

.experts-empty p {
    margin: 0;

    color: #64748b;

    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {

    .experts-catalog {
        padding: 48px 0 80px;
    }

    .experts-filters {
        gap: 24px;
        margin-bottom: 40px;
    }

    .experts-results-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 768px) {

    .experts-catalog {
        padding: 36px 0 64px;
    }

    .experts-filters {
        gap: 20px;
        margin-bottom: 32px;
    }

    .experts-filter-options:has(.experts-filter[data-type]) {
        width: 100%;
    }

    .experts-filter-group {
        align-items: flex-start;
    }

    .experts-filters-label {
        text-align: left;
    }

    .experts-filter-options {
        justify-content: flex-start;
    }

    .experts-results-heading h2 {
        font-size: 1.8rem;
    }

    .experts-results-heading p {
        font-size: 13px;
    }

    .experts-catalog .experts-grid {
        padding-top: 16px;
    }

    .experts-empty,
    .experts-load-error {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {

    .experts-catalog {
        padding: 28px 0 48px;
    }

    .experts-filters {
        gap: 16px;
        margin-bottom: 24px;
    }

    .experts-filter-options {
        gap: 8px;
    }

    .experts-filter,
    .experts-filter[data-type],
    .experts-filter[data-category] {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .experts-results-heading h2 {
        font-size: 1.5rem;
    }

    .experts-results-heading p {
        font-size: 12px;
    }

    .experts-empty {
        padding: 32px 16px;
    }

    .experts-empty h3 {
        font-size: 18px;
    }

    .experts-empty p {
        font-size: 14px;
    }

    .experts-load-error {
        padding: 32px 16px;
    }
}