:root {
  --green: #004d30;
  --green-rgb: #e6e1da;
  --green-dark: #2d6b3a;
  --brown: #4a2c10;
}

body {
  padding-top: 104px;
}

.rd-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 72px;
  background: rgba(250, 247, 242, 0.92);
  border-bottom: 1px solid rgba(74, 44, 16, 0.1);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 30px rgba(74, 47, 27, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 0.24s ease, box-shadow 0.24s ease;
}

.rd-menu.is-scrolled {
  background: rgba(250, 247, 242, 0.98);
  box-shadow: 0 16px 46px rgba(74, 47, 27, 0.12);
}

.page-wrapper--with-menu {
  padding-top: 40px;
}

.rd-menu__shell {
  width: min(1280px, 100%);
  height: 100%;
  display: flex;
  align-items: stretch;
  margin: 0 auto;
  /*border-left: 1px solid rgba(74, 44, 16, 0.08);*/
  /*border-right: 1px solid rgba(74, 44, 16, 0.08);*/
}

.rd-menu__brand {
  min-width: 214px;
  display: flex;
  align-items: center;
  padding: 0 34px;
}

.rd-menu__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.rd-menu__logo img {
  display: block;
  width: auto;
  height: 48px;
  max-width: none;
  max-height: 52px;
  object-fit: contain;
}

.rd-menu__center {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 24px;
  min-width: 0;
}

.rd-menu__links {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.rd-menu__item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.rd-menu__item--has-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.rd-menu__link {
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 0,75rem;
  padding: 12px 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #615c56;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.rd-menu__link::after {
  content: none;
}

.rd-menu__item:hover .rd-menu__link,
.rd-menu__link:focus-visible,
.rd-menu__link.is-active,
.rd-menu__dropdown-toggle.has-active-child {
  background: var(--green-rgb);
  color: var(--green);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.24);
}

.rd-menu [aria-current="page"] {
  pointer-events: none;
}

.rd-menu__dropdown-toggle {
  appearance: none;
}

.rd-menu__chevron {
  width: 9px;
  height: 9px;
  color: currentColor;
  transition: transform 0.2s ease;
}

.rd-menu__chevron path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rd-menu__item:hover .rd-menu__chevron {
  transform: rotate(180deg);
}

.rd-menu__dropdown {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  min-width: 430px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 8px;
  list-style: none;
  background: #fffdf9;
  border: 1px solid rgba(74, 44, 16, 0.12);
  border-radius: 16px;
  box-shadow: 0 22px 46px rgba(74, 47, 27, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.rd-menu__item:hover .rd-menu__dropdown,
.rd-menu__item:focus-within .rd-menu__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.rd-menu__dropdown a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: #645849;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.rd-menu__dropdown a:hover,
.rd-menu__dropdown a:focus-visible,
.rd-menu__dropdown a.is-active {
  background: rgba(74, 47, 27, 0.04);
  color: var(--green);
  padding-left: 18px;
}

.rd-menu__burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 72px;
  height: 72px;
  margin-left: auto;
  border: 0;
  border-left: 1px solid rgba(74, 44, 16, 0.1);
  background: transparent;
  cursor: pointer;
}

.rd-menu__burger span {
  width: 24px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: var(--brown);
  transition: transform 0.24s ease, opacity 0.18s ease;
}

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

.rd-menu__burger.is-open span:nth-child(2) {
  opacity: 0;
}

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

.rd-menu__mobile {
  display: none;
}

body.rd-menu-open {
  overflow: hidden;
}

body.rd-consult-open {
  overflow: hidden;
  padding-right: var(--rd-scrollbar-compensation, 0px);
}

body.rd-consult-open .rd-menu {
  right: var(--rd-scrollbar-compensation, 0px);
}

@media (max-width: 1100px) {
  body {
    padding-top: 96px;
  }

  .rd-menu__shell {
    border-left: 0;
    border-right: 0;
  }

  .rd-menu__brand {
    min-width: 190px;
    padding: 0 24px;
  }

  .rd-menu__center {
    padding: 0 12px;
  }

  .rd-menu__link {
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 1180px) {
  body {
    padding-top: 88px;
  }

  .rd-menu {
    height: 64px;
  }

  .rd-menu__brand {
    min-width: 0;
    padding: 0 20px;
    border-right: 0;
  }

  .rd-menu__logo img {
    height: 44px;
    max-height: 48px;
  }

  .rd-menu__center {
    display: none;
  }

  .rd-menu__actions {
    margin-left: auto;
  }

  .rd-menu__burger {
    display: flex;
    margin-left: 0;
    width: 64px;
    height: 64px;
  }

  .rd-menu__mobile {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100dvh - 64px);
    min-height: calc(100vh - 64px);
    display: block;
    padding: 18px max(18px, calc((100vw - 1280px) / 2 + 18px)) 88px;
    overflow-y: auto;
    background: #f4efe7;
    border-top: 1px solid rgba(74, 44, 16, 0.08);
    box-shadow: 0 18px 42px rgba(74, 47, 27, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .rd-menu__mobile.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .rd-menu__mobile-link,
  .rd-menu__mobile-head {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid rgba(74, 44, 16, 0.09);
    background: transparent;
    color: #4a4037;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
  }

  .rd-menu__mobile-head span {
    color: var(--green);
    font-size: 18px;
    font-weight: 500;
    transition: transform 0.2s ease;
  }

  .rd-menu__mobile-head.is-open span {
    transform: rotate(45deg);
  }

  .rd-menu__mobile-sub {
    display: none;
    max-width: 680px;
    margin: 0 auto;
    padding: 8px 0 16px 18px;
    border-bottom: 1px solid rgba(74, 44, 16, 0.09);
  }

  .rd-menu__mobile-sub.is-open {
    display: block;
  }

  .rd-menu__mobile-sub a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #746653;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .rd-menu__mobile-link.is-active,
  .rd-menu__mobile-sub a.is-active {
    color: var(--green);
    background: rgba(74, 47, 27, 0.04);
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  body {
    padding-top: 96px;
  }

  .rd-menu {
    height: 72px;
  }

  .rd-menu__burger {
    width: 72px;
    height: 72px;
  }

  .rd-menu__mobile {
    top: 72px;
    height: calc(100dvh - 72px);
    min-height: calc(100vh - 72px);
  }
}

@media (max-width: 480px) {
  body {
    padding: 88px 12px 16px;
  }

  .rd-menu__brand {
    padding-left: 16px;
  }

  .rd-menu__logo img {
    height: 40px;
    max-height: 42px;
  }

  .rd-menu__mobile {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ─── Consultation button (desktop) ─────────────────────────── */

.rd-menu__actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0 12px 0 0;
  gap: 8px;
  flex-shrink: 0;
}

.rd-menu__consult-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px 0 18px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background-color: var(--green);
  background-image: linear-gradient(to right, var(--green), #2b5876, #485563, #4e4376);
  background-size: 300% 100%;
  background-position: 0 0;
  color: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: background-position 0.42s ease-in-out, transform 0.15s ease, box-shadow 0.24s ease;
  box-shadow: 0 4px 15px 0 rgba(45, 54, 65, 0.45);
}

.rd-menu__consult-btn:hover,
.rd-menu__consult-btn:focus-visible {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px 0 rgba(45, 54, 65, 0.75);
}

.rd-menu__consult-btn:active {
  transform: translateY(0);
}

.rd-menu__consult-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.85;
}

@media (max-width: 1180px) {
  .rd-menu__actions {
    padding-right: 10px;
  }

  .rd-menu__consult-btn {
    height: 38px;
    padding: 0 15px;
    font-size: 10.5px;
    letter-spacing: 0.07em;
  }
}

@media (max-width: 420px) {
  .rd-menu__consult-btn {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

  .rd-menu__consult-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .rd-menu__consult-icon {
    width: 16px;
    height: 16px;
  }
}

/* ─── Consultation button (mobile menu) ─────────────────────── */

.rd-menu__mobile-consult-wrap {
  max-width: 680px;
  width: 100%;
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
}

.rd-menu__mobile-consult-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  height: 50px;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.rd-menu__mobile-consult-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

.rd-menu__mobile-consult-btn:active {
  background: var(--green-dark, #2d6b3a);
}

/* ─── Consultation popup ─────────────────────────────────────── */

.rd-consult-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(30, 20, 10, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.rd-consult-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.rd-consult-popup {
  position: relative;
  background: #fffdf9;
  border-radius: 24px;
  border: 1px solid rgba(74, 44, 16, 0.1);
  box-shadow: 0 32px 72px rgba(40, 25, 8, 0.2);
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 28px;

  transform: translateY(12px) scale(0.97);
  transition: transform 0.26s cubic-bezier(0.22, 0.84, 0.44, 1), opacity 0.22s ease;
  opacity: 0;
}

.rd-consult-overlay.is-open .rd-consult-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.rd-consult-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(74, 44, 16, 0.07);
  color: #7a6850;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.rd-consult-popup__close:hover {
  background: rgba(74, 44, 16, 0.14);
  color: #3a2a18;
}

.rd-consult-popup__close svg {
  width: 12px;
  height: 12px;
}

.rd-consult-popup__title {
  font-family: 'Charis SIL', serif;
  font-size: 22px;
  font-weight: 700;
  color: #2e200f;
  margin: 0 0 4px;
  line-height: 1.2;
}

.rd-consult-popup__sub {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #9a8874;
  margin: 0 0 22px;
}

.rd-consult-popup__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rd-consult-popup__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.rd-consult-popup__link:hover {
  transform: translateX(3px);
}

/* WhatsApp */
.rd-consult-popup__link--wa {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.2);
}
.rd-consult-popup__link--wa:hover {
  background: rgba(37, 211, 102, 0.14);
}
.rd-consult-popup__link--wa .rd-consult-popup__link-icon {
  background: #fff;
}

.rd-consult-popup__link--wa .rd-consult-popup__link-label strong {
  color: #1a7a3c;
}

.rd-consult-popup__link--wa .rd-consult-popup__link-icon svg {
  fill: #25d366;
}

/* Telegram */
.rd-consult-popup__link--tg {
  background: rgba(40, 160, 240, 0.08);
  border-color: rgba(40, 160, 240, 0.2);
}
.rd-consult-popup__link--tg:hover {
  background: rgba(40, 160, 240, 0.14);
}
.rd-consult-popup__link--tg .rd-consult-popup__link-icon {
  background: #fff;
}
.rd-consult-popup__link--tg .rd-consult-popup__link-label strong {
  color: #1262a0;
}
.rd-consult-popup__link--tg .rd-consult-popup__link-icon svg {
  fill: #28a0f0;
}

/* VK */
.rd-consult-popup__link--vk {
  background: rgba(0, 119, 255, 0.07);
  border-color: rgba(0, 119, 255, 0.18);
}
.rd-consult-popup__link--vk:hover {
  background: rgba(0, 119, 255, 0.12);
}
.rd-consult-popup__link--vk .rd-consult-popup__link-icon {
  background: #fff;
}
.rd-consult-popup__link--vk .rd-consult-popup__link-label strong {
  color: #004eaa;
}
.rd-consult-popup__link--vk .rd-consult-popup__link-icon svg {
  fill: #0077ff;
}

.rd-consult-popup__link-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(45, 54, 65, 0.1);
}

.rd-consult-popup__link-icon svg {
  width: 24px;
  height: 24px;
}

.rd-consult-popup__link-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rd-consult-popup__link-label strong {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.rd-consult-popup__link-label span {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #9a8874;
  line-height: 1;
}

.rd-consult-popup__link-arrow {
  font-size: 24px;
  color: #c0aa90;
  transition: transform 0.15s ease;
}

.rd-consult-popup__link:hover .rd-consult-popup__link-arrow {
  transform: translateX(3px);
}

/* Mobile popup adjustments: bottom sheet style */
@media (max-width: 520px) {
  .rd-consult-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .rd-consult-popup {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 28px 20px 36px;
    transform: translateY(24px);
  }

  .rd-consult-overlay.is-open .rd-consult-popup {
    transform: translateY(0);
  }
}
