/* ============================================================
   author.css — Страница автора
   Все классы с префиксом supper-
   Дизайн: светлый фон, serif-заголовки, жёлтый акцент #f5c518
   ============================================================ */

/* ── Страница ─────────────────────────────────────────────── */
.supper-page--author {
    max-width: 860px;
    margin: 0 auto;
}

/* ============================================================
   AUTHOR HERO
   ============================================================ */
.supper-author {
    padding: 40px 0 36px;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 48px;
}

.supper-author__inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

/* ── Аватар ───────────────────────────────────────────────── */
.supper-author__avatar-wrap {
    flex-shrink: 0;
}

.supper-author__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f3f4f6;
    display: block;
}

.supper-author__avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5c518;
    color: #111;
    font-family: Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    user-select: none;
}

/* ── Info block ───────────────────────────────────────────── */
.supper-author__info {
    flex: 1;
    min-width: 0;
}

.supper-author__name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.supper-author__short-bio {
    font-size: 0.97rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0 0 14px;
    max-width: 560px;
}

/* ── Stats ────────────────────────────────────────────────── */
.supper-author__stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.supper-author__stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.supper-author__stat-value {
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.supper-author__stat-label {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Social links ─────────────────────────────────────────── */
.supper-author__links {
    margin-top: 4px;
}

.supper-author__link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.supper-author__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
    outline: none;
}

.supper-author__link:hover {
    background: #f5c518;
    border-color: #f5c518;
    color: #111;
    transform: translateY(-2px);
}

.supper-author__link:focus-visible {
    outline: 2px solid #f5c518;
    outline-offset: 3px;
}

/* ── Full bio ─────────────────────────────────────────────── */
.supper-author__bio {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.97rem;
    color: #374151;
    line-height: 1.78;
}

.supper-author__bio p {
    margin: 0 0 1em;
}

.supper-author__bio p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   ARTICLES FEED
   ============================================================ */
.supper-feed__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.supper-feed__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.15rem, 3vw, 1.4rem);
    font-weight: 700;
    color: #111;
    margin: 0;
}

.supper-feed__count {
    font-size: 0.83rem;
    color: #9ca3af;
    margin: 0;
    white-space: nowrap;
}

.supper-feed__count strong {
    color: #111;
    font-weight: 600;
}

/* ── Grid ─────────────────────────────────────────────────── */
.supper-feed__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ── Empty state ──────────────────────────────────────────── */
.supper-feed__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 20px;
    color: #9ca3af;
    text-align: center;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.supper-feed__empty svg {
    opacity: 0.4;
}

.supper-feed__empty p {
    font-size: 0.95rem;
    margin: 0;
}

/* ── Load more ────────────────────────────────────────────── */
.supper-feed__loadmore {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    transition: opacity 0.3s;
}

.supper-feed__loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s;
    outline: none;
    font-family: inherit;
}

.supper-feed__loadmore-btn:hover:not(:disabled) {
    background: #f5c518;
    color: #111;
    transform: translateY(-1px);
}

.supper-feed__loadmore-btn:focus-visible {
    outline: 2px solid #f5c518;
    outline-offset: 3px;
}

.supper-feed__loadmore-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Спиннер внутри кнопки (blog.js добавляет .blog-loadmore__spinner) */
.blog-loadmore__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: supper-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.supper-feed__loadmore-btn.is-loading .blog-loadmore__spinner,
.supper-feed__loadmore-btn.loading .blog-loadmore__spinner {
    display: inline-block;
}

@keyframes supper-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   BLOG CARD — базовые стили (если нет своих)
   ============================================================ */
.blog-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.blog-card__img-wrap {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.03);
}

.blog-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #9ca3af;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.blog-card__meta-sep {
    color: #d1d5db;
}

.blog-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
    line-height: 1.38;
}

.blog-card__link {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.blog-card__title {
    position: relative;
}

.blog-card__link:hover {
    color: #c09b00;
}

.blog-card__link:focus-visible {
    outline: 2px solid #f5c518;
    outline-offset: 2px;
    border-radius: 2px;
}

.blog-card__excerpt {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Анимация новых карточек (blog.js добавляет .is-new) */
.blog-card.is-new {
    animation: supper-card-in 0.4s ease both;
}

@keyframes supper-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .supper-author {
        padding: 24px 0 28px;
    }

    .supper-author__inner {
        gap: 16px;
    }

    .supper-author__avatar,
    .supper-author__avatar--placeholder {
        width: 72px;
        height: 72px;
        font-size: 1.7rem;
    }

    .supper-author__name {
        font-size: 1.4rem;
    }

    .supper-feed__header {
        flex-direction: column;
        gap: 4px;
    }

    .supper-feed__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .supper-author__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .supper-author__link-list {
        justify-content: center;
    }

    .supper-author__stats {
        justify-content: center;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .supper-author__links,
    .supper-feed__loadmore {
        display: none !important;
    }
}
/* ============================================================
   blog-card.css
   Стили карточки статьи — точно под HTML-структуру компонента
   Классы: .blog-card, .blog-card__inner, .blog-card__content,
           .blog-card__header, .blog-card__title, .blog-card__link,
           .blog-card__excerpt, .blog-card__meta, .blog-card__index,
           .blog-meta-author, .blog-meta-author--sm, .blog-meta-author__img,
           .blog-meta-date, .blog-meta-views, .blog-meta-read
   ============================================================ */

/* ── Обёртка li ────────────────────────────────────────────── */
.blog-card {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%;
}

/* ── article внутри li ─────────────────────────────────────── */
.blog-card article {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
    position: relative;
}

.blog-card article:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

/* ── Внутренний контейнер ──────────────────────────────────── */
.blog-card__inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 20px 18px;
    gap: 0;
}

/* ── Порядковый номер (декоративный, скрытый) ──────────────── */
.blog-card__index {
    display: none; /* скрыт — aria-hidden="true" уже стоит в HTML */
}

/* ── Контент ───────────────────────────────────────────────── */
.blog-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

/* ── Header: заголовок + excerpt ───────────────────────────── */
.blog-card__header {
    flex: 1;
    margin-bottom: 14px;
}

.blog-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    margin: 0 0 8px;
    /* Stretch link на весь article */
    position: relative;
}

.blog-card__link {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.17s;
}

/* Растянуть кликабельную область на всю карточку */
.blog-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 10px;
}

.blog-card article:hover .blog-card__link,
.blog-card__link:hover {
    color: #c09b00;
}

.blog-card__link:focus-visible {
    outline: none;
}

/* Focus ring на всю карточку через pseudo */
.blog-card__link:focus-visible::after {
    outline: 2px solid #f5c518;
    outline-offset: 2px;
}

.blog-card__excerpt {
    font-size: 0.855rem;
    color: #6b7280;
    line-height: 1.62;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Footer: meta ──────────────────────────────────────────── */
.blog-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    position: relative;
    z-index: 2; /* выше pseudo-link */
}

/* ── Автор ─────────────────────────────────────────────────── */
.blog-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.17s;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.blog-meta-author:hover {
    color: #c09b00;
}

.blog-meta-author:focus-visible {
    outline: 2px solid #f5c518;
    outline-offset: 2px;
    border-radius: 3px;
}

.blog-meta-author--sm .blog-meta-author__img {
    width: 22px;
    height: 22px;
}

.blog-meta-author__img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e5e7eb;
    flex-shrink: 0;
    display: block;
}

/* Разделитель между автором и датой */
.blog-meta-author + .blog-meta-date::before {
    content: '·';
    color: #d1d5db;
    margin-right: 8px;
    font-weight: 400;
}

/* ── Дата ──────────────────────────────────────────────────── */
.blog-meta-date {
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Время чтения ──────────────────────────────────────────── */
.blog-meta-read {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-meta-read::before {
    content: '·';
    color: #d1d5db;
    margin-right: 4px;
}

/* ── Просмотры ─────────────────────────────────────────────── */
.blog-meta-views {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: auto; /* прижать вправо */
    flex-shrink: 0;
}

/* ── Сетка (blog-feed--grid на родителе) ───────────────────── */
.blog-feed--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Убираем лишние отступы у role="listitem" */
.blog-feed--grid > [role="listitem"] {
    display: flex;
}

.blog-feed--list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* В list-режиме — горизонтальная карточка */
.blog-feed--list > [role="listitem"] {
    display: flex;
}

.blog-feed--list .blog-card,
.blog-feed--list .blog-card article {
    flex-direction: row;
    width: 100%;
}

.blog-feed--list .blog-card__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

/* ── Анимация новых карточек (blog.js: .is-new) ─────────────── */
.blog-card.is-new {
    animation: blogcard-appear 0.38s ease both;
}

@keyframes blogcard-appear {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Featured-карточка (если есть) ──────────────────────────── */
.blog-card--featured article {
    border-color: #f5c518;
    background: #fffdf0;
}

.blog-card--featured .blog-card__title {
    font-size: 1.1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .blog-feed--grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-card__inner {
        padding: 16px 16px 14px;
    }

    .blog-card__title {
        font-size: 0.95rem;
    }

    /* List → stack on mobile */
    .blog-feed--list .blog-card article,
    .blog-feed--list .blog-card__inner {
        flex-direction: column;
    }
}