:root {
  --plum-dark: #3a2350;
  --purple: #8e3fa0;
  --purple-bright: #a84fc0;
  --purple-light: #f6effa;
  --ink: #23202b;
  --gray: #6b6470;
  --white: #ffffff;
  --header-h: 100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans Armenian', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(35, 32, 43, 0.10);
  border-bottom: 1px solid #e9e6ec;
}

.header-inner {
  width: 100%;
  margin: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 40px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 52px;
  width: auto;
  display: block;
}

/* ============ NAV ============ */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover,
.nav-toggle[aria-expanded="true"] {
  background: var(--purple-light);
  color: var(--purple);
}

.caret {
  font-size: 16px;
  transition: transform 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

/* Submenu (desktop = dropdown) */
.has-submenu {
  position: relative;
}
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(58, 35, 80, 0.16);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.has-submenu.open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li a {
  display: block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.submenu li a:hover {
  background: var(--purple-light);
  color: var(--purple);
}

/* Call button */
.call-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 30px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.call-btn:hover {
  background: var(--plum-dark);
  transform: translateY(-1px);
}

/* Мобильная кнопка звонка — скрыта на десктопе по умолчанию */
.call-btn.mobile-call {
  display: none;
}

/* Burger (mobile only) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ MODAL: Заказать звонок ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 32, 43, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(35, 32, 43, 0.25);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--purple-light);
  color: var(--gray);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
  background: var(--purple);
  color: var(--white);
}

.modal-box h3 {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  padding-right: 24px;
}

.callback-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.callback-form input {
  padding: 14px 16px;
  border: 1px solid #ddd6e2;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
.callback-form input:focus {
  outline: none;
  border-color: var(--purple);
}

.submit-btn {
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover { background: var(--plum-dark); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  margin: 14px 0 0;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}
.form-status.success { color: #256c25; }
.form-status.error { color: #a83232; }

@media (max-width: 960px) {
  .header-inner { gap: 16px; }

  .call-btn { display: none; }
  .burger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .main-nav.open { transform: translateX(0); }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
  }

  .has-submenu .submenu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    padding: 0 8px;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .has-submenu.open .submenu {
    max-height: 600px;
    padding: 8px;
  }

  .submenu li a {
    padding: 13px 16px;
    font-size: 15px;
  }

  .call-btn.mobile-call {
    display: flex;
    justify-content: center;
    margin: 16px 8px 8px;
  }
}