/* Стили для списков карточек (новости, блог, категории) */

/* Секция списка */
.news-list {
    padding: 60px 0;
    background-color: var(--bg-light);
    min-height: 60vh;
}

.latest-news {
    background-color: var(--bg-light);
}

/* Сетка карточек */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Карточка новости/статьи */
.news-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 15px;
    padding: 30px;
    animation: fadeIn 0.6s ease-out both;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    display: inline-block;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

.news-card h3 {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    line-height: 1.4;
    position: relative;
    border-bottom: 2px solid var(--border-color);
}

.news-card h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 1px;
}

.news-card h3 a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
    font-weight: 700;
}

.news-card h3 a:hover {
    color: var(--primary-color);
}

.news-content p,
.news-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    margin-top: 15px;
    flex: 1;
}

/* Стили для summary в карточках */
.news-card-summary {
    margin-top: 15px;
    margin-bottom: 20px;
    flex: 1;
    color: var(--text-light);
    line-height: 1.7;
}

/* Стили для заголовков внутри summary */
.news-card-summary h2,
.news-card-summary h3,
.news-card-summary h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    line-height: 1.4;
}

.news-card-summary h2::after,
.news-card-summary h3::after,
.news-card-summary h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 1px;
}

/* Стили для параграфов внутри summary */
.news-card-summary p {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-light);
}

.news-card time {
    display: block;
    margin-top: 5px;
    margin-bottom: 15px;
}

.news-card .btn-link {
    display: inline-block;
    font-weight: 600;
    margin-top: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
    .news-list {
        padding: 40px 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card {
        margin: 0;
    }

    .news-content {
        padding: 20px;
    }
}

