.news-section {
    padding: 6rem 0 5rem;
    position: relative;
    width: 100%;
    margin: 0;
    background-color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.section-header .divider {
    width: 80px;
    height: 3px;
    background-color: var(--olive);
    margin: 0.5rem auto;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.news-content {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 2rem;
    margin: 1rem auto 0;
    max-width: 1400px;
    padding: 0 2rem;
}

.tag-sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.tag-sidebar h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.tag-sidebar h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--olive);
}

.tag-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.tag-list .tag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--white);
    color: var(--olive);
    border: 1px solid var(--olive);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 36px;
}

.tag-list .tag:hover,
.tag-list .tag.active {
    background: var(--olive);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.news-feed {
    flex: 1;
    width: 100%;
}

.news-post {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-post.collapsed {
    cursor: pointer;
    background: white;
}

.news-post.collapsed:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.post-thumbnail {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.35rem;
    position: relative;
    min-height: 90px;
}

.post-image {
    width: 100%;
    height: 90px;
    overflow: hidden;
    border-radius: var(--radius);
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-post:hover .post-image img {
    transform: none;
}

.post-preview {
    padding: 0.15rem 0.35rem;
    display: flex;
    flex-direction: column;
    min-height: 90px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-right: 5.5rem;
}

.post-date, .post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.post-tags .tag {
    background-color: rgba(85, 107, 47, 0.1);
    color: var(--olive);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    transition: background-color 0.2s ease;
}

.post-tags .tag:hover {
    background-color: rgba(85, 107, 47, 0.2);
}

.post-title {
    margin: 0 0 0.35rem;
    color: var(--text-color);
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 600;
}

.expand-btn {
    position: absolute;
    right: 0.75rem;
    bottom: 0.35rem;
    padding: 0.35rem 0.9rem;
    background-color: var(--olive);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.collapse-btn {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 0.35rem 0.9rem;
    background-color: transparent;
    border: 1px solid var(--olive);
    color: var(--olive);
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.expand-btn:hover, .collapse-btn:hover {
    background-color: var(--dark-olive);
    color: white;
    transform: translateY(-1px);
}

.post-full-content {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    padding-bottom: 3.5rem;
}

.news-post:not(.collapsed) .post-full-content {
    display: block;
}

.news-post:not(.collapsed) .expand-btn {
    display: none;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--olive);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-olive);
    transform: translateY(-3px);
}

@media (max-width: 1400px) {
    .news-section {
        width: 100%;
    }

    .news-content {
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    .news-content {
        grid-template-columns: 200px 1fr;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 5rem 0 4rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .news-content {
        grid-template-columns: 1fr;
        max-width: 600px;
        padding: 0 1rem;
    }

    .tag-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        background-color: #f8f9fa;
    }

    .tag-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .post-thumbnail {
        grid-template-columns: 100px 1fr;
        gap: 0.5rem;
    }

    .post-image {
        height: 80px;
    }

    .post-preview {
        min-height: 80px;
    }

    .post-meta {
        padding-right: 5rem;
    }

    .expand-btn {
        right: 0.75rem;
        bottom: 0.35rem;
        padding: 0.25rem 0.75rem;
    }
}