/*!
 * Руссмастер — Хедер v1.0
 * Namespace: .site-top (обёртка топбара + шапки). Все стили ограничены
 * этим неймспейсом и не конфликтуют с темой.
 */

.site-top {
  --rm-orange: #FF6B00;
  --rm-orange-dark: #E55A00;
  --rm-orange-soft: #FFF2E5;
  --rm-black: #0A0A0A;
  --rm-text-muted: #555555;
  --rm-border: #E5E5E7;

  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Manrope", sans-serif;
}
.site-top.is-stuck { box-shadow: 0 6px 24px rgba(10,10,10,.08); }
.site-top * { box-sizing: border-box; }

/* ── Топбар ────────────────────────────────────── */
.site-top .topbar {
  background: linear-gradient(90deg, #0A0A0A 0%, #141414 100%);
  color: #fff;
  font-size: 13px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: max-height .3s ease, padding .3s ease, opacity .25s ease;
  max-height: 60px;
  overflow: hidden;
}
.site-top.is-stuck .topbar { max-height: 0; padding: 0; opacity: 0; }
.site-top .topbar .rm-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.site-top .topbar a { color: #fff; text-decoration: none; }
.site-top .topbar a:hover { color: var(--rm-orange); }
.site-top .topbar-left,
.site-top .topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-top .topbar-left span,
.site-top .topbar-right span { opacity: .85; }

.site-top .status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 8px;
  background: rgba(31,157,85,.14);
  color: #6EE7A6;
  border: 1px solid rgba(31,157,85,.35);
  border-radius: 999px;
  font-weight: 600; font-size: 12px; letter-spacing: .01em;
  opacity: 1 !important;
}
.site-top .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,.8);
  animation: rm-pulse-dot 1.8s ease-out infinite;
}
@keyframes rm-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.75); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.site-top .rating-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 12px; color: #fff;
  opacity: 1 !important;
}
.site-top .rating-chip .stars { color: #FFB72E; letter-spacing: 1px; }
.site-top .rating-chip small { opacity: .7; font-size: 12px; }

/* ── Шапка ─────────────────────────────────────── */
.site-top .header {
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rm-border);
  transition: padding .25s ease, background .25s ease;
  position: relative;
}
.site-top.is-stuck .header {
  background: rgba(255,255,255,.96);
  border-bottom-color: transparent;
}
.site-top .header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--rm-orange) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.site-top.is-stuck .header::after { opacity: 1; }

.site-top .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  transition: padding .25s ease;
}
.site-top.is-stuck .header-inner { padding-top: 10px; padding-bottom: 10px; }

/* ── Лого ──────────────────────────────────────── */
.site-top .logo {
  font-weight: 900; font-size: 22px; letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--rm-black); text-decoration: none;
}
.site-top .logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #FF8A2B 0%, #FF6B00 50%, #E55A00 100%);
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 6px 14px rgba(255,107,0,.32), inset 0 -2px 0 rgba(0,0,0,.08);
  position: relative;
  transition: transform .25s ease;
  flex: 0 0 auto;
}
.site-top .logo:hover .logo-mark { transform: rotate(-6deg) scale(1.04); }
.site-top .logo-mark svg { width: 22px; height: 22px; }
.site-top .logo .accent { color: var(--rm-orange); }
.site-top .logo-sub {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--rm-text-muted); letter-spacing: .04em;
  text-transform: uppercase; margin-top: 2px;
}

/* ── Nav ───────────────────────────────────────── */
.site-top .nav { display: flex; gap: 26px; margin-left: auto; flex-wrap: wrap; }
.site-top .nav a {
  font-weight: 600; font-size: 15px;
  padding: 6px 0;
  position: relative;
  color: var(--rm-black);
  text-decoration: none;
  transition: color .2s ease;
}
.site-top .nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--rm-orange);
  transform-origin: left; transform: scaleX(0);
  transition: transform .28s cubic-bezier(.65,.05,.36,1);
  border-radius: 2px;
}
.site-top .nav a:hover::after,
.site-top .nav a.active::after,
.site-top .nav a.current::after,
.site-top .nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-top .nav a.active,
.site-top .nav a.current,
.site-top .nav a[aria-current="page"] { color: var(--rm-orange); }

/* ── CTA-блок ──────────────────────────────────── */
.site-top .header-cta { display: flex; align-items: center; gap: 18px; }
.site-top .phone-block {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--rm-black);
}
.site-top .phone-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--rm-orange-soft); color: var(--rm-orange);
  display: grid; place-items: center;
  position: relative;
  flex: 0 0 auto;
  transition: background .2s ease, color .2s ease;
}
.site-top .phone-icon svg { width: 16px; height: 16px; }
.site-top .phone-icon::before {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--rm-orange); opacity: 0;
  animation: rm-phone-ring 2.4s ease-out infinite;
}
@keyframes rm-phone-ring {
  0%   { transform: scale(1); opacity: .7; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.site-top .phone-block:hover .phone-icon { background: var(--rm-orange); color: #fff; }
.site-top .phone-block .phone-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-top .phone-block .phone-text b {
  font-weight: 800; font-size: 17px; letter-spacing: -.01em;
  color: var(--rm-black);
}
.site-top .phone-block .phone-text small { color: var(--rm-text-muted); font-size: 11px; margin-top: 3px; }
.site-top .phone-block:hover .phone-text b { color: var(--rm-orange); }

.site-top .btn-rm {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--rm-orange); color: #fff;
  font-weight: 700; font-size: 15px; line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: 0 10px 22px rgba(255,107,0,.28);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.site-top .btn-rm:hover {
  background: var(--rm-orange-dark); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255,107,0,.38);
}
.site-top .btn-rm .arr { transition: transform .2s ease; }
.site-top .btn-rm:hover .arr { transform: translateX(3px); }

/* ── Бургер ────────────────────────────────────── */
.site-top .burger {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 0; border-radius: 10px;
  transition: background .2s ease;
}
.site-top .burger:hover { background: var(--rm-orange-soft); }
.site-top .burger span {
  height: 2px; width: 22px;
  background: var(--rm-black);
  border-radius: 2px; display: block;
  margin: 0 auto;
  transition: transform .25s ease, opacity .2s ease;
}
.site-top .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-top .burger.is-open span:nth-child(2) { opacity: 0; }
.site-top .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Мобильный ─────────────────────────────────── */
@media (max-width: 980px) {
  .site-top .burger { display: flex; }
  .site-top .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,.08);
    display: none;
    border-top: 1px solid var(--rm-border);
    gap: 14px;
    margin-left: 0;
  }
  .site-top .nav a { font-size: 17px; padding: 8px 0; }
  .site-top .nav a::after { display: none; }
  .site-top .nav a.active,
  .site-top .nav a.current,
  .site-top .nav a[aria-current="page"] {
    border-left: 3px solid var(--rm-orange);
    padding-left: 10px;
  }
  .site-top .nav.open { display: flex; }
  .site-top .btn-rm { padding: 11px 18px; font-size: 14px; }
}
@media (max-width: 720px) {
  .site-top .header-cta .phone-block .phone-text { display: none; }
  .site-top .header-cta { gap: 10px; }
  .site-top .topbar { font-size: 12px; padding: 8px 0; }
  .site-top .topbar-left,
  .site-top .topbar-right { gap: 10px; }
  .site-top .topbar-right { display: none; }
  .site-top .rating-chip { display: none; }
}
