/* ============================================================
   News — archive + single article
   იყენებს tokens.css-ის ცვლადებს. სტილი: შავი/თეთრი/წითელი,
   ერთი easing, 150/220/320 ms.
   ============================================================ */


/* ============================================================
   Page hero (dark) — გვერდის თავი archive/single-ისთვის
   ============================================================ */

.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding-top: calc(var(--topbar-h) + var(--header-h) + 72px);
  padding-bottom: 56px;
  overflow: hidden;
  isolation: isolate;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-13);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 28px;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.page-hero__back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--white);
}

.page-hero__back svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}

.page-hero__back:hover svg { transform: translateX(-2px); }

.page-hero__title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--white);
  max-width: min(1120px, 100%);
  width: 100%;
  margin-bottom: 16px;
  text-wrap: balance;
}

.page-hero__subtitle {
  font-size: var(--fs-18);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
}

.page-hero__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-14);
  color: rgba(255, 255, 255, 0.7);
}

.page-hero__date svg {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767.98px) {
  .page-hero {
    padding-top: calc(var(--topbar-h) + var(--header-h) + 40px);
    padding-bottom: 40px;
  }
  .page-hero__subtitle { font-size: var(--fs-16); }
}


/* ============================================================
   Filter bar — sticky ჰედერის ქვემოთ
   ============================================================ */

.filter-bar {
  position: sticky;
  top: calc(var(--header-h-sticky) + var(--topbar-h));
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
          backdrop-filter: saturate(150%) blur(14px);
  transition: box-shadow var(--dur) var(--ease);
}

.filter-bar.is-pinned { box-shadow: var(--shadow-2); }

.filter-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 14px 0;
  min-height: 64px;
}

.filter-bar__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}

.filter-bar__tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.filter-tab:hover {
  color: var(--ink);
  background: var(--paper);
}

.filter-tab.is-active {
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}

.filter-tab__count {
  font-size: var(--fs-12);
  color: currentColor;
  opacity: 0.55;
}

.filter-bar__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
  font-size: var(--fs-13);
  color: var(--text-muted);
}

.filter-bar__count { white-space: nowrap; }

.filter-bar__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-13);
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}

.filter-bar__sort:hover { border-color: var(--ink-3); }

.filter-bar__sort svg { width: 12px; height: 12px; color: var(--text-muted); }

@media (max-width: 767.98px) {
  .filter-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding: 12px 0;
  }
  .filter-bar__meta { justify-content: space-between; }
}


/* ============================================================
   News grid + cards
   ============================================================ */

.news-archive {
  background: var(--white);
  padding: 56px 0 96px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px var(--sp-6);
}

@media (max-width: 1023.98px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 32px var(--sp-5); }
}

@media (max-width: 575.98px) {
  .news-grid { grid-template-columns: 1fr; gap: 28px; }
  .news-archive { padding: 40px 0 64px; }
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.news-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-3);
  background: var(--paper);
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.news-card:hover .news-card__media img { transform: scale(1.04); }

.news-card__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-card:hover .news-card__eyebrow { color: var(--ink); }

.news-card__title {
  font-size: var(--fs-18);
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card__title { color: var(--red); }

.news-card__excerpt {
  font-size: var(--fs-14);
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  margin-top: auto;
}

.news-card__date { display: inline-flex; align-items: center; gap: 6px; }

.news-card__date svg { width: 12px; height: 12px; color: var(--text-faint); }


/* ============================================================
   Pagination
   ============================================================ */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 64px;
}

.pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-2);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: var(--white);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.pager__btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.pager__btn.is-current {
  background: var(--ink);
  color: var(--white);
}

.pager__btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

.pager__btn svg { width: 14px; height: 14px; }

.pager__ellipsis {
  padding: 0 6px;
  color: var(--text-faint);
  user-select: none;
}


/* ============================================================
   Single article
   ============================================================ */

.article {
  background: var(--white);
}

/* Featured image — overlaps article-hero by negative margin */
.article__media {
  position: relative;
  margin-top: -56px;
  z-index: 2;
}

.article__media-inner {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--r-4);
  background: var(--paper);
  box-shadow: var(--shadow-2);
}

.article__media-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767.98px) {
  .article__media { margin-top: -32px; }
  .article__media-inner { aspect-ratio: 16 / 9; border-radius: var(--r-3); }
}

/* Body column — narrow, editorial */
.article__body {
  max-width: 720px;
  margin: 64px auto 0;
  font-size: var(--fs-18);
  line-height: 1.7;
  color: var(--ink);
}

.article__lede {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 32px;
  letter-spacing: -0.005em;
}

.article__body p {
  margin-bottom: 1.4em;
}

.article__body h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2em 0 0.6em;
}

.article__body h2:first-child { margin-top: 0; }

.article__body h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 1.8em 0 0.5em;
}

.article__body ul,
.article__body ol {
  list-style: revert;
  padding-left: 1.4em;
  margin-bottom: 1.4em;
  color: var(--ink);
}

.article__body li { margin-bottom: 0.5em; }

.article__body li::marker { color: var(--text-muted); }

.article__body strong { font-weight: 600; color: var(--ink); }

.article__body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color var(--dur-fast) var(--ease);
}

.article__body a:hover { color: var(--red); }

.article__body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.article__figure {
  margin: 2em 0;
}

.article__figure img {
  width: 100%;
  border-radius: var(--r-3);
}

.article__figure figcaption {
  margin-top: 12px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Video figure — poster + play overlay (prototype placeholder) */
.article__video {
  margin: 2.5em 0;
}

.article__video-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  isolation: isolate;
}

.article__video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity var(--dur) var(--ease),
              transform var(--dur-slow) var(--ease);
}

.article__video-frame:hover img,
.article__video-frame:focus-visible img {
  opacity: 0.72;
  transform: scale(1.02);
}

.article__video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 10, 11, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.article__video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px -8px rgba(10, 10, 11, 0.45);
  transition: transform var(--dur) var(--ease),
              background var(--dur-fast) var(--ease);
  z-index: 2;
}

.article__video-frame:hover .article__video-play,
.article__video-frame:focus-visible .article__video-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.article__video-play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px; /* optical centering of triangle */
}

.article__video figcaption {
  margin-top: 14px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .article__video-play { width: 60px; height: 60px; }
  .article__video-play svg { width: 20px; height: 20px; }
}

@media (max-width: 767.98px) {
  .article__body { font-size: var(--fs-16); margin-top: 40px; }
  .article__lede { font-size: var(--fs-18); }
  .article__body h2 { font-size: 24px; }
  .article__body h3 { font-size: var(--fs-18); }
}

/* Tags + share row */
.article__foot {
  max-width: 720px;
  margin: 56px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: var(--fs-13);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}

.tag:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  background: var(--paper);
}

.share-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-row__label {
  font-size: var(--fs-13);
  color: var(--text-muted);
  margin-right: 6px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-2);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.share-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  background: var(--paper);
}

.share-btn svg { width: 14px; height: 14px; }


/* ============================================================
   Related news block
   ============================================================ */

.related {
  background: var(--paper-2);
  padding: 80px 0;
  margin-top: 96px;
  border-top: 1px solid var(--border);
}

.related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.related__title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}

.related__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--red);
  transition: color var(--dur-fast) var(--ease);
}

.related__all svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}

.related__all:hover { color: var(--red-deep); }
.related__all:hover svg { transform: translateX(3px); }


/* ============================================================
   CTA block — dark, red bottom stripe (mega__featured-style)
   ============================================================ */

.cta-block {
  position: relative;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-4);
  padding: 56px;
  margin: 96px auto;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-8);
  overflow: hidden;
  isolation: isolate;
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--red);
}

.cta-block__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 12px;
}

.cta-block__title {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 30ch;
}

@media (max-width: 767.98px) {
  .cta-block {
    grid-template-columns: 1fr;
    padding: 40px 32px;
    margin: 64px auto;
  }
}
