/**
 * News Section CSS - Simplified, Reliable Design
 * Version: 3.0.1
 */

/* Base container styling */
.news-section {
    margin: 2rem 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Header styling */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #1B4332;
    color: #fff;
}

.news-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-title i {
    font-size: 1.25rem;
}

.news-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.news-view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.news-view-all:hover {
    background-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: #fff;
}

/* News grid layout */
.news-grid {
    display: grid;
    gap: 16px;
    padding: 1.5rem;
    grid-template-columns: 1fr;
}

/* Individual news card */
.news-card {
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-card-link {
    display: block;
    padding: 1.25rem;
    color: #333;
    text-decoration: none;
    width: 100%;
}

.news-card-link:hover {
    text-decoration: none;
    color: #1B4332;
}

.news-card-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.news-card-readmore {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #1B4332;
    font-weight: 500;
}

.news-card-link:hover .news-card-readmore i {
    transform: translateX(3px);
    transition: transform 0.2s ease;
}

/* Empty state */
.news-card-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* RTL language support (Hindi) */
.lang-hi .news-card-title {
    text-align: right;
    direction: rtl;
}

.lang-hi .news-card-meta {
    flex-direction: row-reverse;
}

.lang-hi .news-card-date {
    flex-direction: row-reverse;
}

.lang-hi .news-card-readmore {
    flex-direction: row-reverse;
}

.lang-hi .news-card-readmore i {
    transform: scaleX(-1);
}

.lang-hi .news-card-link:hover .news-card-readmore i {
    transform: translateX(-3px) scaleX(-1);
}

.lang-hi .news-view-all {
    flex-direction: row-reverse;
}

.lang-hi .news-view-all i {
    transform: scaleX(-1);
}

/* Responsive styling - Enhanced for more items per row */
@media (min-width: 576px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-card-title {
        font-size: 1.05rem;
    }
}

@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile optimizations */
@media (max-width: 575px) {
    .news-header {
        padding: 0.75rem 1rem;
    }
    
    .news-title h3 {
        font-size: 1.1rem;
    }
    
    .news-view-all {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    .news-grid {
        padding: 1rem;
        gap: 12px;
    }
    
    .news-card-link {
        padding: 1rem;
    }
    
    .news-card-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .news-card-meta {
        font-size: 0.8rem;
    }
} 