/* News category — спеціалізовані стилі для рубрики /news.
 * Завантажується ПОВЕРХ category.css (тільки на body.news-page).
 *
 * Розділи:
 *   1. News hero (тільки заголовок)
 *   2. News ticker (5 свіжих)
 *   3. News lead (рівносильна сітка 6 карток)
 *   4. News feed (day-separators, denser arows)
 *   5. Sidebar variants (sb-services, sb-topweek, sb-tg)
 */

/* ============== 1. NEWS HERO ============== */
.news-page .news-hero-c{
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
  flex-wrap: wrap;
}
.news-page .news-hero-c .left{ flex: 1 1 auto; min-width: 0; }
.news-page .news-hero-c h1{
  font-family: 'Unbounded'; font-weight: 800;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -.02em; margin: 0;
  display: inline-flex; align-items: baseline; gap: 4px;
  flex-wrap: wrap;
  min-width: 0; max-width: 100%;
  overflow-wrap: anywhere;
}
.news-page .news-hero-c h1 .hl{
  position: relative; display: inline-block; padding: 0 .12em; isolation: isolate;
}
.news-page .news-hero-c h1 .hl::before{
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .44em;
  background: var(--yellow); z-index: -1; border-radius: 4px; transform: skewX(-4deg);
}

@media (max-width: 720px){
  .news-page .news-hero-c{ flex-direction: column; align-items: stretch; gap: 14px; }
}

/* ============== 2. NEWS TICKER ============== */
.news-ticker{
  display: flex; align-items: stretch; gap: 0;
  background: var(--ink); color: var(--paper);
  border-radius: 12px;
  margin-bottom: 22px;
  overflow: hidden;
  position: relative;
}
.news-ticker .tk-label{
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  font-family: 'Unbounded'; font-weight: 800;
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  padding: 0 16px;
  flex-shrink: 0;
}
.news-ticker .tk-label .dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  animation: news-pulse-w 1.6s infinite;
}
@keyframes news-pulse-w{
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
  70%  { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.news-ticker .tk-track{
  flex: 1; min-width: 0;
  display: flex; gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  padding: 10px 4px;
}
.news-ticker .tk-track::-webkit-scrollbar{ display: none; width: 0; height: 0; }
.news-ticker .tk-i{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-right: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
  min-width: 0;
  scroll-snap-align: start;
  transition: color .15s, background .15s;
  color: var(--paper);
}
.news-ticker .tk-i:last-child{ border-right: 0; }
.news-ticker .tk-i:hover{ background: rgba(255,255,255,.06); color: var(--yellow); }
.news-ticker .tk-i .tk-t{
  font-family: 'Unbounded'; font-weight: 700; font-size: 11px;
  color: var(--yellow);
  flex-shrink: 0;
}
.news-ticker .tk-i .tk-tx{
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 720px){
  .news-ticker{ flex-direction: column; }
  .news-ticker .tk-label{ padding: 6px 14px; justify-content: flex-start; }
  .news-ticker .tk-track{ padding: 6px 4px 8px; }
  .news-ticker .tk-i{ padding: 4px 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .news-ticker .tk-i:last-child{ border-bottom: 0; }
}

/* ============== 3. NEWS LEAD (рівносильна сітка 6 карток) ============== */
.news-lead{ margin-bottom: 28px; }
.news-lead .nl-uniform{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px){
  .news-lead .nl-uniform{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .news-lead .nl-uniform{ grid-template-columns: 1fr; }
}

.nl-u{
  display: flex; flex-direction: column; min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
body[data-theme="dark"] .nl-u{ background: var(--paper-2); }
.nl-u:hover{
  transform: translateY(-2px);
  border-color: var(--line-strong, var(--ink));
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}
.nl-u .thumb{
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: linear-gradient(135deg, #d9cfb1, #b8a97f);
}
.nl-u .thumb img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nl-u .thumb .time-pill{
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center;
  background: rgba(14,14,15,.78); color: var(--paper);
  backdrop-filter: blur(6px);
  font-family: 'Unbounded'; font-weight: 700; font-size: 10.5px;
  padding: 4px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.nl-u .body{
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.nl-u h3{
  font-family: 'Unbounded'; font-weight: 700; font-size: 15px;
  line-height: 1.22; letter-spacing: -.005em;
  margin: 0; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-u .deck{
  margin: 0;
  font-family: 'Manrope'; font-size: 12.5px; line-height: 1.45;
  color: var(--ink-3, var(--muted));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-u .meta{
  font-size: 11px; color: var(--muted); margin-top: auto;
}
.nl-u .meta time{ color: var(--ink-2); font-weight: 600; }

/* ============== 4. NEWS FEED (denser arows + day separators) ============== */
.news-page .alist.news-alist{ gap: 12px; }

/* На новинній рубриці кожна стаття має primary category "Новини Києва",
 * тому cat-tag на зображенні дублюється на кожній картці — ховаємо. */
.news-page .alist.news-alist .arow .thumb .cat-tag{ display: none; }

/* Day separator — sticky всередині .feed */
.news-day-sep{
  position: sticky; top: 8px;
  z-index: 4;
  margin: 14px 0 4px;
  pointer-events: none;
}
.news-day-sep:first-child{ margin-top: 4px; }
.news-day-sep span{
  display: inline-block;
  font-family: 'Unbounded'; font-weight: 800; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink);
  background: var(--yellow);
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(244,193,0,.32);
}

/* Помітка часу замість "X хв" — добавляється до .arow .meta через wrapper.
 * Wrapper потрібен щоб не лишати залежності від існуючого article-row.php.
 * Підхід: показуємо time-tag поверх .arow як "значок". */
.news-arow-wrap{ position: relative; }
.news-arow-wrap::after{
  content: attr(data-time);
  position: absolute;
  left: 12px; top: 12px;
  z-index: 3;
  font-family: 'Unbounded'; font-weight: 800; font-size: 10.5px;
  letter-spacing: .04em;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border: 1px solid var(--line-strong, #d8d2c2);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
/* На .arow.dark та .arow.yellow тільки темна підкладка */
.news-arow-wrap:has(.arow.dark)::after{
  background: rgba(0,0,0,.7);
  color: var(--yellow);
  border-color: rgba(255,255,255,.14);
}
.news-arow-wrap:has(.arow.yellow)::after{
  background: var(--ink);
  color: var(--yellow);
  border-color: var(--ink);
}
/* Перекриття існуючого cat-tag — opt-out коли ми вже маємо тег категорії в thumb.
 * cat-tag тоді опускаємо нижче. */
.news-arow-wrap .arow .thumb .cat-tag{ top: 44px; }

/* Дрібні арови — прибираємо deck для щільності, у .arow без variant */
.news-page .alist .arow:not(.dark):not(.yellow){
  grid-template-columns: 200px 1fr;
  min-height: 132px;
}
.news-page .alist .arow:not(.dark):not(.yellow) .body{ padding: 14px 18px; gap: 6px; }
.news-page .alist .arow:not(.dark):not(.yellow) h3{ font-size: 17px; line-height: 1.18; }
.news-page .alist .arow:not(.dark):not(.yellow) .deck{
  font-size: 13px; -webkit-line-clamp: 2;
}
@media (max-width: 560px){
  .news-page .alist .arow:not(.dark):not(.yellow){ grid-template-columns: 1fr; min-height: 0; }
}

/* ============== 5. SIDEBAR — news-specific cards ============== */
.news-page .sb{ display: flex; flex-direction: column; gap: 18px; }
.news-page .sb-card{
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.news-page .sb-card h4{
  font-family: 'Unbounded'; font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 14px;
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}

/* sb-services — у стилі стандартного sb-card з category.php (без червоних акцентів) */
.sb-services .srv-row{
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  transition: color .15s;
}
.sb-services .srv-row:last-of-type{ border-bottom: 0; }
.sb-services .srv-row:hover{ color: var(--ink); }
.sb-services .srv-row .ic{
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.sb-services .srv-row .ic svg{ width: 15px; height: 15px; }
.sb-services .srv-row:hover .ic{
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.sb-services .srv-row .tx{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb-services .srv-row .tx b{
  font-family: 'Manrope'; font-weight: 800; font-size: 13px;
  letter-spacing: -.005em; color: var(--ink);
}
.sb-services .srv-row .tx i{
  font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600;
}
.sb-services .srv-row .arr{
  font-family: 'Unbounded'; font-weight: 800; font-size: 14px;
  color: var(--muted-2);
  transition: color .15s, transform .15s;
}
.sb-services .srv-row:hover .arr{ color: var(--ink); transform: translateX(2px); }

/* sb-tg — обнулюємо paddings, бо tg-thin має власні */
.sb-tg{ padding: 0; border: 0; background: transparent; }

/* sb-topweek — як sb-card з top-row-i, але з time замість category */
.sb-topweek h4{ border-bottom-color: var(--ink); }
.sb-topweek .top-row-i{
  display: grid; grid-template-columns: 22px 56px 1fr; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.sb-topweek .top-row-i:last-child{ border-bottom: 0; }
.sb-topweek .top-row-i .n{
  font-family: 'Unbounded'; font-weight: 800; font-size: 14px;
  color: var(--muted-2); line-height: 1.2;
}
.sb-topweek .top-row-i:nth-child(2) .n,
.sb-topweek .top-row-i:nth-child(3) .n,
.sb-topweek .top-row-i:nth-child(4) .n{ color: var(--ink); }
.sb-topweek .top-row-i .tn{
  width: 56px; height: 42px; border-radius: 6px; overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #d9cfb1, #b8a97f);
}
.sb-topweek .top-row-i .tn img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sb-topweek .top-row-i .tx{ min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-topweek .top-row-i h5{
  font-family: 'Manrope'; font-weight: 700; font-size: 12.5px;
  line-height: 1.3; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--ink);
}
.sb-topweek .top-row-i:hover h5{ color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.sb-topweek .top-row-i time{ font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* sb-tags / sb-years — повторні дрібні правки під news-палітру (yellow accent) */
.news-page .sb-tags h4{ border-bottom-color: var(--ink); }
.news-page .sb-tags .group{ margin-bottom: 14px; }
.news-page .sb-tags .group:last-child{ margin-bottom: 0; }
.news-page .sb-tags .group-h{
  font-family: 'Manrope'; font-weight: 800; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 8px;
}
.news-page .sb-tags .tag-list{ display: flex; gap: 6px; flex-wrap: wrap; }
.news-page .sb-tags .tag-list .t{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.news-page .sb-tags .tag-list .t:hover{ border-color: var(--ink); color: var(--ink); }
.news-page .sb-tags .tag-list .t .n{ font-size: 10px; color: var(--muted); font-weight: 600; }

.news-page .sb-years h4{ border-bottom-color: var(--ink); }
.news-page .sb-years .yr-list{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.news-page .sb-years .yr{
  display: inline-flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: 'Unbounded'; font-weight: 700; font-size: 12px;
  color: var(--ink-2);
  transition: border-color .15s, color .15s;
}
.news-page .sb-years .yr:hover{ border-color: var(--ink); color: var(--ink); }
.news-page .sb-years .yr.cur{ border-color: var(--yellow); color: var(--ink); background: var(--yellow-soft, #fff8d8); }
.news-page .sb-years .yr .n{ font-family: 'Manrope'; font-size: 10px; color: var(--muted); font-weight: 600; }
