/* news.css — окончательная версия */

/* Hero секция новостей */
.news-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 51, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.news-hero-content {
    position: relative;
    z-index: 2;
}

.screen-reader-text {
    display: none;
}

.news-hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: white;
}

.news-hero-subtitle {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Основной контейнер */
.news-main {
    padding: 60px 0;
    background: #f8f9fa;
    width: 100%;
}

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

/* Сайдбар */
.news-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

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

.widget-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1.2rem;
    color: #333;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #ff3366, #ff6b35);
}

/* Категории */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
    font-size: 15px;
    width: 100%;
}

.category-link:hover {
    color: #ff3366;
    transform: translateX(5px);
}

.category-link:last-child {
    border-bottom: none;
}

.category-name {
    flex: 1;
}

.category-count {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #666;
    min-width: 30px;
    text-align: center;
}

/* Последние новости */
.recent-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.recent-news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    width: 100%;
}

.recent-news-item:last-child {
    border-bottom: none;
}

.recent-news-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
}

.recent-news-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-news-content {
    flex: 1;
    min-width: 0;
}

.recent-news-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
    transition: color 0.3s ease;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.recent-news-title:hover {
    color: #ff3366;
}

.recent-news-date {
    font-size: 13px;
    color: #888;
}

/* Основной контент новостей */
.news-content {
    width: 100%;
    min-height: auto;
    min-width: 0;
}

/* Информация о результатах */
.news-results-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #ff3366;
    width: 100%;
}

.news-results-info p {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* СЕТКА НОВОСТЕЙ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* фикс для ширины */
    gap: 30px;
    margin-bottom: 50px;
    width: 100%;
    align-items: stretch;
}

/* КАРТОЧКИ НОВОСТЕЙ */
.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 450px;
    border: 1px solid #f0f0f0;
    width: 100%;
    min-width: 0;
}

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

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
}

.news-card-no-image {
    background: linear-gradient(135deg, #ff3366, #ff6b35);
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
}

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

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

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.1));
    transition: background 0.3s ease;
}

.news-card:hover .news-image-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.2));
}

.news-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.news-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.news-date {
    color: #888;
    font-size: 14px;
}

.news-category {
    background: linear-gradient(135deg, #ff3366, #ff6b35);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.news-card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
    flex-shrink: 0;
    font-weight: 600;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.news-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-title a:hover {
    color: #ff3366;
}

.news-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    width: 100%;
    max-height: 4.5em;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff3366;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 15px;
}

.news-read-more:hover {
    gap: 12px;
    color: #e62e5c;
}

.read-more-arrow {
    transition: transform 0.3s ease;
    font-size: 16px;
}

.news-read-more:hover .read-more-arrow {
    transform: translateX(3px);
}

/* Пагинация */
.news-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    padding: 30px 0;
    width: 100%;
    border-top: 1px solid #e0e0e0;
}

.news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    margin: 0 4px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.news-pagination .page-numbers:hover {
    border-color: #ff3366;
    color: #ff3366;
    transform: translateY(-2px);
}

.news-pagination .page-numbers.current {
    background: #ff3366;
    color: white;
    border-color: #ff3366;
}

.news-pagination .prev,
.news-pagination .next {
    font-weight: 600;
}

.news-pagination .dots {
    border: none;
    background: transparent;
    cursor: default;
}

.news-pagination .dots:hover {
    transform: none;
    background: transparent;
    color: #555;
}

/* Сообщение "Новостей нет" */
.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
    width: 100%;
}

.no-news h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-news p {
    font-size: 1.1rem;
    color: #888;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .news-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .news-sidebar {
        position: static;
        order: 2;
    }
    
    .news-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .news-hero {
        padding: 60px 0 40px;
    }
    
    .news-hero-title {
        font-size: 2.5rem;
    }
    
    .news-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .news-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    
    .news-card {
        min-height: 400px;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-card-content {
        padding: 20px;
    }
    
    .news-card-title {
        font-size: 1.3rem;
    }
    
    .news-excerpt {
        font-size: 14px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .news-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .news-hero-title {
        font-size: 2rem;
    }
    
    .news-hero-subtitle {
        font-size: 1rem;
    }
    
    .news-card-content {
        padding: 15px;
    }
    
    .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .news-card-title {
        font-size: 1.2rem;
    }
    
    .news-excerpt {
        font-size: 14px;
    }
    
    .news-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
        margin: 0 2px;
    }
    
    .news-results-info {
        padding: 12px 15px;
    }
    
    .news-results-info p {
        font-size: 14px;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
}

/* Универсальные фиксы */
* {
    box-sizing: border-box;
}

.news-main,
.news-layout,
.news-content,
.news-grid,
.news-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.news-card img,
.recent-news-thumb {
    max-width: 100%;
    height: auto;
}
