.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 24px;
}

body.no-scroll {
  overflow: hidden;
}

/* HEADER */

.site-header {
  padding-top: 30px;
  margin-bottom: 40px;
}

.site-header .site-header__mobile {
  display: none;
  position: relative;
  left: 0;
  right: 0;
  z-index: 100;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
  overflow-y: auto;
  padding-bottom: 24px;
}

@media (max-width: 992px) {
  .site-header {
    margin-bottom: 32px;
  }

  .site-header .site-header__desktop {
    display: none;
  }

  .site-header .site-header__mobile {
    display: block;
  }
}

/* MOBILE HEADER */

.site-header__mobile-top {
  flex-direction: column;
  gap: 12px;
}

.top-menu__mobile {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 22;
  border-radius: var(--radius-24);
  transition: padding 0.5s ease;
}

.home .top-menu__mobile {
  background-color: var(--color-white);
}

.mobile-menu {
  border-radius: var(--radius-24);
  width: 100%;
  height: 100%;
  background-color: var(--color-white);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 24px;
  z-index: 20;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 56px;
  flex-direction: column;
  gap: 5px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
}

.site-header .site-header__mobile.is-fixed {
  padding-top: 30px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  box-shadow: var(--shadow-md);
}

.site-header .site-header__mobile.is-fixed .top-menu__mobile {
  padding: 16px;
  background-color: var(--color-white);
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--color-black);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.mobile-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}

.menu-backdrop.active {
  opacity: 1;
}

/* Top menu */

.site-header .site-header__top {
  margin-bottom: 16px;
}

/* Sub menu */

.sub-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sub-nav ul li {
  display: inline-block;
}

.sub-nav ul li a {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-muted);
  text-decoration: none;
  padding: 12px;
  display: inline-block;
}

@media (max-width: 992px) {
  .sub-nav ul {
    display: flex;
    flex-direction: column;
  }

  .sub-nav ul li a {
    padding: 14px 16px;
    font-size: 16px;
    width: 100%;
  }
}

/* Contacts */

.header-contacts a {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */

.custom-logo-link {
  display: inline-block;
  width: 180px;
}

.custom-logo-link img.custom-logo {
  height: auto;
  width: 100%;
}

@media (max-width: 992px) {
  .custom-logo-link {
    display: inline-block;
    width: 132px;
  }
}

/* Main Menu */

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav ul li a {
  padding: 16px 18px;
  display: inline-block;
  color: var(--color-black);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

@media (max-width: 992px) {
  .main-nav ul {
    flex-direction: column;
  }

  .main-nav ul li a {
    width: 100%;
    padding: 14px 18px;  
  }
}

/* Lang switcher */

.lang-switcher select {
  border: none;
  background: var(--color-surface);
  font-size: 16px;
  cursor: pointer;
  height: 56px;
  opacity: 1;
  border-radius: var(--radius-pill);
  padding: 16px 38px 16px 48px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

@media (max-width: 992px) {
  .lang-switcher select {
    width: 100%;
  }
}

.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-switcher::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 20px;
  height: 14px;
  transform: translateY(-50%);
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  pointer-events: none;
}

.lang-switcher::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-size: 24px 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 9L12 15L5 9' stroke='%235B5961' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  pointer-events: none;
}

html[lang^="en"] .lang-switcher::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect width='20' height='14' fill='%23fff'/%3E%3Crect y='0' width='20' height='2' fill='%23b22234'/%3E%3Crect y='4' width='20' height='2' fill='%23b22234'/%3E%3Crect y='8' width='20' height='2' fill='%23b22234'/%3E%3Crect y='12' width='20' height='2' fill='%23b22234'/%3E%3Crect width='8' height='8' fill='%233c3b6e'/%3E%3C/svg%3E");
}

html[lang^="de"] .lang-switcher::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect width='20' height='14' fill='%23ffce00'/%3E%3Crect width='20' height='9.33' fill='%23dd0000'/%3E%3Crect width='20' height='4.67' fill='%23000'/%3E%3C/svg%3E");
}

html[lang^="ru"] .lang-switcher::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect width='20' height='14' fill='%23d52b1e'/%3E%3Crect width='20' height='9.33' fill='%230039a6'/%3E%3Crect width='20' height='4.67' fill='%23fff'/%3E%3C/svg%3E");
}

/* FOOTER */

.site-footer {
    background: var(--color-footer);
    padding: 50px 0;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 64px;
}

.footer-logo {
    display: inline-block;
    width: 190px;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

.social-link {
    display: inline-block;
    background-color: var(--social-button-color);
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: var(--radius-10);
    padding: 18px;
}

.footer-middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.footer-nav ul li a {
  display: inline-block;
  padding: 16px 18px;
  color: var(--color-white);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 64px;
}

.footer-bottom .sub-nav ul li a {
    color: var(--color-secondary);
}

.copyright {
    color: var(--color-white);
    text-align: center;
}

@media (max-width: 992px) {

  .footer-top {
    flex-direction: column;
    gap: 10px;
  }

  .footer-middle {
    max-width: 220px;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto;
    align-items: flex-start;
  }    

  .footer-middle .footer-nav {
    order: 2;
  }

  .footer-middle .lang-switcher {
    order: 1;
    max-width: 240px;
    width: 100%;
  }

  .footer-nav ul {
    flex-direction: column;
  }

  .footer-bottom {
    max-width: 220px;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto;
    align-items: flex-start;
    margin-bottom: 64px;
  }

  .footer-bottom .sub-nav ul {
    display: flex;
    flex-direction: column;
  }

  .footer-bottom .sub-nav ul li a {
    padding: 16px 18px;
    font-size: 16px;
    display: inline-block;
  }

  .footer-bottom .header-contacts {
    display: flex;
    flex-direction: column;
  }

  .footer-bottom .header-contacts a {
    padding: 12px;
  }

  .copyright {
    max-width: 180px;
    margin: 0 auto;
    text-align: left;
  }
}
