/* ==============================================================================
   1. ШРИФТЫ И ПЕРЕМЕННЫЕ
   ============================================================================== */
@font-face {
  font-family: 'Inter';
  src: url('/inter-regular.woff2') format('woff2'),
       url('/inter-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/inter-bold.woff2') format('woff2'),
       url('/inter-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8fafc;        /* Свежий, слегка стальной оттенок фона */
  --surface: #ffffff;   /* Чистый белый для контента */
  --text: #0f172a;      /* Глубокий графитовый вместо резкого черного */
  --text-muted: #475569;/* Благородный серый для второстепенного текста */
  --primary: #000080;   /* Ваш фирменный глубокий синий */
  --silver: #C0C0C0;    /* Фирменное чистое серебро */
  --border: #cbd5e1;    /* Светлая строгая граница */
  --ad-bg: #fdfdfd;     /* Интегрированный фон рекламы */
  --container-width: 1140px; /* Оптимальная современная ширина */
}

/* ==============================================================================
   2. БАЗОВЫЙ СБРОС И ОБЩИЕ СТИЛИ
   ============================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Бескомпромиссные острые углы */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==============================================================================
   3. ШАПКА И НАВИГАЦИЯ
   ============================================================================== */
header {
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
  padding: 24px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-block img {
  width: 240px !important;       /* Увеличиваем ширину, так как логотип очень вытянутый */
  height: 38px !important;       /* Идеальная пропорциональная высота под 1550 */
  display: block !important;
  object-fit: contain !important;
}

/* Минималистичное Меню */
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 10px 18px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--primary);
  background: #f1f5f9;
}

nav a.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface);
  font-weight: 700;
}

/* ==============================================================================
   4. ОСНОВНОЙ КОНТЕНТ И ТИПОГРАФИКА
   ============================================================================== */
main {
  background: var(--surface);
  margin: 40px 0;
  padding: 50px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 24px;
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  margin: 35px 0 15px 0;
  color: var(--primary);
  border-bottom: 1px solid var(--silver);
  padding-bottom: 8px;
  font-weight: 700;
}

p {
  margin-bottom: 24px;
  text-align: justify;
  font-size: 1.05rem;
  color: var(--text);
}

/* Специфичные стили для главной страницы (Hero блок) */
.hero-section {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  font-size: 2.4rem;
  margin-bottom: 24px;
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  text-align: justify;
  margin-bottom: 0;
}

/* ==============================================================================
   5. СЕТКА КАТЕГОРИЙ (ГЛАВНАЯ СТРАНИЦА)
   ============================================================================== */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.category-card {
  border: 1px solid var(--border);
  padding: 30px;
  background: var(--surface);
  border-left: 6px solid var(--primary);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  background: #f8fafc;
}

.category-card h2 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--silver);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0; /* Сброс отступа сверху для заголовков внутри карточек */
}

.article-list {
  list-style: none;
}

.article-list li {
  margin-bottom: 12px;
  padding-left: 18px;
  position: relative;
}

.article-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--silver);
}

.article-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.article-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==============================================================================
   6. ТАБЛИЦЫ
   ============================================================================== */
.table-container {
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background: #f8fafc;
}

/* ==============================================================================
   7. РЕКЛАМНЫЕ БЛОКИ (СКРЫТЫ)
   ============================================================================== */
.rtb-container {
  display: none !important; /* Намертво блокирует показ */
  border: 1px solid var(--silver);
  margin: 40px 0;
  padding: 20px;
  min-height: 280px;
  /* Остальные свойства скрыты, но оставлены для порядка */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  position: relative;
}

/* ==============================================================================
   8. ФУТЕР
   ============================================================================== */
footer {
  background: var(--surface);
  border-top: 2px solid var(--primary);
  padding: 50px 0;
  margin-top: 80px;
  font-size: 0.9rem;
}

.footer-sections {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-col ul a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  border-top: 1px solid var(--silver);
  padding-top: 24px;
  text-align: justify;
  color: #64748b;
  margin-top: 24px;
}

/* ==============================================================================
   9. COOKIE BANNER (ИНЖЕНЕРНЫЙ СТИЛЬ)
   ============================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--surface) !important;
  border-top: 3px solid var(--primary) !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08) !important;
  z-index: 10000 !important;
  padding: 24px 0 !important;
  display: none; /* Контролируется JS */
}

.cookie-banner-wrap {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 24px;
}

.cookie-text {
  font-size: 0.9rem !important;
  color: var(--text) !important;
  text-align: justify !important;
  max-width: 72% !important;
  line-height: 1.6 !important;
}

.cookie-text a {
  color: var(--primary) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
}

.cookie-buttons {
  display: flex !important;
  gap: 12px !important;
}

.cookie-btn {
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  padding: 12px 28px !important;
  cursor: pointer !important;
  border: 1px solid var(--primary) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  transition: all 0.15s ease-in-out !important;
}

.cookie-btn.accept {
  background: var(--primary) !important;
  color: var(--surface) !important;
}

.cookie-btn.accept:hover {
  background: #000050 !important;
  border-color: #000050 !important;
}

.cookie-btn.decline {
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

.cookie-btn.decline:hover {
  background: #f1f5f9 !important;
  color: var(--text) !important;
  border-color: var(--text-muted) !important;
}

/* Компактная фиксированная плашка в углу экрана */
.cookie-revoke-trigger {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  background: var(--surface) !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  padding: 10px 16px !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
  border-left: 4px solid var(--primary) !important;
  transition: all 0.15s ease-in-out !important;
}

.cookie-revoke-trigger:hover {
  background: var(--primary) !important;
  color: var(--surface) !important;
}

/* ==============================================================================
   10. АДАПТИВНОСТЬ (MEDIA QUERIES)
   ============================================================================== */
@media (max-width: 992px) {
  .footer-sections { 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
  }
}

@media (max-width: 768px) {
  .header-wrap { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 16px; 
  }
  
  nav { 
    width: 100%; 
    gap: 6px; 
  }
  
  nav a { 
    width: 49%; 
    text-align: center; 
    font-size: 0.85rem; 
    padding: 12px 4px; 
    display: inline-block; 
    border: 1px solid var(--border); 
  }
  
  nav a.active { 
    border-color: var(--primary); 
  }
  
  main { 
    padding: 24px 16px; 
    margin: 20px 0; 
  }
  
  h1, .hero-title { 
    font-size: 1.7rem; 
    margin-bottom: 16px; 
  }
  
  .hub-grid { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }
  
  .footer-sections { 
    grid-template-columns: 1fr; 
    gap: 30px; 
  }
  
  .footer-bottom { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 12px; 
  }

  /* Мобильный адаптив для куки-блоков */
  .cookie-banner {
    padding: 20px 0 !important;
  }
  .cookie-text {
    max-width: 100% !important;
    font-size: 0.85rem !important;
  }
  .cookie-buttons {
    width: 100% !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .cookie-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 14px !important;
  }
  .cookie-revoke-trigger {
    bottom: 12px !important;
    right: 12px !important;
    padding: 8px 12px !important;
    font-size: 0.7rem !important;
  }
}