/* =============================================================================
   GosAlertx — глобальные стили: тёмная тема, неоновые акценты, адаптив
   ============================================================================= */

:root {
  --bg-deep: #0a0b0f;
  --bg-card: #12141f;
  --bg-card-hover: #181b2a;
  --border-subtle: rgba(148, 163, 184, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-purple: #a855f7;
  --accent-cyan: #22d3ee;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --cyan-glow: rgba(34, 211, 238, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 72px;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
  --transition: 0.22s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(88, 28, 135, 0.25), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(6, 182, 212, 0.08), transparent),
    var(--bg-deep);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}

a:hover {
  color: var(--accent-purple);
  text-shadow: 0 0 12px var(--accent-glow);
}

h1,
h2,
h3,
.page-title,
.section__title,
.logo__mark,
.article__title,
.hero__title {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Хедер --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-right: auto;
  color: var(--text);
}

.logo:hover {
  color: var(--accent-cyan);
  text-shadow: none;
}

.logo__mark {
  font-weight: 700;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo__text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 200px;
  line-height: 1.2;
}

@media (min-width: 900px) {
  .logo__text {
    max-width: none;
    font-size: 0.75rem;
  }
}

/* Бургер */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  order: 2;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--accent-cyan);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .burger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .burger {
    display: none;
  }
}

/* Навигация */
.nav-main {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.5rem;
  order: 4;
}

body.nav-open .nav-main {
  display: flex;
}

@media (min-width: 900px) {
  .nav-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    order: 0;
    gap: 0.25rem;
  }
}

/* Выпадающее меню «Разделы» */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  font: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-dropdown__toggle::after {
  content: "▾";
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.nav-dropdown__menu {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  border-radius: 6px;
}

.nav-dropdown__menu a:hover {
  background: rgba(34, 211, 238, 0.1);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
  display: flex;
}

/* Десктоп: меню поверх контента, не растягивает шапку */
@media (min-width: 900px) {
  .nav-dropdown {
    align-self: center;
  }

  .nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: auto;
    margin: 0;
    min-width: 16rem;
    max-width: min(22rem, calc(100vw - 2rem));
    z-index: 120;
    flex-direction: column;
  }
}

@media (max-width: 899px) {
  .nav-dropdown__menu {
    position: static;
    display: flex;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 0;
  }

  .nav-dropdown__toggle {
    display: none;
  }
}

/* Поиск */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  order: 3;
  flex: 1 1 200px;
  min-width: 0;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
}

.search-form input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

@media (min-width: 900px) {
  .search-form {
    order: 0;
    flex: 0 1 260px;
  }
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn--accent {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--accent:hover {
  box-shadow: 0 6px 28px var(--cyan-glow), 0 0 20px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn--outline:hover {
  background: rgba(34, 211, 238, 0.1);
}

.btn--ghost {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  border-color: var(--border-subtle);
}

.btn--ghost:hover {
  background: rgba(168, 85, 247, 0.15);
}

.btn--full {
  width: 100%;
}

.header-inner .btn--nav-cta {
  order: 5;
  margin-left: auto;
}

@media (min-width: 900px) {
  .header-inner .btn--nav-cta {
    order: 0;
    margin-left: 0;
  }
}

/* Хлебные крошки */
.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.breadcrumbs__sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* Лейаут с сайдбаром */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .layout--with-sidebar {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
    column-gap: 2rem;
  }

  .layout--with-sidebar .sidebar {
    align-self: start;
    width: 100%;
  }

  .layout--with-sidebar .main-content {
    align-self: start;
  }
}

.main-content {
  min-width: 0;
}

.main-content--article {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* Сайдбар */
.sidebar {
  position: relative;
  z-index: 20;
}

.sidebar__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.sidebar__toggle::after {
  content: " ▾";
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

@media (min-width: 900px) {
  .sidebar__toggle {
    display: none;
  }
}

.sidebar__panel {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

@media (max-width: 899px) {
  .sidebar:not(.sidebar--open) .sidebar__panel {
    display: none;
  }
}

.sidebar--open .sidebar__panel {
  display: block;
}

.sidebar__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin: 0 0 0.75rem;
}

.sidebar__title:not(:first-child) {
  margin-top: 1.25rem;
}

.sidebar__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__links a {
  display: block;
  padding: 0.35rem 0;
  color: var(--text);
}

.sidebar__hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-check input {
  accent-color: var(--accent-purple);
}

/* Герой */
.hero {
  padding: 2.5rem 0 2rem;
}

.hero__inner {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.15), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-card);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.2;
  background: linear-gradient(90deg, var(--text), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Секции */
.section {
  padding: 2rem 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section__title {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text);
}

.link-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-cyan);
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-subtitle {
  margin: 0;
  color: var(--text-muted);
  max-width: 60ch;
}

/* Карточки */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card-grid--news {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-grid--releases,
.card-grid--games {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card-grid--discounts {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px var(--accent-glow);
}

.card__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: var(--bg-deep);
}

/* Логотипы (SVG) в карточках скидок — не обрезать */
.card--discount .card__image {
  object-fit: contain;
  padding: 1rem;
  background: linear-gradient(180deg, #151825, var(--bg-deep));
}

.card__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.card__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}

.card__title a {
  color: var(--text);
}

.card__title a:hover {
  color: var(--accent-cyan);
}

.card__excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}

.card__link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.discount-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #db2777, #7c3aed);
  border-radius: 999px;
}

.card--discount {
  position: relative;
}

.card__timer {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin: 0;
}

.card__store {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Карусель */
.carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

.carousel__track {
  display: flex;
  transition: transform 0.35s ease;
}

.carousel__slide {
  flex: 0 0 100%;
  padding: 1rem;
  background: var(--bg-card);
  min-height: 200px;
  display: grid;
  grid-template-columns: 1fr minmax(120px, 200px);
  gap: 1rem;
  align-items: center;
}

.carousel__slide > img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
  background: rgba(10, 11, 18, 0.6);
  padding: 0.5rem;
}

@media (max-width: 600px) {
  .carousel__slide {
    grid-template-columns: 1fr;
  }
}

.carousel__btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--accent-cyan);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.carousel__btn:hover {
  background: rgba(168, 85, 247, 0.2);
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-subtle);
  cursor: pointer;
  padding: 0;
}

.carousel__dot.is-active {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Пагинация */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.pagination button {
  min-width: 40px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent-purple);
}

.pagination button.is-active {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--accent-purple);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* Статья */
.article__loading {
  color: var(--text-muted);
}

.article__error {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.2);
}

.article__header {
  margin-bottom: 1.5rem;
}

.article__meta {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.25;
}

.article__cover img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.article__content p {
  margin: 0 0 1rem;
}

.article__media img,
.article__media video {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

.article-block {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.article-block__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.contact-list {
  margin: 0;
  padding-left: 1.2rem;
}

.feedback-form .form-row {
  margin-bottom: 1rem;
}

.feedback-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}

/* Комментарии */
.comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.comments-section__title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.comments-form {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.comments-form .form-row {
  margin-bottom: 0.75rem;
}

.comments-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.comments-form input,
.comments-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}

.comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comments-list li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
}

.comments-list li.comments-list__empty {
  border-style: dashed;
  color: var(--text-muted);
  background: transparent;
}

.comment__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment__author {
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Футер */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 11, 18, 0.95);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
  }
}

.footer__tagline {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer__nav a {
  color: var(--text-muted);
}

.footer__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-link {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text);
}

.social-link:hover {
  border-color: var(--accent-purple);
}

.footer__cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__copy {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 899px) {
  body.nav-open .nav-main {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
}

/* =============================================================================
   Подписка GosAlertx, политика, контакты
   ============================================================================= */

.subscribe-section {
  padding-top: 0;
}

.subscribe-panel {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(165deg, rgba(88, 28, 135, 0.12), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow-card);
}

.subscribe-panel__intro {
  margin-bottom: 1.5rem;
}

.subscribe-panel__intro .page-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

.subscribe-panel__more {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.subscribe-panel__more a {
  color: var(--accent-cyan);
}

.subscribe-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .subscribe-panel__grid {
    grid-template-columns: 1fr;
  }
}

.subscribe-form .form-row {
  margin-bottom: 1rem;
}

.subscribe-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.subscribe-form label .optional {
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.85;
}

.subscribe-form input[type="tel"],
.subscribe-form input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.subscribe-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1.1rem 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.subscribe-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-purple);
}

.subscribe-consent a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.subscribe-examples {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(10, 11, 15, 0.65);
}

.subscribe-examples__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
}

.sms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sms-bubble {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-purple);
  background: rgba(18, 20, 31, 0.95);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 2rem;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--accent-cyan);
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content a {
  font-weight: 500;
}

.legal-updated {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr;
  }
}

.contacts-requisites {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-size: 0.92rem;
  line-height: 1.65;
}

.contacts-requisites h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.contacts-requisites dl {
  margin: 0;
}

.contacts-requisites dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  margin-top: 0.85rem;
}

.contacts-requisites dt:first-child {
  margin-top: 0;
}

.contacts-requisites dd {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
}

.contacts-form-block {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.contacts-form-block h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.contacts-form-block .form-row {
  margin-bottom: 0.9rem;
}

.contacts-form-block label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.contacts-form-block input,
.contacts-form-block textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}

.header-inner .btn--nav-cta {
  text-decoration: none;
  display: inline-flex;
}

/* =============================================================================
   Модальное окно успешной подписки
   ============================================================================= */

.subscribe-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.subscribe-modal.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.subscribe-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 12, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.subscribe-modal.is-open .subscribe-modal__backdrop {
  opacity: 1;
}

.subscribe-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(168, 85, 247, 0.45);
  background: linear-gradient(160deg, rgba(24, 27, 42, 0.98), rgba(10, 11, 15, 0.98));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(168, 85, 247, 0.15);
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.4s ease;
}

.subscribe-modal.is-open .subscribe-modal__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.subscribe-modal__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), transparent 45%, rgba(34, 211, 238, 0.12));
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
  filter: blur(12px);
  animation: subscribeModalGlow 4s ease-in-out infinite alternate;
}

@keyframes subscribeModalGlow {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.75;
  }
}

.subscribe-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.subscribe-modal__close:hover {
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.35);
}

.subscribe-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  box-shadow: 0 8px 28px var(--accent-glow);
  animation: subscribeModalIconPop 0.55s cubic-bezier(0.34, 1.5, 0.64, 1) 0.15s both;
}

@keyframes subscribeModalIconPop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.subscribe-modal__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
  background: linear-gradient(90deg, var(--text), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subscribe-modal__text {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
}

.subscribe-modal__text-muted {
  margin: 0 0 1.35rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.subscribe-modal__btn {
  width: 100%;
  justify-content: center;
}

body.subscribe-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .subscribe-modal,
  .subscribe-modal__backdrop,
  .subscribe-modal__panel,
  .subscribe-modal__glow,
  .subscribe-modal__icon {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
