/* --- Общий премиум фон --- */
body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #222;
    min-width: 320px;
}

a {
    text-decoration: none;
    color: #0d6efd;
}
a:hover { text-decoration: underline; }

/* --- Контейнер статьи с сайдбаром --- */
.article-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}
@media(min-width: 992px){
    .article-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* --- Основная карточка статьи --- */
.article-main {
    flex: 1;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Мета + просмотры */
.article-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}
.views {
    display: inline-block;
    margin-left: 1rem;
    color: #495057;
    font-weight: 500;
}

.article-main h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.article-main img.cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    max-height: 480px; /* ограничение для desktop */
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .article-main img.cover {
        max-height: 40vh;
    }
}


/* Блоки статьи */
.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem; /* чуть крупнее */
    color: #333;
}

.article-content blockquote {
    border-left: 4px solid #1a2238;
    background: #e9f2ff;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-style: italic;
    color: #0b3d91;
    margin: 1.5rem 0;
    overflow-wrap: break-word;
}

.article-content blockquote * {
    margin: 0;
    color: inherit;
    font-style: inherit;
}


.article-content img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
}

/* Поделиться */
.share-button {
    margin-top: 2rem;
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}
.share-button:hover {
    background: #084298;
}

/* Теги */
.tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tags a {
    background: #e0e7ff;
    color: #1e3a8a;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}
.tags a:hover { background: #c7d2fe; }

/* Сайдбар */
.sidebar {
    flex-basis: 300px;
    margin-top: 2rem;
}
@media(min-width: 992px){
    .sidebar {
        margin-left: 2rem;
        margin-top: 0;
    }
}

/* Зона для рекламы */
.ad-space {
    margin-bottom: 2rem;
    background: var(--bg-main);
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    color: white;
    font-weight: 500;
}

/* Комментарии премиум */
.comments {
    margin-top: 3rem;
}
.comments h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.comment {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    align-items: flex-start;
}
.comment img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-content {
    flex: 1;
}
.comment-content .name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.comment-content .text {
    font-size: 0.95rem;
    color: #495057;
}

/* Адаптивность */
@media(max-width: 768px){
    .article-main h1 { font-size: 2rem; }
    .sidebar { flex-basis: 100%; margin-left: 0; }
}

/* HTML в текстовых блоках разрешён */
.article-content p,
.article-content blockquote {
    word-break: break-word;
}





.comment-content .name {
    display: flex;
    align-items: center;
    gap: 10px; /* расстояние между username и датой */
    font-weight: bold;
}

.comment-content .name .date {
    font-size: 0.8em; /* маленький шрифт */
    font-weight: normal;
    color: #888;
}




.article-tags h5 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-wrapper .tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #333;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.tags-wrapper .tag:hover {
    background-color: #0d6efd;
    color: white;
}





/* ===== SIDEBAR CARD (белый контейнер) ===== */
.sidebar {
    flex-basis: 320px;
}

.related-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.related-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a2238;
}

/* ===== ОТДЕЛЬНАЯ КАРТОЧКА СТАТЬИ ===== */
.related-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: #f3f5f9;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}


.related-item:last-child {
    margin-bottom: 0;
}

/* Ховер всей карточки */
.related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.05);
    background:  #f9fafc;;
}

/* ===== КАРТИНКА ===== */

.related-thumb {
    flex: 0 0 105px;
    height: 110px;              /* ВОТ ГЛАВНОЕ */
    border-radius: 12px;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

/* Зум картинки */
.related-item:hover img {
    transform: scale(1.08);
}

/* ===== ТЕКСТ ===== */
.related-info {
    display: flex;
    align-items: center;
}

.related-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    color: #2b3448;
    transition: color .2s ease;
}

/* Цвет текста при ховере */
.related-item:hover .related-item-title {
    color: #e4b93f;
}



@media (max-width: 768px) {
    .related-thumb {
        flex: 0 0 85px;
        height: 70px;
    }
}
@media (min-width: 992px) {
    .related-thumb {
        height: 95px; /* было 110 */
    }
}








/* компактные “пилюли” как единый блок */
.meta-pill{
    display:inline-flex;
    align-items:center;
    gap:.45rem;
    padding:.35rem .65rem;
    border-radius: 999px;
    font-size: .9rem;
    line-height: 1;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.75);
    color: #2b3448;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

/* кнопка избранного в том же стиле */
.meta-pill-fav{
    color: black;
}






