/* ============================================================
   ШАПКА САЙТА: <header class="site-header" id="siteHeader"> — логотип, меню, кнопка "Войти"/"Кабинет", телефон, поведение при скролле (.scrolled, .header-hidden).
   ============================================================ */

.sh-login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: fit-content; /* ← ключевое */
}

.sh-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFB830, #FF8C00);
    color: #08040C;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(255, 184, 48, 0.2);
    transition: transform 0.25s, box-shadow 0.25s;
    font-family: inherit;
    border: none;
    cursor: pointer;
    order: 1;
}

.sh-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 184, 48, 0.35);
    color: #08040C;
}

.sh-login-btn i {
    font-size: 14px;
}

.sh-login-btn.logged-in {
    background: rgba(0, 230, 138, 0.12);
    border: 1px solid rgba(0, 230, 138, 0.2);
    color: #00E68A !important;
    box-shadow: none;
}

.sh-login-btn.logged-in:hover {
    background: rgba(0, 230, 138, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 230, 138, 0.1);
}

.sh-login-btn.logged-in i {
    color: #00E68A;
}

@media (max-width: 600px) {
    .sh-login-btn {
        width: 40px;
        padding: 0;
        font-size: 0;
        border-radius: 50%;
        min-width: 40px;
        justify-content: center;
    }
    .sh-login-btn i {
        font-size: 16px;
        margin-left:8px;
    }
    .sh-login-btn.logged-in {
        font-size: 0;
    }
}

.sh-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 1024px) {
    .sh-phone {
        display: none;
        order: 2;
    }
    .sh-call-icon {
        display: none !important;
    }
    .sh-login-btn {
        order: 1;
                margin-right:0px;
    }
}

@media (max-width: 1023px) {
    .sh-phone {
        display: none !important;
    }
    .sh-call-icon {
        display: flex !important;
        order: 3;
    }
    .sh-login-btn {
        order: 1;
    }
}

@media (max-width: 480px) {
    .sh-login-btn {
        width: 38px;
        min-width: 38px;
        height: 36px;
        padding: 0;
        font-size: 0;
    }
    .sh-login-btn i {
        font-size: 14px;
        margin-left:8px;
    }
    .sh-call-icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

.sh-nav a.active {
    color: #FFB830;
}

.sh-nav a.active::after {
    width: 100% !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 10px;
  right: 10px;
  z-index: 600;
  padding-top: max(14px, calc(env(safe-area-inset-top, 0px) + 10px));
  padding-bottom: 14px;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
  transition: background 0.35s, border-color 0.35s;
  *background: rgba(8, 4, 12, 0.4);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    border-radius:0px 0px 24px 24px;
}

.site-header.scrolled {
  *background: rgba(8, 4, 12, 0.92);
  border-color: rgba(255, 255, 255, 0.06);
}

.sh-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sh-logo {
  display: flex;
  align-items: end;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.sh-logo-emoji {
  *font-size: 22px;
  filter: drop-shadow(0 0 10px rgba(255, 184, 48, 0.4));
  margin-bottom: -2px;
}

.sh-logo-text {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.sh-nav {
  display: none;
}

.sh-phone {
  display: none;
}

.sh-call-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .sh-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .sh-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    position: relative;
  }
  .sh-nav a:hover {
    color: #fff;
  }
  .sh-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.25s;
  }
  .sh-nav a:hover::after {
    width: 100%;
  }
  .sh-phone {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
  }
  .sh-call-icon {
    display: none;
  }
}

.site-header.header-hidden {
  transform: translateY(-100%) !important;
}

@media (min-width: 1024px) {
  .site-header {
    padding-left: var(--container-px, 48px);
    padding-right: var(--container-px, 48px);
  }
  .site-header.header-hidden {
    transform: translateY(0) !important;
  }
  .sh-nav {
    display: flex !important;
  }
  .sh-phone {
    display: none;
  }
  .sh-call-icon {
    display: none !important;
  }
  body {
    padding-top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px); 
  }
}

@media (max-width: 1023px) {
  .site-header {
    padding-left: var(--container-px, 22px);
    padding-right: var(--container-px, 22px);
  }
  .sh-nav {
    display: none !important;
  }
  .sh-phone {
    display: none !important;
  }
  .sh-call-icon {
    display: flex !important;
  }
  body {
    padding-top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px); 
  }
}

@media (max-width: 480px) {
  .sh-logo-text {
    font-size: 16px;
  }
  .sh-logo-emoji {
    *font-size: 18px;
    margin-bottom: -3px;
  }
  .sh-btn {
    font-size: 11px;
    padding: 0 12px;
    height: 34px;
  }
}

