/* news.css — Новости в стиле ATC WORK */

.news-section {
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.news-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-section p.subtitle {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Три колонки на десктопе */
.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.news-item {
    width: 100%;
    padding: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.news-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-item-content {
    padding: 1.25rem;
}

.news-item-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.news-item-content h4 a {
    color: inherit;
    text-decoration: none;
}

.news-item-content h4 a:hover {
    text-decoration: underline;
    color: #2980b9;
}

.news-item-content time {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.75rem;
}

.news-item-content p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.loading, .error {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 1.5rem;
    grid-column: 1 / -1; /* чтобы сообщение занимало всю ширину */
}

/* Адаптивность: планшеты - 2 колонки */
@media (max-width: 980px) {
    .news-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .news-section {
        padding: 1.5rem;
    }

    .news-section h3 {
        font-size: 1.15rem;
    }

    .news-item-image {
        height: 180px;
    }

    .news-item-content {
        padding: 1rem;
    }

    .news-item-content h4 {
        font-size: 1.05rem;
    }

    .news-item-content time {
        font-size: 0.85rem;
    }
}

/* Адаптивность: мобильные - 1 колонка */
@media (max-width: 640px) {
    .news-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .news-section {
        padding: 1rem;
    }

    .news-item-image {
        height: 160px;
    }

    .news-item-content {
        padding: 0.9rem;
    }

    .news-item-content h4 {
        font-size: 1rem;
    }
}