/* Latest News Section on Homepage */
.latest-news-section {
    background: var(--bg-secondary);
    padding: 50px 0;
    margin: 40px 0;
}

.latest-news-section .section-title {
    color: var(--accent-primary);
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.news-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.news-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-secondary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
}

.news-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.news-card:hover .news-thumbnail img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-content h3 a:hover {
    color: var(--accent-primary);
}

.news-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-secondary);
}

.news-date {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.7;
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--accent-secondary);
    transform: translateX(-3px);
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.view-all-news {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Light Theme */
body.light-theme .latest-news-section {
    background: #F8F9FA;
}

body.light-theme .latest-news-section .section-title {
    color: #002244;
}

body.light-theme .news-card {
    background: #FFFFFF;
    border-color: #E9ECEF;
}

body.light-theme .news-card:hover {
    border-color: #002244;
    box-shadow: 0 8px 20px rgba(40, 54, 124, 0.15);
}

body.light-theme .news-content h3 a {
    color: #002244;
}

body.light-theme .news-content h3 a:hover {
    color: #1A8CFF;
}

body.light-theme .read-more {
    color: #002244;
}

body.light-theme .read-more:hover {
    color: #1A8CFF;
}

body.light-theme .btn-view-all {
    background: #002244;
    color: #FFFFFF;
}

body.light-theme .btn-view-all:hover {
    box-shadow: 0 6px 20px rgba(40, 54, 124, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .news-grid-home {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-thumbnail {
        height: 150px;
    }

    .news-content {
        padding: 15px;
    }

    .news-content h3 {
        font-size: 16px;
    }

    .btn-view-all {
        width: 100%;
        padding: 12px 20px;
    }
}