/* News Page Styles - Màu xanh nông sản */
:root {
    --news-primary: #103594;
    --news-primary-light: #4caf50;
    --news-primary-lighter: #66bb6a;
    --news-primary-lightest: #c8e6c9;
    --news-bg: #f1f8f4;
    --news-text: #333;
    --news-text-light: #666;
    --news-border: #e0e0e0;
}

/* News Page Container */
.news-page {
    padding: 40px 0;
    background: #fff;
    min-height: 60vh;
}

/* News Header */
.news-header {
    margin-bottom: 40px;
    text-align: left;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--news-primary);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--news-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 12px;
}

.page-title i {
    font-size: 28px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--news-text-light);
    margin: 0;
    line-height: 1.6;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-nav a {
    color: var(--news-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: var(--news-primary-light);
    text-decoration: underline;
}

.breadcrumb-nav i {
    color: var(--news-text-light);
    font-size: 12px;
}

.breadcrumb-nav span {
    color: var(--news-text-light);
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* News Item */
.news-item {
    display: flex;
    gap: 30px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.news-item:hover {
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.15);
    border-left-color: var(--news-primary);
    transform: translateY(-2px);
}

.news-item-image {
    flex-shrink: 0;
    width: 300px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--news-bg);
}

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

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

.news-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--news-bg);
    color: var(--news-primary-light);
    font-size: 48px;
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--news-text-light);
}

.news-meta i {
    margin-right: 5px;
    color: var(--news-primary);
}

.news-category a {
    color: var(--news-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.news-category a:hover {
    color: var(--news-primary-light);
}

.news-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
}

.news-title a {
    color: var(--news-text);
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--news-primary);
}

.news-excerpt {
    flex: 1;
    color: var(--news-text-light);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 15px;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--news-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    width: fit-content;
}

.news-read-more:hover {
    color: var(--news-primary-light);
    gap: 12px;
}

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

.news-read-more:hover i {
    transform: translateX(4px);
}

/* No News */
.no-news {
    text-align: center;
    padding: 60px 20px;
    color: var(--news-text-light);
}

.no-news i {
    font-size: 64px;
    color: var(--news-primary-lightest);
    margin-bottom: 20px;
}

.no-news p {
    font-size: 18px;
    margin: 0;
}

/* Pagination */
.news-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.news-pagination .pagination {
    gap: 8px;
}

.news-pagination .pagination a,
.news-pagination .pagination span {
    padding: 10px 16px;
    border: 1px solid var(--news-border);
    border-radius: 6px;
    color: var(--news-text);
    text-decoration: none;
    transition: all 0.3s;
}

.news-pagination .pagination a:hover {
    background: var(--news-primary);
    color: #fff;
    border-color: var(--news-primary);
}

.news-pagination .pagination .active {
    background: var(--news-primary);
    color: #fff;
    border-color: var(--news-primary);
}

/* News Detail Page */
.news-detail-page {
    padding: 40px 0;
    background: #fff;
}

.news-detail-page .row {
    margin: 0;
}

.news-detail-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--news-border);
}

.news-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--news-text-light);
}

.news-detail-meta i {
    margin-right: 5px;
    color: var(--news-primary);
}

.news-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--news-text);
    line-height: 1.3;
    margin-bottom: 20px;
}

.news-detail-excerpt {
    font-size: 18px;
    color: var(--news-text-light);
    line-height: 1.8;
    font-style: italic;
    padding-left: 20px;
    border-left: 4px solid var(--news-primary);
}

.news-detail-content {
    margin-top: 40px;
}

.news-detail-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--news-text);
    margin-bottom: 40px;
}

.news-detail-body p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 8px;
    color: #333;
}

.news-detail-body h1,
.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4,
.news-detail-body h5,
.news-detail-body h6 {
    color: var(--news-primary);
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 700;
}

.news-detail-body h1 {
    font-size: 24px;
    line-height: 1.4;
    margin-top: 20px;
    margin-bottom: 12px;
}

.news-detail-body h2 {
    font-size: 20px;
    line-height: 1.4;
    margin-top: 18px;
    margin-bottom: 10px;
}

.news-detail-body h3 {
    font-size: 18px;
    line-height: 1.4;
    margin-top: 16px;
    margin-bottom: 10px;
}

.news-detail-body h4 {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 14px;
    margin-bottom: 8px;
}

.news-detail-body h5 {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 12px;
    margin-bottom: 8px;
}

.news-detail-body h6 {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 12px;
    margin-bottom: 8px;
}

.news-detail-body a {
    color: var(--news-primary);
    text-decoration: underline;
}

.news-detail-body a:hover {
    color: var(--news-primary-light);
}

.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.news-detail-body ul,
.news-detail-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-detail-body li {
    margin-bottom: 10px;
}

/* Gallery */
.news-detail-gallery {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--news-border);
}

.news-detail-gallery h3 {
    font-size: 24px;
    color: var(--news-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Sidebar */
.news-sidebar {
    position: sticky;
    top: 100px;
    padding-left: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
    border-top: 3px solid var(--news-primary);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--news-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--news-border);
}

.widget-title i {
    font-size: 16px;
}

/* Table of Contents */
.table-of-contents-widget {
    position: sticky;
    top: 100px;
}

.toc-nav {
    max-height: 500px;
    overflow-y: auto;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 6px;
    line-height: 1.5;
}

.toc-item a {
    color: var(--news-text);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.toc-item a:hover {
    background: var(--news-bg);
    color: var(--news-primary);
    border-left-color: var(--news-primary);
    padding-left: 15px;
}

.toc-item a.active {
    background: var(--news-primary-lightest);
    color: var(--news-primary);
    border-left-color: var(--news-primary);
    font-weight: 600;
}

.toc-item.toc-level-1 a {
    font-weight: 600;
    font-size: 15px;
    padding-left: 8px;
}

.toc-item.toc-level-2 a {
    font-size: 14px;
}

.toc-item.toc-level-3 a,
.toc-item.toc-level-4 a,
.toc-item.toc-level-5 a,
.toc-item.toc-level-6 a {
    font-size: 13px;
    color: var(--news-text-light);
}

/* Related News in Sidebar */
.related-news-widget {
    border-top: 3px solid var(--news-primary);
}

.related-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-news-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--news-bg);
    border-radius: 8px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.related-news-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
    border-left-color: var(--news-primary);
    transform: translateX(5px);
}

.related-news-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

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

.related-news-item:hover .related-news-image img {
    transform: scale(1.1);
}

.related-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-news-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.related-news-title a {
    color: var(--news-text);
    text-decoration: none;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-title a:hover {
    color: var(--news-primary);
}

.related-news-excerpt {
    font-size: 13px;
    color: var(--news-text-light);
    line-height: 1.6;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-date {
    font-size: 12px;
    color: var(--news-text-light);
    margin-top: auto;
}

/* Add IDs to headings in content */
#news-content h1,
#news-content h2,
#news-content h3,
#news-content h4,
#news-content h5,
#news-content h6 {
    scroll-margin-top: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 20px;
    }
    
    .news-item-image {
        width: 100%;
        height: 250px;
    }
    
    .news-detail-title {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .news-sidebar {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .sidebar-widget {
        position: relative;
        top: 0;
    }
    
    .table-of-contents-widget {
        position: relative;
        top: 0;
    }
    
    .news-meta,
    .news-detail-meta {
        font-size: 12px;
        gap: 15px;
    }
}

