/* Новини Flux MarketPlace — темна тема, картки, теги, адаптив */

:root {
    --news-bg: #0B0C10;
    --news-card-bg: #15161A;
    --news-card-border: rgba(255,255,255,0.06);
    --news-text: #ffffff;
    --news-text-muted: #a0a0a0;
    --news-accent: #7300ff;
    --news-tag-update: #3b82f6;
    --news-tag-sellers: #22c55e;
    --news-tag-dropship: #a855f7;
    --news-tag-sales: #eab308;
}

.news-main {
    min-height: 80vh;
    background: var(--news-bg);
    color: var(--news-text);
    padding-bottom: 60px;
}

/* Героїчний блок */
.news-hero {
    text-align: center;
    padding: 80px 20px 50px;
    max-width: 800px;
    margin: 0 auto;
}
.news-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
}
.news-hero-sub {
    font-size: 1.05rem;
    color: var(--news-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Контент і фільтри */
.news-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 32px;
}
.news-filter-btn {
    padding: 10px 18px;
    border: 1px solid var(--news-card-border);
    background: var(--news-card-bg);
    color: var(--news-text-muted);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.news-filter-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--news-text);
}
.news-filter-btn.active {
    background: var(--news-accent);
    border-color: var(--news-accent);
    color: #fff;
}

/* Сітка новин */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    body { overflow-x: hidden; width: 100%; }
    .news-main { width: 100%; box-sizing: border-box; }
    .news-hero { padding: 60px 12px 40px; }
    .news-hero h1 { font-size: 1.5rem; word-break: break-word; }
    .news-content { padding: 0 12px; width: 100%; max-width: 100%; }
    .news-grid { grid-template-columns: 1fr; gap: 16px; }
    .news-card-body { padding: 16px; }
    .news-card-title { font-size: 1rem; word-break: break-word; }
    .news-filter-btn { min-height: 44px; padding: 10px 14px; }
}

@media (max-width: 560px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Картка */
.news-card {
    background: var(--news-card-bg);
    border: 1px solid var(--news-card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.news-card-img {
    height: 160px;
    flex-shrink: 0;
}
.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: fit-content;
}
.news-tag-update   { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.news-tag-sellers  { background: rgba(34, 197, 94, 0.25);  color: #86efac; }
.news-tag-dropship { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; }
.news-tag-sales    { background: rgba(234, 179, 8, 0.25);  color: #fde047; }
.news-tag-default  { background: rgba(255,255,255,0.1);   color: var(--news-text-muted); }

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.35;
    color: var(--news-text);
}
.news-card-excerpt {
    font-size: 0.95rem;
    color: var(--news-text-muted);
    line-height: 1.5;
    margin: 0 0 12px 0;
    flex: 1;
}
.news-card-date {
    font-size: 0.85rem;
    color: var(--news-text-muted);
    opacity: 0.8;
    margin: 0 0 12px 0;
}

/* Повний текст в картці */
.news-card-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.news-card-full.is-open {
    max-height: 400px;
}
.news-card-full-text {
    font-size: 0.95rem;
    color: var(--news-text-muted);
    line-height: 1.55;
    margin: 0 0 12px 0;
}
.news-card-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--news-accent);
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}
.news-card-cta:hover {
    opacity: 0.9;
    color: #fff;
}

.news-card-read-more {
    margin-top: 8px;
    padding: 8px 0;
    border: none;
    background: none;
    color: var(--news-accent);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}
.news-card-read-more:hover {
    color: #a855f7;
}
