/* =========================
   Страница Всі новини — полный стиль
========================= */
.all-news-page {
    max-width: 1300px;
    margin: 24px auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Заголовок страницы */
.all-news-title {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    font-size: 24px;
    color: #5a2b7a;
}

.all-news-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 4px;
    background: linear-gradient(90deg, #0057b7, #ffd700);
    border-radius: 2px;
}

/* =========================
   Секция по дате
========================= */
.news-date-section {
    border-bottom: 1px solid #eee;
}

/* Заголовок даты */
.news-date-heading {
    margin-top: 28px;
    margin-bottom: 14px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* Разделитель между датами */
.news-date-separator {
    border: none;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(90,43,122,0),
        rgba(90,43,122,0.25) 50%,
        rgba(90,43,122,0)
    );
    margin: 12px 0 10px;
}

/* =========================
   Новость: время + заголовок
========================= */
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
}

.news-item:hover {
    background-color: #f9f9f9;
    transform: translateY(-1px);
}

/* Время публикации */
.news-time {
    width: 50px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: #777;
    text-align: right;
    line-height: 1.4;
}

/* Заголовок новости */
.news-title {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    transition: color 0.2s;
}

.news-title:hover {
    color: #5a2b7a;
    text-decoration: underline;
}

/* Краткое описание новости */
.news-description {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}

/* =========================
   Пагинация
========================= */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
    width: 100%;
}

.news-pagination ul.page-numbers {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.news-pagination ul.page-numbers li a,
.news-pagination ul.page-numbers li span {
    display: block;
    padding: 8px 14px;
    font-size: 16px;
    color: #5a2b7a;
    background: #f0f0f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.news-pagination ul.page-numbers li a:hover {
    background: #5a2b7a;
    color: #fff;
    transform: translateY(-1px);
}

.news-pagination ul.page-numbers li span.current {
    background: #5a2b7a;
    color: #fff;
    pointer-events: none;
}

.news-pagination ul.page-numbers li span.dots {
    background: transparent;
    color: #999;
}

.news-pagination ul.page-numbers li a.prev,
.news-pagination ul.page-numbers li a.next {
    font-weight: 500;
    color: #333;
}

.news-pagination ul.page-numbers li a.prev:hover,
.news-pagination ul.page-numbers li a.next:hover {
    color: #5a2b7a;
}

/* =========================
   Адаптивность
========================= */
@media (max-width: 768px) {
    .all-news-page {
        padding: 20px 15px;
    }

    .all-news-title {
        font-size: 22px;
    }

    .news-date-heading {
        font-size: 14px;
    }

    .news-item {
        gap: 8px;
        padding: 6px 8px;
    }

    .news-time {
        width: 45px;
        font-size: 12px;
    }

    .news-title {
        font-size: 13px;
    }

    .news-pagination ul.page-numbers li a,
    .news-pagination ul.page-numbers li span {
        padding: 6px 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .news-item {
        flex-direction: column;
        gap: 4px;
    }

    .news-time {
        text-align: left;
    }
}
