/* Эксперты НЭН: каталог /eksperty/, страница эксперта, плашки-бейджи.
   Отдельный файл: index.min.css и article.min.css правятся вручную.
   Подключается бандлом ExpertAsset.

   Язык — тот же, что у живого сайта и баннеров продуктов (nen-banners.css):
   карточка повторяет врезку .note статьи — белый фон, обводка
   inset 0 0 0 1.3px #33343A, радиус 8px; заголовки Cera Round, текст Montserrat.
   Плашки — плоские, из фирменной палитры (Визуал/Лого-клуб, club/web/brand.css):
   тёмный #333439, оранжевый #FC6025, синий #6684FF, розовый #FFCDD9.
   Красного нет намеренно: статус эксперта не бывает тревожным.
   Тёмная сцена шапки — .bg-block рубрики (#33343a), как у страницы автора. */

.nen-eksperty {
    --ek-ink: #33343a;
    --ek-muted: #79697d;
    --ek-line: #bdb3bf;
    --ek-pale: #e9e6ea;
    --ek-dark: #333439;
    --ek-orange: #fc6025;
    --ek-blue: #6684ff;
    --ek-pink: #ffcdd9;
    --ek-action: #3327ad;
    --ek-action-hover: #271e85;

    position: relative;
    color: var(--ek-ink);
    padding-bottom: 40px;
}

.nen-eksperty *,
.nen-expert-badge {
    box-sizing: border-box;
}

/* ---------- шапка каталога ---------- */

.nen-eksperty__hero {
    position: relative;
    background: var(--ek-dark);
    color: #fff;
    padding: 40px 0 44px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .nen-eksperty__hero {
        padding: 56px 0 60px;
    }
}

.nen-eksperty__eyebrow {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .7;
    margin: 0 0 12px;
}

.nen-eksperty__title {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 900;
    font-size: 32px;
    line-height: 36px;
    color: #fff;
    margin: 0 0 16px;
}

@media (min-width: 768px) {
    .nen-eksperty__title {
        font-size: 48px;
        line-height: 52px;
    }
}

.nen-eksperty__lead {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 14px;
    line-height: 23px;
    max-width: 640px;
    margin: 0;
    opacity: .9;
}

@media (min-width: 768px) {
    .nen-eksperty__lead {
        font-size: 16px;
        line-height: 26px;
    }
}

/* ---------- поиск и фильтр ---------- */

.nen-eksperty__tools {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .nen-eksperty__tools {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.nen-eksperty__search {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 520px;
}

.nen-eksperty__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    border: 1.3px solid var(--ek-ink);
    border-radius: 8px;
    background: #fff;
    color: var(--ek-ink);
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 14px;
    outline: none;
}

.nen-eksperty__input:focus {
    border-color: var(--ek-action);
    box-shadow: 0 0 0 2px rgba(51, 39, 173, .15);
}

.nen-eksperty__button {
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--ek-action);
    color: #fff;
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.nen-eksperty__button:hover {
    background: var(--ek-action-hover);
}

.nen-eksperty__count {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 13px;
    line-height: 20px;
    color: var(--ek-muted);
    white-space: nowrap;
}

.nen-eksperty__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.nen-eksperty__filter {
    display: inline-block;
    padding: 6px 14px;
    border: 1.3px solid var(--ek-ink);
    border-radius: 999px;
    color: var(--ek-ink);
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 500;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    background: #fff;
}

.nen-eksperty__filter:hover {
    background: var(--ek-pale);
    color: var(--ek-ink);
    text-decoration: none;
}

.nen-eksperty__filter--active,
.nen-eksperty__filter--active:hover {
    background: var(--ek-ink);
    color: #fff;
}

/* ---------- сетка карточек ---------- */

.nen-eksperty__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .nen-eksperty__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .nen-eksperty__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px;
    }
}

.nen-eksperty__empty {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 16px;
    line-height: 26px;
    color: var(--ek-muted);
    padding: 40px 0;
}

/* ---------- карточка ---------- */

.nen-expert-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 20px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 0 0 1.3px var(--ek-ink);
    text-decoration: none;
    color: var(--ek-ink);
    transition: background-color .15s ease;
}

.nen-expert-card:hover {
    background: #faf9fb;
    text-decoration: none;
    color: var(--ek-ink);
}

.nen-expert-card[hidden] {
    display: none;
}

.nen-expert-card__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ek-muted);
}

.nen-expert-card__portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ek-pale);
    align-self: center;
    flex: 0 0 auto;
}

.nen-expert-card__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nen-expert-card__initial {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 900;
    font-size: 44px;
    color: var(--ek-ink);
}

.nen-expert-card__name {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 700;
    font-size: 22px;
    line-height: 28px;
    text-align: center;
    margin: 0;
    color: var(--ek-ink);
}

.nen-expert-card__role {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 13px;
    line-height: 20px;
    color: var(--ek-muted);
    text-align: center;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nen-expert-card__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 0;
}

.nen-expert-card__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ek-pale);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ek-muted);
}

.nen-expert-card__foot b {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ek-ink);
}

/* ---------- плашки-бейджи ---------- */

.nen-expert-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 600;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .02em;
    white-space: nowrap;
    color: #fff;
    background: var(--ek-dark, #333439);
    vertical-align: middle;
}

.nen-expert-badge--dark {
    background: #333439;
    color: #fff;
}

.nen-expert-badge--orange {
    background: #fc6025;
    color: #fff;
}

.nen-expert-badge--blue {
    background: #6684ff;
    color: #fff;
}

.nen-expert-badge--pink {
    background: #ffcdd9;
    color: #333439;
}

/* плашки под регалиями в теле статьи (Material::convertToHtml) */
.article-page .article-content .expert .expert-badges {
    margin: 6px 0 0;
    line-height: 24px;
}

.article-page .article-content .expert .expert-badges .nen-expert-badge {
    margin-right: 4px;
}

.article-page .article-content .expert a.expert-link {
    color: inherit;
    text-decoration: none;
}

.article-page .article-content .expert a.expert-link:hover {
    text-decoration: underline;
}

/* ---------- страница эксперта ---------- */

.nen-expert-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 8px 0 8px;
    color: #fff;
}

@media (min-width: 768px) {
    .nen-expert-profile {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 32px;
    }
}

.nen-expert-profile__portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
}

.nen-expert-profile__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nen-expert-profile__portrait .nen-expert-card__initial {
    font-size: 64px;
}

.nen-expert-profile__body {
    min-width: 0;
}

.nen-expert-profile__eyebrow {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .7;
    margin: 0 0 8px;
}

.nen-expert-profile__eyebrow a {
    color: inherit;
    text-decoration: none;
}

.nen-expert-profile__eyebrow a:hover {
    text-decoration: underline;
}

.nen-expert-profile__name {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 900;
    font-size: 32px;
    line-height: 36px;
    color: #fff;
    margin: 0 0 8px;
}

@media (min-width: 768px) {
    .nen-expert-profile__name {
        font-size: 44px;
        line-height: 48px;
    }
}

.nen-expert-profile__role {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 15px;
    line-height: 24px;
    margin: 0 0 12px;
    opacity: .9;
}

.nen-expert-profile__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 0 16px;
}

/* на тёмной сцене тёмная плашка сливалась с фоном — инвертируем */
.nen-expert-profile .nen-expert-badge--dark {
    background: #fff;
    color: #333439;
}

@media (min-width: 768px) {
    .nen-expert-profile__badges {
        justify-content: flex-start;
    }
}

.nen-expert-profile__bio {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-size: 15px;
    line-height: 26px;
    max-width: 720px;
    margin: 0 0 16px;
}

.nen-expert-profile__bio p {
    margin: 0 0 12px;
}

.nen-expert-profile__link {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1.3px solid #fff;
    color: #fff;
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}

.nen-expert-profile__link:hover {
    background: #fff;
    color: var(--ek-dark, #333439);
    text-decoration: none;
}

.nen-eksperty__section-title {
    font-family: "Cera Round Pro", sans-serif, -apple-system;
    font-weight: 900;
    font-size: 24px;
    line-height: 30px;
    margin: 8px 0 20px;
    color: var(--ek-ink);
}

.nen-eksperty__section-title small {
    font-family: "Montserrat", sans-serif, -apple-system;
    font-weight: 500;
    font-size: 13px;
    color: var(--ek-muted);
    margin-left: 10px;
}

/* тёмная сцена под шапкой профиля — та же высота, что у рубрики,
   но подгоняется под содержимое: биография бывает длинной */
.nen-eksperty--profile .nen-eksperty__hero {
    padding: 32px 0 40px;
}
