/* static/css/news-list.css */

/* ─── Line-clamp утилиты ────────────────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Равная высота карточек в секции "Последние события" ───────────────── */
/* col обёртка использует d-flex чтобы article тянулся на всю высоту ряда   */
.home-news-grid .col-12.col-md-6 {
    display: flex;
}

.home-news-grid .news-card-premium {
    flex: 1 1 0;           /* растягивается на всю доступную высоту col */
    min-height: 300px;     /* нижний порог высоты */
}

/* Описание растёт и занимает всё свободное пространство между */
/* заголовком и футером — это и даёт симметрию нижней части    */
.home-news-grid .news-description {
    flex-grow: 1;
}

.news-list-container {
    padding-bottom: 2rem;
}

/* Фильтры и сортировка */
.btn-filter-pill, .btn-sort-pill {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-filter-pill:hover, .btn-sort-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-filter-pill.active, .btn-sort-pill.active {
    background: var(--bs-primary, var(--primary-color));
    color: var(--text-white);
    border-color: var(--bs-primary, var(--primary-color));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Сетка новостей */

/* Карточка новости */
.news-card-premium {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(30, 30, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}


.news-card-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Фон карточки если есть картинка */
.news-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.1;
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.news-card-premium:hover .news-card-bg {
    opacity: 0.2;
    transform: scale(1.05);
}

.news-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20,20,25,0.95) 0%, rgba(20,20,25,0.5) 100%);
    z-index: 2;
}

.news-card-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-category-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.news-category-badge:hover {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-white);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.news-title {
    line-height: 1.4;
}

.news-title a {
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #818cf8 !important;
}

.news-description {
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn-read-more {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

.news-card-premium:hover .btn-read-more {
    color: #818cf8;
}

.news-card-premium:hover .btn-read-more i {
    transform: translateX(5px);
}

/* Стили пагинации Glassmorphism */
.glass-pagination .page-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    margin: 0 4px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.glass-pagination .page-item.active .page-link {
    background: var(--bs-primary, var(--primary-color));
    border-color: var(--bs-primary, var(--primary-color));
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.glass-pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.glass-empty-state {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}
