/* ═══════════════════════════════════════════════════════════
   TERAN ILDIZ — css/news.css  (v3.0 — oq/qora/kumush palitra)
   ═══════════════════════════════════════════════════════════ */

/* ── Subkategoriya chiplari ── */
.ti-news-sub {
  display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap;
  padding: 4px 0 14px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.ti-news-sub.dragging { cursor: grabbing; scroll-snap-type: none; }
.ti-news-sub::-webkit-scrollbar { height: 7px; }
.ti-news-sub::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: 99px;
}
.ti-news-sub::-webkit-scrollbar-thumb:hover { background: var(--gold); }
.ti-news-sub::-webkit-scrollbar-track { background: transparent; }

.ti-chip {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap; scroll-snap-align: start;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: transparent;
  color: var(--txt);
  border: 1px solid var(--bdr-cool);
  font-size: .95rem; letter-spacing: .01em;
  transition: background .12s, color .12s, border-color .12s;
  user-select: none;
}
.ti-chip:hover  {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border-color: color-mix(in srgb, var(--gold) 36%, transparent);
  color: var(--ink);
}
/* Faol = OLTIN (butun ilova bo'ylab bitta rang) */
.ti-chip.on {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #b8924f);
  color: var(--bg);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 3px 14px -4px color-mix(in srgb, var(--gold) 55%, transparent);
}

/* ── Kartochka ── */
.ti-news-card {
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  background: var(--surf);
  border: 1px solid var(--bdr-cool);
  border-radius: var(--r);
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  /* tezroq animatsiya */
  transition: transform .15s ease, border-color .15s, box-shadow .15s;
  animation: tiFadeUp .28s ease both;
  will-change: transform;
}
.ti-news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 6px 20px rgba(0,0,0,.32);
}
[data-scheme="light"] .ti-news-card:hover,
[data-scheme="sepia"]  .ti-news-card:hover {
  border-color: rgba(0,0,0,.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
}

.ti-news-cover {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; background: var(--bg-2);
  flex-shrink: 0;
}
.ti-news-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .2s ease;
}
.ti-news-card:hover .ti-news-cover img { transform: scale(1.04); }
.ti-news-cover--ph {
  display: flex; align-items: center; justify-content: center;
  /* kumush gradient placeholder */
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.09) 100%);
  color: rgba(255,255,255,.28); font-size: 2.2rem;
}

.ti-news-body {
  padding: 13px 15px 15px;
  display: flex; flex-direction: column; gap: 7px; flex: 1;
}

/* Badge — oq/kumush, rang YO'Q */
.ti-news-badge {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start; font-size: .80rem;
  letter-spacing: .05em; text-transform: uppercase;
  color: rgba(255,255,255,.52);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  padding: 2px 8px; border-radius: var(--r-pill);
}
[data-scheme="light"] .ti-news-badge,
[data-scheme="sepia"]  .ti-news-badge {
  color: rgba(0,0,0,.48);
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.10);
}

.ti-news-title {
  font-size: 1.12rem; line-height: 1.38; color: var(--ink); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ti-news-excerpt {
  font-size: .97rem; line-height: 1.5; color: var(--txt); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Sana — aniq va o'qilishi oson */
.ti-news-date {
  font-size: .86rem;
  color: rgba(255,255,255,.40);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
[data-scheme="light"] .ti-news-date,
[data-scheme="sepia"]  .ti-news-date { color: rgba(0,0,0,.40); }

.ti-news-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: auto; gap: 8px;
}

/* Share tugmasi — kumush */
.ti-news-share-btn {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.38); font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ti-news-share-btn:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.26);
  color: rgba(255,255,255,.78);
}
[data-scheme="light"] .ti-news-share-btn,
[data-scheme="sepia"]  .ti-news-share-btn {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.10);
  color: rgba(0,0,0,.38);
}
/* Ulashish + yuklab olish tugmalari qatori */
.ti-news-acts { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Saqlash tugmasi — sariq rangli ikonka saqlanganida */
.ti-news-save-btn {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.38); font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s, border-color .12s, transform .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ti-news-save-btn:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.26);
  color: rgba(255,255,255,.78);
}
.ti-news-save-btn.ti-saved {
  color: #f0c040;
  border-color: rgba(240,192,64,.4);
  background: rgba(240,192,64,.10);
}
.ti-news-save-btn.ti-saved:hover {
  background: rgba(240,192,64,.18);
  color: #f5d060;
}
[data-scheme="light"] .ti-news-save-btn,
[data-scheme="sepia"]  .ti-news-save-btn {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.10);
  color: rgba(0,0,0,.38);
}
[data-scheme="light"] .ti-news-save-btn.ti-saved,
[data-scheme="sepia"]  .ti-news-save-btn.ti-saved {
  color: #c8920a;
  border-color: rgba(200,146,10,.4);
  background: rgba(200,146,10,.10);
}

@keyframes tiFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Loader / bo'sh / xato ── */
.ti-news-loading, .ti-news-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 48px 16px;
  color: var(--muted); text-align: center;
  grid-column: 1 / -1;
}
.ti-news-empty i { font-size: 2rem; color: rgba(255,255,255,.22); opacity: .8; }
[data-scheme="light"] .ti-news-empty i,
[data-scheme="sepia"]  .ti-news-empty i { color: rgba(0,0,0,.22); }

/* ── Ko'proq yuklash ── */
.ti-news-more { display: flex; justify-content: center; padding: 22px 0 36px; }
.ti-news-more-btn {
  cursor: pointer; padding: 11px 24px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.12);
  font-size: .88rem; display: inline-flex; align-items: center; gap: 8px;
  transition: background .14s, border-color .14s, color .14s;
}
.ti-news-more-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.90);
}
.ti-news-more-btn:disabled { opacity: .5; cursor: default; }
[data-scheme="light"] .ti-news-more-btn,
[data-scheme="sepia"]  .ti-news-more-btn {
  background: rgba(0,0,0,.04); color: rgba(0,0,0,.60); border-color: rgba(0,0,0,.12);
}

/* ═══════════════════════════════════════════════════════════
   MAQOLA O'QISH OYNASI
   ═══════════════════════════════════════════════════════════ */

#artRdr {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: artSlideIn .18s ease;
}
@keyframes artSlideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
body.art-open { overflow: hidden; }

.art-top {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 10px 16px; min-height: 54px;
  background: var(--chrome-bg-2); border-bottom: 1px solid var(--chrome-bdr);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.art-back {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: transparent; border: none; color: var(--chrome-ink);
  font-size: .90rem; padding: 7px 10px; border-radius: var(--r-sm);
  transition: background .12s;
  white-space: nowrap;
}
.art-back:hover { background: var(--chrome-hover); }
.art-back i { font-size: .95rem; }
.art-htitle {
  flex: 1; font-size: .94rem; color: var(--chrome-ink); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.art-top-acts {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.art-top-acts .ti-news-save-btn,
.art-top-acts .ti-news-share-btn {
  width: 32px; height: 32px;
}
.art-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.art-content {
  max-width: 760px; margin: 0 auto;
  padding: 28px 22px 90px;
}

.art-hero {
  width: 100%; border-radius: var(--r); margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,.32); display: block;
  max-height: 400px; object-fit: cover;
}
.art-title {
  font-size: 1.72rem; line-height: 1.28; color: var(--ink);
  margin: 0 0 10px; font-family: var(--ff-serif, inherit);
}

/* Sana — maqola ichida ham aniq */
.art-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .95rem; color: rgba(255,255,255,.40);
  margin-bottom: 20px; padding-bottom: 18px;
  border-bottom: 1px solid var(--bdr);
  font-variant-numeric: tabular-nums;
}
[data-scheme="light"] .art-meta,
[data-scheme="sepia"]  .art-meta { color: rgba(0,0,0,.42); }

.art-html { color: var(--txt); font-size: 1.05rem; line-height: 1.86; }
.art-html p   { margin: 0 0 1.1em; }
.art-html h1, .art-html h2, .art-html h3, .art-html h4 {
  color: var(--ink); line-height: 1.34; margin: 1.5em 0 .5em;
  font-family: var(--ff-serif, inherit);
}
.art-html h2 { font-size: 1.35rem; }
.art-html h3 { font-size: 1.16rem; }
.art-html h4 { font-size: 1.03rem; }
.art-html a  { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; opacity: .75; }
.art-html a:hover { opacity: 1; }
.art-html img {
  max-width: 100%; height: auto; border-radius: var(--r-sm);
  margin: 1em auto; display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.art-html blockquote {
  margin: 1.3em 0; padding: .7em 1.2em;
  border-left: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink); font-style: italic;
}
[data-scheme="light"] .art-html blockquote,
[data-scheme="sepia"]  .art-html blockquote {
  border-left-color: rgba(0,0,0,.18);
  background: rgba(0,0,0,.03);
}
.art-html ul, .art-html ol { margin: 0 0 1.1em; padding-inline-start: 1.5em; }
.art-html li { margin: .4em 0; }
.art-html table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: .94rem; }
.art-html th, .art-html td { border: 1px solid var(--bdr-1); padding: 8px 10px; text-align: start; }
.art-html th { background: var(--surf-1); color: var(--ink); font-weight: 600; }
.art-html pre {
  background: var(--surf-1); border: 1px solid var(--bdr); border-radius: var(--r-sm);
  padding: 14px 16px; overflow-x: auto; font-size: .88rem; line-height: 1.6;
}

.art-src-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.11);
  font-size: .86rem; text-decoration: none;
  transition: background .13s, border-color .13s, color .13s;
  margin-top: 28px; display: inline-flex;
}
.art-src-link:hover {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.88);
}
[data-scheme="light"] .art-src-link,
[data-scheme="sepia"]  .art-src-link {
  background: rgba(0,0,0,.04); color: rgba(0,0,0,.56); border-color: rgba(0,0,0,.11);
}

.art-load, .art-err {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 72px 16px; color: var(--muted); text-align: center;
}

/* Mobil */
@media (max-width: 600px) {
  .art-title   { font-size: 1.38rem; }
  .art-html    { font-size: 1rem; line-height: 1.76; }
  .art-content { padding: 18px 15px 68px; }
  .art-back span { display: none; }
  .art-htitle  { font-size: .88rem; }
}

/* ═══════════════════════════════════════════════════════════
   NAVDAGI KATEGORIYA IKONKALARI — kumush/oq, rang YO'Q
   Har biri bir xil: oq/qora monoxrom tizim
   ═══════════════════════════════════════════════════════════ */

/* Barcha faol bo'lmagan kategoriya tugmalari — bir xil kumush */
#catbar .nc:not(.on) i,
.side-panel .side-item:not(.on) i {
  color: rgba(255,255,255,.45) !important;
  transition: color .12s;
}
#catbar .nc:not(.on):hover i,
.side-panel .side-item:not(.on):hover i {
  color: rgba(255,255,255,.80) !important;
}

/* Yorug' rejimda qora */
[data-scheme="light"] #catbar .nc:not(.on) i,
[data-scheme="light"] .side-panel .side-item:not(.on) i,
[data-scheme="sepia"] #catbar .nc:not(.on) i,
[data-scheme="sepia"] .side-panel .side-item:not(.on) i {
  color: rgba(0,0,0,.42) !important;
}
[data-scheme="light"] #catbar .nc:not(.on):hover i,
[data-scheme="light"] .side-panel .side-item:not(.on):hover i,
[data-scheme="sepia"] #catbar .nc:not(.on):hover i,
[data-scheme="sepia"] .side-panel .side-item:not(.on):hover i {
  color: rgba(0,0,0,.72) !important;
}

/* Catbar border */
#catbar .nc:not(.on) { border: 1px solid transparent; }
#catbar .nc:not(.on):hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}
[data-scheme="light"] #catbar .nc:not(.on):hover,
[data-scheme="sepia"]  #catbar .nc:not(.on):hover {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.10);
}
