/* Сброс и базовые переменные */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 18px;
}
:root {
  --color-bg: #FFF8E1;
  --color-accent: #FFD700;
  --color-telegram: #0088cc;
  --color-whatsapp: #25D366;
  --text-dark: #333;
  --text-light: #555;
  --radius: 12px;
  --transition: 0.5s ease-out;
}
body {
  font-family: 'Nunito', sans-serif;
  background: var(--color-bg);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Анимации */
.fade-left   { opacity: 0; transform: translateX(-40px); transition: var(--transition); }
.fade-right  { opacity: 0; transform: translateX( 40px); transition: var(--transition); }
.fade-up     { opacity: 0; transform: translateY( 40px); transition: var(--transition); }
.fade-down   { opacity: 0; transform: translateY(-40px); transition: var(--transition); }
.fade-in     { opacity: 0; transition: var(--transition); }
.visible     { opacity: 1; transform: none; }

/* Утилиты */
.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 0;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
}
.btn {
  padding: 0.75em 2em;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
  display: inline-block;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 2px solid transparent;
}
.btn.telegram {
  background: var(--color-telegram);
  border-color: #0077b5;
}
.btn.telegram:hover {
  background: #0077b5;
  border-color: #005f99;
  transform: scale(1.05);
}
.btn.whatsapp {
  background: var(--color-whatsapp);
  border-color: #1ebe57;
}
.btn.whatsapp:hover {
  background: #1ebe57;
  border-color: #189f48;
  transform: scale(1.05);
}

/* Типографика */
h1, h2, h3 {
  font-family: 'Lora', serif;
}
h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
  text-align: center;
}
p {
  margin-bottom: 1em;
  color: var(--text-light);
}
ul, ol {
  margin-left: 1.2em;
  margin-bottom: 1em;
}

/* Hero */
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
  padding: 3em 1em;
}
.hero-photo {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: var(--radius);
}
.hero-text {
  max-width: 600px;
  text-align: center;
}
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
  }
  .hero-photo {
    flex: 0 0 40%;
  }
  .hero-text {
    text-align: left;
  }
}

/* About Section: адаптивный flex-блок */
.about-work {
  display: flex;
  flex-direction: column;
  gap: 2em;
  align-items: center;
  padding: 2em 0;
}
.about-work .about-photo img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
}
.about-work .about-text {
  flex: 1;
}
@media (min-width: 768px) {
  .about-work {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .about-work .about-text {
    flex: 2;
    padding-right: 2em;
  }
  .about-work .about-photo {
    flex: 1;
    display: flex;
    justify-content: center;
  }
}

/* Видео-отзывы */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
}
.videos-grid iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Текстовые отзывы */
.text-reviews {
  margin-top: 2em;
  list-style: none;
  padding-left: 0;
}
.text-reviews li {
  margin-bottom: 1.5em;
  padding: 1em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: background 0.3s;
}
.text-reviews li:hover {
  background: #f9f9f9;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid #ddd;
  padding: 1em 0;
  cursor: pointer;
  transition: background 0.3s ease;
}
.faq-item:hover {
  background: #fdf6e3;
}
.faq-question {
  font-weight: 700;
  position: relative;
  padding-right: 1.5em;
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.5em;
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  padding-top: 0;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  opacity: 1;
  padding-top: 0.5em;
}

/* Финальный CTA */
#final-cta {
  background: rgba(255, 236, 179, 0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 2em;
  border-radius: var(--radius);
  margin: 3em 0;
  text-align: center;
}
#final-cta h2 {
  margin-bottom: 0.5em;
}
#final-cta p {
  color: var(--text-light);
  margin-bottom: 1.5em;
}

/* Footer */
footer {
  text-align: center;
  padding: 2em 1em;
  font-size: 0.9em;
  color: var(--text-light);
}

/* Общие стили для изображений */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Глобальные тени и hover-эффекты */
section, .container, .card {
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}
section:hover, .card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* Обновлённые кнопки без лишних файлов */
.btn {
  border: 2px solid transparent;
  padding: 0.8em 1.5em;
  font-weight: bold;
  border-radius: var(--radius);
  background-color: var(--color-accent);
  color: #000;
  transition: all 0.3s ease;
}
.btn:hover {
  border-color: #000;
  background-color: transparent;
  color: #000;
}

/* Медиа-запросы */
@media (max-width: 768px) {
  h2 { font-size: 1.8em; }
  .cta-buttons {
    flex-direction: column;
    gap: 0.75em;
  }
  .about-work {
    flex-direction: column;
    padding: 1em 0;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* === Alternating full-width section backgrounds === */
:root {
  --section-bg-odd: #FFF8E1; /* мягкий кремовый */
  --section-bg-even: #F0F4F8; /* легкий небесно-серый */
}

section.container {
  position: relative; /* чтобы ::before был внутри секции */
}

/* общий стиль для фонового слоя */
section.container::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: -1;
}

/* первый, третий и т. д. контейнеры — кремовый фон */
section.container:nth-of-type(odd)::before {
  background-color: var(--section-bg-odd);
}

/* второй, четвёртый… — светло-серый фон */
section.container:nth-of-type(even)::before {
  background-color: var(--section-bg-even);
}

/* === 1. Фоновый фрактальный узор на весь блок === */
#hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/fractal-pattern-transparent.png") center center / cover no-repeat;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* === 2. Анимированный градиент-оверлей === */
#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* более насыщенные цвета и повышенная прозрачность для лучшей видимости */
  background: linear-gradient(
    120deg,
    rgba(255, 255, 224, 0.5) 0%,
    rgba(224, 240, 248, 0.5) 100%
  );
  /* наложение поверх фрактала, но под контентом */
  z-index: 1;
  pointer-events: none;
  /* усиливаем смешивание, чтобы градиент прочнее «схватился» */
  mix-blend-mode: overlay;
  animation: heroGradient 10s ease infinite alternate;
}

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


/* === 3. Анимированная линия-подчёркивание в заголовке (осталась только основа) === */
.hero-text h1 {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* удалён блок .hero-text h1::after и @keyframes underlineWrite */

/* === 4. Полупрозрачный бэкдроп под текстом === */
.hero-text {
  position: relative;
  z-index: 2;
}
/* удалён блок .hero-text::before */

/* === 5. Иконки у ключевых фраз === */
.hero-text ul li.icon {
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: relative;
  z-index: 2;
}
.hero-text ul li.icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("icons/root.svg");
}

/* === 6. Глубокая тень для текста === */
.hero-text p {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* === 7. Декоративные штрихи между абзацами === */
.hero-text p + p {
  position: relative;
  padding-top: 1.5em;
  margin-top: 1.5em;
}
.hero-text p + p::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-accent);
  font-size: 1.2em;
  opacity: 0.6;
}

/* === 8. Пульсирующая кнопка CTA === */
.cta-buttons .btn {
  position: relative;
  z-index: 2;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* === 9. Мягкие «плавающие» партиклы === */
#hero .particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
#hero .particles span {
  position: absolute;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  animation: floatDown linear infinite;
}
@keyframes floatDown {
  from { transform: translateY(-10%); opacity: 0; }
  to   { transform: translateY(110%); opacity: 0.2; }
}

/* === 10. Индикатор «скролл вниз» === */
.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5em;
  color: var(--text-light);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

/* ========== ВИДЕО-БЛОК после HERO ========== */
#intro-video {
  text-align: center;
  padding: 2rem 0;
}

#intro-video h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Обёртка для видео: центрируем, добавляем скругление и тень */
#intro-video .video-wrapper {
  width: 100%;
  max-width: 800px;            /* макс. ширина ролика */
  margin: 0 auto;              /* центрируем */
  overflow: hidden;            /* чтобы скругление работало */
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Сам iframe: адаптивно растягиваем, сохраняя соотношение 16:9 */
#intro-video .video-wrapper iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;        /* соотношение сторон YouTube */
  border: none;
}


/* ========== ИКОНКИ-ГАЛОЧКИ ЧЕРЕЗ Unicode ========== */
.hero-benefits li {
  position: relative;
  padding-left: 1.5em; /* чтобы текст не начинался под галочкой */
  margin-bottom: 0.5em;
}

.hero-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  /* размер и цвет галочки подстройте под свою тему: */
  font-size: 1.2em;
  line-height: 1;
  color: var(--color-accent);
}

/* ========== ВЫРАВНИВАНИЕ СПИСКА НА МОБИЛЬНЫХ ========== */
@media (max-width: 767px) {
  .hero-benefits {
    text-align: left !important;
  }
}
/* ========== HERO-BENEFITS: галочка через Unicode вместо check.svg ========== */
.hero-benefits {
  list-style: none;       /* убираем маркеры браузера */
  padding: 0;
  margin: 1em 0;
}

.hero-benefits li {
  position: relative;
  padding-left: 1.5em;    /* отступ для «галочки» */
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.hero-benefits li::before {
  content: "✓";            /* Unicode галочка */
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2em;
  color: var(--color-accent); /* или замените на #F3B045 */
  line-height: 1;
}

/* ========== для телефонов: текст списка всегда слева ========== */
@media (max-width: 767px) {
  .hero-benefits {
    text-align: left !important;
  }
}
