/* ====================================
   Стили для новостных карточек
   Используется на главной и странице "Все новости"
   ==================================== */

/* Базовые стили для всех новостных карточек */
.news-card {
    border: none !important;
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 1.5rem;
    background-color: #fff;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2) !important;
}

/* Стили для горизонтального расположения (изображение слева, текст справа) */
.news-card .row {
    margin: 0;
}

.news-card .col-md-4,
.news-card .col-lg-4 {
    padding: 0;
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

/* Стили для контента карточки */
.news-card .card-body {
    padding: 2rem;
}

/* Бейджи (категория, дата, время чтения) */
.news-card .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.news-card .badge i {
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

.news-card .badge.bg-primary {
    background-color: #0d6efd !important;
}

.news-card .badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Заголовок новости */
.news-card h3,
.news-card .h3,
.news-card h4,
.news-card .h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-card h3 a,
.news-card .h3 a,
.news-card h4 a,
.news-card .h4 a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card h3 a:hover,
.news-card .h3 a:hover,
.news-card h4 a:hover,
.news-card .h4 a:hover {
    color: #0d6efd;
}

/* Текст новости */
.news-card .card-text {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Мета-информация (для главной страницы) */
.news-card .news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Кнопка "Подробнее" (для главной страницы) */
.news-card .read-more {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.news-card .read-more:hover {
    gap: 0.8rem;
    color: #0a58ca;
}

/* Кнопка "Читать далее" (для страницы "Все новости") */
.news-card .btn-outline-primary {
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border: 2px solid #0d6efd;
    color: #0d6efd;
    transition: all 0.2s ease;
}

.news-card .btn-outline-primary:hover {
    transform: translateX(5px);
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.news-card .btn-outline-primary i {
    transition: transform 0.2s ease;
}

.news-card .btn-outline-primary:hover i {
    transform: translateX(3px);
}

/* Автор новости */
.news-card .small.text-muted i {
    margin-right: 0.3rem;
    color: #6c757d;
}

/* Футер карточки (для главной страницы) */
.news-card .card-footer {
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* Стили для сетки на странице "Все новости" */
.news-list-page .news-card {
    margin-bottom: 2rem;
}

/* Пагинация для страницы "Все новости" */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination .page-link {
    color: #0d6efd;
    border: none;
    margin: 0 0.2rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    color: white;
}

/* Фильтры для страницы "Все новости" */
.news-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.news-filters .form-select,
.news-filters .form-control {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
}

.news-filters .btn-filter {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 2rem;
    transition: all 0.2s ease;
    width: 100%;
}

.news-filters .btn-filter:hover {
    background-color: #0a58ca;
    transform: translateY(-2px);
}

/* Заголовок страницы новостей */
.news-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
}

.news-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.news-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.news-header .breadcrumb-item,
.news-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.news-header .breadcrumb-item a:hover {
    color: white;
}

.news-header .breadcrumb-item.active {
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .news-card .row {
        flex-direction: column;
    }
    
    .news-card .col-md-4,
    .news-card .col-lg-4 {
        height: 200px;
    }
    
    .news-card img {
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        border-bottom-left-radius: 0;
    }
    
    .news-card .card-body {
        padding: 1.5rem;
    }
    
    .news-card h3,
    .news-card .h3,
    .news-card h4,
    .news-card .h4 {
        font-size: 1.25rem;
    }
    
    .news-header {
        padding: 2rem 0;
    }
    
    .news-header h1 {
        font-size: 2rem;
    }
    
    .news-filters .btn-filter {
        margin-top: 0.5rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 576px) {
    .news-card .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .news-card .card-body {
        padding: 1rem;
    }
}

/* Стили для PDF кнопок (как кнопка "Все новости") */
.pdf-download-btn-news {
    display: inline-block !important;
    background-color: transparent !important;
    color: #0d6efd !important;
    padding: 8px 24px !important;
    border: 2px solid #0d6efd !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

.pdf-download-btn-news:hover {
    background-color: #0d6efd !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* Стили для PDF кнопок (как кнопка "Все новости" - прозрачная с синей обводкой) */
.pdf-download-btn-news {
    display: inline-block !important;
    background-color: transparent !important;  /* прозрачный фон */
    color: #0d6efd !important;                  /* синий текст */
    padding: 8px 24px !important;
    border: 2px solid #0d6efd !important;       /* синяя обводка */
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.pdf-download-btn-news:hover {
    background-color: #0d6efd !important;  /* синий фон при наведении */
    color: white !important;                 /* белый текст при наведении */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
    border-color: #0d6efd !important;
}

/* Убираем возможные конфликтующие стили */
.pdf-container a.btn-primary,
.pdf-container a[style*="background-color"] {
    background-color: transparent !important;
}

/* ===== Эффект парения для карточек видов спорта ===== */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    top: 0;
    overflow: hidden;
    border-radius: 8px;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04) !important;
    cursor: pointer;
}

.hover-card .card-img-top {
    transition: transform 0.5s ease;
    aspect-ratio: 3/4;
    object-fit: cover;
}

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

.hover-card .stretched-link {
    opacity: 0.9;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.hover-card:hover .stretched-link {
    opacity: 1;
    background-color: #0d6efd !important;
    color: white !important;
}

/* Заглушка для карточки без изображения */
.hover-card .bg-light {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-card .bi-trophy-fill {
    color: #0d6efd;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.hover-card:hover .bi-trophy-fill {
    opacity: 1;
}

/* ===== Стили для карточек видов спорта (как на главной) ===== */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.125);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04) !important;
    cursor: pointer;
}

.news-card .col-4 {
    overflow: hidden;
}

.news-card img,
.news-card .bg-light {
    transition: transform 0.5s ease;
    height: 100%;
    min-height: 120px;
}

.news-card:hover img,
.news-card:hover .bg-light {
    transform: scale(1.05);
}

.news-card .card-body {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.news-card:hover .card-body {
    background-color: #ffffff;
}

.news-card .h5 {
    color: #212529;
    line-height: 1.4;
    margin: 0;
    font-size: 1.1rem;
}

/* Для мобильных */
@media (max-width: 768px) {
    .news-card .h5 {
        font-size: 1rem;
    }
}
