/* ═══════════════════════════════════════════════════════════
   ТОВЧ.МН — BOLD INK EDITORIAL DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #fef200;
  color: #0a0a0a;
}

/* ── Focus States ─────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fef200;
  outline-offset: 2px;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Line Clamp Utilities ─────────────────────────────────── */
.lc2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Scrollbar Hide ───────────────────────────────────────── */
.no-scroll::-webkit-scrollbar { display: none; }
.no-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Noise Texture Overlay ────────────────────────────────── */
.noise-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  pointer-events: none;
  z-index: 1;
}
.dark .noise-bg::before {
  opacity: 0.06;
}

/* ── Reading Progress Bar ─────────────────────────────────── */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #fef200, #facc15);
  z-index: 9999;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 8px rgba(254, 242, 0, 0.4);
}

/* ── News Card System ─────────────────────────────────────── */
.news-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 40px -8px rgba(0, 0, 0, 0.12),
    0 4px 12px -4px rgba(0, 0, 0, 0.06);
}
.dark .news-card:hover {
  box-shadow:
    0 12px 40px -8px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(254, 242, 0, 0.08);
}

.news-card .card-img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card:hover .card-img {
  transform: scale(1.06);
}

/* Card yellow accent line on hover */
.news-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #fef200;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card:hover::after {
  transform: scaleX(1);
}

/* ── Category Badge ───────────────────────────────────────── */
.cat-badge {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: #fef200;
  color: #0a0a0a;
  transition: background 0.2s;
}
.cat-badge:hover {
  background: #facc15;
}

/* ── Section Header ───────────────────────────────────────── */
.section-title {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 1.25rem;
  background: #fef200;
  flex-shrink: 0;
}

/* ── Article Body Typography ──────────────────────────────── */
.article-body {
  font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif;
  line-height: 1.85;
}
.article-body p {
  margin-bottom: 1.25rem;
  font-size: 16px;
  line-height: 1.85;
}
.article-body h3 {
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  line-height: 1.85;
}
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body blockquote {
  border-left: 4px solid #fef200;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  background: rgba(254, 242, 0, 0.04);
  font-style: italic;
  color: #525252;
}
.dark .article-body blockquote {
  color: #a3a3a3;
  background: rgba(254, 242, 0, 0.03);
}
.article-body img {
  border-radius: 2px;
  margin: 1.5rem 0;
}

/* ── Glass Effect ─────────────────────────────────────────── */
.glass {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* ── Ticker ───────────────────────────────────────────────── */
.ticker-dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Stagger Animation ────────────────────────────────────── */
.stagger-item {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.5s ease-out forwards;
}
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Sidebar Widget ───────────────────────────────────────── */
.sidebar-widget {
  background: white;
  border: 1px solid #e5e5e5;
  transition: box-shadow 0.3s;
}
.dark .sidebar-widget {
  background: #171717;
  border-color: #262626;
}

/* ── Trending Number ──────────────────────────────────────── */
.trending-num {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
  color: #e5e5e5;
  min-width: 2rem;
  text-align: center;
  transition: color 0.2s;
}
.dark .trending-num {
  color: #262626;
}
.group:hover .trending-num {
  color: #0a0a0a;
}
.dark .group:hover .trending-num {
  color: #fef200;
}

/* ── Share Button ─────────────────────────────────────────── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: opacity 0.2s, transform 0.2s;
}
.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ── Image Rendering ──────────────────────────────────────── */
img {
  image-rendering: auto;
}

/* ── Comment Form ─────────────────────────────────────────── */
.comment-form textarea {
  font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form textarea:focus {
  border-color: #fef200;
  box-shadow: 0 0 0 3px rgba(254, 242, 0, 0.1);
}

/* ── Type Chip (used in article view) ─────────────────────── */
.type-chip {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ── Smooth Image Loading ─────────────────────────────────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* ── Mobile Menu Slide ────────────────────────────────────── */
#mobile-menu {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mobile-menu.menu-open {
  opacity: 1;
  visibility: visible;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.25rem;
  font-family: "Roboto", sans-serif;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid #e5e5e5;
  transition: all 0.2s;
}
.dark .pagination a,
.dark .pagination span {
  border-color: #262626;
}
.pagination a:hover {
  background: #fef200;
  color: #0a0a0a;
  border-color: #fef200;
}
.pagination .active {
  background: #fef200;
  color: #0a0a0a;
  border-color: #fef200;
  font-weight: 800;
}
