/* Общие стили для всех страниц */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #4361ee;
  --light-gray: #f5f7fa;
  --gray: #6c757d;
  --border: #e0e0e0;
}

.dark {
  --bg: #121212;
  --text: #f0f0f0;
  --light-gray: #1e1e1e;
  --border: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text);
  margin-left: 24px;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 24px;
  position: relative;
  cursor: pointer;
}

.theme-toggle::after {
  content: '☀️';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform 0.3s;
}

.dark .theme-toggle::after {
  content: '🌙';
  transform: translateX(16px);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mobile-nav .theme-toggle {
  margin-top: 16px;
  margin-left: 0;
}

footer {
  background: var(--light-gray);
  padding: 40px 0 20px;
  margin-top: 80px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--gray);
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  color: var(--gray);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* === Стили для контента === */
main {
  padding: 40px 0;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 24px;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: var(--accent);
}

h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
}

p {
  margin-bottom: 16px;
}

ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 10px;
}

.highlight {
  background: var(--light-gray);
  padding: 24px;
  border-radius: 16px;
  margin: 32px 0;
  border-left: 4px solid var(--accent);
}

/* === Секции и карточки === */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.feature-card {
  background: var(--light-gray);
  padding: 24px;
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-card h3 {
  margin-bottom: 12px;
  color: var(--accent);
}

.feature-card p {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.9;
}

.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.btn:hover {
  background: #3a56e0;
}

/* === Мобильные стили === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: row;
    justify-content: space-between;
  }
  .desktop-nav,
  .theme-toggle:not(.mobile) {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .mobile-nav.active {
    display: block;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .footer-content {
    flex-direction: column;
    gap: 24px;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.3rem;
  }
}