/* Ускоренная анимация фона в синих тонах */
body {
  margin: 0;
  overflow-x: hidden;
  position: relative;
  font-family: Arial, sans-serif;
  color: #555;
  padding-top: 70px;
  background: #4a5fc7;
  animation: theme 28s ease-in-out infinite;
}

body:after,
body:before {
  content: '';
  display: block;
  position: fixed;
  z-index: -1;
  top: 0;
  width: 100vmax;
  height: 100vmax;
  background: rgba(0, 0, 0, 0.04);
  animation: background 75s linear infinite;
  pointer-events: none;
  border-radius: 45% 55% 70% 30% / 30% 40% 60% 70%;
}

body:after {
  left: 10vw;
  opacity: 0.6;
}

body:before {
  right: 10vw;
  animation-delay: -25s;
  animation-direction: reverse;
  opacity: 0.4;
}

@keyframes theme {
  0% { background: #4a5fc7; }
  20% { background: #5b67d8; }
  40% { background: #6a82fb; }
  60% { background: #5b67d8; }
  100% { background: #4a5fc7; }
}

@keyframes background {
  0% { transform: rotate(0deg) scale(1.2); }
  50% { transform: rotate(180deg) scale(1.4); }
  100% { transform: rotate(360deg) scale(1.2); }
}

/* Основной контент */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Фон секций */
.services-grid,
.features-section,
.contact-section {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.service-card,
.feature-item,
.contact-item {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Герой-секция */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0 0 40px 0;
  text-align: center;
  border-radius: 15px;
  margin: 10px 0 20px 0;
  position: relative;
  overflow: hidden;
}

/* Специальный стиль для главной страницы - ИЗМЕНЕНИЕ ЗДЕСЬ */
.index-hero {
  margin: 0 0 20px 0; /* Убираем верхний отступ, поднимаем выше */
}

.hero-title {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Адаптивность для анимации */
@media (max-width: 768px) {
  body:after,
  body:before {
    animation-duration: 100s;
    border-radius: 35% 65% 60% 40% / 40% 30% 70% 60%;
  }
  body {
    animation-duration: 35s;
    padding-top: 80px;
  }
  html {
    scroll-padding-top: 80px;
  }
}

/* Исправление якорных ссылок */
html {
  scroll-padding-top: 70px;
}

/* Навигационная панель */
.navbar {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(86, 104, 210, 0.55) 50%) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1) !important;
  position: fixed;
  top: -3px;
  width: 100%;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0 15px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #d9f0ff;
}

/* Изображения */
img {
  width: 100%;
  height: auto;
}

/* Контейнер */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  border-radius: 0 0 12px 12px; /* Закругление нижних углов */
}

/* Заголовки */
.main-title {
  font-size: 36px;
  font-weight: bold;
  color: #0077b6;
  margin: 0 0 30px;
  text-align: center;
}

.faq-title,
.services-title {
  font-size: 24px;
  font-weight: bold;
  color: #0077b6;
  margin-bottom: 20px;
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  color: #0077b6;
  margin-bottom: 25px;
  font-weight: bold;
  text-align: center;
}

/* Текст */
.intro-text {
  font-size: 18px;
  font-weight: bold;
  margin: 0 40px;
  text-align: center;
}

.additional-info {
  font-size: 14px;
  margin: 10px 0 0 100px;
  text-align: left;
  color: #777;
  font-style: italic;
}

/* Списки */
.services-list li::before {
  content: "➤";
  margin-right: 10px;
  color: #0077b6;
}

.services-list li {
  font-size: 16px;
  margin-bottom: 10px;
}

/* Изображения */
.image-container {
  text-align: center;
  margin-bottom: 30px;
  background: radial-gradient(circle, #ffffff, #d9f0ff, #9ec9e6);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

/* Специфичный селектор для изображения внутри .image-container */
.image-container img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: inline-block;
  object-fit: contain;
}

.screenshot-image {
  max-width: 100%;
  height: auto;
  margin: 10px;
}

@media (min-width: 768px) {
  .screenshot-image {
    max-width: 350px;
  }
}

/* Диалог */
.dialog-container {
  margin-bottom: 30px;
}

.dialog-text {
  font-size: 16px;
  margin-bottom: 10px;
  color: #000;
}

.speaker1 {
  font-weight: bold;
  color: #0077b6;
}

.speaker2 {
  font-weight: bold;
  color: #555;
}

/* Ссылки */
.a-into,
.a-info {
  font-size: 20px;
  color: #000;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.a-info {
  padding: 40px 20px;
}

/* Футер */
.main-footer {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(86, 104, 210, 0.95) 100%);
  color: white;
  padding: 30px 0;
  text-align: center;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

.main-footer p {
  margin: 10px 0;
  opacity: 0.9;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

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

.main-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Футер-инфо */
.footer-info {
  font-size: 15px;
  color: #fff;
  text-align: center;
  margin: 20px 0;
}

.footer-info a {
  color: #ecf0f1; /* Светлый цвет для контраста */
  text-decoration: underline;
}

.footer-info a:hover {
  color: #ffffff;
}

/* Калькулятор */
label {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

input[type="number"] {
  width: 97%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
}

button {
  display: block;
  width: 100%;
  padding: 10px 20px;
  font-size: 18px;
  background-color: #0077b6;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
}

button:hover {
  background-color: #005b8c;
}

#result {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-top: 30px;
}

/* FAQ аккордеон */
.faq-item {
  margin-bottom: 15px;
  border: 1px solid #e6f1ff;
  border-radius: 5px;
  overflow: hidden;
}

.faq-question {
  padding: 15px;
  cursor: pointer;
  background-color: #f8fbff;
  margin: 0;
  transition: background-color 0.3s;
  font-size: 18px;
  font-weight: bold;
}

.faq-question:hover {
  background-color: #e6f1ff;
}

.faq-question .arrow {
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.3s;
  font-weight: bold;
}

.faq-question.active .arrow {
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: white;
}

.faq-answer.active {
  max-height: 500px;
}

.faq-answer p {
  padding: 15px;
  margin: 0;
}

/* Кнопка "Наверх" */
.back-to-top {
  text-decoration: none;
  color: #0077b6;
  font-size: 20px;
  margin-left: 10px;
  display: inline-block;
  vertical-align: middle;
}

.back-to-top:hover {
  color: #005b8c;
  transform: scale(1.1);
}

/* Блоки услуг */
.service-item {
  background-color: #f8fbff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  border-left: 4px solid #0077b6;
}

.service-item h3 {
  color: #0077b6;
  margin-top: 0;
}

.service-skills {
  font-size: 14px;
  color: #666;
  margin: 8px 0;
  font-style: italic;
}

/* Технологии */
.technologies-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.tech-category {
  background-color: #e6f1ff;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.tech-category h4 {
  color: #0077b6;
  margin-top: 0;
}

/* Контакты */
.contact-info {
  background-color: #f8fbff;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h3 {
  color: #0077b6;
  margin-top: 0;
}

/* Сетка услуг */
.services-grid {
  padding: 30px 20px;
  width: 100%;
  box-sizing: border-box;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.service-card {
  padding: 20px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card h3 {
  color: #0077b6;
  margin: 12px 0 8px;
  font-size: 1.3rem;
}

.service-card p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Преимущества */
.features-section {
  background: linear-gradient(135deg, #f8fbff 0%, #e6f1ff 100%);
  padding: 30px 0;
  border-radius: 15px;
  margin: 25px 0;
  text-align: center; /* Центрируем содержимое секции */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto; /* Центрируем сетку преимуществ */
}

.feature-item {
  padding: 20px;
  border-radius: 12px; /* Добавляем закругленные края */
  text-align: center;
  transition: all 0.3s ease;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 15px;
}

.feature-item h4 {
  color: #0077b6;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.feature-item p {
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.audio-examples {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.audio-sample {
  margin: 15px 0;
}

.audio-sample h4 {
  margin-bottom: 5px;
  color: #333;
}

.vmainadsdvcl {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  z-index: -9999 !important;
}

a.yt-but {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  z-index: -9999 !important;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-item {
    margin: 5px 10px;
  }
  .grid-container,
  .features-grid,
  .contact-info,
  .technologies-container {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  .service-card,
  .feature-item {
    padding: 18px;
  }
  .additional-info {
    margin: 10px 0 0 20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 30px 0;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .card-icon {
    font-size: 2rem;
  }
  .service-card h3 {
    font-size: 1.2rem;
  }
  .contact-item {
    padding: 15px;
  }
  .contact-icon {
    font-size: 1.5rem;
  }
  .main-title,
  label,
  input[type="number"],
  button,
  #result {
    font-size: 16px;
  }
}

/* Изменение цвета герой-секции на главной странице */
.index-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(86, 104, 210, 0.95) 100%) !important;
  margin: -50px 0 30px 0 !important; /* Поднимаем на 100px и компенсируем снизу */
  position: relative;
  z-index: 2;
}

/* Убираем лишние отступы для других страниц */
.hero-section:not(.index-hero) {
  margin: 10px 0 20px 0 !important;
}