/* Russian locale — shared */

/* Form submit CTAs: match hero / .btn-primary typography (weight + inherited size) */
html[lang="ru"] #hindamine .card form button[type="submit"].btn-primary,
html[lang="ru"] #kontakt .card form button[type="submit"].btn-primary {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 630;
}

/* Contact profile: keep text block left edge consistent with EST */
html[lang="ru"] .contact-agent.profile-photo-wrapper .contact-agent-text {
  width: 180px;
  max-width: 180px;
  margin: 0;
  text-align: left;
  align-self: center;
}

/* Russian locale — desktop */

@media (min-width: 769px) {
  /* Header fine-tuning: match EST nav-to-lang rhythm; redistribute space into item gaps */
  html[lang="ru"] .nav-inner {
    gap: 12px;
  }

  html[lang="ru"] .brand {
    margin-left: -16px;
  }

  html[lang="ru"] .nav-links {
    gap: 4px;
    margin-right: 10px;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html[lang="ru"] .nav-links a {
    padding-left: 1px;
    padding-right: 1px;
  }

  html[lang="ru"] .nav-links::-webkit-scrollbar {
    display: none;
  }

  html[lang="ru"] .lang-switcher {
    margin-left: 0;
  }

  /*
   * Hero: EST geometry at 1920px — content frame 1630px (145px side margins).
   * Uniform 0.70× EST typography; same line1/line2 ratio as EST.
   */
  html[lang="ru"] .hero h1 .gold-line,
  html[lang="ru"] .hero h1 .gold-line-soft {
    white-space: nowrap;
    text-wrap: nowrap;
  }

  html[lang="ru"] .hero h1 .gold-line {
    font-size: clamp(2.1rem, 1.33rem + 3.36vw, 4.27rem);
    letter-spacing: -1px;
  }

  html[lang="ru"] .hero h1 .gold-line-soft {
    font-size: clamp(1.79rem, calc(1.13rem + 2.86vw), 3.63rem);
    letter-spacing: calc(0.02em - 0.5px);
  }

  html[lang="ru"] .hero-subtitle.hero-subtitle-lead {
    white-space: nowrap;
  }

  /* Label: EST desktop geometry (1920px) — 79px below header, 85px above H1 */
  html[lang="ru"] .hero-label {
    margin: -24px auto 85px;
  }

  /* Section headings: one line on desktop (match EST) */
  html[lang="ru"] .section-title {
    max-width: none;
    white-space: nowrap;
    margin-bottom: 14px;
  }

  html[lang="ru"] .section-intro {
    margin-bottom: 32px;
  }

  /* Keep valuation intro + trust line as a tight two-line text block */
  html[lang="ru"] #hindamine .hindamine-intro-main {
    margin-bottom: 0;
  }

  html[lang="ru"] #hindamine .section-title br {
    display: none;
  }

  html[lang="ru"] #hindamine .hindamine-title-line2:empty {
    display: none;
  }

  /* Valuation form label: one line; muted optional part only */
  html[lang="ru"] #hindamine label.label-optional-field {
    display: block;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__title {
    display: inline;
    font-size: 0.92rem;
    color: #e7e7e7;
    font-weight: inherit;
    line-height: inherit;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint {
    display: inline;
    font-size: calc(0.92rem - 1px);
    color: var(--muted);
    font-weight: inherit;
    line-height: inherit;
    text-transform: lowercase;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint::before {
    content: " (";
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint::after {
    content: ")";
  }

  /* Pricing: second card matches first card (desktop RU) */
  html[lang="ru"] #hinnakiri .pricing-grid {
    align-items: stretch;
  }

  html[lang="ru"] #hinnakiri .pricing-rate,
  html[lang="ru"] #hinnakiri .pricing-note {
    height: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(201, 162, 74, 0.38);
    border-radius: 14px;
    padding: 26px;
    background:
      radial-gradient(circle at 80% 0%, rgba(201, 162, 74, 0.24), transparent 45%),
      linear-gradient(150deg, #16120a, #0c0c0c 62%);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }

  html[lang="ru"] #hinnakiri .pricing-note {
    margin-top: 0;
  }

  html[lang="ru"] #hinnakiri .pricing-rate:hover,
  html[lang="ru"] #hinnakiri .pricing-note:hover {
    transform: translateY(-7px);
    border-color: rgba(201, 162, 74, 0.55);
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.56);
  }

  /* Success popup line breaks: mobile-only (hidden on desktop) */
  html[lang="ru"] .form-success-br {
    display: none;
  }
}

/* Russian locale — mobile */
@media (max-width: 768px) {
  /* Valuation form: stacked label + muted hint (mobile RU only) */
  html[lang="ru"] #hindamine label.label-optional-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 8px;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__title {
    display: block;
    font-size: 0.92rem;
    color: #e7e7e7;
    line-height: 1.3;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint {
    display: block;
    font-size: calc(0.92rem - 1px);
    color: var(--muted);
    font-weight: 400;
    line-height: 1.3;
    text-transform: lowercase;
    margin: 0;
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint::before {
    content: "(";
  }

  html[lang="ru"] #hindamine label.label-optional-field .label-optional-field__hint::after {
    content: ")";
  }

  html[lang="ru"] #hindamine label.label-optional-field + textarea {
    margin-top: 0;
  }

  /* Pricing: premium surface on second card (mobile RU) */
  html[lang="ru"] #hinnakiri .pricing-note {
    border: 1px solid rgba(201, 162, 74, 0.38);
    background:
      radial-gradient(circle at 80% 0%, rgba(201, 162, 74, 0.24), transparent 45%),
      linear-gradient(150deg, #16120a, #0c0c0c 62%);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  }

  /* FAQ accordion: slightly tighter vertical padding inside cards (mobile RU only) */
  html[lang="ru"] #kkk details {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  /* Form success meta: keep "(не позднее чем в течение 24 ч)." on one line */
  html[lang="ru"] .form-success-panel {
    padding-left: 8px;
    padding-right: 8px;
  }

  html[lang="ru"] .form-success-panel.is-visible {
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px);
    box-sizing: border-box;
  }

  html[lang="ru"] .form-success-inner {
    max-width: none;
  }

  html[lang="ru"] .form-success-inner p.form-success-meta {
    display: inline-block;
    width: auto;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    white-space: nowrap;
  }

  /* Footer copyright on one line — full 0.9rem, extra width via tighter side padding */
  html[lang="ru"] footer .container {
    white-space: nowrap;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Slightly less space below contact form and above footer */
  html[lang="ru"] #kontakt {
    padding-bottom: 100px;
  }

  html[lang="ru"] #kontakt .contact-wrap > article.card {
    padding-bottom: 24px;
  }

  html[lang="ru"] footer {
    padding-top: 28px;
  }

  /* Hero CTAs: slightly above EST base, +12px down from prior tweak */
  html[lang="ru"] .hero-buttons {
    margin-top: 33px;
    margin-bottom: 2px;
  }

  /* "С 2005 года" → CTAs: balanced gap under tagline */
  html[lang="ru"] .hero-subtitle:not(.hero-subtitle-lead) {
    margin-bottom: 18px;
  }

  /* Burger menu: darker translucent overlay + stronger blur */
  html[lang="ru"] .top-nav.menu-open {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.96));
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
  }

  html[lang="ru"] .top-nav.menu-open .mobile-nav-links {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.97) 0%,
      rgba(0, 0, 0, 0.955) 50%,
      rgba(0, 0, 0, 0.94) 100%
    );
    backdrop-filter: blur(28px) saturate(120%);
    -webkit-backdrop-filter: blur(28px) saturate(120%);
    box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.62);
  }
}

@media (max-width: 680px) {
  html[lang="ru"] #kontakt {
    padding-bottom: 74px;
  }
}

@media (max-width: 390px) {
  html[lang="ru"] .hero-buttons {
    margin-top: 33px;
  }

  html[lang="ru"] .hero-subtitle:not(.hero-subtitle-lead) {
    margin-bottom: 18px;
  }

  html[lang="ru"] footer .container {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* RU mobile success popup fix */
@media (max-width: 768px) {

  html[lang="ru"] .form-success-meta {
    display: inline-block;
    white-space: nowrap;
  }

  html[lang="ru"] .form-success-panel {
    padding-left: 0;
    padding-right: 0;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  html[lang="ru"] .form-success-inner {
    max-width: none;
  }

  html[lang="ru"] .form-success-panel .form-success-reset {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 630;
    white-space: nowrap;
  }

}