/* ============================================================
   InfoPulse — премиальный дизайн (2026)
   ============================================================ */
:root {
  --color-primary: #0A1628;
  --color-secondary: #1A2A4A;
  --color-accent: #FF6B35;
  --color-highlight: #00D4FF;
  --grad-1: #6C3CE1;
  --grad-2: #E94057;
  --grad-3: #F27121;
  --text-primary: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;

  --radius-card: 18px;
  --radius-btn: 30px;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.25);
  --shadow-hover: 0 24px 60px rgba(0,0,0,0.45);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --card-bg: rgba(255,255,255,.04);
  --card-border: rgba(255,255,255,.08);
  --header-bg: rgba(10,22,40,.85);
}

/* Светлая тема */
[data-theme="light"] {
  --color-primary: #f4f6fb;
  --color-secondary: #ffffff;
  --color-accent: #FF6B35;
  --color-highlight: #0a7ea4;
  --grad-1: #6C3CE1;
  --grad-2: #E94057;
  --grad-3: #F27121;
  --text-primary: #0A1628;
  --text-secondary: #1e293b;
  --text-muted: #64748b;

  --shadow-card: 0 8px 30px rgba(15,23,42,.12);
  --shadow-hover: 0 24px 60px rgba(15,23,42,.22);

  --card-bg: #ffffff;
  --card-border: rgba(15,23,42,.1);
  --header-bg: rgba(255,255,255,.92);

  color-scheme: light;
}
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  background: var(--color-primary);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,.logo,.headline { font-family: var(--font-heading); font-weight: 700; }
h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.2; color: var(--text-primary); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; }

a { color: var(--color-highlight); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-accent); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* --- Заголовки блоков (контейнеров) --- */
.container-heading {
  position: relative;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 22px;
  padding-bottom: 12px;
  color: var(--text-primary);
}
.container-heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 64px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
}

/* --- Шапка --- */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  position: sticky; top: 0; z-index: 40;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 20px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); letter-spacing: -.5px; }
.logo .pulse { color: var(--color-accent); }
.site-header nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-header nav a { color: var(--text-secondary); padding: 6px 12px; border-radius: 20px; font-size: 14px; font-family: var(--font-body);}
.site-header nav a:hover { color: var(--color-highlight); background: rgba(255,255,255,.06); }

/* --- Flash News --- */
.flash-bar {
  background: linear-gradient(90deg, rgba(255,107,53,.12), rgba(242,113,33,.05));
  border: 1px solid rgba(255,107,53,.3);
  color: var(--text-secondary);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.flash-bar .flash-inner { display: flex; align-items: center; gap: 22px; padding: 12px 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.flash-inner::-webkit-scrollbar { display: none; }
.flash-live {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--color-accent), var(--grad-3));
  color: #fff; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 14px; border-radius: 20px; flex-shrink: 0;
}
.flash-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: flashPulse 1.2s infinite; }
@keyframes flashPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.7)} }
.flash-bar a { color: var(--text-secondary); }
.flash-bar a:hover { color: var(--color-accent); }
.flash-sep { opacity:.35; }

/* --- Featured grid --- */
.featured-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 40px; }
.featured-card { position: relative; border-radius: var(--radius-card); overflow: hidden; display: block; box-shadow: var(--shadow-card); }
.featured-card--large { height: 460px; }
.featured-card--small { height: 220px; }
.featured-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.featured-card:hover img { transform: scale(1.06); }
.featured-card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(to top, rgba(10,22,40,.96) 0%, rgba(10,22,40,.35) 55%, transparent 100%);
}
.featured-card--large h2 { font-size: 30px; margin: 10px 0; color: #fff; }
.featured-card--small h3 { font-size: 16px; color: #fff; margin: 8px 0 0; }
.featured-card__meta { font-size: 12px; color: var(--text-muted); }

/* --- Бейджи рубрик --- */
.rubric-badge {
  display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; padding: 4px 14px; border-radius: 20px;
  color: #fff; background: var(--color-accent);
}

/* --- Кнопки --- */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent), var(--color-highlight));
  color: #fff; padding: 12px 30px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  transition: all .3s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,107,53,.4); color: #fff; }

/* --- Карточка новости --- */
.news-card {
  display: flex; gap: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 16px;
  transition: all .35s cubic-bezier(.25,.46,.45,.94);
  margin-bottom: 16px;
}
.news-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-highlight);
}
.news-card__image { position: relative; flex-shrink: 0; width: 220px; height: 150px; border-radius: 12px; overflow: hidden; background: var(--color-secondary); }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-card__image img { transform: scale(1.05); }
.news-card__imgph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:2rem; background: linear-gradient(135deg,var(--grad-1),var(--grad-2)); }
.news-card__content { flex: 1; min-width: 0; }
.news-card__meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.news-card__title { font-size: 18px; line-height: 1.4; margin: 6px 0; }
.news-card__title a { color: var(--text-primary); }
.news-card__title a:hover { color: var(--color-highlight); }
.news-card__summary { color: var(--text-secondary); font-size: 14px; margin: 8px 0; }
.news-card__footer { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* --- Реакции --- */
.reactions-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); margin: 22px 0; }
.reaction-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 30px; padding: 6px 16px; color: var(--text-secondary); font-size: 14px; cursor: pointer; transition: all .2s ease; font-family: var(--font-body);}
.reaction-btn:hover { background: rgba(255,255,255,.12); transform: scale(1.06); }
.reaction-btn .count { font-weight: 700; color: var(--text-primary); }

/* --- Glass-виджеты --- */
.widget-glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 18px; padding: 22px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

/* --- Контекстная перелинковка --- */
.context-link { color: var(--color-highlight); text-decoration: none; border-bottom: 1px dashed var(--color-highlight); cursor: pointer; }
.context-link:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.context-box { background: rgba(108,60,225,.12); border-left: 4px solid var(--grad-1); border-radius: 10px; padding: 20px; margin: 18px 0; }

/* --- Страница новости --- */
.article-page { max-width: 860px; margin: 0 auto; }
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--color-highlight); }
.article-title { margin: 8px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.article-image { border-radius: var(--radius-card); overflow: hidden; margin: 22px 0; }
.article-image img { width: 100%; display: block; }
.article-image-caption { display:block; font-size:12px; color:var(--text-muted); padding:8px 4px; }
.article-summary {
  background: rgba(0,212,255,.08); border-left: 4px solid var(--color-highlight);
  border-radius: 10px; padding: 20px; margin: 22px 0; font-size: 17px;
}
.article-content { font-size: 17px; color: var(--text-secondary); }

/* --- Футер --- */
.site-footer {
  background: linear-gradient(135deg, var(--color-primary), #1A0A2E);
  border-top: 1px solid rgba(255,255,255,.05);
  color: var(--text-muted); margin-top: 40px;
}

/* --- Анимации --- */
@keyframes fadeInUp { from { opacity:0; transform: translateY(22px);} to { opacity:1; transform:none;} }
.animate-in { opacity: 0; }
.animate-in.visible { animation: fadeInUp .6s ease forwards; }

/* --- Градиентный текст --- */
.gradient-text, .logo .pulse {
  background: linear-gradient(135deg, var(--color-accent), var(--color-highlight));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* --- Адаптивность --- */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card--large { height: 320px; }
  .featured-card--large h2 { font-size: 24px; }
  .news-card { flex-direction: column; }
  .news-card__image { width: 100%; height: 200px; }
  .container-heading { font-size: 23px; }
}
@media (max-width: 520px) {
  .featured-card--large { height: 250px; }
  .featured-card--small { height: 170px; }
  .featured-card__overlay { padding: 16px; }
  .reactions-bar { gap: 6px; }
  .reaction-btn { font-size: 12px; padding: 4px 12px; }
  body { font-size: 16px; }
}
