:root {
  --bg1: #0e021b;
  --bg2: #1a0430;
  --txt: #f2e6ff;
  --muted: #cdb7ff;
  --glass: rgba(0, 0, 0, .55);
  --glass-brd: rgba(255, 255, 255, .1);
  --chip: #ffffff1a;
  --accent1: #9b2dff;
  --accent2: #ff00e0;
  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(circle at 20% 0%, rgba(90, 30, 180, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(60, 15, 120, 0.25) 0%, transparent 60%),
    linear-gradient(180deg, #120224 0%, #070011 100%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 0, 70, 0.45);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header h1 {
  margin: 0;
  padding: 28px 0 6px;
  font-size: clamp(22px, 3.2vw, 34px);
  text-align: center;
  text-shadow: 0 0 18px rgba(200, 120, 255, .65);
  font-weight: 700;
}

.site-header .lead {
  margin: 0 0 10px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px 0 20px;
}

.links a {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(6px);
  color: #ead9ff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.links a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 45, 255, 0.3);
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

/* ===== CARDS ===== */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(140, 0, 220, .4);
  border-color: rgba(155, 45, 255, 0.3);
}

.logo-wrap {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.logo-wrap img {
  max-height: 50px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.card h2 {
  margin: 8px 0 6px;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 150, 255, .25);
}

.sub {
  margin: 0 0 16px;
  color: #d9cfff;
  font-size: 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 12px 0 20px;
}

.chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--glass-brd);
  color: var(--muted);
  font-weight: 500;
}

.cta {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(150, 0, 255, .35);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  max-width: 200px;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(150, 0, 255, .5);
  filter: brightness(1.1);
}

/* ===== FAQ ===== */
.faq {
  margin: 60px 0;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 0 12px rgba(180, 100, 255, .4);
  font-weight: 700;
}

.faq details {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 12px 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.faq details:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(155, 45, 255, 0.2);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 4px 0;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq details[open] summary::after {
  content: '−';
  transform: translateY(-50%) rotate(0deg);
}

.faq p {
  margin: 12px 0 4px;
  color: #e9dcff;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(20, 0, 35, .8);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  padding: 30px 0;
  font-size: 14px;
  color: #cbb3ff;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer a {
  color: #d9cfff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--accent1);
}

/* ===== OVERLAYS & MODALS ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.overlay.show {
  display: flex;
  opacity: 1;
}

/* Блокировка скролла при открытом overlay */
body.overlay-open {
  overflow: hidden;
}

.modal {
  background: rgba(20, 5, 40, 0.95);
  border: 1px solid rgba(155, 45, 255, 0.3);
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalAppear 0.4s ease-out;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Улучшенные стили для модальных окон */
.modal img {
  max-width: 180px;
  height: auto;
  margin: 0 auto 25px;
  display: block;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.modal h3 {
  font-size: 26px;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

.modal p {
  margin-bottom: 18px;
  line-height: 1.7;
  color: #e9dcff;
  text-align: center;
  font-size: 16px;
}

.modal ul {
  margin: 20px 0;
  padding-left: 0;
  text-align: left;
  display: inline-block;
}

.modal li {
  margin-bottom: 10px;
  color: #e9dcff;
  padding-left: 10px;
}

.modal .tags {
  margin: 25px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.modal .cta {
  display: inline-block;
  text-align: center;
  margin: 25px auto 0;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  max-width: 280px;
}

/* ===== CLOSE BUTTON ===== */
.close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eee;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-x:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.close-x svg {
  width: 20px;
  height: 20px;
}

/* ===== PROMO BANNER ===== */
.promo-overlay .modal {
  max-width: 500px;
  text-align: center;
  background: rgba(15, 2, 35, 0.98);
  padding: 30px;
}

.promo-overlay .logo-wrap {
  margin-bottom: 25px;
}

.promo-overlay .logo-wrap img {
  max-width: 100%;
  max-height: 200px;
  height: auto;
  border-radius: 16px;
  object-fit: contain;
}

.promo-overlay h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 700;
}

.promo-overlay p {
  margin-bottom: 20px;
  color: #e9dcff;
  line-height: 1.6;
  font-size: 16px;
}

.promo-overlay .chips {
  margin: 20px 0;
}

.promo-overlay .actions {
  margin: 25px 0 15px;
}

.promo-overlay .countdown {
  font-size: 14px;
  color: #aaa;
  margin-top: 15px;
  font-family: monospace;
  min-height: 20px;
}

/* ===== ARTICLES ===== */
#latest-articles {
  margin: 60px 0;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#latest-articles h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  text-align: center;
  margin-bottom: 30px;
  color: var(--txt);
  text-shadow: 0 0 12px rgba(180, 100, 255, .4);
  font-weight: 700;
}

.articles-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
  padding: 0;
  margin: 0;
}

.articles-list li {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  padding: 12px 18px;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 8px 20px rgba(60, 0, 90, .25);
  transition: all 0.3s ease;
}

.articles-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(130, 0, 255, .45);
  border-color: rgba(155, 45, 255, 0.3);
}

.articles-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.articles-list a:hover {
  color: #fff;
}

/* ===== UTILITY ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== ARTICLE BLOCK ===== */
.article-block {
  margin: 40px 0;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-block .content {
  max-width: 800px;
  margin: 0 auto;
}

.article-block h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 0 12px rgba(180, 100, 255, .4);
}

.article-block h3 {
  font-size: 22px;
  margin: 30px 0 16px;
  color: #fff;
}

.article-block p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: #e9dcff;
}

.article-block blockquote {
  border-left: 4px solid var(--accent1);
  padding: 16px 20px;
  margin: 20px 0;
  background: rgba(155, 45, 255, 0.1);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .card {
    padding: 20px 16px;
  }
  
  .modal {
    padding: 24px 20px;
    margin: 10px;
  }
  
  .modal img {
    max-width: 140px;
  }
  
  .modal h3 {
    font-size: 22px;
  }
  
  .site-header h1 {
    padding: 20px 0 6px;
  }
  
  .links {
    padding: 8px 0 16px;
  }
  
  .promo-overlay .logo-wrap img {
    max-height: 150px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 18px 14px;
  }
  
  .modal {
    padding: 20px 16px;
  }
  
  .modal img {
    max-width: 120px;
  }
  
  .modal h3 {
    font-size: 20px;
  }
  
  .close-x {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
  
  .promo-overlay .logo-wrap img {
    max-height: 120px;
  }
}
/* ===== PROMO OVERLAYS: Общие стили для обеих модалок ===== */
.promo-overlay {
  z-index: 10001; /* Выше других overlay */
}

.promo-overlay .modal {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important; /* Вертикальное центрирование */
  align-items: center !important; /* Горизонтальное центрирование */
  text-align: center !important;
  background: rgba(15, 2, 35, 0.98) !important;
  border-radius: 20px !important;
  padding: 40px 30px !important; /* Увеличено для места под img */
  max-width: 500px !important;
  width: 90% !important; /* Responsivity */
  max-height: 90vh !important;
  overflow: hidden !important; /* Предотвращает съезд */
  box-shadow: var(--shadow) !important;
  position: relative !important;
  min-height: 420px !important; /* Фиксированная min-height для стабильности */
  gap: 20px !important; /* Отступы между элементами */
}

.promo-overlay .close-x {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #eee !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
  opacity: 0 !important; /* По умолчанию скрыт */
  pointer-events: none !important;
}

.promo-overlay .close-x.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.promo-overlay .close-x:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: rotate(90deg) !important;
}

.promo-overlay .logo-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-shrink: 0 !important; /* Не сжимается */
  margin: 0 !important; /* Убираем лишние маржины */
}

.promo-overlay .logo-wrap img {
  width: 100% !important; /* Заполняет контейнер по ширине */
  max-width: 300px !important; /* Лимит ширины */
  height: auto !important;
  max-height: 160px !important;
  object-fit: contain !important; /* Сохраняет пропорции, центрирует */
  border-radius: 12px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.3s ease !important;
  display: block !important;
}

.promo-overlay .content,
.promo-overlay h3,
.promo-overlay p {
  width: 100% !important;
  flex-shrink: 0 !important;
  margin: 0 !important; /* Убираем дефолтные маржины */
  padding: 0 10px !important; /* Небольшой indent для длинного текста */
  word-wrap: break-word !important;
  line-height: 1.5 !important;
}

.promo-overlay h3 {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 10px !important;
}

.promo-overlay p {
  font-size: 16px !important;
  color: #e9dcff !important;
  margin-bottom: 15px !important;
}

.promo-overlay .chips {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 15px 0 !important;
  width: 100% !important;
}

.promo-overlay .actions,
.promo-overlay .content .cta {
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.promo-overlay .countdown {
  font-size: 14px !important;
  color: #aaa !important;
  margin-top: 10px !important;
  font-family: monospace !important;
  min-height: 20px !important;
  width: 100% !important;
  text-align: center !important;
}

/* Мобильные: Уменьшаем всё */
@media (max-width: 768px) {
  .promo-overlay .modal {
    padding: 30px 20px !important;
    min-height: 380px !important;
    width: 95% !important;
    gap: 15px !important;
  }
  
  .promo-overlay .logo-wrap img {
    max-width: 250px !important;
    max-height: 140px !important;
  }
  
  .promo-overlay h3 {
    font-size: 20px !important;
  }
  
  .promo-overlay p {
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .promo-overlay .modal {
    padding: 25px 15px !important;
    min-height: 350px !important;
    gap: 12px !important;
  }
  
  .promo-overlay .logo-wrap img {
    max-width: 220px !important;
    max-height: 120px !important;
  }
  
  .promo-overlay h3 {
    font-size: 18px !important;
  }
  
  .promo-overlay .close-x {
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
  }
}
.promo-overlay .modal {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  background: rgba(15, 2, 35, 0.98) !important;
  border-radius: 20px !important;
  padding: 40px 30px !important;
  max-width: 500px !important;
  width: 90% !important;
  overflow: hidden !important;
  box-shadow: var(--shadow) !important;
  position: relative !important;
  gap: 20px !important;
}

/* Квадратное фото по центру */
.promo-overlay .logo-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.promo-overlay .logo-wrap img {
  width: 250px !important;
  height: 250px !important;
  object-fit: cover !important; /* делает фото квадратным */
  border-radius: 16px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
  margin-bottom: 80px !important; /* <-- добавили отступ снизу */
}


/* Центровка контента под фото */
.promo-overlay h3,
.promo-overlay p,
.promo-overlay .chips,
.promo-overlay .cta {
  width: 100% !important;
  text-align: center !important;
  margin: 0 auto !important;
}

.promo-overlay h3 {
  font-size: 22px !important;
  color: #fff !important;
  font-weight: 700 !important;
  margin-top: 10px !important;
}

.promo-overlay p {
  font-size: 16px !important;
  color: #e9dcff !important;
  margin-top: 8px !important;
  margin-bottom: 10px !important;
}

.promo-overlay .cta {
  display: inline-block !important;
  padding: 14px 28px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--accent1), var(--accent2)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(150, 0, 255, .35) !important;
  transition: all 0.3s ease !important;
  margin-top: 12px !important;
}
