/* --- Variables & Reset --- */
:root {
  --bg-dark: #0f0c29;
  --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px);
  --primary-color: #a18cd1;
  --accent-color: #fbc2eb;
  --text-main: #ffffff;
  --text-muted: #b3b3b3;
  --radius-xl: 40px; /* Гипер-округление */
  --radius-lg: 24px;
  --radius-sm: 12px;
  --font-main: "Outfit", sans-serif;
  --container-width: 1280px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* Добавим немного шума для текстуры, если нужно, но пока оставим чистым */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utilities --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn--glow {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: #fff;
  box-shadow: 0 0 15px rgba(161, 140, 209, 0.4);
}

.btn--glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(161, 140, 209, 0.6);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 20px;
}

.header__container {
  max-width: var(--container-width);
  margin: 0 auto;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50px; /* Гипер-округление хедера */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-main);
}

.header__logo-img {
  width: 36px;
  height: 36px;
  /* Плейсхолдер для SVG логотипа, который мы сгенерируем в конце */
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__menu {
  display: flex;
  gap: 30px;
}

.header__link {
  font-weight: 400;
  color: var(--text-muted);
  position: relative;
}

.header__link:hover {
  color: var(--text-main);
}

/* Анимация подчеркивания для меню */
.header__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.header__link:hover::after {
  width: 100%;
}

.header__burger {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* --- Footer --- */
.footer {
  padding: 20px 20px 40px;
  margin-top: 100px;
}

.footer__container {
  max-width: var(--container-width);
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); /* Гипер-округление футера */
  padding: 60px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer__logo {
  display: block;
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.footer__note {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
}

.footer__title {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--text-main);
}

.footer__list li {
  margin-bottom: 12px;
}

.footer__link {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: padding-left 0.3s ease;
}

.footer__link:hover {
  color: var(--accent-color);
  padding-left: 5px; /* Микро-сдвиг при ховере */
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer__icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .header__nav {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    left: 0;
    width: 100%;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(30px);
    flex-direction: column;
    padding: 40px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header__menu {
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
  }

  .header__burger {
    display: block;
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
    padding: 40px;
  }
}

@media (max-width: 576px) {
  .header__container {
    padding: 0 20px;
  }

  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer__contact-item {
    justify-content: center;
  }

  .footer__logo {
    margin: 0 auto 20px;
  }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding-top: 140px; /* Отступ под фиксированный хедер */
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Typography */
.hero__title {
  font-size: 4.5rem; /* Очень крупный заголовок */
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.text-gradient {
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color),
    #fff
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientMove 5s linear infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.hero__desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
  font-weight: 300;
}

/* Actions */
.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 40px;
}

.hero__btn {
  font-size: 1.1rem;
  padding: 16px 48px;
}

.hero__subtext {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.hero__icon-sm {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

/* Stats */
.hero__stats {
  display: flex;
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat-item {
  display: flex;
  flex-direction: column;
}

.hero__stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.hero__stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Visual & Canvas */
.hero__visual {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 60px; /* Гипер-округление */
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

#neuralCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__glow-sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  animation: floatSphere 6s ease-in-out infinite;
}

@keyframes floatSphere {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    align-items: center;
  }

  .hero__visual {
    height: 400px;
    order: -1; /* Визуал сверху на мобилке */
    margin-bottom: 40px;
  }

  .hero__title {
    font-size: 3rem;
  }
}

@media (max-width: 576px) {
  .hero__title {
    font-size: 2.5rem;
  }
  .hero__visual {
    height: 300px;
    border-radius: 30px;
  }
}

/* --- Technology Section (Bento Grid) --- */
.tech {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 300px);
  gap: 24px;
}

/* Bento Items Styles */
.bento-item {
  background: var(--glass-bg);
  backdrop-filter: blur(30px); /* Сильное размытие */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); /* Гипер-округление */
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s linear, box-shadow 0.3s ease; /* transition для JS тилта */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hover Effect: Inner Glow */
.bento-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-xl);
  background: radial-gradient(
    circle at center,
    rgba(161, 140, 209, 0.15),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.bento-item:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.bento-item:hover::before {
  opacity: 1;
}

.bento-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bento-item h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  line-height: 1.2;
}

.bento-item p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

/* Specific Sizes */
.bento-item--large {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.08)
  );
}

.bento-item--tall {
  grid-column: span 1;
  grid-row: span 2;
}

.bento-item--wide {
  grid-column: span 1; /* В десктопе занимает 1 место, но внутри флекс */
}

/* Elements inside cards */
.bento-icon-bg {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  color: rgba(255, 255, 255, 0.03);
  transform: rotate(-15deg);
}

.bento-icon-bg svg {
  width: 100%;
  height: 100%;
}

.bento-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto; /* Push content down */
  color: var(--accent-color);
}

.bento-icon-sm {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-weight: 600;
  margin-top: auto;
}

.link-arrow:hover gap {
  gap: 12px;
}

.bento-tag {
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.chart-visual {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 60px;
  margin-top: 15px;
}

.bar {
  width: 10px;
  background: var(--accent-color);
  border-radius: 4px;
  opacity: 0.7;
  animation: barAnim 2s infinite alternate ease-in-out;
}

.bar:nth-child(2) {
  animation-delay: 0.2s;
}
.bar:nth-child(3) {
  animation-delay: 0.4s;
}
.bar:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes barAnim {
  0% {
    height: 30%;
    opacity: 0.4;
  }
  100% {
    height: 100%;
    opacity: 1;
  }
}

/* Responsive Grid */
@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .bento-item--large {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 400px;
  }
  .bento-item--tall {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 350px;
  }
  .bento-item--wide {
    grid-column: span 1;
  }
}

@media (max-width: 650px) {
  .bento-grid {
    display: flex;
    flex-direction: column;
  }
  .bento-item {
    min-height: 300px;
  }
  .section-title {
    font-size: 2.2rem;
  }
}

/* --- Solutions Section (Horizontal Accordion) --- */
.solutions {
  padding: 100px 0;
  overflow: hidden;
}

.solutions__title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 60px;
}

.accordion {
  display: flex;
  gap: 20px;
  height: 500px; /* Высота аккордеона */
  width: 100%;
}

.acc-card {
  position: relative;
  height: 100%;
  border-radius: 40px; /* Гипер-округление */
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  flex: 1; /* Все сжаты по умолчанию */
  transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid var(--glass-border);
}

/* Затемнение фона картинки */
.acc-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 12, 41, 0.4) 0%,
    rgba(15, 12, 41, 0.9) 100%
  );
  backdrop-filter: blur(2px);
  transition: background 0.6s ease;
}

/* Активное состояние (расширенное) */
.acc-card.active {
  flex: 3; /* Активная карточка занимает в 3 раза больше места */
  border-color: var(--accent-color);
  box-shadow: 0 0 30px rgba(161, 140, 209, 0.3);
}

.acc-card.active .acc-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 12, 41, 0.1) 0%,
    rgba(15, 12, 41, 0.8) 100%
  );
  backdrop-filter: blur(0px);
}

/* Контент внутри */
.acc-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  white-space: nowrap; /* Чтобы текст не прыгал при анимации */
}

.acc-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-main);
  transition: transform 0.3s ease;
}

.acc-card:hover .acc-icon {
  transform: scale(1.1) rotate(5deg);
  color: var(--accent-color);
}

.acc-text h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #fff;
}

.acc-desc {
  opacity: 0; /* Скрыто в свернутом состоянии */
  max-height: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 1rem;
  white-space: normal;
  transition: all 0.5s ease 0s; /* Задержка появления текста */
  transform: translateY(20px);
}

.btn--sm {
  margin-top: 20px;
  padding: 10px 24px;
  font-size: 0.9rem;
  background: var(--text-main);
  color: var(--bg-dark);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0s;
  display: inline-block;
}

.btn--sm:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(20px) scale(1.05);
}

/* Показываем контент только у активного элемента */
.acc-card.active .acc-desc,
.acc-card.active .btn--sm {
  opacity: 1;
  max-height: 200px; /* Достаточно для текста */
  transform: translateY(0);
  transition-delay: 0.3s; /* Текст появляется после расширения карточки */
}

/* Responsive */
@media (max-width: 992px) {
  .accordion {
    flex-direction: column;
    height: auto;
  }

  .acc-card {
    height: 80px; /* Свернутая высота */
    flex: none;
    width: 100%;
  }

  .acc-card.active {
    height: 400px; /* Развернутая высота */
    flex: none;
  }

  .acc-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    position: absolute;
    top: 20px;
    right: 20px;
  }
}

/* --- Blog Section (Capsule Stream) --- */
.blog {
  padding: 100px 0;
  position: relative;
  /* Фоновый декоративный элемент */
  background: radial-gradient(
    circle at 10% 20%,
    rgba(161, 140, 209, 0.05),
    transparent 40%
  );
}

.blog__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.blog__nav {
  display: flex;
  gap: 12px;
}

.blog__nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.blog__nav-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Slider Container */
.blog__slider-wrapper {
  overflow: hidden; /* Скрываем вылезающие элементы */
  padding: 20px 0; /* Место для теней */
}

.blog__slider {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 20px;
  cursor: grab; /* Курсор руки */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide Scrollbar */
.blog__slider::-webkit-scrollbar {
  display: none;
}

.blog__slider.active {
  cursor: grabbing;
  scroll-behavior: auto; /* Для JS перетаскивания */
}

/* Blog Card (Capsule) */
.blog__card {
  min-width: 350px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 40px; /* Гипер-округление */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.blog__img-box {
  height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 40px; /* Внутреннее скругление */
  margin: 10px; /* Отступ от краев капсулы */
}

.blog__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog__card:hover .blog__img {
  transform: scale(1.1);
}

.blog__tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(15, 12, 41, 0.7);
  backdrop-filter: blur(5px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog__tag--accent {
  background: var(--accent-color);
  color: var(--bg-dark);
}

.blog__content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog__title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog__excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

.blog__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.blog__link:hover {
  gap: 10px;
  color: #fff;
}

.blog__btn {
  align-self: flex-start;
  margin: 0;
  opacity: 1; /* Оверрайд стилей из прошлой секции если есть конфликты */
  transform: none;
}

/* Responsive */
@media (max-width: 576px) {
  .blog__card {
    min-width: 280px;
  }
  .blog__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* --- FAQ Section --- */
.faq {
  padding: 100px 0;
}

.faq__container {
  max-width: 800px; /* Уже, чем основной контейнер, для читаемости */
}

.faq__header {
  text-align: center;
  margin-bottom: 50px;
}

.faq__item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px; /* Среднее скругление */
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq__question {
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq__icon {
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 30px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.faq__item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.faq__item.active .faq__icon {
  transform: rotate(45deg);
  color: var(--accent-color);
}

.faq__item.active .faq__answer {
  max-height: 200px; /* Достаточно для ответа */
  padding-bottom: 24px;
}

/* --- Contact Section --- */
.contact {
  padding: 100px 0 140px;
}

.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Left Info */
.contact__title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.contact__desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 450px;
}

.contact__features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__feat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.contact__feat-icon {
  color: var(--accent-color);
}

.contact__glass-circle {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.3;
  position: absolute;
  left: -50px;
  bottom: -50px;
  z-index: -1;
}

/* Right Form Box */
.contact__form-box {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 50px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.form__title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.form__group {
  margin-bottom: 24px;
  position: relative;
}

.form__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 10px;
}

.form__input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 14px 20px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form__input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(161, 140, 209, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.form__input.error {
  border-color: #ff4d4d;
}

.form__error {
  display: none;
  color: #ff4d4d;
  font-size: 0.8rem;
  margin-top: 5px;
  margin-left: 10px;
}

.form__input.error + .form__error,
.captcha-box.error + .form__error,
.custom-checkbox input.error ~ .form__error {
  display: block;
}

.form__btn {
  width: 100%;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Fake Captcha */
.captcha-box {
  background: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 12px;
  min-width: 250px;
  cursor: pointer;
}

.captcha-box.active .captcha-checkbox {
  border-color: transparent;
}

.captcha-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #c1c1c1;
  border-radius: 2px;
  background: #fff;
  position: relative;
}

.captcha-box.active .captcha-checkbox::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #009688;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.captcha-text {
  color: #000;
  font-size: 0.9rem;
  font-family: sans-serif;
  flex-grow: 1;
}

.captcha-logo {
  width: 32px;
  opacity: 0.7;
}

/* Custom Checkbox (Terms) */
.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
  border-color: var(--primary-color);
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

.custom-checkbox a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Success Message */
.form-success {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 12, 41, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.form-success.visible {
  opacity: 1;
  pointer-events: all;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #fff;
  font-size: 2rem;
}

.success-icon svg {
  width: 40px;
  height: 40px;
}

/* Responsive */
@media (max-width: 992px) {
  .contact__wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact__info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact__desc {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 576px) {
  .contact__form-box {
    padding: 30px 20px;
    border-radius: 30px;
  }

  .form__title {
    font-size: 1.5rem;
  }
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px); /* Скрыт внизу */
  width: 90%;
  max-width: 600px;
  background: rgba(15, 12, 41, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-icon {
  color: var(--accent-color);
  min-width: 24px;
}

.cookie-content a {
  color: #fff;
  text-decoration: underline;
}

/* --- FIX: Cookie Button Visibility --- */
/* Перезаписываем стили для кнопки в баннере */
.cookie-banner .btn {
  opacity: 1 !important; /* Делаем видимой принудительно */
  transform: none !important; /* Убираем смещение */
  background: #ffffff; /* Белый фон */
  color: var(--bg-dark); /* Темный текст */
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cookie-banner .btn:hover {
  background: var(--accent-color); /* Розовый при наведении */
  color: #fff;
  transform: scale(1.05) !important;
  box-shadow: 0 0 20px rgba(251, 194, 235, 0.5);
}

/* --- Legal Pages Styles (Политики) --- */
/* Стиль для страниц: privacy.html, terms.html и т.д. */

.pages {
  padding: 160px 0 100px; /* Отступ сверху для хедера */
  min-height: 80vh;
}

.pages .container {
  max-width: 800px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 60px;
  backdrop-filter: blur(30px);
}

.pages h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pages h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.pages p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pages ul {
  margin-bottom: 20px;
  padding-left: 20px;
  list-style: disc;
  color: var(--text-muted);
}

.pages li {
  margin-bottom: 10px;
  padding-left: 10px;
}

.pages li::marker {
  color: var(--accent-color);
}

.pages strong {
  color: #fff;
  font-weight: 600;
}

.pages a {
  color: var(--accent-color);
  text-decoration: underline;
}

@media (max-width: 576px) {
  .cookie-banner {
    flex-direction: column;
    border-radius: 20px;
    text-align: center;
    padding: 20px;
  }
  .pages .container {
    padding: 30px 20px;
  }
  .pages h1 {
    font-size: 1.8rem;
  }
}
