/* ============================================================
   articles.css — Страница статей СЭС Москва
   ============================================================ */

/* Хлебные крошки */
.art-breadcrumb { background: var(--gray-f5); border-bottom: 1px solid var(--gray-ee); padding: 10px 0; font-size: 13px; }
.art-breadcrumb__inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--gray-text); }
.art-breadcrumb__inner a { color: var(--gray-text); }
.art-breadcrumb__inner a:hover { color: var(--cyan-dark); }
.art-breadcrumb__inner i { font-size: 10px; }
.art-breadcrumb__inner span { color: var(--dark); font-weight: 500; }

/* Статистика в заголовке */
.art-head-stat { box-shadow: none; }

/* Основной layout: sidebar + контент */
.art-layout { padding-top: 36px; padding-bottom: 64px; }
.art-layout__inner { display: grid; grid-template-columns: 256px 1fr; gap: 32px; align-items: start; }
.art-layout__inner--sidebar-right { grid-template-columns: 1fr 256px; }
.art-layout__inner--sidebar-right .art-sidebar { order: 2; }
.art-layout__inner--sidebar-right .art-content { order: 1; }
.art-featured[hidden],
.art-card[hidden],
.art-grid[hidden],
.art-empty[hidden] { display: none !important; }

/* ============================================================
   САЙДБАР
   ============================================================ */
.art-sidebar { position: sticky; top: 100px; }

.art-sidebar-block {
    background: var(--white); border: 1.5px solid var(--gray-ee);
    border-radius: var(--r12); overflow: hidden; margin-bottom: 16px;
}
.art-sidebar-block__title {
    padding: 14px 18px;
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--gray-text);
    border-bottom: 1px solid var(--gray-ee);
    display: flex; align-items: center; gap: 8px;
}
.art-sidebar-block__title i { color: var(--cyan-dark); }

/* Список категорий */
.art-cat-list { padding: 8px 0; }
.art-cat-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 18px; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--dark);
    transition: var(--tr); gap: 8px;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.art-cat-item:hover { background: var(--gray-f5); color: var(--cyan-dark); }
.art-cat-item.active { background: var(--cyan-light); color: var(--cyan-dark); border-left-color: var(--cyan); font-weight: 700; }
.art-cat-item__left { display: flex; align-items: center; gap: 10px; }
.art-cat-item__left i { width: 18px; text-align: center; font-size: 14px; color: var(--cyan-dark); }
.art-cat-item__count {
    background: var(--gray-ee); color: var(--gray-text);
    font-size: 11px; font-weight: 700; border-radius: 20px;
    padding: 2px 7px; min-width: 22px; text-align: center;
    transition: var(--tr);
}
.art-cat-item.active .art-cat-item__count { background: var(--cyan); color: var(--white); }

/* Популярные теги */
.art-tags { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.art-tag {
    padding: 5px 12px; border-radius: 20px;
    border: 1.5px solid var(--gray-ee); font-size: 13px; font-weight: 500; color: var(--gray-text);
    transition: var(--tr); cursor: pointer;
}
.art-tag:hover, .art-tag.active { border-color: var(--cyan); color: var(--cyan-dark); background: var(--cyan-light); }

/* ============================================================
   КОНТЕНТ (правая часть)
   ============================================================ */
.art-content { min-width: 0; }

/* Главная статья (featured) */
.art-featured {
    background: var(--white); border: 1.5px solid var(--gray-ee);
    border-radius: var(--r16); overflow: hidden; margin-bottom: 28px;
    display: grid; grid-template-columns: 1fr 340px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    cursor: pointer;
}
.art-featured:hover { border-color: var(--cyan); box-shadow: 0 8px 32px rgba(0,194,212,.13); transform: translateY(-2px); }
.art-featured__img {
    background: linear-gradient(135deg, #00C2D4 0%, #009BAA 100%);
    display: flex; align-items: center; justify-content: center;
    min-height: 220px; font-size: 80px; position: relative; overflow: hidden;
}
.art-featured__img::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,.08);
}
.art-featured__img-cover { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.art-featured__img-emoji { position: relative; z-index: 1; }
.art-featured__body { padding: 28px 28px; display: flex; flex-direction: column; }
.art-featured__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.art-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    white-space: nowrap;
}
.art-badge--featured { background: #fff3cd; color: #856404; }
.art-badge--cat { background: var(--cyan-light); color: var(--cyan-dark); }
.art-badge--new { background: #d1fae5; color: #065f46; }
.art-meta-date { font-size: 13px; color: var(--gray-text); }
.art-meta-read { font-size: 13px; color: var(--gray-text); display: flex; align-items: center; gap: 4px; }
.art-featured__title { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--dark); margin: 0 0 10px; line-height: 1.3; }
.art-featured__title a { color: inherit; }
.art-featured__title a:hover { color: var(--cyan-dark); }
.art-featured__desc { font-size: 14px; color: var(--gray-text); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.art-featured__footer { display: flex; align-items: center; justify-content: space-between; }
.art-featured__author { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.art-author-ava {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--cyan); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.art-featured__link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--cyan-dark); font-weight: 700; font-size: 14px;
    transition: var(--tr);
}
.art-featured__link:hover { gap: 10px; }

/* Сетка карточек */
.art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 32px; }

/* ============================================================
   КАРТОЧКА СТАТЬИ
   ============================================================ */
.art-card {
    background: var(--white);
    border: 1.5px solid var(--gray-ee);
    border-radius: var(--r16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: pointer;
    position: relative;
}
.art-card::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: var(--r16);
    box-shadow: 0 0 0 2px var(--cyan);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
    z-index: 1;
}
.art-card:hover { border-color: transparent; box-shadow: 0 12px 40px rgba(0,194,212,.15); transform: translateY(-4px); }
.art-card:hover::before { opacity: 1; }

/* --- Шапка карточки с иллюстрацией --- */
.art-card__img {
    height: 178px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; flex-shrink: 0;
}
/* Декоративные кружки в фоне */
.art-card__img::before {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    top: -50px; right: -40px;
}
.art-card__img::after {
    content: '';
    position: absolute;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    bottom: -30px; left: -20px;
}
.art-card__img--cover::before, .art-card__img--cover::after { display: none; }
.art-card__img-cover { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Нижний градиент */
.art-card__img-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,.18), transparent);
    z-index: 1;
}

/* Эмодзи */
.art-card__emoji {
    font-size: 64px;
    position: relative; z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
    display: block; line-height: 1;
}
.art-card:hover .art-card__emoji { transform: scale(1.12) translateY(-4px); }

/* Бейдж поверх картинки */
.art-card__badge {
    position: absolute; top: 14px; left: 14px; z-index: 3;
    display: flex; gap: 6px;
}

/* Кнопка «читать» появляется при ховере */
.art-card__hover-btn {
    position: absolute; bottom: 14px; right: 14px; z-index: 3;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px; font-weight: 700; color: var(--dark);
    display: flex; align-items: center; gap: 5px;
    opacity: 0; transform: translateY(8px);
    transition: opacity .22s, transform .22s;
    pointer-events: none;
}
.art-card:hover .art-card__hover-btn { opacity: 1; transform: translateY(0); }
.art-card__hover-btn i { color: var(--cyan-dark); font-size: 11px; }

/* --- Тело карточки --- */
.art-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

/* Мета-строка */
.art-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.art-meta-date { font-size: 12px; color: var(--gray-text); display: flex; align-items: center; gap: 4px; }
.art-meta-date i { font-size: 11px; }
.art-meta-read { font-size: 12px; color: var(--gray-text); display: flex; align-items: center; gap: 4px; }
.art-meta-read i { font-size: 11px; }

/* Заголовок */
.art-card__title {
    font-family: var(--font-head); font-size: 16px; font-weight: 800;
    color: var(--dark); line-height: 1.35; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.art-card__title a { color: inherit; transition: color .15s; }
.art-card__title a:hover { color: var(--cyan-dark); }

/* Описание */
.art-card__desc {
    font-size: 13px; color: var(--gray-text); line-height: 1.6; flex: 1; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Прогресс-бар времени чтения */
.art-card__readbar {
    height: 3px; border-radius: 2px;
    background: var(--gray-ee); margin-bottom: 16px; overflow: hidden;
}
.art-card__readbar-fill {
    height: 100%; border-radius: 2px;
    background: linear-gradient(to right, var(--cyan), var(--cyan-dark));
    transition: width .5s ease;
}

/* Разделитель */
.art-card__divider { border: none; border-top: 1px solid var(--gray-ee); margin: 0 0 14px; }

/* Подвал */
.art-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.art-card__author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.art-author-ava {
    width: 32px; height: 32px; border-radius: 50%;
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.art-card__author-info { min-width: 0; }
.art-card__author-name { font-size: 12px; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-card__author-role { font-size: 11px; color: var(--gray-text); }

/* Статистика */
.art-card__stats { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.art-card__stat {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--gray-text);
    padding: 4px 8px; border-radius: 20px;
    background: var(--gray-f5);
    transition: background .15s, color .15s;
}
.art-card__stat:hover { background: var(--cyan-light); color: var(--cyan-dark); }
.art-card__stat i { font-size: 11px; }

/* Пустое состояние */
.art-empty { text-align: center; padding: 80px 20px; color: var(--gray-text); }
.art-empty i { font-size: 60px; color: var(--gray-ee); margin-bottom: 16px; display: block; }
.art-empty h3 { font-size: 20px; color: var(--dark); margin-bottom: 8px; }
.art-empty p { font-size: 14px; margin-bottom: 20px; }

/* Пагинация */
.art-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; }
.art-page-btn {
    width: 38px; height: 38px; border-radius: var(--r8);
    border: 1.5px solid var(--gray-ee); background: var(--white);
    font-size: 14px; font-weight: 600; color: var(--dark);
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr); cursor: pointer;
}
.art-page-btn:hover { border-color: var(--cyan); color: var(--cyan-dark); }
.art-page-btn.active { background: var(--cyan); border-color: var(--cyan); color: var(--white); }
.art-page-btn--arrow { color: var(--gray-text); }
.art-page-btn--arrow:disabled { opacity: .4; cursor: default; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1060px) {
    .art-layout__inner { grid-template-columns: 220px 1fr; gap: 20px; }
    .art-layout__inner--sidebar-right { grid-template-columns: 1fr 220px; }
}

@media (max-width: 860px) {
    .art-layout__inner { grid-template-columns: 1fr; }
    .art-layout__inner--sidebar-right { grid-template-columns: 1fr; }
    .art-sidebar { position: static; }
    .art-cat-list { display: flex; flex-wrap: wrap; gap: 0; padding: 0; }
    .art-cat-item { flex: 0 0 auto; border-left: none; border-bottom: 3px solid transparent; }
    .art-cat-item.active { border-left-color: transparent; border-bottom-color: var(--cyan); }
    .art-featured { grid-template-columns: 1fr; }
    .art-featured__img { min-height: 160px; }
    .art-hero__title { font-size: 28px; }
}

@media (max-width: 600px) {
    .art-grid { grid-template-columns: 1fr; }
    .art-featured__body { padding: 18px; }
}
