/* ===== news.html: сетка карточек новостей =====
   Визуально приведена к единому стилю с карточками видеоуроков
   (lessons-grid.css) — та же рамка, скругление, эффект при наведении и
   отступы, только вместо плей-кнопки — просто обложка новости. */

.news-wrap {
    padding: 50px 114px 80px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.news-card {
    position: relative;
    text-decoration: none;
    color: #193D50;
    background-color: white;
    border: 1px solid #e4e4e4;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

/* Кнопка редактирования — см. .card-edit-btn в base.css (общий для новостей,
   уроков и главной страницы стиль) */

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
}

.news-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #ececec;
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.05);
}

.news-card-thumb-fallback {
    background: linear-gradient(135deg, #193D50 0%, #2a5a78 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-thumb-fallback span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-style: italic;
    padding: 0 20px;
    text-align: center;
}

.news-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-body h3 {
    font-size: 19px;
    margin-bottom: 8px;
}

.news-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 14px;
    flex-grow: 1;
}

.news-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.news-card-tag {
    display: inline-block;
    background-color: #f0f4f7;
    color: #193D50;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
}

.news-card-tag::before {
    content: '#';
}

.news-card-date {
    font-size: 13px;
    color: #999;
    margin-top: auto;
}

.news-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.news-pagination a {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    background-color: #f0f0f0;
    color: #193D50;
    transition: background-color 0.2s, color 0.2s;
}

.news-pagination a:hover {
    background-color: #e2e2e2;
}

.news-pagination a.active {
    background-color: #193D50;
    color: white;
}

.news-empty {
    color: #888;
    text-align: center;
    font-size: 18px;
}
