/* 
=====================================
СТИЛИ БЛОГА
=====================================
*/

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: #222;
}

/* 
=====================================
СЕТКА СТАТЕЙ
=====================================
*/

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* максимум 3 */
    gap: 30px;
}

/* Для планшетов — 2 колонки */
@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Для телефонов — 1 колонка */
@media (max-width: 700px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Карточка статьи (теперь — кликабельная ссылка) */
.blog-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 16px rgba(0,0,0,0.15);
}

/* Обложка статьи */
.blog-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Контент карточки */
.blog-content {
    padding: 18px 20px 25px 20px;
}

.blog-content h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    color: #222;
}

.blog-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.blog-snippet {
    color: #444;
    line-height: 1.5;
}

/* Заголовок страницы */
.blog-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: #222;
}


/* Карточка статьи */
.blog-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.blog-cover {
    width: 200px;
    height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-content {
    padding: 18px 20px 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.blog-content h2 {
    margin: 0 0 10px;
    font-size: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 3.64rem;
}

.blog-content a {
    color: #333;
    text-decoration: none;
}

.blog-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.blog-snippet {
    color: #444;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more {
    color: #0077cc;
    font-weight: bold;
    text-decoration: none;
}

/* 
=====================================
СТАТЬЯ
=====================================
*/

.article-detail {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
}

.article-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 30px;
}

.article-detail h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.article-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.back-btn {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #000;
}