/* CMS News Articles Styles */
/* These styles are scoped to avoid conflicts with main site styling */

/* Initial loading indicator - simple text, no animation */
.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.news-loading p {
    color: #666;
    font-size: 16px;
}

/* News Grid Layout - 4 columns on desktop */
#articles {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 50px 2%;
    box-sizing: border-box;
}

/* Listing Title - High specificity to override site styles */
#articles h2.content-h2,
#articles h2.content-h2 span,
.content-wrap #articles .content-h2 {
    font-size: 42px !important;
    color: #005EB8 !important;
    font-weight: 300 !important;
    margin-bottom: 30px !important;
    line-height: 1.2 !important;
}

#articles .news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}


/* Responsive breakpoints */
@media (max-width: 1200px) {
    #articles .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #articles .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #articles .news-grid {
        grid-template-columns: 1fr;
    }
}

#articles .news-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#articles .news-card:hover {
    border-color: #0066cc;
}

#articles .news-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background-color: #e0e0e0;
    border-radius: 6px;
    margin: 10px 0;
}



#articles .news-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#articles .news-card h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1em;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#articles .news-card-image-link {
    display: block;
}

#articles .news-card .excerpt {
    color: black;
    font-size: 0.85em;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Categories section */
#articles .news-card .categories-wrap {
    margin-bottom: 8px;
}

/* Tags section - fixed height for alignment */
#articles .news-card .tags-wrap {
    min-height: 34px;
    margin-top: auto;
    margin-bottom: 10px;
}

/* Meta section - date and author */
#articles .news-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

#articles .news-card .meta .publish-date {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.2 !important;
    font-weight: 500;
}

#articles .tag {
    display: inline-block;
    background: #e8f4fc;
    color: #0066cc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px !important;
    margin: 2px;
    line-height: 1.4;
    font-weight: 500;
}

#articles .category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px !important;
    font-weight: 500;
    color: white;
    margin-right: 4px;
    margin-bottom: 4px;
}

#articles .featured-badge {
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

#articles .tags-section, #articles .categories-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#articles .tag-item, #articles .category-item {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    border-radius: 8px;
}

#articles .tag-item strong, #articles .category-item strong {
    display: block;
    margin-bottom: 5px;
}

#articles .tag-item small, #articles .category-item small {
    color: #888;
}

/* Pagination Styles */
#articles .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

#articles .pagination-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #0066cc;
    background: white;
}

#articles .pagination-link.current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    font-weight: bold;
}

#articles .pagination-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
    pointer-events: none;
    opacity: 0.6;
}

#articles .tag-link, #articles .category-link {
    text-decoration: none;
    cursor: pointer;
}

#articles .active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#articles .active-filters-label {
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

#articles .filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    text-decoration: none;
    cursor: pointer;
}

#articles .filter-chip.category-chip {
    background: #0066cc;
    color: white;
}

#articles .filter-chip.tag-chip {
    background: #e8f4fc;
    color: #0066cc;
    border: 1px solid #b8daff;
}

#articles .filter-chip .remove-icon {
    margin-left: 8px;
    font-weight: bold;
    font-size: 1.1em;
    color: white !important
}



#articles .clear-all-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 0.9em;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
}
