.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: none;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Легкая линия снизу для красоты */
}

/* Контейнер для содержимого шапки */
.header-content {
    height: 100px; /* Чуть увеличил высоту, так как логотип большой */
    display: flex;
    align-items: center;
}

/* Логотип */
.logo img {
    height: 90px;
    width: auto;
    display: block;
    position: relative;
    top: 5px; /* Небольшая коррекция */
}

/* --- НАВИГАЦИЯ (МЕНЮ) --- */
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1; 
    margin-left: 40px; /* Отступ от логотипа */
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px; /* Расстояние между ссылками */
    align-items: center;
    padding: 0;
    margin: 0;
    
    /* ГЛАВНОЕ: Толкаем правую часть (кнопку) в конец */
    margin-right: auto; 
}

/* Ссылки меню */
.nav-menu a {
    text-decoration: none;
    color: #8c2388; /* Цвет бренда */
    font-weight: 600;
    font-size: 18px; /* 22px слишком много, 18-20px оптимально */
    white-space: nowrap;
    transition: color 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.nav-menu a:hover {
    color: #5e175c;
}

/* --- ПРАВАЯ ЧАСТЬ (ЯЗЫК И КНОПКА) --- */
/* Эти стили пропали, поэтому кнопка сломалась. Возвращаем их: */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px; /* Расстояние между RU и Кнопкой */
}

.lang-switch {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
    color: #8c2388;
    text-decoration: none;
}

.btn-signup {
    background-color: #8c2388; /* Фиолетовый фон */
    color: #fff !important;    /* Белый текст (важно!) */
    padding: 12px 30px;        /* Размер кнопки */
    border-radius: 50px;       /* Овальная форма */
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(140, 35, 136, 0.2);
}

.btn-signup:hover {
    background-color: #701c6d;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(140, 35, 136, 0.3);
}

/* --- ВЫПАДАЮЩЕЕ МЕНЮ (DROPDOWN) --- */
.menu-item-has-children {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
    cursor: pointer;
}

.arrow {
    display: inline-block;
    width: 8px; 
    height: 8px; 
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg); 
    margin-left: 8px; 
    margin-bottom: 3px; 
    transition: transform 0.3s;
}

.menu-item-has-children:hover .arrow {
    transform: rotate(225deg);
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    background-color: #fff;
    min-width: 260px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 0;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1100;
    
    display: block !important;
    border-top: 4px solid #8c2388;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    display: block;
    margin: 0;
}

.sub-menu a {
    display: block;
    padding: 12px 25px;
    font-size: 16px; 
    color: #333 !important;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

.sub-menu a:hover {
    background-color: #fcf4fc;
    color: #8c2388 !important;
    padding-left: 30px;
}



/* =========================
   REAL HAMBURGER + DRAWER
   ========================= */

/* button */
/* ===== REAL hamburger ===== */
.nav-toggle{
    display:none;
    width:44px;height:44px;
    border:1px solid rgba(0,0,0,.08);
    border-radius:12px;
    background:#fff;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    gap:6px;
    z-index:2001;
  }
  .nav-toggle span{
    width:20px;height:2px;
    background:#8c2388;
    border-radius:2px;
    display:block;
    transition:.25s ease;
  }
  
  /* overlay */
  .nav-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:.25s ease;
    z-index:2000;
  }
  
  /* ---------- MOBILE DRAWER ---------- */
/* =========================
   MOBILE HEADER + DRAWER NAV
   ========================= */

/* Hamburger button */
.nav-toggle{
    display:none;
    width:44px;height:44px;
    border:1px solid rgba(0,0,0,.08);
    border-radius:12px;
    background:#fff;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    gap:6px;
    z-index:2001;
  }
  .nav-toggle span{
    width:20px;height:2px;
    background:#8c2388;
    border-radius:2px;
    display:block;
    transition:.25s ease;
  }
  
  /* Overlay (created by JS) */
  .nav-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:.25s ease;
    z-index:2000;
  }
  
  /* OPEN state */
  body.nav-open .nav-overlay{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  
  /* Mobile layout */
  @media (max-width: 992px){
    /* show hamburger */
    .nav-toggle{ display:inline-flex; }
  
    /* keep header row clean */
    .header-content{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      padding: 12px 16px; /* optional if your container is tight */
    }
  
    .logo img{
      height: 54px;
      width: auto;
      display:block;
    }
  
    /* NAV becomes a drawer */
    .nav-menu{
      position:fixed;
      top:0;
      right:0;
      height:100vh;
      width:min(86vw, 360px);
      background:#fff;
      z-index:2002;
  
      padding:18px 16px;
      display:flex;
      flex-direction:column;
      gap:12px;
  
      transform:translateX(105%);
      transition:.25s ease;
      box-shadow:-20px 0 60px rgba(0,0,0,.18);
      border-radius:18px 0 0 18px;
    }
  
    body.nav-open .nav-menu{ transform:translateX(0); }
  
    /* list inside drawer */
    .nav-menu ul{
      position:static !important;
      margin:0;
      padding:0;
      list-style:none;
  
      display:flex !important; /* overrides any display:none in your old mobile rules */
      flex-direction:column;
      gap:6px;
  
      box-shadow:none !important;
      transform:none !important;
    }
  
    .nav-menu a{
      display:block;
      padding:14px 14px;
      border-radius:14px;
      font-size:16px;
    }
    .nav-menu a:hover{ background:#fcf4fc; }
  
    /* put actions at bottom */
    .header-actions{
      margin-top:auto;
      display:flex;
      gap:12px;
      padding-top:12px;
      border-top:1px solid rgba(0,0,0,.08);
    }
    .btn-signup{
      flex:1;
      text-align:center;
    }
  
    /* Submenu accordion (works with JS toggling .is-open) */
    .menu-item-has-children .sub-menu{
      max-height:0;
      overflow:hidden;
      padding:0 0 0 14px;
      transition:max-height .25s ease;
    }
    .menu-item-has-children.is-open .sub-menu{
      max-height:400px;
      padding-top:6px;
    }
  
    .menu-item-has-children .arrow{
      display:inline-block;
      margin-left:6px;
      transition:transform .25s ease;
    }
    .menu-item-has-children.is-open .arrow{
      transform:rotate(180deg);
    }
  }
  
  /* hamburger -> X */
  body.nav-open .nav-toggle span:nth-child(1){ transform:translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2){ opacity:0; }
  body.nav-open .nav-toggle span:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }