/* Базовые стили: полная ширина на всех устройствах */
html {
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  width: 100%;
  min-width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
}

main {
  width: 100%;
  min-width: 0;
}

/* Кастомные анимации */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* Плавное появление элементов при скролле */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Анимация для статистики */
.counter-animate {
  transition: all 0.3s ease;
}

/* Плавные переходы для карточек */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
}

/* Анимация для бургер-меню */
.burger-line {
  transition: all 0.3s ease;
}

.burger-active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Мобильное меню — под шапкой, непрозрачная панель справа */
.mobile-menu {
  position: fixed;
  top: 5rem; /* под header (h-20) */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999; /* выше всего, включая hero и другие секции */
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-closed {
  opacity: 0;
  visibility: hidden;
}

.mobile-menu-closed .mobile-menu__panel {
  transform: translateX(100%);
}

.mobile-menu-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-open .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background-color: #131a2e;
  border-left: 1px solid #2a355a;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 0;
  font-size: 1rem;
  color: #a9b6d3;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus {
  color: #22d3ee;
}

.mobile-menu__link--active {
  color: #22d3ee;
  font-weight: 600;
}

.mobile-menu__divider {
  height: 1px;
  background-color: #2a355a;
  margin: 1rem 0;
}

.mobile-menu__auth {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu__auth .mobile-menu__link {
  padding: 0.5rem 0;
}

.mobile-menu__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0b1020;
  background-color: #22d3ee;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.mobile-menu__btn:hover {
  background-color: #06b6d4;
}

.mobile-menu__btn--active {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.5);
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none;
  }
}

/* Cookie consent banner — на всю ширину экрана */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-width: 100%;
  max-width: 100vw;
  z-index: 50;
  background: #1b2440;
  border-top: 1px solid #2a355a;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-consent__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
}

@media (min-width: 640px) {
  .cookie-consent__inner {
    padding: 1.25rem 1.5rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .cookie-consent__inner {
    padding: 1.5rem 2rem;
  }
}

.cookie-consent__header {
  margin-bottom: 1rem;
}

.cookie-consent__title {
  font-size: 1rem;
  font-weight: 600;
  color: #eaf0ff;
  margin: 0 0 0.375rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .cookie-consent__title {
    font-size: 1.125rem;
  }
}

.cookie-consent__text {
  font-size: 0.8125rem;
  color: #a9b6d3;
  margin: 0;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .cookie-consent__text {
    font-size: 0.875rem;
  }
}

.cookie-consent__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .cookie-consent__checkboxes {
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
  }
}

.cookie-consent__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: #eaf0ff;
}

.cookie-consent__label input {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin: 0;
  border-radius: 0.25rem;
  border: 1px solid #2a355a;
  background: #131a2e;
  accent-color: #22d3ee;
  cursor: pointer;
}

.cookie-consent__label input:disabled {
  cursor: default;
  opacity: 0.8;
}

.cookie-consent__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .cookie-consent__buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
}

.cookie-consent__btn {
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .cookie-consent__btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
  }
}

.cookie-consent__btn--primary {
  background: #22d3ee;
  color: #0b1020;
}

.cookie-consent__btn--primary:hover {
  background: #06b6d4;
}

.cookie-consent__btn--secondary {
  background: #1b2440;
  color: #eaf0ff;
  border: 1px solid #2a355a;
}

.cookie-consent__btn--secondary:hover {
  background: #2a355a;
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: #a9b6d3;
}

.cookie-consent__btn--ghost:hover {
  background: rgba(27, 36, 64, 0.8);
  color: #eaf0ff;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0b1020;
}

::-webkit-scrollbar-thumb {
  background: #2a355a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #22d3ee;
}

/* Форма: блок поля и ошибка */
.form-field__error {
  color: #f87171;
}

/* FAQ аккордеон */
.faq-item__question {
  cursor: pointer;
  list-style: none;
}

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

.faq-item__icon {
  transition: transform 0.2s ease;
}
