/* static\css\blog_style.css */

/* =========================================
       1. ПЕРЕМЕННЫЕ И ФОН СТРАНИЦЫ
       ========================================= */
    :root { 
        --brand-purple: #8A2BE2; 
        --brand-purple-dark: #6a1b9a; 
        --brand-purple-light: #f3e5f5; 
        --text-main: #1f2937; 
        --text-muted: #6b7280; 
        --bg-page: #f3f4f6; 
        --bg-card: #ffffff; 
        --border-color: #e5e7eb;
        --neon-blue: #0076b6c6;
        --bg-cyber-btn: #0076b6c6;
    }


    /* Принудительно разрешаем переполнение для всех уровней, чтобы не ломать sticky */
    body, main, .container-blog, .main-layout {
        overflow: visible !important; 
    }
    /* @media (min-width: 1200px) and (max-width: 1700px) {
        body {
            zoom: 0.85;
        }
    } */
    .container-blog { max-width: 1600px; margin: 0 auto; padding: 40px 24px; }


    /* Переопределяем белую иконку на тёмную */
    .navbar-dark .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    /* =========================================
       2. ХЕДЕР СТАТЬИ (С ФОНОВЫМ ИЗОБРАЖЕНИЕМ)
       ========================================= */
    .article-header { 
        background: var(--bg-card);
        padding: 40px;
        border-radius: 16px 16px 0 0; 
        border: 1px solid var(--border-color);
        border-bottom: none;
        display: flex; flex-wrap: wrap; gap: 40px; 
        position: relative; 
        transition: all 0.3s ease;
    }
    
    /* 🔹 МОДИФИКАТОР: Когда есть фоновое изображение */
    .article-header--with-image {
        background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(138, 43, 226, 0.75) 100%), var(--header-bg-image);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 80px 40px;
        border: none;
    }
    
    .article-header--with-image .header-title h1 {
        color: #ffffff;
        text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }
    
    .article-header--with-image .header-meta {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    
    .article-header::before { 
        content: ''; position: absolute; top: -10px; left: -10px; 
        width: 80px; height: 80px; 
        background: var(--brand-purple-light); 
        border-radius: 50%; z-index: -1; opacity: 0.5; filter: blur(25px); 
    }
    
    /* Скрываем декоративный круг когда есть фон */
    .article-header--with-image::before {
        display: none;
    }
    
    .header-title { flex: 1 1 65%; }
    .header-title h1 { 
        font-size: clamp(1.8rem, 4vw, 3.8rem); 
        font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 20px; 
        color: #111827;
        transition: color 0.3s ease;
    }
    .header-meta { 
        flex: 1 1 30%; background: #f9fafb; padding: 24px; 
        border-radius: 12px; border: 1px solid var(--border-color);
        display: flex; flex-direction: column; justify-content: center; 
        transition: all 0.3s ease;
    }
    .meta-item { display: flex; align-items: center; margin-bottom: 12px; font-size: 0.9rem; color: var(--text-muted); }
    .meta-item:last-child { margin-bottom: 0; }
    .meta-icon { margin-right: 10px; font-weight: bold; color: var(--brand-purple); }
    .author-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark)); margin-right: 10px; }


    /* =========================================
       3. ОСНОВНОЙ МАКЕТ И ПУЛЕНЕПРОБИВАЕМОЕ ОГЛАВЛЕНИЕ
       ========================================= */
    .main-layout { 
        display: flex; 
        gap: 10px; 
        align-items: flex-start; /* КРИТИЧЕСКИ ВАЖНО для sticky */
        position: relative;
    }

    .sidebar { 
        flex: 0 0 280px; 
        align-self: flex-start;
        position: -webkit-sticky; /* Для Safari */
        position: sticky !important; 
        top: 120px !important;         
        background: var(--bg-card);
        padding: 24px;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 20px rgba(0,0,0,0.04);
        max-height: calc(100vh - 50px); 
        overflow-y: auto !important; 
        scrollbar-width: thin; 
        scrollbar-color: var(--neon-blue) rgba(0, 118, 182, 0.071);
    }
    .sidebar::-webkit-scrollbar { width: 4px; }
    .sidebar::-webkit-scrollbar-thumb { background: var(--brand-purple-light); border-radius: 4px; }

    .toc-title { 
        font-weight: 700; margin-bottom: 16px; text-transform: uppercase; 
        font-size: 0.75rem; letter-spacing: 0.1em; color: var(--text-muted); 
        border-bottom: 2px solid var(--brand-purple-light);
        padding-bottom: 8px;
    }

    .toc-list { list-style: none; padding-left: 0;}
    .toc-list li { margin-bottom: 8px; }
    .toc-list a { 
        text-decoration: none; color: var(--text-muted); font-size: 1rem; 
        transition: all 0.2s ease; display: block; position: relative; padding-left: 16px;
        line-height: 1.4;
    }
    .toc-list a:hover, .toc-list a.active { 
        color: var(--neon-blue); 
    }
    .toc-list a.active::before { 
        content: ''; position: absolute; left: 0; top: 6px; 
        width: 6px; height: 6px; background-color: var(--brand-purple); border-radius: 50%; 
    }

    /* =========================================
       4. ТЕЛО СТАТЬИ
       ========================================= */
    .article-content { 
        max-width: 100%;
        flex: 1; 
        background: var(--bg-card); 
        padding: 40px;
        border-radius: 0 0 16px 16px; 
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.04); 
        font-family: 'Merriweather', Georgia, serif; 
        font-size: 1.125rem; 
        line-height: 1.8; 
        color: #374151;
    }
    .article-content h2 { 
        font-family: 'Exo 2', 'Segoe UI', sans-serif;
        font-size: 1.75rem; font-weight: 800; margin: 48px 0 20px; 
        color: #111827; scroll-margin-top: 40px; 
    }
    .article-content h3 { 
        font-family: 'Exo 2', 'Segoe UI', sans-serif;
        font-size: 1.35rem; font-weight: 700; margin: 32px 0 16px; color: #1f2937;
    }
    .article-content p { margin-bottom: 24px; }
    .article-content ul, .article-content ol { margin-bottom: 24px; padding-left: 24px; }
    .article-content li { margin-bottom: 8px; }

    /* =========================================
       5. СТИЛИ ДЛЯ ТАБЛИЦ
       ========================================= */
    .article-content table { 
        width: 100%; border-collapse: collapse; margin: 32px 0; 
        font-family: 'Exo 2', 'Segoe UI', sans-serif;font-size: 0.95rem; 
        border: 1px solid var(--border-color); border-radius: 8px; 
        overflow: hidden; background: #fafbfc;
    }
    .article-content th, .article-content td { 
        padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-color); 
    }
    .article-content th { 
        background-color: var(--neon-blue); 
        color: #ffffff; font-weight: 600; 
        text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; 
    }
    .article-content tr:last-child td { border-bottom: none; }
    .article-content tr:nth-child(even) { background-color: #ffffff; }
    .article-content tr:hover { background-color: var(--brand-purple-light); transition: background 0.2s; }
    @media (max-width: 768px) {
        .article-content table { display: block; overflow-x: auto; white-space: nowrap; }
    }

    /* =========================================
       6. ЛИД-МАГНИТ И ВРЕЗКИ
       ========================================= */
    .lead-magnet { 
        margin: 40px 0; 
        background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%); 
        border-radius: 12px; padding: 32px; color: white; 
        box-shadow: 0 10px 25px rgba(138, 43, 226, 0.15); 
        font-family: 'Exo 2', 'Segoe UI', sans-serif;position: relative; overflow: hidden; 
    }
    .lead-magnet::after { 
        content: 'SEO_RAB'; position: absolute; bottom: -15px; right: -15px; 
        font-size: 4rem; font-weight: 900; color: rgba(255,255,255,0.06); 
        letter-spacing: -2px; pointer-events: none; 
    }
    .lead-magnet h3 { font-size: 1.4rem; margin: 0 0 10px 0; color: white; }
    .lead-magnet p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 24px; }
    .form-group { display: flex; gap: 12px; margin-bottom: 12px; }
    @media (max-width: 768px) { .form-group { flex-direction: column; } }
    .lead-magnet input { flex: 1; padding: 14px 18px; border: none; border-radius: 8px; font-size: 1rem; outline: none; }
    .lead-magnet button { 
        background-color: #111827; color: white; border: none; padding: 14px 28px; 
        border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; 
        transition: transform 0.2s, background-color 0.2s; 
    }
    .lead-magnet button:hover { transform: translateY(-2px); background-color: #000; }

    .inline-read-also { 
        margin: 40px 0; padding: 24px 28px; background-color: #f9fafb; 
        border: 1px solid var(--border-color); border-left: 4px solid var(--brand-purple);
        border-radius: 8px; 
        display: flex; align-items: center; justify-content: space-between; 
        text-decoration: none; color: inherit; transition: all 0.3s ease; 
        font-family: 'Exo 2', 'Segoe UI', sans-serif;
    }
    .inline-read-also:hover { background-color: var(--brand-purple-light); border-color: var(--brand-purple); }
    .inline-info span { display: block; font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--brand-purple); margin-bottom: 6px; }
    .inline-info h4 { font-size: 1.15rem; margin: 0; color: #111827; }
    .inline-arrow { color: var(--brand-purple); font-size: 1.5rem; font-weight: 300; }

    /* =========================================
       БЛОК "ЧИТАЙТЕ ТАКЖЕ" (4 КАРТОЧКИ РАЗНОГО РАЗМЕРА В 2 РЯДА)
       ========================================= */
    .bottom-read-also {
        margin-top: 60px;
        padding-top: 60px;
        border-top: 2px solid var(--border-color);
    }

    .bottom-read-also h3 {
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 30px;
        color: #111827;
    }

    /* 🔹 СЕТКА: 3 колонки, 2 ряда */
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 24px;
    }

    /* 🔹 ПЕРВАЯ КАРТОЧКА: Большая, ряд 1, занимает 2 колонки */
    .cards-grid .card:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
    }
    .cards-grid .card:nth-child(1) .card-img {
        height: 100%;
        min-height: 240px;
        flex: 1;
        border-radius: 0 16px 16px 0;
    }
    .card-img {
        height: 200px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        transition: transform 0.5s ease;
    }
    .cards-grid .card:nth-child(1) .card-content {
        flex: 1;
        padding: 30px;
    }
    .cards-grid .card:nth-child(1) .card-title {
        font-size: 1.5rem;
    }

    /* 🔹 ВТОРАЯ КАРТОЧКА: Маленькая, ряд 1, занимает 1 колонку */
    .cards-grid .card:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* 🔹 ТРЕТЬЯ КАРТОЧКА: Маленькая, ряд 2, занимает 1 колонку */
    .cards-grid .card:nth-child(3) {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* 🔹 ЧЕТВЕРТАЯ КАРТОЧКА: Большая, ряд 2, занимает 2 колонки */
    .cards-grid .card:nth-child(4) {
        grid-column: span 2;
        grid-row: span 1;
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    .cards-grid .card:nth-child(4) .card-img {
        height: 100%;
        min-height: 240px;
        flex: 1;
        border-radius: 16px 0 0 16px;
    }
    .cards-grid .card:nth-child(4) .card-content {
        flex: 1;
        padding: 30px;
    }
    .cards-grid .card:nth-child(4) .card-title {
        font-size: 1.5rem;
    }

    /* 🔹 АДАПТИВНОСТЬ: На планшетах 2 колонки */
    @media (max-width: 1100px) {
        .cards-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        .cards-grid .card:nth-child(1),
        .cards-grid .card:nth-child(4) {
            grid-column: span 2;
            flex-direction: column;
        }
        .cards-grid .card:nth-child(1) .card-img,
        .cards-grid .card:nth-child(4) .card-img {
            height: 200px;
            border-radius: 16px 16px 0 0;
        }
    }

    /* 🔹 АДАПТИВНОСТЬ: На телефонах 1 колонка */
    @media (max-width: 600px) {
        .cards-grid {
            grid-template-columns: 1fr;
        }
        .cards-grid .card:nth-child(1),
        .cards-grid .card:nth-child(2),
        .cards-grid .card:nth-child(3),
        .cards-grid .card:nth-child(4) {
            grid-column: span 1;
            flex-direction: column;
        }
        .cards-grid .card:nth-child(1) .card-img,
        .cards-grid .card:nth-child(4) .card-img {
            height: 180px;
            border-radius: 16px 16px 0 0;
        }
    }

    .card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.06);
        border-color: var(--brand-purple-light);
    }

    .card-img {
        height: 180px;
        background-color: var(--brand-purple-light);
        background-image: linear-gradient(45deg, #f3e5f5 25%, #e1bee7 25%, #e1bee7 50%, #f3e5f5 50%, #f3e5f5 75%, #e1bee7 75%, #e1bee7 100%);
        background-size: 20px 20px;
        transition: transform 0.5s ease;
    }
    
    .card:hover .card-img {
        transform: scale(1.03);
    }

    .card-content {
        padding: 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .card-tag {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--brand-purple);
        text-transform: uppercase;
        margin-bottom: 8px;
        letter-spacing: 0.05em;
    }

    .card-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 12px;
        line-height: 1.4;
        color: #111827;
        transition: color 0.2s ease;
    }

    .card:hover .card-title {
        color: var(--brand-purple);
    }

    .card-meta {
        margin-top: auto;
        font-size: 0.8rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    code {
        color: var(--brand-purple);
    }
    /* =========================================
       8. АДАПТИВНОСТЬ
       ========================================= */
    @media (max-width: 992px) { 
        .main-layout {
            flex-direction: column;
            gap: 0;
            margin-top: 2rem;
        } 

        .toc-title {
            margin-bottom: 0;
        }

        .sidebar { 
            flex: none; width: 100%; position: static !important; 
            margin-bottom: 24px; max-height: none; 
        } 
        .article-header, .article-content { padding: 24px; }
    }


    /* =========================================
       9. СТИЛИ ДЛЯ ИЗОБРАЖЕНИЙ В СТАТЬЕ И ЛАЙТБОКС
       ========================================= */
    
    /* Базовые стили для картинок в статье */
    .article-content img {
        max-width: 100%; /* Никогда не вылезает за границы контента */
        height: auto;    /* Сохраняет пропорции */
        border-radius: 8px;
        cursor: zoom-in; /* Показывает, что можно кликнуть */
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        display: block;
        margin: 24px auto; /* Центрирование и отступы */
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .article-content img:hover {
        transform: scale(1.01);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }

    /* Стили модального окна (Lightbox) */
    .image-lightbox {
        display: none;
        position: fixed;
        z-index: 9999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(15, 23, 42, 0.95); /* Темный фон с легким фиолетовым оттенком */
        backdrop-filter: blur(5px);
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .image-lightbox.active {
        display: flex;
        opacity: 1;
    }

    .image-lightbox img {
        max-width: 90%;
        max-height: 90vh;
        border-radius: 8px;
        box-shadow: 0 0 40px rgba(0,0,0,0.5);
        cursor: zoom-out;
        margin: 0; /* Сбрасываем margin из .article-content */
        transform: scale(0.9);
        transition: transform 0.3s ease;
    }

    .image-lightbox.active img {
        transform: scale(1);
    }

    .image-lightbox .close-btn {
        position: absolute;
        top: 20px;
        right: 30px;
        color: #ffffff;
        font-size: 40px;
        font-weight: 300;
        cursor: pointer;
        transition: color 0.2s, transform 0.2s;
        line-height: 1;
    }

    .image-lightbox .close-btn:hover {
        color: var(--brand-purple);
        transform: scale(1.1);
    }


    /* =========================================
       СВЕТЛАЯ ФОРМА ПОСЛЕ ПЕРВОГО АБЗАЦА (КОМПАКТНАЯ)
       ========================================= */
    .article-lead-form {
        position: relative;
        margin: 24px 0;
        padding: 24px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(243,229,245,0.98) 100%);
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        border: 1px solid var(--border-color);
        overflow: hidden;
        font-family: 'Exo 2', 'Segoe UI', sans-serif;
    }

    /* Фоновое изображение */
    .article-lead-form::before {
        content: '';
        position: absolute;
        top: -10%;
        right: -5%;
        width: 60%;
        height: 150%;
        background-image: url(/static/images/anton-phone.webp);
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.32;
        z-index: 0;
        pointer-events: none;
    }

    .lead-form-content {
        position: relative;
        left: 0;
        z-index: 1;
        max-width: 60%;
        text-align: center;
    }


    .heading-form {
        font-size: 2rem;
        color: #4a5568;
        line-height: 1.3;
        text-transform: uppercase; 
        font-weight: 700;
    }

    .lead-form-content > p {
        font-size: 0.85rem;
        color: var(--text-muted);
        margin-bottom: 16px;
        line-height: 1.5;
    }

    .lead-form {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }

    .lead-form input[type="tel"],
    .lead-form input[type="text"] {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-size: 0.9rem;
        outline: none;
        transition: border-color 0.2s, box-shadow 0.2s;
        background: #ffffff9c;
    }

    .lead-form input[type="tel"]:focus,
    .lead-form input[type="text"]:focus {
        border-color: var(--brand-purple);
        box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.1);
    }

    .lead-form input::placeholder {
        color: #9ca3af;
    }

    .lead-form .form-check {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: left;
    }

    .lead-form .form-check input[type="checkbox"] {
        margin-top: 2px;
        width: 16px;
        height: 16px;
        accent-color: var(--brand-purple);
        cursor: pointer;
    }

    .lead-form .form-check label {
        cursor: pointer;
        line-height: 1.4;
    }

    .lead-form .form-check a {
        color: var(--brand-purple);
        text-decoration: underline;
    }

    .lead-form button {
        width: 100%;
        padding: 10px;
        background: var(--brand-purple);
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
        margin-top: 4px;
    }

    .lead-form button:hover {
        background: var(--brand-purple-dark);
        transform: translateY(-1px);
    }

    .lead-form-content small {
        display: block;
        font-size: 0.7rem;
        color: var(--text-muted);
        line-height: 1.4;
    }

    .lead-form-content small a {
        color: var(--brand-purple);
        text-decoration: underline;
    }

    /* Адаптивность */
    @media (max-width: 768px) {
        .article-lead-form {
            padding: 20px 16px;
            margin: 20px 0;
        }
        
        .article-lead-form::before {
            opacity: 0.20;
            width: 100%;
        }
        
        .lead-form-content h2 {
            font-size: 1.15rem;
        }
        
        .lead-form-content > p {
            font-size: 0.8rem;
        }
    }


    /* =========================================
       ОГЛАВЛЕНИЕ С АККОРДЕОНОМ
       ========================================= */
    
    /* Заголовок оглавления (кнопка) */
    .toc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 8px 0;
        user-select: none;
    }
    
    .toc-title {
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        border-bottom: 2px solid var(--brand-purple-light);
        padding-bottom: 8px;
        flex: 1;
    }
    
    .toc-toggle-icon {
        font-size: 0.7rem;
        color: var(--brand-purple);
        transition: transform 0.3s ease;
        margin-left: 12px;
    }
    
    /* Тело оглавления */
    .toc-body {
        max-height: 1000px; /* Достаточно большое значение */
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        opacity: 1;
    }
    
    /* Состояние "свернуто" (для мобильных) */
    .toc-body.collapsed {
        max-height: 0;
        opacity: 0;
    }
    
    /* Поворот стрелки при открытии */
    .sidebar.expanded .toc-toggle-icon {
        transform: rotate(180deg);
    }
    
    /* На десктопе (>992px) оглавление всегда открыто */
    @media (min-width: 993px) {
        .toc-header {
            cursor: default;
        }
        
        .toc-body {
            max-height: 1000px !important;
            opacity: 1 !important;
        }
        
        .toc-toggle-icon {
            display: none; /* Скрываем стрелку на десктопе */
        }
    }
    
    /* На мобильных (<=992px) показываем стрелку */
    @media (max-width: 992px) {
        .toc-header {
            cursor: pointer;
        }
        
        .toc-toggle-icon {
            display: inline-block;
        }
        
        .sidebar {
            padding: 16px;
            margin-bottom: 16px;
        }
    }

/* =========================================
   ПОЛНЫЙ РЕДИЗАЙН СПИСКА БЛОГА (НОВЫЙ)
   ========================================= */

.custom-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.custom-blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.custom-blog-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #111827 0%, #8A2BE2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-blog-lead {
    font-size: 1.15rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Сетка: адаптивная, без Bootstrap */
.custom-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* Карточка */
.custom-blog-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important; /* Перебиваем Bootstrap */
    color: inherit !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.custom-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.12);
    border-color: #8A2BE2;
}

/* Изображение */
.custom-blog-card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.custom-blog-card:hover .custom-blog-card-img {
    transform: scale(1.05);
}

/* Тело карточки */
.custom-blog-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.custom-blog-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #8A2BE2;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    background: rgba(138, 43, 226, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
}

.custom-blog-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.custom-blog-card:hover .custom-blog-title {
    color: #8A2BE2;
}

.custom-blog-excerpt {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1; /* Прижимает мету к низу */
}

.custom-blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

.custom-blog-meta i {
    margin-right: 6px;
    color: #8A2BE2;
}

/* Пустое состояние */
.custom-blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.custom-blog-empty i {
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .custom-blog-container {
        padding: 40px 16px;
    }
    .custom-blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .custom-blog-header {
        margin-bottom: 40px;
    }
}



/* ===== ВРЕЗКА С УСЛУГОЙ ===== */
.service-inline {
    font-family: 'Exo 2', 'Segoe UI', sans-serif;
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px 24px;
    margin: 24px 0;
    border: 1px solid #e9edf2;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    transition: all 0.2s;
}

.service-inline:hover {
    border-color: #dbe2ea;
}

/* Иконка */
.service-inline__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: color-mix(in srgb, var(--brand-purple) 12%, transparent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-purple);
}

.service-inline__icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Контент */
.service-inline__content {
    flex: 1;
    min-width: 160px;
}

.service-inline__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.service-inline__title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #0b1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s;
}

.service-inline__title:hover {
    color: var(--brand-purple);
    text-decoration: underline;
}

.service-inline__desc {
    font-size: 14px;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Кнопка */
.service-inline__btn-wrap {
    flex-shrink: 0;
}

.service-inline__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-purple);
    color: #fff;
    padding: 10px 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.service-inline__btn:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

.service-inline__arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.service-inline__btn:hover .service-inline__arrow {
    transform: translateX(3px);
}

/* Адаптив */
@media (max-width: 600px) {
    .service-inline {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 20px 16px;
    }
    .service-inline__icon {
        align-self: center;
    }
    .service-inline__btn-wrap {
        align-self: center;
        margin-top: 8px;
    }
    .service-inline__btn {
        white-space: normal;
        justify-content: center;
        width: 100%;
        max-width: 260px;
    }
}

  .seo-matrix {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
  }
  .seo-card {
    flex: 1;
    padding: 24px;
    border-radius: 12px;
  }
  .seo-card-success {
    background: #eaf5ed; /* Мягкий зеленый под стиль сайта */
  }
  .seo-card-success h4 {
    margin-top: 0;
    color: #27ae60;
    font-size: 18px;
    margin-bottom: 12px;
  }
  .seo-card-warning {
    background: #fef5e7; /* Мягкий оранжевый/песочный под стиль сайта */
  }
  .seo-card-warning h4 {
    margin-top: 0;
    color: #d35400;
    font-size: 18px;
    margin-bottom: 12px;
  }
  .seo-card p {
    margin: 0;
    color: #555555;
    font-size: 15px;
    line-height: 1.5;
  }
  
  /* Адаптив для мобильных устройств */
  @media (max-width: 768px) {
    .seo-matrix {
      flex-direction: column;
    }
  }