.language-switcher {
  position: relative;
  z-index: 280;
  direction: ltr;
  font-family: 'Advent Pro', Arial, sans-serif;
}

.language-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 76px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.language-switcher__button::-webkit-details-marker {
  display: none;
}

.language-switcher__button:hover {
  background: #f7f7f7;
  border-color: #8e8e8e;
}

.language-switcher__button:active {
  transform: translateY(1px);
}

.language-switcher__button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.language-switcher__code {
  min-width: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.language-switcher__chevron {
  transition: transform 0.2s ease;
}

.language-switcher[open] .language-switcher__chevron {
  transform: rotate(180deg);
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 164px;
  padding: 4px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.1);
}

.language-switcher__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  border-radius: 5px;
  color: #171717;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  white-space: nowrap;
}

.language-switcher__menu a::after {
  content: "✓";
  display: block;
  color: #111;
  font-size: 0.76rem;
  opacity: 0;
}

.language-switcher__menu a:hover {
  background: #f5f5f5;
}

.language-switcher__menu a.is-active {
  font-weight: 700;
  background: #f1f1f1;
}

.language-switcher__menu a.is-active::after {
  opacity: 1;
}

.page-language-control {
  position: absolute;
  top: 56px;
  left: 58px;
  z-index: 300;
}

html[dir="rtl"] .page-language-control {
  right: 58px;
  left: auto;
}

html[dir="rtl"] .page-language-control .language-switcher__menu {
  right: 0;
  left: auto;
}

.mobile-language-control {
  display: none;
}

.hero-actions,
.viz-header-actions {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 18px;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .innovation-block,
html[dir="rtl"] .visualizer-text,
html[dir="rtl"] .section-head,
html[dir="rtl"] .carousel-info,
html[dir="rtl"] .tiles-head,
html[dir="rtl"] .gallery-top,
html[dir="rtl"] .g-caption,
html[dir="rtl"] .product-extra__title,
html[dir="rtl"] .forms-head,
html[dir="rtl"] .forms-left,
html[dir="rtl"] .contacts-left,
html[dir="rtl"] .modal-titleblock,
html[dir="rtl"] .controls-panel,
html[dir="rtl"] .facade-gallery,
html[dir="rtl"] .upload-content,
html[dir="rtl"] .result-container {
  text-align: right;
}

html[dir="rtl"] .brand {
  align-self: flex-start;
}

html[dir="rtl"] .carousel-viewport,
html[dir="rtl"] .carousel-track,
html[dir="rtl"] .carousel-shell,
html[dir="rtl"] .overlay-container {
  direction: ltr;
}

html[dir="rtl"] .world-caption,
html[dir="rtl"] .forms-label {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .viz-menu {
  border-right: 0;
  border-left: 1px solid #ddd;
  align-items: flex-start;
}

html[dir="rtl"] .viz-menu a.active::after {
  content: " ←";
}

@media (max-width: 820px) {
  .page-language-control {
    display: none;
  }

  body.is-mobile-nav-open .hero-right {
    overflow: visible;
  }

  body.is-mobile-nav-open .hero-image img,
  body.is-mobile-nav-open .hero-overlay {
    border-radius: 10px;
  }

  .mobile-language-control {
    display: block;
    width: 100%;
    margin-top: 2px;
  }

  .mobile-language-control .language-switcher {
    width: 100%;
  }

  .mobile-language-control .language-switcher__button {
    width: 100%;
    height: auto;
    min-height: 42px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }

  .mobile-language-control .language-switcher__button:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-language-control .language-switcher__chevron {
    margin-left: auto;
  }

  .mobile-language-control .language-switcher__menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  html[dir="rtl"] .mobile-language-control .language-switcher__button {
    direction: rtl;
  }

  html[dir="rtl"] .mobile-language-control .language-switcher__chevron {
    margin-right: auto;
    margin-left: 0;
  }

  .hero-actions {
    gap: 8px;
  }

  html[dir="rtl"] .hero-nav a,
  html[dir="rtl"] .hero-nav-btn {
    text-align: right;
  }

  html[dir="rtl"] .hero-nav {
    direction: rtl;
  }
}

@media (max-width: 520px) {
  .language-switcher__button {
    min-width: 64px;
  }

}
