.news-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.news-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
}

.news-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.2;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-meta i {
    font-size: 1.1rem;
}

.news-content {
    font-size: 1.1rem;
    margin: 30px 0;
    text-align: justify;
    white-space: pre-wrap;
}



.news-gallery h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.news-gallery h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #3498db;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f9f9f9;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}


/* Контейнер новостей */
.news {
    max-width: 1200px;
    margin: 30px auto;
    padding: 50px;
    background-color: var(--text);
    border-radius: 20px;
}

.news-item {
    border: 1px solid rgba(109, 109, 109, 0.425);
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-item h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.news-item h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.news-item h2 a:hover {
    color: #3498db;
}

.news-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.news-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
    text-decoration: underline;
}


/* Сообщения */
.loader, .error, .no-news {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
}

.error {
    color: #e74c3c;
}

.no-news {
    color: #7f8c8d;
}

/* Адаптивность */
@media (max-width: 768px) {
    .news {
        padding: 15px;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .pagination a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .news-header h1 {
        font-size: 2.2rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .news-detail {
        padding: 15px;
    }
    
    .news-header h1 {
        font-size: 1.8rem;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .news-content {
        font-size: 1rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .news-gallery h2 {
        font-size: 1.5rem;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .news-header h1 {
        font-size: 1.5rem;
    }
    
    .gallery-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
}

/* Для очень больших экранов */
@media (min-width: 1400px) {
    .news-detail {
        max-width: 1300px;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}