/* assets/css/blog.css — Стили блога статей */

/* ============================================================
   ОБЩИЕ
   ============================================================ */
.blog-page-wrap,
.article-page-wrap {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* ============================================================
   СТРАНИЦА СПИСКА СТАТЕЙ: HERO
   ============================================================ */
.blog-page-hero {
    background: linear-gradient(135deg, #0B0F19 0%, #1A2340 60%, #0B1628 100%);
    border-radius: 1.25rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.blog-page-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,91,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.blog-page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,91,255,0.2);
    border: 1px solid rgba(0,91,255,0.4);
    color: #60A5FA;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.blog-page-hero-title {
    font-size: 2rem;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.2;
    max-width: 600px;
    margin: 0 0 0.75rem;
}

.blog-page-hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    max-width: 520px;
    margin: 0;
}

@media (min-width: 768px) {
    .blog-page-hero-title { font-size: 2.5rem; }
}

/* ============================================================
   ФИЛЬТР ТЕГОВ
   ============================================================ */
.blog-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.blog-tag-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: #F1F5F9;
    color: #475569;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

.blog-tag-btn:hover {
    background: #E2E8F0;
    color: #1E293B;
    border-color: #CBD5E1;
}

.blog-tag-btn.active {
    background: #1A56DB;
    color: #FFFFFF;
    border-color: #1A56DB;
    box-shadow: 0 4px 12px rgba(26,86,219,0.3);
}

/* ============================================================
   СЕТКА СТАТЕЙ
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-card--featured {
        grid-column: span 2;
    }
    .blog-card--featured .blog-card-cover {
        height: 320px;
    }
    .blog-card--featured .blog-card-title {
        font-size: 1.35rem;
    }
}

.blog-grid--3 { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 768px) { .blog-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   КАРТОЧКА СТАТЬИ
   ============================================================ */
.blog-card {
    background: #FFFFFF;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border: 1px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.blog-card-cover-link {
    display: block;
    text-decoration: none;
}

.blog-card-cover {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #E2E8F0;
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.05);
}

.blog-card-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 60%);
}

.blog-card-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #1A56DB;
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0F172A;
    margin: 0;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover { color: #1A56DB; }

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #64748B;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1A56DB;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}

.blog-card-link:hover { gap: 0.6rem; }

/* ============================================================
   ПУСТОЙ СПИСОК
   ============================================================ */
.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #94A3B8;
}

.blog-empty i { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2rem;
}

.blog-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: #F1F5F9;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.blog-page-btn:hover { background: #E2E8F0; color: #0F172A; }
.blog-page-btn.active { background: #1A56DB; color: #FFF; box-shadow: 0 4px 10px rgba(26,86,219,0.3); }

/* ============================================================
   СТРАНИЦА СТАТЬИ: ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.article-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #94A3B8;
    margin-bottom: 2rem;
}

.article-breadcrumb a {
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumb a:hover { color: #1A56DB; }

.article-breadcrumb .ti-chevron-right { font-size: 0.7rem; color: #CBD5E1; }

/* ============================================================
   СТРАНИЦА СТАТЬИ: LAYOUT
   ============================================================ */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr 300px;
    }
}

/* ============================================================
   ОСНОВНАЯ ЧАСТЬ СТАТЬИ
   ============================================================ */
.article-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.article-tag {
    display: inline-block;
    background: rgba(26,86,219,0.1);
    color: #1A56DB;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.7rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: background 0.2s;
}

.article-tag:hover { background: rgba(26,86,219,0.18); }

.article-date,
.article-author {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: #94A3B8;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.25;
    color: #0F172A;
    margin: 0 0 1.25rem;
}

@media (min-width: 768px) {
    .article-title { font-size: 2.25rem; }
}

.article-lead {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.65;
    border-left: 3px solid #1A56DB;
    padding-left: 1rem;
    margin: 0 0 1.5rem;
    font-style: italic;
}

.article-cover {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.article-cover img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

/* ============================================================
   КОНТЕНТ СТАТЬИ (типографика)
   ============================================================ */
.article-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #334155;
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0F172A;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #F1F5F9;
}

.article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1E293B;
    margin: 1.5rem 0 0.5rem;
}

.article-content p {
    margin: 0 0 1.2rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.article-content li { color: #475569; }

.article-content strong { color: #0F172A; font-weight: 700; }
.article-content em { color: #475569; }

.article-content a {
    color: #1A56DB;
    text-decoration: underline;
    text-decoration-color: rgba(26,86,219,0.3);
}

.article-content a:hover {
    text-decoration-color: #1A56DB;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #F8FAFC;
    border-left: 4px solid #1A56DB;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #475569;
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.article-content th {
    background: #F1F5F9;
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 700;
    color: #1E293B;
    border-bottom: 2px solid #E2E8F0;
}

.article-content td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    color: #475569;
}

/* ============================================================
   ТЕГИ В КОНЦЕ СТАТЬИ
   ============================================================ */
.article-tags-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #F1F5F9;
    font-size: 0.85rem;
    color: #94A3B8;
}

/* ============================================================
   САЙДБАР
   ============================================================ */
.article-sidebar-card {
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-sidebar-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-sidebar-list li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #F8FAFC;
}

.article-sidebar-list li:last-child { border-bottom: none; padding-bottom: 0; }

.article-sidebar-list a {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    line-height: 1.35;
    transition: color 0.2s;
}

.article-sidebar-list a:hover { color: #1A56DB; }

.article-sidebar-list span {
    font-size: 0.75rem;
    color: #94A3B8;
}

/* CTA карточка */
.article-sidebar-cta {
    background: linear-gradient(135deg, #0B0F19 0%, #1A2340 100%);
    border-color: rgba(255,255,255,0.05);
    text-align: center;
}

.article-cta-icon {
    font-size: 2rem;
    color: #60A5FA;
    display: block;
    margin-bottom: 0.75rem;
}

.article-sidebar-cta h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #FFF;
    margin: 0 0 0.5rem;
}

.article-sidebar-cta p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* ============================================================
   ПОХОЖИЕ СТАТЬИ
   ============================================================ */
.article-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #F1F5F9;
}

.article-related-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 1.5rem;
}

/* ============================================================
   БЛОК-ПРЕВЬЮ В КОНСТРУКТОРЕ (blog_preview)
   ============================================================ */
.blog-preview-section {
    padding: 3rem 0;
}

.blog-preview-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.blog-preview-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0;
}

.blog-preview-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A56DB;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.blog-preview-link:hover { gap: 0.55rem; }
