/* Compact news layout with optional auto-scroll */
#news {
    background-color: var(--background-color);
}

.news-container {
    background-color: var(--secondary-color);
    border-radius: 0.72rem;
    padding: 0.72rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 266px;
    overflow: hidden;
}

.news-scroll {
    max-height: 236px;
    overflow-y: auto;
    padding-right: 0.28rem;
    scroll-behavior: auto;
    scrollbar-width: none;
}

.news-scroll::-webkit-scrollbar {
    width: 0;
}

.news-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}

.news-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.news-scroll:hover {
    scrollbar-width: thin;
}

.news-scroll:hover::-webkit-scrollbar {
    width: 5px;
}

.news-item {
    padding: 0.48rem 0.58rem;
    margin-bottom: 0.4rem;
    border-left: 2px solid var(--primary-color);
    background-color: var(--background-color);
    border-radius: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.18rem;
    display: flex;
    align-items: center;
    gap: 0.38rem;
}

.news-date i {
    font-size: 0.72rem;
}

.news-content {
    color: var(--text-color);
    line-height: 1.28;
    font-size: 0.88rem;
}

.news-content p {
    margin-bottom: 0;
}

.news-content a {
    color: var(--text-link-color);
    text-decoration: none;
    font-weight: 500;
}

.news-content a:hover {
    text-decoration: underline;
}

.dark .news-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.dark .news-item {
    border-left-color: var(--primary-color);
}
