/* OKMesh News Feed Styles */

.okmesh-news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filter Buttons */
.okmesh-news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
}

.okmesh-filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 24px;
    background: #fff;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.okmesh-filter-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.okmesh-filter-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

/* News Grid */
.okmesh-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* News Card */
.okmesh-news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

/* Card Header */
.okmesh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.okmesh-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.okmesh-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Tag Colors by Type */
.okmesh-tag-events {
    background: #E3F2FD;
    color: #1565C0;
}

.okmesh-tag-firmware {
    background: #FFF3E0;
    color: #E65100;
}

.okmesh-tag-hardware {
    background: #F3E5F5;
    color: #7B1FA2;
}

.okmesh-tag-meshcore {
    background: #E8F5E9;
    color: #2E7D32;
}

.okmesh-tag-community {
    background: #FFF9C4;
    color: #F57F17;
}

.okmesh-tag-network {
    background: #E0F7FA;
    color: #00838F;
}

.okmesh-card-date {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

/* Card Title */
.okmesh-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

/* Event Details */
.okmesh-event-details {
    background: #f8f9fa;
    border-left: 3px solid #4CAF50;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

.okmesh-event-when,
.okmesh-event-where {
    padding: 2px 0;
    color: #444;
}

/* Excerpt */
.okmesh-card-excerpt {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #555;
    flex-grow: 1;
}

/* Source */
.okmesh-card-source {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.78rem;
    color: #999;
    font-style: italic;
}

/* Empty State */
.okmesh-news-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

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

    .okmesh-news-filters {
        justify-content: center;
    }

    .okmesh-filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
