/* Стили для новостей */

/* Хлебные крошки */
.breadcrumbs {
    background: #f5f6f8;
    padding: 15px 0;
    border-bottom: 1px solid #dde3ff;
    margin-top: 70px; /* Отступ под фиксированный header */
}

.breadcrumbs a {
    color: #7c5cd8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #5a2fc4;
}

.breadcrumbs span {
    margin: 0 10px;
    color: #8b91a3;
}

/* Основной контент */
.news-content {
    padding: 40px 0;
}

.news-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Заголовок новостей */
.news-header {
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2750;
    margin-bottom: 15px;
}

.category-description {
    color: #5a6075;
    font-size: 1.1rem;
    line-height: 1.6;
}

.search-results {
    color: #7c5cd8;
    font-weight: 600;
}

/* Боковая панель */
.news-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #f5f6f8;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a2750;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7c5cd8;
}

/* Поиск */
.search-form {
    display: flex;
    border: 2px solid #dde3ff;
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-form:focus-within {
    border-color: #7c5cd8;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-form button {
    background: #7c5cd8;
    color: white;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #5a2fc4;
}

/* Список категорий */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list li {
    margin-bottom: 8px;
}

.categories-list a {
    display: block;
    padding: 10px 15px;
    color: #2c3247;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.categories-list a:hover,
.categories-list a.active {
    background: #7c5cd8;
    color: white;
}

/* Контактный виджет */
.contact-widget {
    background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
    color: white;
    text-align: center;
}

.contact-widget h3 {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.contact-widget p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.contact-phone, .contact-email {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.contact-phone:hover, .contact-email:hover {
    background: rgba(255,255,255,0.3);
}

/* Сетка новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Карточка новости */
.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f5f6f8;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-card.featured {
    border: 2px solid #7c5cd8;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc2626;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.news-content {
    padding: 25px;
}

.news-category {
    margin-bottom: 15px;
}

.news-category a {
    background: #7c5cd8;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    transition: background 0.3s ease;
}

.news-category a:hover {
    background: #5a2fc4;
}

.news-title {
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title a {
    color: #1a2750;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #7c5cd8;
}

.news-excerpt {
    color: #5a6075;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #5a6075;
}

.news-date {
    font-weight: 500;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Сообщение об отсутствии новостей */
.no-news {
    text-align: center;
    padding: 60px 20px;
    background: #f5f6f8;
    border-radius: 15px;
}

.no-news h3 {
    color: #2c3247;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-news p {
    color: #5a6075;
    margin-bottom: 25px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination-btn {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #dde3ff;
    border-radius: 8px;
    color: #2c3247;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
    font-weight: 500;
}

.pagination-btn:hover {
    background: #7c5cd8;
    color: white;
    border-color: #7c5cd8;
}

.pagination-btn.active {
    background: #7c5cd8;
    color: white;
    border-color: #7c5cd8;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .breadcrumbs {
        margin-top: 55px;
        padding: 12px 0;
        font-size: 14px;
    }
    
    .news-content {
        padding: 30px 0;
    }
    
    .news-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .news-sidebar {
        order: -1;
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-header {
        margin-bottom: 30px;
    }
    
    .news-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .news-card {
        max-width: 100%;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-card .news-content {
        padding: 20px;
    }
    
    .news-title a {
        font-size: 1.1rem;
    }
    
    .pagination {
        gap: 5px;
        margin-top: 30px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .breadcrumbs {
        margin-top: 50px;
        padding: 10px 0;
        font-size: 13px;
    }
    
    .breadcrumbs span {
        margin: 0 5px;
    }
    
    .news-content {
        padding: 20px 0;
    }
    
    .news-header {
        margin-bottom: 25px;
    }
    
    .news-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .category-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .search-form input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-form button {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .categories-list a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .news-grid {
        gap: 15px;
    }
    
    .news-card {
        border-radius: 12px;
    }
    
    .news-image {
        height: 160px;
    }
    
    .news-card .news-content {
        padding: 15px;
    }
    
    .news-category a {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .news-title {
        margin-bottom: 12px;
    }
    
    .news-title a {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .news-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 15px;
        -webkit-line-clamp: 2;
    }
    
    .news-meta {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .featured-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .pagination {
        gap: 4px;
        margin-top: 25px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .contact-widget {
        padding: 15px;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 14px;
        padding: 8px 12px;
        margin-bottom: 8px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .news-header h1 {
        font-size: 1.3rem;
    }
    
    .sidebar-widget {
        padding: 12px;
    }
    
    .news-card .news-content {
        padding: 12px;
    }
    
    .news-title a {
        font-size: 0.95rem;
    }
    
    .news-excerpt {
        font-size: 0.85rem;
    }
    
    .pagination-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 32px;
    }
}

/* Блок с описанием категории после новостей */
.category-content-block {
    margin-top: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #16a34a;
}

.category-content-block h2,
.category-content-block h3,
.category-content-block h4 {
    color: #0a0d14;
    margin-top: 25px;
    margin-bottom: 15px;
}

.category-content-block h2 { font-size: 24px; }
.category-content-block h3 { font-size: 20px; }
.category-content-block h4 { font-size: 18px; }

.category-content-block p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #5a6075;
}

.category-content-block ul,
.category-content-block ol {
    margin: 15px 0;
    padding-left: 25px;
}

.category-content-block li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.category-content-block strong {
    color: #0a0d14;
    font-weight: 600;
}

.category-content-block a {
    color: #16a34a;
    text-decoration: none;
}

.category-content-block a:hover {
    text-decoration: underline;
}

/* Респонсивность */
@media (max-width: 768px) {
    .category-content-block {
        margin-top: 30px;
        padding: 20px;
    }
    
    .category-content-block h2 { font-size: 20px; }
    .category-content-block h3 { font-size: 18px; }
    .category-content-block h4 { font-size: 16px; }
}