/* ==========================================================================
   SPECIALISTS SEARCH PAGE
   ========================================================================== */
.experts-catalog-page {
    background: #FFFFFF;
}

.page-wrapper {
    min-height: 100vh;
}

/* ==========================================================================
   CATALOG
   ========================================================================== */
.experts-catalog {
    padding: 32px 0 56px;
    background-color: var(--white);
}

.experts-catalog .experts-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0;
}

.experts-catalog > .experts-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.experts-search-container h1 {
    margin: 0 0 14px;
    text-align: left;
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    line-height: 1.3;
    letter-spacing: -0.025em;
    font-weight: 550;
    color: var(--primary);
}

.experts-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.experts-title-row h1 {
    margin: 0;
}

.experts-title-row .specialist-count {
    margin-left: auto;
}

.experts-results-heading .btn-filter-trigger {
    display: none;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.experts-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}


/* ==========================================================================
   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 p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.specialist-count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.specialist-count strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.specialist-count span {
    font-size: 12px;
    font-weight: 550;
    line-height: 1;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.vacancies-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

/* ==========================================================================
   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 — TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .experts-catalog {
        padding: 28px 0 48px;
    }

    .experts-catalog > .experts-search-container {
        padding-right: 24px;
        padding-left: 24px;
    }

    .experts-layout,
    .vacancies-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 22px;
    }

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

    .experts-filter-group {
        gap: 12px;
    }

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

    .experts-filter,
    .experts-filter[data-type],
    .experts-filter[data-category] {
        font-size: 13px;
    }
}


/* ==========================================================================
   RESPONSIVE — SMALL TABLET
   ========================================================================== */

@media (max-width: 800px) {
    .experts-catalog {
        padding-top: 24px;
    }

    .experts-layout,
    .vacancies-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .experts-filters {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 24px;
        margin-bottom: 8px;
    }

    .experts-filter-group {
        align-items: flex-start;
        gap: 10px;
        min-width: 0;
    }

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

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


/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 600px) {
    .experts-catalog {
        padding: 20px 0 36px;
    }

    .experts-catalog > .experts-search-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .experts-search-container h1 {
        font-size: 24px;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }

    .experts-title-row {
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
    }

    .experts-title-row h1 {
        min-width: 0;
        font-size: 24px;
    }

    .specialist-count {
        min-height: 30px;
        padding: 6px 9px;
        border-radius: 11px;
        font-size: 12px;
    }

    .specialist-count strong {
        font-size: 13px;
    }

    .specialist-count span {
        font-size: 11px;
    }

    /*
     * На мобильном фильтры открываются через кнопку
     * и выезжающую панель.
     */
    .experts-layout > .experts-filters {
        display: none;
    }

    .experts-results-heading {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

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

    .experts-results-heading .btn-filter-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        gap: 8px;
        min-height: 42px;
        max-width: 100%;
        padding: 0 16px;
        border-radius: 12px;
    }

    .experts-filters {
        gap: 22px;
    }

    .experts-filter-group {
        width: 100%;
        gap: 10px;
    }

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

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

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

    .experts-load-error {
        padding: 36px 18px;
        border-radius: 14px;
    }

    .experts-load-error h3 {
        font-size: 16px;
    }

    .experts-empty {
        padding: 36px 18px;
        border-radius: 14px;
    }

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

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

    /*!* Плавающая кнопка открытия фильтров *!*/
    /*.experts-results-heading .btn-filter-trigger {*/
    /*    position: fixed;*/
    /*    right: 16px;*/
    /*    bottom: 24px;*/
    /*    top: auto;*/
    /*    z-index: 900;*/
    /*    display: inline-flex;*/
    /*    align-items: center;*/
    /*    justify-content: center;*/
    /*    width: 48px;*/
    /*    height: 48px;*/
    /*    padding: 0;*/
    /*    transform: none;*/
    /*    border: 1px solid rgba(37, 99, 235, 0.08);*/
    /*    border-radius: 12px;*/
    /*    background: var(--white);*/
    /*    color: var(--primary-light);*/
    /*    box-shadow: 0 3px 16px rgba(37, 99, 235, 0.18);*/
    /*    cursor: pointer;*/
    /*}*/

    /*.experts-results-heading .btn-filter-trigger span {*/
    /*    display: none;*/
    /*}*/

    /*.experts-results-heading .btn-filter-trigger .btn-filter-icon {*/
    /*    width: 22px;*/
    /*    height: 22px;*/
    /*    filter: none;*/
    /*}*/

    /*.experts-results-heading .btn-filter-trigger:hover {*/
    /*    transform: none;*/
    /*    background: var(--primary-light);*/
    /*}*/
}

/* ==========================================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================================== */

@media (max-width: 380px) {
    .experts-catalog > .experts-search-container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .experts-title-row {
        gap: 8px;
    }

    .experts-title-row h1 {
        font-size: 22px;
    }

    .specialist-count {
        padding-right: 7px;
        padding-left: 7px;
    }

    .experts-filter,
    .experts-filter[data-type],
    .experts-filter[data-category] {
        padding-right: 10px;
        padding-left: 10px;
    }
}
