header {
  justify-content: flex-start;
  gap: 26px;
  padding-left: 4%;
  padding-right: 4%;
  height: 100px;
}

header > .brand {
  margin-right: auto;
}

header nav {
  margin-left: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 28px;
}

header nav a {
  padding: 14px 0;
  border-radius: 0;
  color: #4b6152;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

header nav a:hover,
header nav a.selected {
  background: transparent;
  color: #315f47;
  box-shadow: none;
}

header > .btn.small {
  margin-left: 12px;
  border-radius: 8px;
  padding: 15px 21px;
  gap: 25px;
}

@media (max-width: 1000px) {
  header {
    gap: 20px;
  }
  header nav {
    gap: 21px;
  }
  header nav a {
    font-size: 12px;
  }
  header > .btn.small {
    margin-left: 3px;
    padding: 14px 17px;
    gap: 16px;
  }
  .brand-logo {
    width: 185px;
  }
}

@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 126px;
    padding: 12px 5% 10px;
    gap: 8px 15px;
  }
  header > .brand {
    margin: 0;
  }
  header > .btn.small {
    margin: 0;
    justify-self: end;
    padding: 12px 15px;
  }
  header nav {
    margin: 0;
    padding: 2px 0 0;
    border-top: 1px solid #e6ebe1;
    gap: 22px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  header nav::-webkit-scrollbar {
    display: none;
  }
  header nav a {
    flex: 0 0 auto;
    padding: 13px 0;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  header nav {
    justify-content: space-between;
    gap: 12px;
  }
  header nav a {
    font-size: 11px;
  }
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  border-left: 1px solid #dce4d8;
  padding-left: 15px;
}
.language-switch button {
  border: 0;
  background: transparent;
  color: #788574;
  border-radius: 5px;
  padding: 7px;
  font-size: 11px;
  font-weight: 600;
}
.language-switch button[aria-pressed="true"] {
  background: #e9efdf;
  color: #315f47;
}
html[lang="ru"] h1 {
  font-size: clamp(54px, 6.6vw, 94px);
  letter-spacing: -3px;
}
@media (max-width: 1000px) {
  header {
    gap: 14px;
  }
  header nav {
    gap: 17px;
  }
  header > .btn.small {
    padding: 13px;
    gap: 10px;
  }
  .language-switch {
    padding-left: 9px;
  }
}
@media (max-width: 760px) {
  header {
    grid-template-columns: 1fr auto auto;
    gap: 8px 10px;
  }
  header > .brand {
    grid-column: 1;
    grid-row: 1;
  }
  header > .btn.small {
    grid-column: 3;
    grid-row: 1;
    font-size: 10px;
    padding: 10px;
  }
  header nav {
    grid-column: 1/-1;
    grid-row: 2;
    gap: 20px;
  }
  .language-switch {
    grid-column: 2;
    grid-row: 1;
    border: 0;
    padding: 0;
  }
  .language-switch button {
    padding: 6px 4px;
    font-size: 10px;
  }
  header .brand-logo {
    width: 135px;
  }
  html[lang="ru"] h1 {
    font-size: 57px;
    letter-spacing: -3px;
  }
}
@media (max-width: 360px) {
  header .brand-logo {
    width: 115px;
  }
  header nav {
    gap: 13px;
  }
  html[lang="ru"] h1 {
    font-size: 49px;
  }
}
/* Explicit layout keeps the mobile menu visible with the base styles. */
header nav {
  display: flex;
}
@media (max-width: 760px) {
  header {
    display: grid;
  }
  header nav {
    display: flex;
  }
}

/* Selected navigation uses color only; no absolute decorative lines. */
header nav a {
  position: relative;
}
header nav a::after {
  content: none;
  display: none;
}
header nav a.selected {
  color: #315f47;
  font-weight: 650;
}
/* French and English first; Russian and Spanish remain readily available. */
.language-switch {
  gap: 2px;
  padding-left: 11px;
}
.language-switch button {
  font-size: 10px;
  padding: 7px 5px;
}
.language-switch button:nth-child(3) {
  margin-left: 3px;
}
@media (max-width: 1000px) and (min-width: 761px) {
  header nav {
    gap: 14px;
  }
  header .brand-logo {
    width: 160px;
  }
  header {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  header {
    grid-template-columns: 1fr auto;
  }
  .language-switch {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }
  header > .btn.small {
    display: none;
  }
  .language-switch button {
    padding: 8px 6px;
    font-size: 10px;
  }
}
/* Keep the mobile hero headline proportional in every language. */
@media (max-width: 760px) {
  .hero h1,
  html[lang="ru"] .hero h1 {
    font-size: clamp(32px, 9.5vw, 48px);
    letter-spacing: -1.7px;
    line-height: 1.12;
    margin-bottom: 23px;
  }
  .hero-copy {
    padding-top: 68px;
    padding-bottom: 68px;
  }
  .hero {
    min-height: 460px;
  }
  .hero .intro {
    font-size: 14px;
    line-height: 1.65;
    max-width: 290px;
  }
  .hero .actions {
    margin-top: 27px;
    gap: 22px;
  }
}
@media (max-width: 380px) {
  .hero .actions {
    gap: 16px;
  }
  .hero .actions .btn {
    min-width: 120px;
    padding: 16px;
  }
}
@media (max-width: 760px) {
  .hero-copy {
    padding-top: 102px;
    padding-bottom: 34px;
  }
}
@media (max-width: 760px) {
  .hero {
    min-height: 500px;
  }
  .hero-copy {
    padding-top: 170px;
    padding-bottom: 66px;
  }
}
.arrow-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  flex-shrink: 0;
}
.btn > span:has(.arrow-icon),
.text-link > span:has(.arrow-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.round {
  font-size: 0;
}
.round::after {
  content: "";
  width: 21px;
  height: 21px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M5 5h14v14' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M5 5h14v14' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/contain no-repeat;
}
footer .brand {
  margin: 0;
  padding: 0;
}
footer .brand-logo {
  display: block;
  object-position: left center;
}
@media (max-width: 760px) {
  footer {
    justify-content: center;
    text-align: center;
    gap: 24px;
  }
  footer .brand {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  footer .brand-logo {
    width: 175px;
    height: auto;
    object-position: center;
  }
  footer p {
    flex-basis: 100%;
  }
  footer > a:not(.brand),
  footer > small {
    width: 100%;
  }
}
.property-picture .round {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
.property-picture .round::after {
  content: none;
  display: none;
}
.property-picture .round .arrow-icon {
  width: 24px;
  height: 24px;
  display: block;
  vertical-align: initial;
}
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #315f47;
  color: #f8fbf2;
  box-shadow: 0 4px 18px #16332526;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.2s,
    transform 0.2s;
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}
.back-to-top:hover {
  background: #244c38;
  transform: translateY(-2px);
}
.back-to-top:focus-visible {
  outline: 2px solid #78965e;
  outline-offset: 4px;
}
.back-to-top[hidden],
body:has(dialog[open]) .back-to-top {
  display: none;
}
@media (max-width: 760px) {
  .back-to-top {
    right: 17px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 40px;
    height: 40px;
  }
}
