/* All-news page — global CSS (bypasses Blazor CSS isolation) */

*, *::before, *::after { box-sizing: border-box; }

.all-news-wrapper {
    font-family: 'Vazirmatn', sans-serif;
    background: transparent;
    color: #f8fafc;
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
}

.all-news-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.all-news-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.all-news-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.all-news-back:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.16);
}

.all-news-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.all-news-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.all-news-count {
    font-size: 0.78rem;
    color: #475569;
}

/* Filter bar */
.all-news-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 0.55rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.clear-filter-btn {
    background: none;
    border: none;
    color: #38bdf8;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.clear-filter-btn:hover { color: #7dd3fc; }

/* Empty state */
.all-news-empty {
    text-align: center;
    color: #475569;
    padding: 4rem;
    font-size: 0.95rem;
}

/* Grid */
.all-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* Card */
.an-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.an-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(56, 189, 248, 0.18);
}

.an-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

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

.an-card:hover .an-img {
    transform: scale(1.04);
}

.an-img-ph {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #334155;
}

.an-body {
    padding: 1rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.an-code {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: 0.15rem 0.55rem;
    font-size: 0.68rem;
    font-family: monospace;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.an-code:hover {
    background: rgba(56, 189, 248, 0.2);
}

.an-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 0.45rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.an-excerpt {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 0.75rem;
}

.an-date {
    font-size: 0.68rem;
    color: #334155;
    margin-top: 0.6rem;
}

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

    .all-news-title {
        font-size: 1.2rem;
    }
}
