/* Header Styles */
.main-header {
  background: #fff;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
  direction: rtl;
}
.header-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.header-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header-logo {
  height: 40px;
  width: auto;
}
.header-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Joomla menu styling */
.header-nav ul.mod-menu {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  background: none;
}
.header-nav ul.mod-menu > li.nav-item {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.header-nav ul.mod-menu > li.nav-item > a {
  color: #444;
  text-decoration: none;
  font-size: 0.785rem;
  font-family: "Segoe UI", "Arial", sans-serif;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  font-weight: 400;
  background: none;
  display: block;
}
.header-nav ul.mod-menu > li.nav-item.active > a,
.header-nav ul.mod-menu > li.nav-item.current > a {
  background: #2563eb;
  color: #fff;
}
.header-nav ul.mod-menu > li.nav-item > a:hover,
.header-nav ul.mod-menu > li.nav-item > a:focus {
  background: #e3edfa;
  color: #2563eb;
}
.header-nav ul.mod-menu > li.nav-item.active > a:hover,
.header-nav ul.mod-menu > li.nav-item.active > a:focus,
.header-nav ul.mod-menu > li.nav-item.current > a:hover,
.header-nav ul.mod-menu > li.nav-item.current > a:focus {
  background: #2563eb;
  color: #fff;
}

/* Remove default list marker for nested menus if any */
.header-nav ul.mod-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 8px;
  z-index: 100;
}
.burger-bar {
  display: block;
  width: 26px;
  height: 3px;
  background: #2563eb;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
.burger-menu.active .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger-menu.active .burger-bar:nth-child(2) {
  opacity: 0;
}
.burger-menu.active .burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-menu-list-wrapper {
  display: flex;
  align-items: center;
}

.burger-overlay {
  display: none;
  position: fixed;
  z-index: 98;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 41, 59, 0.55);
  transition: opacity 0.2s;
  opacity: 0;
}
.burger-overlay.open {
  display: block;
  opacity: 1;
}

.main-menu-list-wrapper.center {
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}
.main-menu-list-wrapper.center ul.mod-menu {
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
}
.main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a {
  text-align: center !important;
}
.burger-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 2.2rem;
  position: absolute;
  top: 18px;
  right: 75px;
  z-index: 101;
  cursor: pointer;
  padding: 0;
}
.burger-close .fa-times {
  font-size: 2.2rem;
  line-height: 1;
}
@media (max-width: 900px) {
  .header-nav ul.mod-menu {
    gap: 1rem;
  }
  .burger-menu {
    display: flex;
  }
  .main-menu-list-wrapper {
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 24px 0 rgba(30, 41, 59, 0.08);
    flex-direction: column;
    align-items: flex-end;
    padding: 16px 0 8px 0;
    z-index: 99;
  }
  .main-menu-list-wrapper.open {
    display: flex;
  }
  .header-nav ul.mod-menu {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    align-items: flex-end;
    background: none;
  }
  .header-nav ul.mod-menu > li.nav-item > a {
    width: 100%;
    text-align: right;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0;
    background: none;
  }
  .burger-overlay {
    display: none;
  }
  .burger-overlay.open {
    display: block;
  }
  .main-menu-list-wrapper.center {
    min-height: 100vh;
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 100;
    box-shadow: none;
    padding: 0;
  }
  .main-menu-list-wrapper.center ul.mod-menu {
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    gap: 1.5rem;
    background: none;
  }
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a {
    width: 100%;
    text-align: center !important;
    font-size: 1.3rem;
    padding: 1.2rem 0;
    border-radius: 0;
    background: none;
  }
  .burger-close {
    display: flex;
  }
}
@media (min-width: 901px) {
  .burger-overlay {
    display: none !important;
  }
  .burger-close {
    display: none !important;
  }
}

/* Отключаем hover-эффекты и фиксируем цвет для бургер-меню */
@media (max-width: 900px) {
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a,
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a:visited,
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a:active,
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a:focus,
  .main-menu-list-wrapper.center ul.mod-menu > li.nav-item > a:hover {
    color: #444 !important;
    background: none !important;
    transition: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
  }