/* Глобальные настройки для корректного отображения выпадающих меню */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  height: 100%;
}

body {
  font-family: "Montserrat", "Wix Madefor Display", "Unbounded", sans-serif;
  background: white;
}

/* Убедимся, что все родительские элементы не обрезают содержимое */
header,
.header,
.header-top,
.nav-menu,
.nav-links,
.nav-item {
  overflow: visible !important;
}

/* Контейнеры */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 100%;
  padding: 0 40px;
}

/* Шапка - точное соответствие дизайну */
.header {
  background: white;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-top {
  background: white;
  padding: 20px 0;
  border-bottom: 3px solid #ffea00;
  position: relative;
  z-index: 1001;
}

.header-content {
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Логотип */
.logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.logo-img {
  width: 255px;
  position: relative;
  z-index: 2;
}

/* Поиск */
.search-wrapper {
  position: relative;
}

.search-input {
  width: 312.21px;
  height: 42.03px;
  border-radius: 50px;
  border: 3px solid #fd6d00;
  background: transparent;
  padding: 0 20px;
  font-size: 16px;
}

.search-label {
  position: absolute;
  left: 27px;
  top: 50%;
  transform: translateY(-50%);
  color: #fd6d00;
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}

/* Контактная информация */
.contact-block {
  display: flex;
  align-items: center;
  gap: 15px;
}

.phone-icon {
  width: 53.03px;
  height: 47.97px;
}

.phone-text {
  color: #2e5065;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

.phone-text span {
  display: block;
}

/* Кнопки */
.header-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-appointment {
  background: #fd6d00;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-appointment:hover {
  background: #e05e00;
}

.btn-login {
  background: #0090d2;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-login:hover {
  background: #0066a3;
}

/* ========== НАВИГАЦИОННОЕ МЕНЮ (ДЕСКТОП) ========== */
.nav-menu {
  background: white;
  padding: 15px 0;
  overflow-x: auto;
  overflow-y: visible;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1000;
}

.nav-links {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1000;
}

.nav-item {
  position: relative;
  z-index: 1000;
}

.nav-item > a {
  color: #0090d2;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 20px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1000;
  background: white;
}

.nav-item > a:hover {
  background: rgba(0, 144, 210, 0.1);
  border-radius: 30px;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.nav-item.has-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Выпадающее меню */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 562px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid white;
  max-height: 500px;
  overflow-y: auto;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(5px);
}

.dropdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-dot.orange-dot {
  background: #ff8e00;
}

.dropdown-item span {
  color: #2e5065;
  font-size: 18px;
  font-family: Montserrat;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  word-wrap: break-word;
}

/* Специальные стили для меню мероприятий */
.events-dropdown {
  min-width: 400px;
}

/* ========== АДАПТИВНАЯ МОБИЛЬНАЯ ВЕРСИЯ ========== */

/* Классы для показа/скрытия элементов */
.desktop-only {
  display: flex;
}

.mobile-only {
  display: none !important;
}

/* Бургер-меню - только на мобильных */
.burger-menu {
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger-icon {
  width: 30px;
  height: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: #0090d2;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Мобильная иконка телефона */
.mobile-phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mobile-phone-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Мобильные кнопки действия (вторая строка) */
.mobile-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.btn-appointment-mobile {
  flex: 1;
  background: #fd6d00;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login-mobile {
  flex: 1;
  background: #0090d2;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-appointment-mobile:hover,
.btn-login-mobile:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Мобильное меню (оверлей) */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  transition: left 0.3s ease;
}

.mobile-menu-overlay.active {
  left: 0;
}

.mobile-menu-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 400px;
  height: 100%;
  background: white;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-logo img {
  width: 150px;
  height: auto;
}

.mobile-menu-close {
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Поиск в мобильном меню */
.mobile-search {
  position: relative;
  margin-bottom: 30px;
}

.mobile-search input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: 2px solid #fd6d00;
  border-radius: 50px;
  font-size: 16px;
  font-family: Montserrat;
}

.mobile-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Мобильная навигация */
.mobile-nav {
  margin-bottom: 30px;
}

.mobile-nav-item {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  color: #2e5065;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.mobile-nav-link a {
  color: #2e5065;
  text-decoration: none;
  width: 100%;
}

.submenu-arrow {
  transition: transform 0.3s ease;
}

.mobile-nav-item.active .submenu-arrow {
  transform: rotate(90deg);
}

.mobile-submenu {
  display: none;
  padding-left: 20px;
  margin-bottom: 15px;
}

.mobile-submenu.active {
  display: block;
}

.mobile-submenu-item {
  display: block;
  padding: 12px 0;
  color: #666;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}

.mobile-submenu-item:last-child {
  border-bottom: none;
}

.mobile-submenu-item:hover {
  color: #fd6d00;
}

/* Кнопки в мобильном меню */
.mobile-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.mobile-btn-login {
  flex: 1;
  background: #0090d2;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ========== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ ========== */
@media (max-width: 1200px) {
  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .logo-wrapper {
    align-self: center;
  }

  .search-wrapper {
    align-self: center;
  }

  .contact-block {
    justify-content: center;
  }

  .header-buttons {
    justify-content: center;
  }

  .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }
}

@media (max-width: 1024px) {
  /* Скрываем десктопные элементы */
  .desktop-only {
    display: none !important;
  }

  /* Показываем мобильные элементы */
  .mobile-only {
    display: flex !important;
  }

  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 15px;
  }

  .logo-img {
    width: 180px;
  }

  /* Скрываем блок контактов на мобильных */
  .contact-block {
    display: none !important;
  }

  /* Скрываем десктопное меню */
  .nav-menu {
    display: none !important;
  }

  /* Выпадающие меню на мобильных */
  .dropdown-menu {
    position: fixed;
    top: auto;
    left: 20px;
    right: 20px;
    width: auto;
    min-width: auto;
    max-width: calc(100% - 40px);
    z-index: 10000;
  }

  .dropdown-content {
    max-height: 400px;
  }

  .dropdown-item span {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .burger-icon {
    width: 25px;
    height: 20px;
  }

  .btn-appointment-mobile,
  .btn-login-mobile {
    padding: 8px 12px;
    font-size: 13px;
  }

  .nav-links {
    padding: 0 20px;
    gap: 10px;
  }

  .nav-item > a {
    font-size: 14px;
    padding: 8px 12px;
  }

  .dropdown-item span {
    font-size: 14px;
  }

  .dropdown-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .logo-img {
    width: 150px;
  }

  .mobile-phone-icon {
    width: 25px;
    height: 25px;
  }

  .burger-menu {
    width: 35px;
    height: 35px;
  }

  .burger-icon {
    width: 22px;
    height: 18px;
  }

  .burger-icon span {
    height: 2px;
  }

  .mobile-menu-container {
    width: 100%;
    max-width: none;
  }

  .btn-appointment-mobile,
  .btn-login-mobile {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Поиск */
.search-wrapper {
  position: relative;
}

.search-form {
  position: relative;
  margin: 0;
}

.search-input {
  width: 312.21px;
  height: 42.03px;
  border-radius: 50px;
  border: 3px solid #fd6d00;
  background: transparent;
  padding: 0 50px 0 20px;
  font-size: 16px;
  font-family: "Montserrat", sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #fd6d00;
  box-shadow: 0 0 0 2px rgba(253, 109, 0, 0.2);
}

.search-input::placeholder {
  color: #fd6d00;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.7;
}

.search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit svg {
  width: 20px;
  height: 20px;
  display: block;
}

.search-submit:hover svg path {
  stroke: #e05e00;
}
.mobile-search-form {
  display: flex;
  gap: 10px;
  position: relative;
}

.mobile-search input {
  flex: 1;
  padding: 12px 50px 12px 20px;
  border: 2px solid #fd6d00;
  border-radius: 50px;
  font-size: 16px;
  font-family: Montserrat;
}

.mobile-search input::placeholder {
  color: #fd6d00;
  font-weight: 500;
}

.mobile-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
