/* Публичный каталог авторов: поиск, карточки и серверная пагинация. */

.authors-intro {
    padding: 72px 0 54px;
    background: linear-gradient(180deg, rgba(10, 209, 201, 0.08), transparent);
}

.authors-intro .eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--accent);
}

.authors-intro h1 {
    max-width: 720px;
    margin-bottom: 16px;
    font-family: var(--serif);
    font-size: clamp(34px, 4.6vw, 52px);
    line-height: 1.08;
}

.authors-intro>div>p {
    max-width: 620px;
    color: var(--text-muted);
    font-size: 17px;
}

.author-search {
    max-width: 720px;
    margin-top: 34px;
}

.author-search label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
}

.author-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-search input {
    min-width: 0;
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid rgba(var(--rule-rgb), 0.18);
    border-radius: 10px;
    outline: none;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
}

.author-search input:focus {
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(10, 209, 201, 0.14);
}

.author-search .btn {
    height: 46px;
}

.search-reset {
    padding: 10px 4px;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.authors-results {
    padding: 48px 0 96px;
}

.authors-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 12px;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.author-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    min-height: 210px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(var(--rule-rgb), 0.08);
    border-radius: var(--radius);
    background: var(--surface-raised);
    box-shadow: 0 18px 38px -30px rgba(22, 26, 51, 0.5);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.author-card:hover {
    transform: translateY(-3px);
    border-color: rgba(10, 168, 162, 0.25);
    box-shadow: 0 24px 42px -28px rgba(22, 26, 51, 0.55);
}

.author-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--text-on-brand);
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
}

.author-card-main {
    min-width: 0;
}

.author-name {
    display: block;
    margin: 3px 34px 7px 0;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.author-bio {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.author-bio-empty {
    font-style: italic;
    opacity: 0.75;
}

.author-stats {
    grid-column: 1 / -1;
    display: flex;
    align-self: end;
    gap: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(var(--rule-rgb), 0.08);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
}

.author-stats b {
    color: var(--text);
}

.author-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--brand-dark);
    font-size: 19px;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity .2s, transform .2s;
}

.author-card:hover .author-arrow {
    opacity: 1;
    transform: translateX(0);
}

.authors-empty {
    grid-column: 1 / -1;
    padding: 58px 24px;
    border: 1.5px dashed rgba(var(--rule-rgb), 0.2);
    border-radius: var(--radius);
    text-align: center;
}

.authors-empty h2 {
    margin-bottom: 10px;
    font-family: var(--serif);
    font-size: 24px;
}

.authors-empty p {
    margin: 0 auto 22px;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 38px;
}

.page-link,
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(var(--rule-rgb), 0.15);
    border-radius: 9px;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: 13px;
}

a.page-link:hover {
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}

.page-link.current {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
    color: var(--text-on-brand);
}

.page-direction {
    min-width: auto;
}

.page-ellipsis {
    border-color: transparent;
    background: transparent;
}

@media (max-width: 760px) {
    .authors-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .authors-intro {
        padding: 48px 0 40px;
    }

    .author-search-row {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .author-search input {
        flex-basis: 100%;
    }

    .author-search .btn {
        flex: 1;
        justify-content: center;
    }

    .authors-results {
        padding: 38px 0 64px;
    }

    .authors-summary {
        flex-direction: column;
        gap: 5px;
    }

    .author-card {
        min-height: 0;
        padding: 20px;
    }

    .author-stats {
        gap: 10px;
        justify-content: space-between;
        font-size: 10px;
    }

    .page-direction {
        min-width: 40px;
    }

    .page-direction-label {
        display: none;
    }
}
