/* TornadoGate — News (listing + article). Reuses tokens from styles.css */

/* ---- Bilingual content toggle (driven by <html lang>) ---- */
.n-ru { display: none; }
.n-en { display: revert; }
html[lang="ru"] .n-ru { display: revert; }
html[lang="ru"] .n-en { display: none; }

/* ============ Reading progress (article) ============ */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: rgba(223, 238, 230, 0.6);
}
.reading-progress .bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width 0.12s linear;
}

/* ============ Shared hero for news ============ */
.news-hero {
  position: relative;
  padding: 150px 0 56px;
  background: radial-gradient(1100px 480px at 82% -12%, var(--tint) 0%, transparent 60%),
              var(--bg);
  overflow: hidden;
}
.news-hero .grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(680px 400px at 76% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(680px 400px at 76% 0%, #000 0%, transparent 72%);
  opacity: 0.6;
}
.news-hero .orb {
  position: absolute; top: -40px; right: 6%;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.30), transparent 65%);
  filter: blur(10px);
  animation: tgfloat 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tgfloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -24px) scale(1.08); }
}
.news-hero .wrap { position: relative; }
.news-hero .eyebrow {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 14px;
}
.news-hero h1 {
  font: 700 clamp(34px, 5vw, 54px)/1.05 var(--font-display);
  color: var(--ink); margin: 0 0 14px; letter-spacing: -.02em;
}
.news-hero p.lead {
  font: 400 clamp(16px, 2vw, 19px)/1.55 var(--font-body);
  color: var(--muted); max-width: 640px;
}

/* ============ Listing wrapper ============ */
.news-list { padding: 20px 0 110px; }

/* ---- Cover tag pill (on card / featured covers) ---- */
.cover-tag {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.9); color: var(--accent-dark);
  font: 600 11px/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* group of pills on the featured cover: [Главное][Категория] */
.cover-tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.cover-tags .cover-tag { position: static; }
.cover-tag.ft {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* ---- Decorative fallback swirl shown on coverless posts ---- */
.cover-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .5;
}

/* ============ Featured card ============ */
.news-featured { margin: 0 0 34px; }
.featured-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-md); text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-cover {
  position: relative; min-height: 340px; overflow: hidden;
  background: var(--tint-soft) center/cover no-repeat;
}
.featured-body { padding: 38px 40px 36px; display: flex; flex-direction: column; }
.featured-meta {
  display: flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 14px;
}
.featured-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.featured-body h2 {
  font: 600 clamp(24px, 2.4vw, 34px)/1.14 var(--font-display);
  color: var(--ink); margin: 0 0 14px; letter-spacing: -.01em;
}
.featured-body p {
  font: 400 17px/1.6 var(--font-body); color: var(--muted); margin: 0 0 24px;
}
.featured-foot { margin-top: auto; display: flex; align-items: center; gap: 16px; }
.featured-foot .read-more {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--font-body); color: var(--accent-deep);
}
.featured-foot .read-more svg { width: 18px; height: 18px; transition: transform .3s; }
.featured-card:hover .read-more svg { transform: translateX(5px); }
.featured-foot .read-time { color: #9fb4aa; font: 400 14px/1 var(--font-body); }

/* ============ Filters ============ */
.news-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px;
}
.news-filter {
  font: 600 14px/1 var(--font-body); padding: 9px 18px; border-radius: 999px;
  cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft);
  transition: all .2s;
}
.news-filter:hover { border-color: var(--accent); color: var(--accent-deep); }
.news-filter.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* ============ Listing grid ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
}
.news-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tint-soft) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.news-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-card-meta {
  font: 600 12px/1 var(--font-body);
  color: var(--muted); margin-bottom: 11px;
  display: flex; gap: 9px; align-items: center;
}
.news-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #c2d8cd; }
.news-card h3 {
  font: 600 20px/1.24 var(--font-display);
  color: var(--ink); margin: 0 0 10px; letter-spacing: -.01em;
}
.news-card p {
  font: 400 15px/1.55 var(--font-body);
  color: var(--muted); margin: 0 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .read-more {
  margin-top: auto;
  font: 600 14px/1 var(--font-body); color: var(--accent-deep);
  display: inline-flex; align-items: center; gap: 6px;
}
.news-card .read-more svg { width: 16px; height: 16px; transition: transform .3s; }
.news-card:hover .read-more svg { transform: translateX(4px); }

.news-empty {
  text-align: center; padding: 60px 0; color: var(--muted);
  font: 400 17px/1.5 var(--font-body);
}

/* ============ Article page ============ */
.article-hero {
  position: relative;
  padding: 118px 0 24px;
  background: radial-gradient(1000px 460px at 80% -12%, var(--tint) 0%, transparent 60%), var(--bg);
  overflow: hidden;
}
.article-hero .crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font: 500 13px/1 var(--font-body); color: var(--muted); margin-bottom: 22px;
}
.article-hero .crumbs a { color: var(--muted); text-decoration: none; }
.article-hero .crumbs a:hover { color: var(--accent-deep); }
.article-hero .crumbs svg { width: 14px; height: 14px; opacity: .5; }
.article-hero .crumbs .cur { color: var(--ink-soft); }
.article-meta {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.article-meta .read-time { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.article-hero h1 {
  font: 700 clamp(30px, 4.4vw, 52px)/1.07 var(--font-display);
  color: var(--ink); margin: 0 0 18px; letter-spacing: -.02em; max-width: 900px;
}
.article-lead {
  font: 400 clamp(17px, 2vw, 20px)/1.55 var(--font-body);
  color: var(--ink-soft); max-width: 760px; margin: 0;
}
.article-wrap { max-width: 820px; }
.article-cover {
  position: relative;
  margin: 30px 0 40px;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  min-height: clamp(240px, 40vw, 400px);
  background: var(--tint-soft) center/cover no-repeat;
}
.article-cover img { display: block; width: 100%; height: auto; }

.article-body { font: 400 18px/1.72 var(--font-body); color: var(--ink-soft); }
.article-body h2 {
  font: 600 27px/1.24 var(--font-display); color: var(--ink);
  letter-spacing: -.01em; margin: 40px 0 14px;
}
.article-body h3 {
  font: 600 21px/1.3 var(--font-display); color: var(--ink);
  margin: 32px 0 10px;
}
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin: 0 0 8px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--r-md); margin: 26px 0; border: 1px solid var(--line); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* ---- Checklist bullet list (design "ul") ---- */
.article-body ul.checklist {
  list-style: none; padding-left: 0; margin: 0 0 22px;
  display: flex; flex-direction: column; gap: 11px;
}
.article-body ul.checklist li { position: relative; padding-left: 30px; margin: 0; }
.article-body ul.checklist li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 9px 9px; background-repeat: no-repeat; background-position: center;
}

/* ---- Key takeaways box (design "key") ---- */
.article-body .key-box {
  margin: 30px 0; padding: 26px 28px;
  background: linear-gradient(135deg, var(--tint-soft), var(--tint));
  border: 1px solid #cfeadd; border-radius: 18px;
}
.article-body .key-box .key-title {
  font: 600 14px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 16px;
}
.article-body .key-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.article-body .key-box li {
  display: flex; align-items: flex-start; gap: 12px;
  font: 400 16.5px/1.5 var(--font-body); color: var(--ink); margin: 0; padding: 0;
}
.article-body .key-box li::before { content: none; }
.article-body .key-box li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; stroke: var(--accent); }

/* ---- Quote (design "quote") ---- */
.article-body blockquote {
  margin: 32px 0; padding: 8px 0 8px 24px;
  border-left: 3px solid var(--accent); font-style: normal; color: var(--ink);
}
.article-body blockquote p {
  font: 500 21px/1.4 var(--font-display); color: var(--ink);
  margin: 0 0 10px; letter-spacing: -.01em;
}
.article-body blockquote cite {
  display: block; font-style: normal;
  font: 600 14px/1 var(--font-body); color: var(--muted);
}

/* ---- Article contacts block (baked into every generated article) ---- */
.article-contacts {
  margin: 44px 0 0; padding: 26px 28px;
  background: linear-gradient(135deg, var(--tint-soft), var(--surface) 70%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.article-contacts .ac-head h2 {
  font: 600 clamp(19px, 2vw, 23px)/1.25 var(--font-display);
  color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em;
}
.article-contacts .ac-head p { font: 400 15px/1.5 var(--font-body); color: var(--muted); margin: 0 0 18px; }
.ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-link {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 16px; text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ac-link:hover { transform: translateY(-2px); border-color: rgba(16, 185, 129, 0.5); box-shadow: var(--shadow-sm); }
.ac-ico {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--tint); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.ac-ico svg { width: 18px; height: 18px; }
.ac-txt { min-width: 0; }
.ac-label { display: block; font: 500 12px/1.25 var(--font-body); color: var(--muted); }
.ac-value { display: block; font: 600 14.5px/1.3 var(--font-body); color: var(--accent-deep); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ac-grid { grid-template-columns: 1fr; }
  .article-contacts { padding: 20px 18px; }
}

/* ---- Article footer: back + share ---- */
.article-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin: 44px 0 0; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--font-body); color: var(--accent-deep); text-decoration: none;
  margin: 0;
}
.article-back svg { width: 18px; height: 18px; transition: transform .3s; }
.article-back:hover svg { transform: translateX(-4px); }
.share-row { display: flex; align-items: center; gap: 10px; }
.share-row .share-label { font: 600 14px/1 var(--font-body); color: var(--muted); }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-deep); cursor: pointer; transition: .2s;
}
.share-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.share-btn svg { width: 17px; height: 17px; }

/* ---- Related "Read next" ---- */
.news-related { padding: 70px 0 20px; }
.news-related h2 {
  font: 600 clamp(24px, 2.6vw, 32px)/1.2 var(--font-display);
  color: var(--ink); letter-spacing: -.01em; margin: 0 0 28px;
}

/* ---- Toast (copy link) ---- */
.news-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(18px);
  opacity: 0; pointer-events: none; z-index: 300;
  background: var(--accent-deep); color: #fff; font: 600 14px/1 var(--font-body);
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-md);
  transition: opacity .25s, transform .25s;
}
.news-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 780px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-cover { min-height: 210px; aspect-ratio: 16 / 9; }
  .featured-body { padding: 26px 24px 28px; }
}
@media (max-width: 640px) {
  .news-hero { padding: 120px 0 44px; }
  .news-hero .orb { width: 220px; height: 220px; right: -20px; }
  .article-hero { padding: 104px 0 20px; }
  .article-body { font-size: 17px; }
  .news-grid { grid-template-columns: 1fr; }
}
