/* ---------- صفحهٔ اخبار (/news) ---------- */

/* نوار سرتیتر RSS */
.news-ticker { background: var(--brand); color: #fff; }
.news-ticker-inner {
    display: flex; align-items: center; gap: 16px; padding: 0; height: 46px; overflow: hidden;
}
.news-ticker-label {
    flex: 0 0 auto; background: var(--brand-dark); height: 100%; display: flex; align-items: center;
    padding: 0 22px; font-weight: 800; font-size: 14px; white-space: nowrap;
}
.news-ticker-text-wrap { flex: 1; min-width: 0; display: flex; align-items: center; height: 100%; }
.news-ticker-text {
    font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden;
}
.news-ticker-text::after { content: ''; display: inline-block; width: 2px; height: 14px; background: #fff; margin-inline-start: 3px; vertical-align: -2px; animation: newsTickerBlink 1s step-end infinite; }
@keyframes newsTickerBlink { 50% { opacity: 0; } }

/* ردیف بالا: اسلایدر + ویجت سه‌تبه */
.news-top { padding: 28px 0; }
.news-top-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 20px; align-items: stretch; }

.news-slider {
    position: relative; min-height: 440px; border-radius: var(--radius); overflow: hidden;
    background: var(--gray); box-shadow: var(--shadow);
}
.news-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; visibility: hidden; transition: opacity .7s ease;
}
.news-slide.active { opacity: 1; visibility: visible; }
.news-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.35) 45%, rgba(10,10,10,0) 75%);
}
.news-slide-caption { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 26px 28px; color: #fff; }
.news-slide-eyebrow {
    display: inline-block; background: var(--brand); padding: 3px 14px; border-radius: 20px;
    font-size: 12.5px; font-weight: 700; margin-bottom: 10px;
}
.news-slide-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.news-slide-title a { color: #fff; }
.news-slide-excerpt { font-size: 13.5px; color: rgba(255,255,255,.85); max-width: 640px; }
.news-slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center;
    backdrop-filter: blur(6px); transition: var(--t);
}
.news-slider-nav:hover { background: var(--brand); }
.news-slider-nav.prev { right: 16px; }
.news-slider-nav.next { left: 16px; }
.news-slider-nav.next svg { transform: scaleX(-1); }

.news-widget {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.news-widget-tabs { display: flex; }
.news-widget-tab {
    flex: 1; border: 0; background: var(--gray); padding: 14px 6px; cursor: pointer;
    font-family: var(--font); font-size: 13.5px; font-weight: 700; color: var(--ink-soft); transition: var(--t);
}
.news-widget-tab.active { background: var(--brand); color: #fff; }
.news-widget-list { display: none; flex-direction: column; padding: 10px; gap: 4px; flex: 1; }
.news-widget-list.active { display: flex; }
.news-widget-item { display: flex; gap: 10px; padding: 10px 6px; border-radius: 10px; transition: var(--t); }
.news-widget-item:hover { background: var(--gray); }
.news-widget-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--gray); }
.news-widget-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-widget-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.news-widget-eyebrow { font-size: 11px; font-weight: 700; color: var(--brand); }
.news-widget-title {
    font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-widget-empty { padding: 24px 14px; color: var(--muted); font-size: 13px; text-align: center; }

/* نوار تب دسته‌بندی */
.news-cat-tabs {
    display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.news-cat-tab {
    padding: 8px 20px; border-radius: 30px; background: var(--gray); color: var(--ink-soft);
    font-size: 13.5px; font-weight: 700; transition: var(--t); white-space: nowrap;
}
.news-cat-tab:hover { background: var(--gray-2); }
.news-cat-tab.active { background: var(--brand); color: #fff; }

/* لیست خبرها */
.news-list { display: flex; flex-direction: column; }
.news-row { display: flex; gap: 24px; align-items: flex-start; padding: 26px 0; border-bottom: 1px solid var(--line); }
.news-row:first-child { padding-top: 0; }
.news-row-media { flex: 0 0 200px; width: 200px; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; display: block; background: var(--gray); }
.news-row-media img { width: 100%; height: 100%; object-fit: cover; transition: var(--t); }
.news-row:hover .news-row-media img { transform: scale(1.06); }
.news-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-row-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.news-cat-chip {
    display: inline-block; background: rgba(153,0,0,.08); color: var(--brand); font-size: 12px; font-weight: 700;
    padding: 3px 12px; border-radius: 20px;
}
.news-row-date { font-size: 12.5px; color: var(--muted); }
.news-row-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.news-row-title a:hover { color: var(--brand); }
.news-excerpt {
    color: var(--muted); font-size: 13.5px; line-height: 1.8;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-empty { text-align: center; padding: 60px 20px; color: var(--muted); }

.news-pagination { display: flex; justify-content: center; gap: 12px; margin-top: 34px; }

@media (max-width: 900px) {
    .news-top-grid { grid-template-columns: 1fr; }
    .news-slider { min-height: 320px; }
}
@media (max-width: 620px) {
    .news-ticker-label { padding: 0 14px; font-size: 13px; }
    .news-slider { min-height: 240px; }
    .news-slide-title { font-size: 17px; }
    .news-cat-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .news-cat-tabs::-webkit-scrollbar { display: none; }
    .news-row { flex-direction: column; gap: 14px; }
    .news-row-media { width: 100%; flex-basis: auto; aspect-ratio: 16/9; }
}
