/* === 1. Обнуление и базовые стили === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Блокировка прокрутки при открытом меню */
body.menu-open {
  overflow: hidden;
  height: 100vh;
}

/* Ссылки */
a {
  color: #0e065c;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* === 2. Контейнер макета === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === 3. Хедер и навигация === */
.header {
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1002;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.logo a {
  font-size: 1.6rem;
  font-weight: bold;
  color: #2575fc;
  transition: color 0.3s ease;
}

.logo a:hover {
  color: #6a11cb;
}

/* === 4. Гамбургер-иконка (только мобильные) === */
.nav-toggle {
  display: none;
}

.nav-icon {
  display: none;
}

@media (max-width: 768px) {
  .nav-icon {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1003;
  }

  .nav-icon span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Анимация "гамбургер → крестик" */
  #nav-toggle:checked + .nav-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #nav-toggle:checked + .nav-icon span:nth-child(2) {
    opacity: 0;
  }
  #nav-toggle:checked + .nav-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* === 5. Навигационное меню === */

/* По умолчанию — скрыто */
.nav-links {
  display: none;
}

/* Мобильное выезжающее меню */
@media (max-width: 768px) {
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: -80%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding-top: 80px;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    overflow-y: auto;
  }

  #nav-toggle:checked ~ .nav-links {
    left: 0;
  }

  .nav-links a {
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
  }

  .nav-links a:hover {
    color: #2575fc;
    background-color: #f8f9fa;
    padding-left: 28px;
  }
}

/* Десктоп: горизонтальное меню */
@media (min-width: 769px) {
  .nav-links {
    display: flex;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    flex-direction: row;
    gap: 30px;
    margin: 0;
    overflow: visible;
    z-index: auto;
  }

  .nav-links a {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0;
    border: none;
    transition: color 0.3s ease;
  }

  .nav-links a:hover {
    color: #2575fc;
  }

  /* Гамбургер и оверлей скрыты на десктопе */
  .nav-icon,
  .overlay {
    display: none;
  }
}

/* === 6. Overlay (только мобильные) === */
.overlay {
  display: none;
}

@media (max-width: 768px) {
  .overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  #nav-toggle:checked ~ .overlay {
    opacity: 1;
    visibility: visible;
  }
}

/* === 7. Главный блок (hero-section) === */
.hero-section {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #6d7977 0%, #8b939f 100%);
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-section p {
  font-size: 1.1rem;
  margin: 15px 0;
}

/* === 8. Блок контактов === */
.contact-info {
  margin: 20px 0;
  font-size: 1.1rem;
}

.contact-info p {
  margin: 8px 0;
  color: white;
}

.contact-info a {
  color: #fff;
  text-decoration: underline;
}

.contact-info a:hover {
  text-decoration: none;
}

/* === 9. Кнопки === */
.button {
  margin-top: 20px;
  text-align: center;
}

.button a {
  display: inline-block;
}

.button button {
  background-color: #2575fc;
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.button button:hover {
  background-color: #0e065c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* === 10. Плавающая кнопка "Позвонить" === */
.floating-call-button {
  display: none;
}

@media (max-width: 768px) {
  .floating-call-button {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1004;
  }

  .floating-call-button a {
    background-color: #28a745;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  .floating-call-button a:hover {
    background-color: #218838;
    transform: scale(1.05);
  }

  .floating-call-button svg {
    pointer-events: none;
  }
}

/* === 11. Виджет карты === */
.widget {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.widget iframe {
  width: 100%;
  height: 288px;
  border: none;
}

/* === 12. Футер === */
footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #666;
  background-color: #f1f1f1;
  border-radius: 8px;
  margin-bottom: 20px;
}

footer p {
  margin: 5px 0;
}

footer a {
  color: #2575fc;
  font-style: italic;
  transition: text-decoration 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
}

/* Ссылки в футере */
.support-link,
.hosting-link {
  display: block;
  text-align: center;
  font-size: 0.6rem;
  color: #666;
  margin: 5px 0;
  font-style: italic;
  text-decoration: none;
}

.support-link:hover,
.hosting-link:hover {
  text-decoration: underline;
}

/* === 13. Адаптивность (малые экраны) === */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .navbar {
    padding: 15px 20px;
  }

  .logo a {
    font-size: 1.4rem;
  }

  .hero-section {
    padding: 30px 15px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .button button {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .widget {
    height: 250px;
  }

  .widget iframe {
    height: 100%;
  }

  footer {
    padding: 15px;
    font-size: 0.85rem;
  }

  footer a {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .button button {
    font-size: 0.95rem;
    padding: 10px 16px;
  }

  footer {
    font-size: 0.8rem;
  }
}
