/* Общие настройки секции */
.blog-section {
    padding: 60px 0;
    background-color: #f9fafb;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.container-blog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-header h2 {
    font-size: 2.5rem;
    color: #1a1d28;
    margin-bottom: 10px;
}

/* Сетка блога */
.blog-grid {
    display: grid;
    /* Убираем жесткий минимум 300px для гибкости на мобильных */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

/* Карточка */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.blog-card.is-hidden {
    display: none;
}

/* Изображение и категория */
.blog-image {
    position: relative;
    height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #6366f1;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Текст карточки */
.blog-content {
    padding: 20px;
    flex-grow: 1;
}

.blog-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #111827;
    line-height: 1.3;
}

.blog-content p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-more {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Кнопка "Показать еще" */
.blog-more {
    text-align: center;
    margin-top: 40px;
}

.btn-more {
    background: #1a1d28;
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: #6366f1;
    transform: scale(1.05);
}

/* Анимация появления */
.fade-in-up {
    display: flex !important; /* Перебиваем display: none */
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr; /* 1 колонка на смартфонах */
        gap: 20px;
    }
    .blog-header h2 {
        font-size: 1.8rem;
    }
}