/* سایت عمومی خبرگزاری */
body.site { background: var(--surface); }
.site-topbar { font-size: .85rem; color: var(--slate); border-bottom: 1px solid var(--line); }
.masthead { padding: 1.4rem 0 1rem; }
.masthead .brand { font-family: var(--font-read); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--ink); line-height: 1.2; }
.masthead .brand:hover { text-decoration: none; color: var(--turq-deep); }
.masthead .tagline { color: var(--slate); font-size: .95rem; }
.masthead form { max-width: 340px; }

.site-nav { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.site-nav .nav-link { color: var(--ink); font-weight: 600; padding: .8rem .9rem; border-bottom: 3px solid transparent; }
.site-nav .nav-link:hover { color: var(--turq-deep); text-decoration: none; border-bottom-color: var(--turq); }
.site-nav .nav-scroll { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }

.breaking-bar { background: var(--crimson-soft); border-bottom: 1px solid #f3c6cd; }
.breaking-bar .label { background: var(--crimson); color: #fff; font-weight: 700; padding: .45rem .9rem; flex-shrink: 0; }
.breaking-bar a { color: var(--ink); font-weight: 600; }

.lead-story .cover { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-radius: var(--radius); background: var(--paper); }
.lead-story h2 { font-family: var(--font-read); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.55; margin: .8rem 0 .5rem; }
.lead-story h2 a { color: var(--ink); }
.lead-story p { font-size: 1.05rem; color: var(--ink-2); line-height: 2; }
.kicker { color: var(--turq-deep); font-weight: 600; font-size: .9rem; }

.story-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; border-radius: 8px; background: var(--paper); }
.story-card h3 { font-family: var(--font-read); font-weight: 700; font-size: 1.08rem; line-height: 1.75; margin: .55rem 0 .25rem; }
.story-card h3 a { color: var(--ink); }
.story-meta { color: var(--slate); font-size: .8rem; display: flex; gap: .75rem; flex-wrap: wrap; }

.latest-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.4rem 1fr; gap: .6rem; align-items: baseline; }
.latest-list time { color: var(--turq-deep); font-weight: 600; font-size: .85rem; }
.latest-list a { color: var(--ink); font-family: var(--font-read); font-size: 1.05rem; line-height: 1.8; }

.section-title { font-weight: 800; font-size: 1.15rem; padding-bottom: .55rem; margin-bottom: 1rem; border-bottom: 2px solid var(--line); position: relative; }
.section-title::after { content: ""; position: absolute; right: 0; bottom: -2px; width: 56px; height: 2px; background: var(--turq); }
.section-title a { color: inherit; }

.hot-searches { background: var(--paper); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.hot-searches h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .2rem; }
.hot-searches .sub { color: var(--slate); font-size: .8rem; margin-bottom: .9rem; }
.hot-searches li { padding: .5rem 0; }
.hot-searches li a { color: var(--ink); font-weight: 600; display: flex; justify-content: space-between; gap: .5rem; }
.hot-searches li small { color: var(--slate); font-weight: 400; }
.hot-searches .heat { margin-top: .35rem; }

.most-viewed ol { counter-reset: mv; list-style: none; padding: 0; }
.most-viewed li { counter-increment: mv; display: grid; grid-template-columns: 2rem 1fr; gap: .4rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.most-viewed li::before { content: counter(mv, persian); font-weight: 800; font-size: 1.3rem; color: var(--turq); line-height: 1.4; }
.most-viewed a { color: var(--ink); font-family: var(--font-read); line-height: 1.8; }

/* صفحه خبر */
.article-head h1 { font-family: var(--font-read); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.6; margin: .5rem 0 1rem; }
.article-lead { font-size: 1.12rem; line-height: 2.05; color: var(--ink-2); border-right: 4px solid var(--turq); padding: .3rem 1rem .3rem 0; margin-bottom: 1.4rem; }
.article-meta { color: var(--slate); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1.2rem; }
.article-cover img { width: 100%; border-radius: var(--radius); }
.article-cover figcaption { color: var(--slate); font-size: .85rem; margin-top: .4rem; }
.article-body { font-family: var(--font-read); font-size: 1.16rem; line-height: 2.15; color: var(--ink); max-width: 46em; }
.article-body p { margin-bottom: 1.15rem; text-align: justify; }
.article-body h2 { font-family: var(--font-ui); font-weight: 800; font-size: 1.25rem; margin: 2rem 0 .8rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body a { color: var(--turq-deep); text-decoration: underline; text-underline-offset: 4px; }
.article-body blockquote { border-right: 3px solid var(--line); padding-right: 1rem; color: var(--ink-2); }
.tag-chip { display: inline-block; background: var(--turq-soft); color: var(--turq-deep); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; margin: 0 0 .4rem .3rem; }
.tag-chip:hover { background: var(--turq); color: #fff; text-decoration: none; }
.share a { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); }
.share a:hover { background: var(--turq); color: #fff; border-color: var(--turq); text-decoration: none; }
.preview-banner { background: var(--saffron); color: var(--ink); font-weight: 600; }

.site-footer { background: var(--ink); color: #c9d1da; margin-top: 3rem; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #e6ecf1; }
.site-footer .brand { font-family: var(--font-read); font-weight: 700; font-size: 1.6rem; color: #fff; }
.pagination .page-link { color: var(--turq-deep); }
.pagination .active .page-link { background: var(--turq); border-color: var(--turq); }

/* ---------- پیش‌نمایش قالب ---------- */
.theme-preview-bar { background: var(--saffron); color: #1b2430; font-weight: 600; font-size: .88rem; padding: .45rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; position: sticky; top: 0; z-index: 50; }
.theme-preview-bar a { color: #1b2430; text-decoration: underline; }

/* ---------- اسلایدرها ---------- */
.tn-slider { --per-view: 4; --pv: var(--per-view); --gap: 1rem; position: relative; margin: 0 0 2rem; }
.tn-slider-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.tn-slider-head .section-title { flex: 1; }
.tn-slider-nav { display: flex; gap: .4rem; margin-bottom: 1rem; }
.tn-prev, .tn-next { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; transition: background .15s, color .15s; }
.tn-prev:hover, .tn-next:hover { background: var(--turq); border-color: var(--turq); color: #fff; }
.tn-viewport { position: relative; }
.tn-track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; cursor: grab; }
.tn-track::-webkit-scrollbar { display: none; }
.tn-track:focus-visible { outline-offset: 4px; }
.tn-track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.tn-slide { flex: 0 0 calc((100% - (var(--pv) - 1) * var(--gap)) / var(--pv)); scroll-snap-align: start; min-width: 0; }
@media (max-width: 991.98px) { .tn-slider { --pv: min(var(--per-view), 3); } }
@media (max-width: 767.98px) { .tn-slider { --pv: min(var(--per-view), 2); --gap: .75rem; } }
@media (max-width: 575.98px) { .tn-slider { --pv: min(var(--per-view), 1.25); } }
.tn-slide-link { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.tn-slide-link:hover { text-decoration: none; color: var(--ink); }
.tn-slide-link:hover .tn-title { color: var(--turq-deep); }
.tn-media { display: block; overflow: hidden; border-radius: 8px; background: var(--paper); aspect-ratio: 16/10; }
.tn-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; -webkit-user-drag: none; }
.tn-slide-link:hover .tn-media img { transform: scale(1.04); }
.tn-caption { display: flex; flex-direction: column; gap: .2rem; padding-top: .55rem; }
.tn-kicker { color: var(--c, var(--turq-deep)); font-weight: 700; font-size: .8rem; }
.tn-title { font-family: var(--font-read); font-weight: 700; font-size: 1.05rem; line-height: 1.75; }
.tn-sub { color: var(--slate); font-size: .9rem; line-height: 1.8; }
.tn-time { color: var(--slate); font-size: .78rem; }
.tn-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .9rem; }
.tn-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--line); transition: width .25s, background .25s; }
.tn-dot[aria-current="true"] { width: 22px; background: var(--turq); }
@media (prefers-reduced-motion: reduce) { .tn-track { scroll-behavior: auto; } .tn-media img { transition: none; } }

/* بزرگ (تمام‌عرض) */
.tn-style-hero .tn-slide-link { position: relative; border-radius: var(--radius); overflow: hidden; }
.tn-style-hero .tn-media { aspect-ratio: 21/9; border-radius: 0; }
.tn-style-hero .tn-caption { position: absolute; inset: auto 0 0 0; padding: 4rem 1.6rem 1.4rem; background: linear-gradient(to top, rgba(10,14,20,.88), rgba(10,14,20,.35) 65%, transparent); color: #fff; }
.tn-style-hero .tn-title { color: #fff; font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.6; max-width: 46em; }
.tn-style-hero .tn-slide-link:hover .tn-title { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.tn-style-hero .tn-sub { color: #dfe6ec; max-width: 52em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tn-style-hero .tn-kicker { color: #fff; background: var(--c, var(--turq)); align-self: flex-start; padding: .1rem .6rem; border-radius: 4px; }
.tn-style-hero .tn-time { color: #c7d0d8; }
.tn-style-hero .no-image .tn-slide-link { background: var(--ink); min-height: 260px; justify-content: flex-end; }
.tn-style-hero .no-image .tn-caption { position: static; background: none; }
.tn-overlay { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.9); border: 0; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.tn-overlay.tn-prev { right: .9rem; }
.tn-overlay.tn-next { left: .9rem; }
@media (max-width: 767.98px) { .tn-style-hero .tn-media { aspect-ratio: 4/3; } .tn-style-hero .tn-caption { padding: 3rem 1rem 1rem; } .tn-overlay { display: none; } }

/* گالری (تیتر روی تصویر) */
.tn-style-gallery .tn-slide-link { position: relative; border-radius: 10px; overflow: hidden; }
.tn-style-gallery .tn-media { aspect-ratio: 4/5; border-radius: 0; }
.tn-style-gallery .tn-caption { position: absolute; inset: auto 0 0 0; padding: 2.5rem .9rem .9rem; background: linear-gradient(to top, rgba(10,14,20,.85), transparent); }
.tn-style-gallery .tn-title { color: #fff; font-size: .98rem; }
.tn-style-gallery .tn-kicker, .tn-style-gallery .tn-time { color: #e4eaef; }
.tn-style-gallery .no-image .tn-slide-link { background: var(--ink); min-height: 220px; }

/* فشرده (فقط تیتر) */
.tn-style-compact .tn-slide-link { border: 1px solid var(--line); border-right: 4px solid var(--c, var(--turq)); border-radius: 8px; padding: .8rem .95rem; background: var(--surface); }
.tn-style-compact .tn-caption { padding: 0; }
.tn-style-compact .tn-title { font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tn-style-compact .tn-sub { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* کارت بی‌تصویر */
.tn-style-cards .no-image .tn-slide-link { border-top: 3px solid var(--turq); padding-top: .3rem; }

/* ابزارک خبرگزاری‌های جهان */
.wire-box li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.wire-box .src { color: var(--turq-deep); font-weight: 700; font-size: .78rem; }
.wire-box time { color: var(--slate); font-size: .75rem; }
.wire-box a { display: block; color: var(--ink); line-height: 1.8; font-weight: 600; }
.tn-custom-top, .tn-custom-bottom { margin-bottom: 1.5rem; }
