/* ========================
   CSS-ПЕРЕМЕННЫЕ (ТЁМНАЯ ТЕМА ПО УМОЛЧАНИЮ)
   ======================== */
:root {
  --primary-bg: #1A1A1A;      /* Фон страницы (тёмная тема) */
  --accent-color: #2E000C;    /* Бордовый акцент */
  --text-color: #FFF;         /* Цвет текста */
  --hero-bg: #2A2A2A;         /* Фон для секции Hero */
  --button-bg: #FFF;          /* Фон кнопок */
  --button-text: #2E000C;     /* Текст кнопок */
  --transition-time: 0.3s;    /* Время перехода для анимаций */
}

/* ========================
   СТИЛИ ДЛЯ LIGHT-THEME (ОБНОВЛЁННЫЕ)
   ======================== */
body.light-theme {
  /* Более тёмный бордово-розовый фон и акценты */
  --primary-bg: #e7c3c3;    /* Общий фон страницы (светлая тема) */
  --accent-color: #7a1a1a;  /* Тёмный бордовый для акцентов */
  --text-color: #2a2a2a;    /* Почти чёрный для текста */
  --hero-bg: #f2dada;       /* Чуть светлее для Hero */
  --button-bg: #7a1a1a;     /* Тёмно-бордовый фон кнопок */
  --button-text: #ffffff;   /* Белый текст на кнопках */
}

/* ========================
   ОБЩИЕ СТИЛИ
   ======================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  font-size: 16px;             /* Увеличен размер шрифта */
  line-height: 1.6;            /* Добавлен комфортный межстрочный интервал */
  background-color: var(--primary-bg);
  transition: background-color 0.5s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Ссылка для перехода к основному контенту (доступность) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 100;
  transition: top var(--transition-time);
}
.skip-link:focus {
  top: 0;
}

/* ========================
   ШАПКА (HEADER)
   ======================== */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: var(--primary-bg);
  transition: background-color var(--transition-time), box-shadow var(--transition-time);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.logo-icon {
  width: 30px;
  height: auto;
  margin-right: 10px;
}
.nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.nav ul li {
  margin-left: 20px;
}
.nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  transition: opacity var(--transition-time);
}
.nav ul li a:hover {
  opacity: 0.7;
}
.header-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}
#theme-toggle {
  background: none;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color var(--transition-time);
  font-size: 14px;
}
#theme-toggle:hover {
  background-color: var(--accent-color);
}

/* Гамбургер-меню (мобильная версия) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 3px;
  background: var(--text-color);
  border-radius: 3px;
  transition: var(--transition-time);
}
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.header.scrolled {
  background-color: var(--primary-bg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Мобильное навигационное меню с темой-зависимым фоном */
.nav {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  background-color: var(--primary-bg);  /* Используем переменную для фона */
  backdrop-filter: blur(4px);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-time) ease,
              border var(--transition-time) ease,
              box-shadow var(--transition-time) ease,
              transform var(--transition-time) ease;
  border-radius: 8px;
}

.nav.open {
  max-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav ul {
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
  }
  .nav ul li {
    margin: 15px 0;
  }
  .nav ul li a {
    font-size: 16px;
  }
}

/* ========================
   ГЛАВНЫЙ БЛОК (HERO)
   ======================== */
#hero {
  background-color: var(--hero-bg);
  color: var(--text-color);  /* Текст теперь берется из переменной */
  padding: 80px 0;
  margin-top: 70px;
  transition: background-color 0.5сs ease;
}
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
}
.hero-content {
  max-width: 500px;
  margin: 20px;
}
.hero-content h1 {
  font-size: 42px;
  margin-bottom: 20px;
}
.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
}
.hero-image img {
  width: 300px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* ========================
   КНОПКИ (ОБНОВЛЁННЫЕ)
   ======================== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  background-color: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  font-size: 16px;
  border-radius: 5px;
  transition: var(--transition-time);
  border: 2px solid transparent;
}
.btn:hover {
  background-color: #ffffff;
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* ========================
   СЕКЦИИ
   ======================== */
section {
  background: transparent;
  position: relative;
}
.about {
  background: linear-gradient(to bottom, var(--hero-bg), var(--primary-bg));
  padding: 60px 0;
  text-align: center;
  transition: background 0.5s ease;
}
.about h2 {
  font-size: 36px;
  margin-bottom: 20px;
}
.about p {
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.6;
}
.features,
.web,
.download {
  padding: 60px 0;
  text-align: center;
}
.features h2,
.web h2,
.download h2 {
  font-size: 32px;
  margin-bottom: 20px;
}
.feature-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.feature {
  background-color: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  padding: 20px;
  border-radius: 8px;
  width: 260px;
  margin: 10px;
}
.feature h3 {
  font-size: 20px;
  margin-bottom: 15px;
}
.feature p {
  font-size: 14px;
}

/* ========================
   Секция "Esclipe Web"
   ======================== */
.web {
  background: linear-gradient(135deg, var(--tertiary-bg) 40%, var(--accent-color) 100%);
  padding: 60px 0;
  text-align: center;
}
.web h2 {
  font-size: 36px;
  margin-bottom: 20px;
}
.web p {
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* ========================
   Секция "Скачать"
   ======================== */
.download {
  background: linear-gradient(to bottom left, var(--accent-color) 2%, var(--tertiary-bg) 55%);
  padding: 60px 0;
  text-align: center;
}
.download h2 {
  font-size: 32px;
  margin-bottom: 40px;
}
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* ========================
   ПОДВАЛ (FOOTER)
   ======================== */
footer {
  background: linear-gradient(135deg, var(--tertiary-bg) 65%, var(--accent-color) 100%);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
}
.footer-nav ul li {
  margin: 0 10px;
}
.footer-nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 12px;
}

/* ========================
   АНИМАЦИЯ ПОЯВЛЕНИЯ
   ======================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   ЭФФЕКТ ПОДСВЕТКИ СЕКЦИИ СО СВЕЧЕНИЕМ
   ======================== */
section.highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 80%;
  height: 4px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
  animation: highlight-line 1.5s forwards;
}
@keyframes highlight-line {
  0% {
    transform: translateX(-50%) scaleX(0);
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  50% {
    transform: translateX(-50%) scaleX(1);
    box-shadow: 0 0 15px rgba(255,255,255,1);
  }
  100% {
    transform: translateX(-50%) scaleX(0);
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
}

/* ========================
   АДАПТИВНЫЕ СТИЛИ
   ======================== */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
  }
  .hero-content {
    text-align: center;
  }
  .hero-content h1 {
    font-size: 36px;
  }
}
@media (max-width: 480px) {
  .hero-content p,
  .btn {
    font-size: 14px;
  }
  .about h2,
  .features h2,
  .web h2,
  .download h2 {
    font-size: 28px;
  }
}
/* Стили для ссылок в шапке */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.header-link:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .header-link {
    display: none; /* Скрываем на мобильных */
  }
}
/* Стили для шапки */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Центральные кнопки */
.header-center-buttons {
  display: flex;
  gap: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-center-link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.header-center-link:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Правая часть с кнопками */
.header-right-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .header-center-buttons {
    display: none; /* Скрываем на мобильных */
  }
  
  .header-content {
    justify-content: space-between;
  }
}
.header-action {
  background: none;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color var(--transition-time), color var(--transition-time);
  font-size: 14px;
  text-decoration: none;
}

.header-action:hover {
  background-color: var(--accent-color);
  color: var(--button-text);
}
.outline-button {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--text-color); /* Обводка */
  color: var(--text-color);
  background: transparent;              /* По умолчанию прозрачный фон */
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-time), color var(--transition-time);
}

.outline-button:hover {
  background-color: var(--accent-color);
  color: var(--button-text);
}
body.light-theme .outline-button {
  background-color: #e7c3c3;      /* Белый фон в светлой теме */
  color: #000000;              /* Бордовый текст */
  border-color: #000000;       /* Бордовая обводка */
}
body.light-theme .outline-button:hover {
  background-color: var(--accent-color);
  color: var(--button-text);
}
.outline-button {
  background-color: #1A1A1A;
  color: #ffffff;
  border: 1px solid #ffffff; /* Обводка теперь отдельная переменная */
  border-radius: 4px;
  padding: 5px 10px;
  transition: background-color var(--transition-time), color var(--transition-time);
}

.outline-button:hover {
  background-color: var(--accent-color);
  color: var(--button-bg);
}
body.light-theme {
  --button-bg: #7a1a1a;
  --button-text: #fff;
  --button-border: #7a1a1a;  /* тут цвет обводки для светлой темы */
}

/* мой код */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  top: 70px;
  right: -100%;
  width: 100%;
  height: calc(100vh - 70px);
  background-color: var(--primary-bg, #1A1A1A);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: right 0.4s ease-in-out;
  z-index: 1000;
}

.nav-overlay.open {
  right: 0;
}

.nav-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.nav-overlay ul li {
  margin: 20px 0;
}

.nav-overlay ul li a {
  color: var(--text-color);
  font-size: 22px;
  text-decoration: none;
  border: 1px solid var(--text-color);
  padding: 12px 24px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.nav-overlay ul li a:hover {
  background-color: var(--accent-color);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .header-center-buttons {
    display: none;
  }
}