:root {
  --ru-preview-navy: #071f32;
  --ru-preview-green: #8fba45;
}

html[lang="ru"] {
  scroll-behavior: smooth;
}

html[lang="ru"] body {
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

html[lang="ru"] p,
html[lang="ru"] li,
html[lang="ru"] td,
html[lang="ru"] th,
html[lang="ru"] label,
html[lang="ru"] small {
  hyphens: auto;
  overflow-wrap: break-word;
}

html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3,
html[lang="ru"] h4 {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

html[lang="ru"] a,
html[lang="ru"] button,
html[lang="ru"] input,
html[lang="ru"] select,
html[lang="ru"] textarea {
  font: inherit;
}

.language-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  line-height: 1;
}

.language-select__control {
  min-width: 92px;
  margin: 0;
  padding: 2px 18px 2px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.language-select__control:focus-visible {
  outline: 2px solid #8ab83f;
  outline-offset: 3px;
  border-radius: 2px;
}

.language-select__control option {
  background: #ffffff;
  color: #071f32;
}

.language-select .language-select__chevron {
  position: absolute;
  right: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  pointer-events: none;
}

.language-select--mobile {
  display: none;
  color: #071f32;
}

@media (max-width: 1279.98px) {
  .language-select--mobile {
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
  }

  .language-select--mobile > svg:first-child {
    width: 18px;
    height: 18px;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .language-select--mobile .language-select__control {
    min-width: 86px;
  }
}

@media (max-width: 767.98px) {
  .language-select--mobile > svg:first-child {
    display: none;
  }

  .language-select--mobile .language-select__control {
    width: 76px;
    min-width: 76px;
    padding-right: 16px;
    font-size: 12px;
  }
}

/* Keep the localized home hero on the same responsive image and crop system as English. */
@media (min-width: 768px) {
  html[lang="ru"] .hero--figma-crop {
    --hero-bg-url: url("assets/hero/home-hero-responsive-normal-v2-2400.webp?v=20260713a");
    --hero-bg-position: center center;
    --hero-stat-height: min(100px, 5.2083vw);
    --hero-stat-bottom: 0px;
    --hero-side-pad: max(24px, 16.6667vw);
    --hero-image-extra: 0px !important;
    --hero-image-shift: 0px !important;
    height: clamp(600px, 48.75vw, 936px) !important;
    background: #071f36 !important;
  }

  html[lang="ru"] .hero--figma-crop::before {
    display: block !important;
    z-index: 1 !important;
    background: linear-gradient(74.376deg, rgba(6, 32, 59, 0.84) 9.4605%, rgba(6, 32, 59, 0.72) 40.475%, rgba(6, 32, 59, 0) 72.758%) !important;
  }

  html[lang="ru"] .hero--figma-crop::after {
    display: block !important;
    z-index: 1 !important;
    top: auto !important;
    height: 28% !important;
    background: linear-gradient(180deg, rgba(6, 32, 59, 0), rgba(6, 32, 59, 0.34)) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero__bg {
    inset: 0 !important;
    overflow: hidden !important;
    background-image: var(--hero-bg-url) !important;
    background-position: var(--hero-bg-position) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
  }

  html[lang="ru"] .hero--figma-crop .hero__bg::before,
  html[lang="ru"] .hero--figma-crop .hero__bg::after {
    content: none !important;
  }

  html[lang="ru"] .hero--figma-crop .hero__content {
    display: flex !important;
    align-items: center !important;
    width: min(1440px, calc(100% - 48px)) !important;
    height: calc(100% - var(--hero-stat-height)) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero__copy {
    padding-top: 0 !important;
    transform: translateY(5%) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero-stats {
    right: 0 !important;
    bottom: var(--hero-stat-bottom) !important;
    left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    width: auto !important;
    height: var(--hero-stat-height) !important;
    padding: 0 var(--hero-side-pad) !important;
    transform: none !important;
    background: rgba(6, 32, 59, 0.18) !important;
    backdrop-filter: blur(4px) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero-stats div,
  html[lang="ru"] .hero--figma-crop .hero-stats div:nth-child(1),
  html[lang="ru"] .hero--figma-crop .hero-stats div:nth-child(2),
  html[lang="ru"] .hero--figma-crop .hero-stats div:nth-child(3),
  html[lang="ru"] .hero--figma-crop .hero-stats div:nth-child(4) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 0 0 min(48px, 2.5vw) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero-stats div:not(:first-child)::before {
    top: 50% !important;
    left: 0 !important;
    width: 1px !important;
    height: min(40px, 2.0833vw) !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.18) !important;
  }

  html[lang="ru"] .hero--figma-crop .hero-stats span {
    white-space: nowrap !important;
  }
}

@media (min-width: 1280px) and (max-width: 1919.98px) {
  html[lang="ru"] .hero--figma-crop .hero__content {
    width: min(1440px, calc(100% - clamp(192px, 20vw, 360px))) !important;
  }
}

@media (min-width: 1920px) {
  html[lang="ru"] .hero--figma-crop {
    --hero-bg-url: url("assets/hero/home-hero-responsive-wide-v2-3200.webp?v=20260713a");
    --hero-bg-position: center center;
  }

  html[lang="ru"] .hero--figma-crop .hero__content {
    width: min(75vw, 1920px) !important;
  }
}

html[lang="ru"] a[class*="button"],
html[lang="ru"] button,
html[lang="ru"] .pdp-cta,
html[lang="ru"] .whatsapp-pill,
html[lang="ru"] .contact-actions a,
html[lang="ru"] .catalog-card__button {
  min-height: 44px;
  height: auto;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

html[lang="ru"] .product-card,
html[lang="ru"] .catalog-card,
html[lang="ru"] .proof-card,
html[lang="ru"] .pdp-payment-card {
  height: auto;
  min-height: 0;
}

html[lang="ru"] .pdp-info__title,
html[lang="ru"] .catalog-card__title,
html[lang="ru"] .product-card__title,
html[lang="ru"] .pdp-quick-spec__value,
html[lang="ru"] .pdp-price-box__amount,
html[lang="ru"] [class*="price"],
html[lang="ru"] a[href^="tel:"],
html[lang="ru"] a[href^="mailto:"] {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="ru"] .catalog-card__meta,
html[lang="ru"] .catalog-card__price,
html[lang="ru"] .pdp-quick-spec__label,
html[lang="ru"] .pdp-cert-row__body,
html[lang="ru"] .pdp-trust-item {
  white-space: normal;
}

.ru-preview-banner {
  position: fixed;
  z-index: 100000;
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 2px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 14px;
  color: #fff;
  background: rgba(7, 31, 50, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(7, 31, 50, 0.25);
  font: 500 12px/1.35 Inter, Arial, sans-serif;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.ru-preview-banner strong {
  color: #b8dd74;
  font-weight: 800;
}

.ru-preview-toast {
  position: fixed;
  z-index: 100001;
  left: 50%;
  bottom: 24px;
  width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  color: #fff;
  background: #071f32;
  border-radius: 12px;
  box-shadow: 0 16px 45px rgba(7, 31, 50, 0.32);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: 180ms ease;
  text-align: center;
  pointer-events: none;
}

.ru-preview-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 767.98px) {
  html[lang="ru"] p,
  html[lang="ru"] li,
  html[lang="ru"] label,
  html[lang="ru"] small {
    hyphens: none;
  }

  html[lang="ru"] h1,
  html[lang="ru"] h2,
  html[lang="ru"] h3,
  html[lang="ru"] h4 {
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
  }

  html[lang="ru"] .brand,
  html[lang="ru"] .icon-button,
  html[lang="ru"] .menu-button {
    min-width: 44px;
  }

  html[lang="ru"] .nav-links a,
  html[lang="ru"] .nav-submenu a {
    white-space: normal;
  }

  html[lang="ru"] .hero,
  html[lang="ru"] .home-hero,
  html[lang="ru"] .about-hero,
  html[lang="ru"] .catalog-hero {
    height: auto;
  }

  html[lang="ru"] .hero--figma-crop {
    height: 732px !important;
  }

  html[lang="ru"] .hero--figma-crop .hero__bg {
    background: none;
  }

  html[lang="ru"] .hero--figma-crop .hero__copy,
  html[lang="ru"] .hero--figma-crop .hero__copy p:not(.eyebrow),
  html[lang="ru"] .hero--figma-crop .hero__actions {
    width: 100%;
    max-width: 100%;
  }

  html[lang="ru"] .hero--figma-crop h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(29px, 8.2vw, 32px);
    line-height: 1.08;
  }

  html[lang="ru"] .hero__actions,
  html[lang="ru"] .cta-actions,
  html[lang="ru"] .contact-actions,
  html[lang="ru"] .pdp-ctas,
  html[lang="ru"] .inquiry-actions,
  html[lang="ru"] .form-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  html[lang="ru"] .proof-metrics,
  html[lang="ru"] .company-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[lang="ru"] .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }

  html[lang="ru"] .pdp-quick-spec {
    min-width: 0;
  }

  html[lang="ru"] .pdp-cert-row,
  html[lang="ru"] .pdp-trust-item {
    align-items: flex-start;
  }

  html[lang="ru"] .blog-detail__table-wrap,
  html[lang="ru"] .article-table-wrap,
  html[lang="ru"] .ru-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  html[lang="ru"] .ru-table-scroll {
    width: 100%;
    margin-block: 18px;
    padding-bottom: 4px;
    border-radius: 8px;
    overscroll-behavior-inline: contain;
  }

  html[lang="ru"] .ru-table-scroll table {
    min-width: 720px;
    margin: 0;
  }

  html[lang="ru"] .product-card .price-row a,
  html[lang="ru"] .proof-card a,
  html[lang="ru"] .catalog-detail-button {
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  html[lang="ru"] h1 {
    font-size: clamp(29px, 8.2vw, 32px);
    line-height: 1.08;
  }

  html[lang="ru"] h2 {
    font-size: clamp(27px, 7.7vw, 30px);
    line-height: 1.12;
  }

  html[lang="ru"] .hero__actions,
  html[lang="ru"] .cta-actions,
  html[lang="ru"] .contact-actions,
  html[lang="ru"] .pdp-ctas,
  html[lang="ru"] .inquiry-actions,
  html[lang="ru"] .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  html[lang="ru"] .hero__actions > *,
  html[lang="ru"] .cta-actions > *,
  html[lang="ru"] .contact-actions > *,
  html[lang="ru"] .pdp-ctas > *,
  html[lang="ru"] .inquiry-actions > *,
  html[lang="ru"] .form-actions > * {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  html[lang="ru"] .pdp-form .form-row,
  html[lang="ru"] .inquiry-form .form-row,
  html[lang="ru"] .contact-inquiry__form .form-row,
  html[lang="ru"] form .form-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  html[lang="ru"] .catalog-card__price-row,
  html[lang="ru"] .price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  html[lang="ru"] .product-main .price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  html[lang="ru"] .product-main .price-row > div,
  html[lang="ru"] .product-main .price-row > a {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    align-self: stretch;
  }

  html[lang="ru"] .catalog-price b {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  html[lang="ru"] .pdp-cert-row__body {
    min-width: 0;
  }

  .ru-preview-banner {
    left: 10px;
    bottom: 10px;
    max-width: 250px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

html[lang="ru"] .product-card .price-row span::before {
  content: "Цена";
}

@media (min-width: 1280px) and (max-width: 1599.98px) {
  html[lang="ru"] .catalog-promise {
    padding-block: 12px;
  }

  html[lang="ru"] .catalog-promise h2 {
    margin-bottom: 10px;
  }

  html[lang="ru"] .catalog-promise dl {
    gap: 6px;
  }

  html[lang="ru"] .catalog-promise__button {
    margin-top: 6px;
  }
}

@media (min-width: 1181px) and (max-width: 1919.98px) {
  html[lang="ru"] body.product-detail-preview .pdp-overview {
    align-items: stretch;
  }

  html[lang="ru"] body.product-detail-preview .pdp-gallery__main {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (min-width: 1280px) {
  html[lang="ru"] body.about-page .about-overview__grid {
    align-items: stretch;
  }

  html[lang="ru"] body.about-page .about-collage {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    align-self: stretch;
  }

  html[lang="ru"] body.contact-page .contact-grid {
    align-items: stretch;
  }

  html[lang="ru"] body.contact-page .contact-map-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-self: stretch;
  }

  html[lang="ru"] body.contact-page .contact-map__media {
    min-height: 0;
    aspect-ratio: auto;
  }

  html[lang="ru"] body.contact-page .contact-map__media img {
    height: 100%;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[lang="ru"] {
    scroll-behavior: auto;
  }

  .ru-preview-toast {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  html[lang="ru"] .blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow: visible;
  }

  html[lang="ru"] .category-card,
  html[lang="ru"] .category-card a,
  html[lang="ru"] .product-category,
  html[lang="ru"] .product-category a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[lang="ru"] .detail-content .ru-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }

  html[lang="ru"] .detail-content .ru-table-scroll table {
    max-width: none;
  }
}
