/* === Базовые стили === */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Didact Gothic', sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.6;
}

/* === Header и навигация === */
.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f7f5fa;
}
.logo img { max-height: 80px; }
.contacts a {
  margin: 0 10px;
  color: #b42870;
  text-decoration: none;
  font-size: 16px;
}
.contacts a:hover { text-decoration: underline; }

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 10px;
  gap: 10px;
  background: #ffdbf9;
}
.main-nav li {
  position: relative;
  border: 1px solid #ffdbf3;
  background-color: #ffdbf9;
  padding: 8px 10px;
  margin: 0 15px;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.main-nav li:hover { background-color: #ffdbf5; }
.main-nav a {
  text-decoration: none;
  color: #222;
  font-size: 18px;
}

/* === Подменю === */
.submenu {
  display: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%; left: 0;
  background-color: #ffdbf9;
  border: 1px solid #ffdbf3;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  min-width: 160px;
  z-index: 100;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.4s;
}
.has-submenu:hover .submenu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li a {
  display: block;
  padding: 10px 16px;
  color: #222;
  font-size: 16px;
  text-decoration: none;
}
.submenu li a:hover { background-color: #ffe3fb; }




/* Основное меню */
.main-nav {
  background: #ffdbf9;
  padding: 10px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
  background-color: #ffdbf9;
  border: 1px solid #ffdbf3;
  border-radius: 4px;
  padding: 8px 12px;
  transition: background-color 0.3s ease;
}

.main-nav li:hover { background-color: #ffe3fb; }

.main-nav a {
  text-decoration: none;
  color: #222;
  font-size: 18px;
}

/* Подменю */
.submenu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
}
.has-submenu:hover .submenu { display: block; }

/* --- Мобильная версия --- */
.menu-toggle {
  display: none;
  /* background-color: #fff; */
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #b42870;
  color: #fff;
  padding: 10px 15px;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    display: none; /* скрыто по умолчанию */
    width: 100%;
  }

  .main-nav ul.active { display: flex; }

  .main-nav li {
    width: 100%;
    text-align: left;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border: none;
    background-color: #ffeef9;
    margin-top: 5px;
  }
}























/* === Секции сайта === */
.services, .news, .team, .about, .contact, .feedback {
  margin: 60px auto;
  max-width: 1000px;
  padding: 0 20px;
  text-align: center;
}
.services h2, .news h2, .team h2, .about h2, .contact h2, .feedback h2 {
  font-size: 32px;
  color: #80134b;
  margin-bottom: 30px;
}

/* Сетка услуг */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-items: center;
}
.service-grid a {
  text-decoration: none;
  color: #222;
  transition: transform 0.3s ease;
}
.service-grid a:hover { transform: scale(1.05); color: #b42870; }
.service-grid img { width: 100%; border-radius: 8px; }

/* Новости */
.news-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.news-item img { width: 200px; border-radius: 8px; }
.news-item h3 { font-size: 20px; color: #b42870; margin: 0 0 10px; }
.news-item a { color: #b42870; text-decoration: none; }
.news-item a:hover { color: #80134b; }

/* Команда */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}
.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}
.team-member:hover { transform: scale(1.05); }
.team-member img {
  width: 160px; height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffdbee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Контакты */
.contact a { color: #b42870; text-decoration: none; }
.contact a:hover { color: #80134b; }

/* === Формы и модалки === */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.feedback-form input, .feedback-form textarea {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.feedback-form input:focus, .feedback-form textarea:focus {
  border-color: #b42870;
  outline: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%; max-width: 500px;
  position: relative;
}
.close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

/* === Кнопки === */
.btn-primary, .btn-zapis, .btn-callback {
  background: #76cd16;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  font-size: 16px;
}
.btn-primary:hover, .btn-zapis:hover, .btn-callback:hover {
  background: #df84b3;
  transform: scale(1.05);
}

/* === Footer === */
.footer {
  background: #b42870;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* === Адаптив === */
@media (max-width: 768px) {
  .header { flex-direction: column; text-align: center; }
  .main-nav ul { flex-direction: column; }
  .main-nav li { margin: 10px 0; }
  .service-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gallery-container img { width: 80vw; }
  .news-item { flex-direction: column; text-align: center; }
  .news-item img { width: 100%; max-width: 300px; }
}


.gallery-container {
  display: flex;
  overflow-x: auto;       /* включаем горизонтальный скролл */
  /*scroll-snap-type: x mandatory; */
  gap: 16px;
  padding: 10px;
  /*scrollbar-width: thin; */
}

.gallery-container img {
  flex-shrink: 0;         /* запрещаем сжатие картинок */
  width: 300px;           /* фиксированная ширина */
  height: auto;
  border-radius: 8px;
  /*scroll-snap-align: start;*/
  object-fit: cover;
}








/* === Модальные окна === */
.modal {
  display: none;              /* скрыто по умолчанию */
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5); /* затемнение фона */
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-out;
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
  text-align: center;
}

.modal-content label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: 500;
  color: #444;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  outline: none;
  border-color: #b42870;
  box-shadow: 0 0 0 2px rgba(180,40,112,0.2);
}

.modal-content button[type="submit"] {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  background-color: #76cd16;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-content button[type="submit"]:hover {
  background-color: #df84b3;
  transform: scale(1.05);
}

.close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close:hover { color: #b42870; }

/* Анимация появления */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}





.map iframe {
  width: 100%;
  max-width: 100%;
  height: 500px;   /* для ПК */
  border: 0;
}

@media (max-width: 768px) {
  .map iframe {
    height: 300px; /* планшет */
  }
}

@media (max-width: 480px) {
  .map iframe {
    height: 200px; /* телефон */
  }
}

.callback {
  text-align: center;   /* кнопка по центру */
  margin-top: 15px;
}

.btn-callback {
  background: #4CAF50;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.btn-callback:hover {
  background: #45a049;
}




