/* Сетка новостей */
.news-grid {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.news-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

/* Карточка новости */
.news-card {
    display: flex;
    gap: 25px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Изображение (квадрат 200x200) */
.news-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.news-image img {
    height: 100%;
    object-fit: cover;
}

.news-image-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-radius: 8px;
}

/* Контент новости */
.news-content {
    flex: 1;
}

.news-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.news-date {
    font-size: 0.85rem;
    color: #888;
}

.news-draft {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.news-headline {
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.news-headline a {
    color: #333;
    text-decoration: none;
}

.news-headline a:hover {
    color: #667eea;
}

.news-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
    }
    
    .news-image,
    .news-image-placeholder {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* Кнопка "Назад к новостям" */
.back-link {
    margin-bottom: 30px;
}

.back-link a {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Стиль отдельной новости */
.news-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-meta {
    color: #888;
    margin-bottom: 20px;
}

.article-image {
    margin: 20px 0;
}


.article-body {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Скрыть выпадающее меню для раздела Новости */
.page-news .dropdown-menu {
    display: none !important;
}

/* Скрыть выпадающее меню для всех пунктов в шапке */
.dropdown-menu {
    display: none !important;
}

/* Или только для страницы Новости */
.page-news .dropdown-toggle + .dropdown-menu {
    display: none !important;
}

/* Кнопка "Назад" */
.back-link {
    margin: 20px 0;
}

.back-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
}

.back-button:hover {
    background: #5a67d8;
    color: white;
}

/* Стиль отдельной новости */
.news-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.article-meta {
    color: #888;
    margin: 10px 0 20px;
}

.article-image {
    margin: 20px 0;
}


.article-content {
    line-height: 1.7;
}

/* Скрыть выпадающее меню */
.dropdown-menu {
    display: none !important;
}

/* Скрыть стрелку у пунктов с подменю */
.dropdown-toggle:after {
    display: none !important;
}
.news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.news-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}
.news-text h3 {
    margin: 0 0 5px;
}
.news-date {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* Блок с новостью */
.news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

/* Контейнер картинки */
.news-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
}

/* Сама картинка */
.news-image img {
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Текстовая часть */
.news-text {
    flex: 1;
}

.news-text h3 {
    margin: 0 0 5px;
    font-size: 1.2rem;
}

.news-text h3 a {
    text-decoration: none;
    color: #333;
}

.news-text h3 a:hover {
    color: #667eea;
}

.news-date {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.news-text p {
    margin: 0 0 10px;
    color: #666;
    line-height: 1.4;
}

.news-text a {
    color: #667eea;
    text-decoration: none;
}

.news-text a:hover {
    text-decoration: underline;
}

/* Описание страницы */
.page-description {
    background: #f0f0f0;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Кнопка "Назад к списку новостей" - текстовая ссылка */
.back-link {
    margin: 20px 0 30px;
}

.back-link a {
    display: inline-block;
    background: transparent !important;
    color: #667eea !important;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.back-link a:hover {
    color: #5a67d8 !important;
    text-decoration: underline !important;
    background: transparent !important;
}

/* Максимально агрессивные стили для кнопки "Назад" */
.back-link,
.back-link *,
.back-link a,
a.back-button,
div.back-link a,
section .back-link a,
.back-link a:link,
.back-link a:visited {
    display: inline-block !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #667eea !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.back-link a:hover,
.back-link a:focus,
.back-link a:active {
    color: #5a67d8 !important;
    text-decoration: underline !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Новая стилизация кнопки "Назад" */
.news-back-link {
    margin: 20px 0 30px;
}

.news-back-button {
    display: inline-block !important;
    background: transparent !important;
    color: #667eea !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.news-back-button:hover {
    color: #5a67d8 !important;
    text-decoration: underline !important;
    background: transparent !important;
}

.news-article h1,
article h1,
.article-content h1 {
    font-size: 1.4rem !important;
}

/* Картинка внутри новости - не больше ширины экрана */

/* Превью картинок в списке - чёткое отображение */
.news-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: crisp-edges; /* Улучшает чёткость */
}

/* Горизонтальная черта как в Telegra.ph */

/* Альтернативный вариант — простая черта по центру */
/*
*/




hr {
    width: 500px;
    margin: 30px auto;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ccc, transparent);
}

/* Вариант 1: Тонкая линия */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}
    color: #667eea;
    text-decoration: none;
}
    text-decoration: underline;
}

/* Вариант 2: С фоном и рамкой */
    margin-top: 40px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}
    color: #667eea;
    text-decoration: none;
}
    text-decoration: underline;
}

/* Вариант 3: С цветной полосой слева */
    margin-top: 40px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}
    color: #667eea;
    text-decoration: none;
}
    text-decoration: underline;
}

/* Общие стили для всех вариантов */
.nav-next {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.nav-prev-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-prev-list a {
    display: inline-block;
}

.chapter-selector {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.next-chapter {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
}

.next-chapter:hover {
    text-decoration: underline;
}

.chapter-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
}

.chapter-selector select:hover {
    border-color: #667eea;
}

.chapter-selector {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Вариант: список слева, продолжение справа */
.chapter-selector-left {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.next-chapter-right {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
}

.next-chapter-right:hover {
    text-decoration: underline;
}

/* Вариант: продолжение сверху, список снизу */
.chapter-selector-column {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.next-chapter-top {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
}

.next-chapter-top:hover {
    text-decoration: underline;
}

.chapter-selector-column select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    width: auto;
    min-width: 200px;
}

.chapter-selector-column select:hover {
    border-color: #667eea;
}

.chapter-selector select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
}

.chapter-selector select:hover {
    border-color: #667eea;
}

/* Скругление для всех картинок внутри текста статьи (как у первой) */
.article-content img {
    border-radius: 8px;
}

/* Единое скругление для всех картинок в статьях */
.article-image img,
.article-content img {
    border-radius: 8px;
}
