{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
<!-- ВНЕДРЯЕМ СТИЛИ ПРЯМО СЮДА ДЛЯ ГАРАНТИИ РАБОТЫ -->
<style>
    /* Перезапись стилей для исправления сетки блога */
    
    /* 1. СЕТКА */
    .blog-cards-container {
        display: grid !important;
        gap: 2rem !important;
        width: 100% !important;
        margin-bottom: 3rem !important;
    }

    /* Адаптивность колонок */
    @media (min-width: 992px) {
        .blog-cards-container { grid-template-columns: repeat(3, 1fr) !important; }
    }
    @media (min-width: 768px) and (max-width: 991px) {
        .blog-cards-container { grid-template-columns: repeat(2, 1fr) !important; }
    }
    @media (max-width: 767px) {
        .blog-cards-container { grid-template-columns: 1fr !important; }
    }

    /* 2. КАРТОЧКА */
    .blog-cards-container .blog-card {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        background-color: #ffffff !important;
        border: none !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
        transition: transform 0.3s ease !important;
    }

    /* Эффект наведения */
    .blog-cards-container .blog-card:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
    }

    /* 3. ИЗОБРАЖЕНИЕ */
    .blog-cards-container .card-img-top {
        height: 240px !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    /* 4. ТЕЛО КАРТОЧКИ */
    .blog-cards-container .card-body {
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 1.5rem !important;
    }

    /* Заголовок и текст */
    .blog-cards-container .card-title {
        font-family: 'Playfair Display', serif !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #2B4D9C !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }

    .blog-cards-container .card-text {
        font-family: 'Outfit', sans-serif !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
        color: #333 !important;
        margin-bottom: 1.5rem !important;
    }

    /* 5. КНОПКИ (Прижатие к низу) */
    .blog-cards-container .btn-actions {
        margin-top: auto !important;
        padding-top: 1rem !important;
        border-top: 1px solid #eee !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Мобильные кнопки */
    @media (max-width: 576px) {
        .blog-cards-container .btn-actions {
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 10px !important;
        }
    }
</style>
{% endblock %}