/* News and Announcements Section */
.news-announcements-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.news-announcements-section .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.news-announcements-section .section-title {
    font-size: 2.25rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.news-announcements-section .section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.news-announcements-section .section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.news-announcements-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.news-box, .announcements-box {
    flex: 1;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-box:hover, .announcements-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.news-header, .announcements-header {
    padding: 1.2rem 1.8rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.news-header {
    background: linear-gradient(135deg, #00AEBA, #08748C);
}

.announcements-header {
    background: linear-gradient(135deg, #F2A25C, #d97706);
}

.news-header i, .announcements-header i {
    margin-right: 10px;
    font-size: 1.4rem;
}

.news-content, .announcements-content {
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    height: 300px; /* Fixed height for the scrolling container */
}

.news-list, .announcements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    transition: transform 0.5s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.news-item, .announcement-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.8rem;
    transition: all 0.3s ease;
    min-height: 70px; /* Ensure consistent height for smooth scrolling */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-item:last-child, .announcement-item:last-child {
    border-bottom: none;
}

.news-item:before, .announcement-item:before {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
    top: 1.1rem;
    transition: all 0.3s ease;
}

.news-item:hover, .announcement-item:hover {
    padding-left: 2rem;
}

.news-item:hover:before, .announcement-item:hover:before {
    color: var(--secondary-color);
    transform: translateX(3px);
}

.news-title, .announcement-title {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    display: block;
    transition: color 0.3s ease;
}

.news-item:hover .news-title, .announcement-item:hover .announcement-title {
    color: var(--primary-color);
}

.news-date, .announcement-date {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.news-date i, .announcement-date i {
    margin-right: 5px;
    font-size: 0.7rem;
}

.view-all-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.view-all-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-all-link:hover {
    color: var(--secondary-color);
}

.view-all-link:hover i {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 991px) {
    .news-announcements-container {
        flex-direction: column;
    }
    
    .news-box, .announcements-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .news-announcements-section {
        padding: 3.5rem 0;
    }
    
    .news-announcements-section .section-title {
        font-size: 1.8rem;
    }
    
    .news-header, .announcements-header {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .news-content, .announcements-content {
        padding: 1.5rem;
        height: 280px; /* Slightly smaller height on mobile */
    }
    
    .news-announcements-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .news-box, .announcements-box {
        width: 100%;
    }
}
