/* News Page Styles */

/* News Section */
.news-section {
    padding: 60px 0;
    background-color: #ffffff;
    min-height: 100vh;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* News Main */
.news-main {
    min-height: 100vh;
}

.news-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212427;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* News Topbar */
.news-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.news-topbar .results-count {
    font-size: 14px;
    color: #6c757d;
}

.news-topbar .sort-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    min-width: 180px;
}

.news-topbar .sort-select:focus {
    outline: none;
    border-color: #356df1;
    box-shadow: 0 0 0 2px rgba(53, 109, 241, 0.1);
}

/* News Item */
.news-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 12px;
    background: #f5f7f8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.news-item:hover {
    transform: translateY(-5px);
    border-color: #356df1;
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 100px;
    background: #f0f0f0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.08);
}

.news-content {
    padding: 30px 30px 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    margin: 0 0 16px 0;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.news-title a {
    color: #212427;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #356df1;
}

.news-excerpt {
    color: #6c757d;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.news-category,
.news-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.news-category svg,
.news-date svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.read-more {
    color: #356df1;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: #000000;
    gap: 10px;
}

/* No News */
.no-news {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 12px;
}

.no-news p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.page-link:hover {
    background-color: #356df1;
    border-color: #356df1;
    color: #ffffff;
    transform: translateY(-2px);
}

.page-link.active {
    background-color: #356df1;
    border-color: #356df1;
    color: #ffffff;
}

.page-link.prev,
.page-link.next {
    font-size: 14px;
    padding: 0 12px;
}

.page-link.prev svg,
.page-link.next svg {
    width: 20px;
    height: 20px;
}

/* Sidebar */
.news-sidebar {
    background: #f5f7f8;
    border-radius: 10px;
    padding: 0;
    position: sticky;
    top: 20px;
}

.sidebar-content {
    padding: 30px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

/* Tags Inline (checkbox style) */
.tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f5f7f8;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.tag-checkbox:hover {
    border-color: #356df1;
    background: #fff;
}

.tag-checkbox input {
    display: none;
}

.tag-checkbox input:checked + span {
    color: #356df1;
}

.tag-checkbox:has(input:checked) {
    border-color: #356df1;
    background: rgba(53, 109, 241, 0.1);
}

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #212427;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background-color: #f8f9fa;
    color: #212427;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212427;
    margin: 0 0 16px 0;
}

.category-list,
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.links-list li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child,
.links-list li:last-child {
    margin-bottom: 0;
}

.category-list a,
.links-list a {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    flex: 1;
}

.category-list a:hover,
.links-list a:hover {
    color: #356df1;
}

/* Only apply blue text when filter is actively selected by user */
.category-list a.filter-active,
.links-list a.filter-active {
    color: #356df1 !important;
    font-weight: 600 !important;
    background-color: transparent !important;
}

/* Tags get blue background when selected */
.tag.filter-active {
    background-color: #356df1 !important;
    color: #ffffff !important;
    border-color: #356df1 !important;
}

.count {
    color: #6c757d;
    font-size: 12px;
    margin-left: 8px;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tag:hover {
    background-color: #356df1;
    color: #ffffff;
    border-color: #356df1;
}

/* Filter Buttons */
.reset-filters-btn,
.apply-filters-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-btn {
    background-color: #356df1;
    color: #ffffff;
}

.reset-filters-btn:hover {
    background-color: #000000;
}

.apply-filters-btn {
    background-color: #356df1;
    color: #ffffff;
}

.apply-filters-btn:hover {
    background-color: #000000;
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.error-message strong {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .news-sidebar {
        position: static;
        max-height: none;
        padding: 0;
    }
    
    .news-sidebar .sidebar-header {
        display: flex;
    }
    
    .news-sidebar .sidebar-content {
        padding: 20px;
    }
    
    .news-item {
        grid-template-columns: 250px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .news-item {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .news-image {
        min-height: 200px;
        max-height: 200px;
    }
    
    .news-content {
        padding: 24px;
    }
    
    .news-title {
        font-size: 1.4rem;
    }
    
    .news-excerpt {
        font-size: 14px;
    }
    
    .news-sidebar {
        padding: 0;
    }
    
    .news-sidebar .sidebar-content {
        padding: 24px;
    }
    
    .pagination {
        gap: 8px;
    }
    
    .page-link {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 30px 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .news-list {
        gap: 20px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .news-excerpt {
        margin-bottom: 16px;
    }
    
    .news-meta {
        gap: 12px;
    }
    
    .sidebar-content {
        gap: 25px;
    }
    
    .sidebar-section {
        padding-bottom: 25px;
    }
    
    .sidebar-title {
        font-size: 1.1rem;
    }
    
    .tags-cloud {
        gap: 8px;
    }
    
    .tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Remove scrollbar styling - no longer needed */
