/* static/css/style.css */

/* Общие стили */
body {
    background-color: #f9f8f5;
    color: #222;
    font-family: 'Georgia', serif;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка газеты */
.header {
    background-color: #f5f5f5;
    border-bottom: 3px double #000;
    padding: 2rem 0;
}

.header .title {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-family: Georgia, serif;
    font-style: italic;
    color: #555;
    font-size: 1rem;
}

/* Навигация */
.navbar {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background-color: #f5f5f5 !important;
}

.navbar-item {
    font-family: Georgia, serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #222 !important;
}

.navbar-item:hover {
    color: #3273dc !important;
}

/* Новостные карточки */
.news-list {
    margin: 2rem 0;
}

.news-item {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item-grid {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.news-item-image {
    flex: 0 0 25%;
    min-width: 0;
}

.news-thumbnail {
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item:hover {
    border-color: #3273dc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.news-title a {
    color: #222;
    text-decoration: none;
}

.news-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.news-date {
    display: inline-block;
    margin-right: 1rem;
}

.news-description {
    color: #444;
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Адаптация для мобильных */
@media screen and (max-width: 768px) {
    .news-item {
        flex-direction: column;
    }
    
    .news-image-container {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .news-image {
        width: 100%;
        height: auto;
    }
.news-item-grid {
        flex-direction: column;
    }
    
    .news-item-image {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .news-thumbnail {
        padding-bottom: 56.25%; /* 16:9 на мобильных */
    }
}

/* Форма фильтрации */
.filter-form .field {
    margin-bottom: 0;
}

.filter-form .input {
    border-radius: 0;
    border: 1px solid #000;
}

.filter-form .button {
    border-radius: 0;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
}

.filter-form .button:hover {
    background-color: #3273dc;
    border-color: #3273dc;
}

/* Пагинация */
.pagination {
    margin: 2rem 0;
    justify-content: flex-start !important; /* Выравнивание по левому краю */
}

.pagination-list {
    margin-left: 0 !important;
}

.pagination-previous,
.pagination-next,
.pagination-link {
    margin: 0 0.25rem !important; /* Уменьшаем отступы между кнопками */
    min-width: 2.25em !important; /* Фиксированная ширина кнопок */
}

.pagination-link.is-current {
    background-color: #3273dc !important;
    border-color: #3273dc !important;
}

/* Для мобильных */
@media screen and (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    .pagination-previous,
    .pagination-next {
        order: 1; /* Кнопки вперед/назад в конце */
    }
}

/* Полная новость */
.full-news {
    background: #fff;
    padding: 2rem;
    border: 1px solid #ddd;
    margin: 2rem 0;
}

.full-news-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.full-news-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
}

.full-news-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.full-news-source {
    font-style: italic;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

/* Адаптация для мобильных */
@media screen and (max-width: 768px) {
    .header .title {
        font-size: 1.5rem;
    }
    
    .navbar-menu {
        box-shadow: none;
    }
    
    .news-item {
        margin-bottom: 1.5rem;
    }
}

/* Стили для полной новости */
.news-article {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.news-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.news-meta {
    font-size: 0.85rem;
    color: #666;
}

.news-meta span {
    margin-right: 1rem;
}

.news-image-container {
    margin: 2rem 0;
    text-align: center;
}

.news-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.news-image-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.news-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 2rem 0;
}


.news-source a {
    color: #3273dc;
    text-decoration: none;
    font-weight: 500;
}

.news-source a:hover {
    text-decoration: underline;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .news-article {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .news-image {
        max-height: 300px;
    }
    
    .news-content {
        font-size: 1rem;
    }
}

/* Стили для контента новости */
.news-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.news-content h2,
.news-content h3 {
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.news-content h2 {
    font-size: 1.5rem;
}

.news-content h3 {
    font-size: 1.3rem;
}

.news-content ul,
.news-content ol {
    margin: 1rem 0 1rem 2rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

.news-content a {
    color: #3273dc;
    text-decoration: underline;
}

.news-content strong {
    font-weight: 600;
}

.news-content em {
    font-style: italic;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}
/* Карусель фотоленты */
.photolenta-carousel {
    position: relative;
    margin: 2rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    bottom: 0;
    left: 0;
    right: 0;
}

.carousel-caption p {
    color: white;
    margin-bottom: 0.5rem;
}

.carousel-caption small {
    color: #ccc;
    font-size: 0.8rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
}

/* Стили для карусели */
.photo-carousel {
    position: relative;
    margin: 1rem 0;
    overflow: hidden;
}

.carousel-item {
    display: none;
}

.carousel-item.active {
    display: block;
}

.photo-carousel img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 4px;
}

.caption {
    padding: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: white;
    text-align: center;
    font-size: 0.9rem;
}

/* Стили для текста статьи */
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #333;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 1.3rem 0 0.8rem;
    color: #444;
}