/* =====================================================================
   Плавающая стеклянная шапка (ТЗ п.1).
   Фиксирована сверху, frosted glass, активный/hover пункт — оранжевый.
   Mobile: бургер-меню (стандартный паттерн — мобильного макета шапки нет).
   ===================================================================== */


.site-header {
  position: fixed;
  top: 25px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 58px);
  max-width: 2560px;
  z-index: 80;
  font-family: "SF Pro Display", "SF UI Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  transition: top .3s ease;
  will-change: top;
}
.site-header.is-scrolled {
  top: -5px;
}
.site-header__bar {
    position: relative;
    box-sizing: border-box;
    width: -webkit-fill-available;
    max-width: 100%;
    height: 105px;
    margin: 24px 29px;
    display: flex;
    align-items: center;
    padding: 0 45px;
    border-radius: 36px;
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 57px rgba(0, 0, 0, 0.2);
    color: #fff;
    justify-content: space-between;
}

/* Матовое стекло вынесено на псевдоэлемент.
   Если оставить backdrop-filter на самом .site-header__bar, он создаёт контекст
   наложения — и подменю с z-index: -1 не сможет уйти под шапку.
   Здесь ::after и подменю оба лежат на слое -1, а порядок между ними задаёт
   дерево: псевдоэлемент идёт последним, значит рисуется поверх панели. */
.site-header__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 36px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

.site-header__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 36px;
    padding: 1px;
    /*background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.2) 100%);*/
    background-color: rgba(255,255,255,0.2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}


.site-header__brand { display: flex; align-items: center; gap: 11px; flex: none; }
.site-header__text { display: flex; flex-direction: column; justify-content: center; }
.site-header__logo { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; flex: none; }
.site-header__logo svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.site-header__name {
  font-size: 26px;
  font-family: "SF Pro Display", "SF UI Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.05;
}
.site-header__slogan { font-size: 14px; color: rgba(255,255,255,.6); }

.site-header__lang {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06); color: #fff; font-size: 18px; font-weight: 400; cursor: pointer;
  position: relative;
  margin-left: 40px;
}
.site-header__langlist {
  position: absolute; top: calc(100% + 12px); right: 0;
  list-style: none; margin: 0; padding: 12px 20px; display: flex; flex-direction: column; gap: 12px;
  background: rgba(18,18,22,.9); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  min-width: 120px; text-align: left; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s, transform .2s ease;
  transform: translateY(-8px);
}
.site-header__lang:hover .site-header__langlist { opacity: 1; visibility: visible; transform: translateY(0); }
.site-header__langlist li { display: block; }
.site-header__langlist a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s ease; }
.site-header__langlist a:hover { color: #fff; }

/* Навигация тянется на всю высоту бара: так зона наведения пункта доходит
   до нижнего края шапки и между ссылкой и панелью подменю не остаётся
   «мёртвого» зазора, на котором ховер срывался бы. */
.site-header__nav { display: flex; align-self: stretch; margin: 0 15px; }
.site-header__menu {
  display: flex;
  align-items: stretch;
  gap: clamp(28px, 2.5vw, 42px);
  margin: 0; padding: 0;
  list-style: none;
}
.site-header__menu > li { 
  position: relative;
  display: flex; 
  align-items: center;
  padding: 25px 0;
}
.site-header__menu > li > a { white-space: nowrap; color: rgba(255,255,255,.9); font-size: 18px; font-weight: 500; transition: color .2s ease; }
.site-header__menu > li > a:hover,
.site-header__menu > li > a.is-active { color: var(--orange); }

/* родитель подсвечен, пока открыта его панель */
.site-header__menu-item--has-sub:hover > a,
.site-header__menu-item--has-sub:focus-within > a { color: var(--orange); }

/* ---------- Выпадающее подменю (десктоп) ---------- */

.site-header__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: -1;                 /* уводит панель под фон и стекло шапки */
  margin-top: 0;           /* глубина «подныривания» под бар */
  padding: 22px;     /* 26px + компенсация тех самых 12px сверху */
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(20, 21, 22, .34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.site-header__menu-item--has-sub:hover > .site-header__submenu,
.site-header__menu-item--has-sub:focus-within > .site-header__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
  z-index: 1;
}

/* 6 пунктов → 2 колонки по 3. Заполнение идёт по колонкам, как в макете.
   Седьмой пункт добавит третью колонку — при необходимости поменяйте
   grid-template-rows на нужное число строк. */
.site-header__sublist {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  column-gap: 56px;
  row-gap: 26px;
  margin: 0; padding: 0;
  list-style: none;
}

.site-header__sublist a {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  transition: color .2s ease;
}
.site-header__sublist li:hover a,
.site-header__sublist a.is-active { color: var(--orange); }
.site-header__sublist li:hover svg,
.site-header__sublist li:hover svg path {
  fill: var(--orange);
}

/* Иконка рисуется маской, поэтому красится currentColor вместе с текстом.
   Замена на боевую из Figma = подмена одного --icon ниже. */
.site-header__subicon {
  flex: none;
  width: 20px;
  height: 20px;
  /*background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;*/
}

/* --- ПЛЕЙСХОЛДЕРЫ ИКОНОК --- */
/*.site-header__sublist .icon-amazon  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%207.5%2012%203l9%204.5v9L12%2021l-9-4.5v-9Z'/><path%20d='m3%207.5%209%204.5%209-4.5'/><path%20d='M12%2012v9'/></svg>"); }
.site-header__sublist .icon-arbitrage  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='12'%20cy='12'%20r='8.5'/><path%20d='M8%2010h6.5a2%202%200%200%201%200%204H10l1.8%201.8M16%2014h-6.5a2%202%200%200%201%200-4H14'/></svg>"); }
.site-header__sublist .icon-wholesale  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M3%209.5%2012%204l9%205.5V20H3V9.5Z'/><path%20d='M9%2020v-6h6v6'/><path%20d='M3%2012h18'/></svg>"); }
.site-header__sublist .icon-consulting  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M4%2013v-1a8%208%200%200%201%2016%200v1'/><path%20d='M4%2013h2.5v5H5a1%201%200%200%201-1-1v-4Zm16%200h-2.5v5H19a1%201%200%200%200%201-1v-4Z'/><path%20d='M17.5%2018v.5a2.5%202.5%200%200%201-2.5%202.5h-2'/></svg>"); }
.site-header__sublist .icon-unlock  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><rect%20x='4'%20y='10.5'%20width='16'%20height='10.5'%20rx='2.5'/><path%20d='M8%2010.5V7a4%204%200%200%201%207.6-1.7'/><circle%20cx='12'%20cy='15.5'%20r='1.4'/></svg>"); }
.site-header__sublist .icon-other  { --icon: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'><path%20d='M6%203h8l4%204v14H6V3Z'/><path%20d='M14%203v4h4'/><path%20d='M9%2012h6M9%2016h6'/></svg>"); }
*/
.site-header__phone { color: #fff; font-weight: 500; font-size: 19px; white-space: nowrap; }
.site-header__cta {
  display: inline-flex; align-items: center; padding: 14px 25px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); color: #fff; font-weight: 400; font-size: 18px;
  transition: background .2s ease;
}
.site-header__cta:hover { background: rgba(255,255,255,.12); }

/* Бургер (моб.) */
.site-header__burger { display: none; flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); cursor: pointer; }
.site-header__burger span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px auto; transition: transform .25s ease, opacity .25s ease; }
.site-header.is-open .site-header__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .site-header__burger span:nth-child(2) { opacity: 0; }
.site-header.is-open .site-header__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное выпадающее меню */
.site-header__mobile {
  display: none; margin: 8px auto 0; max-width: 1360px;
  padding: 18px; border-radius: 24px;
  background: rgba(18,18,22,.9); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.site-header.is-open .site-header__mobile { display: block; }
.site-header__mobile a { display: block; white-space: nowrap; padding: 12px 6px; color: #fff; font-size: 17px; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header__mobile a:hover { color: var(--orange); }
.site-header__mobile .site-header__cta { margin-top: 14px; width: 100%; justify-content: center; }
@media (max-width: 1600px) {
    .site-header__menu > li > a {
      font-size: 16px;
  }
  .site-header__sublist a {
    font-size: 17px;
  }
  .site-header__phone {
    font-size: 18px;
  }
}
@media (max-width: 768px) {

  .site-header__bar::before,
  .site-header__bar::after {
    display: none;
  }
  .site-header__lang, .site-header__nav, .site-header__contact, .site-header__mobile, .site-header__phone, .site-header__cta {
    display: none !important;
  }

  .site-header {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 2560px;
    transform: none;
    left: 0;
    top: 0;
  }
  .site-header__bar {
  position: relative;
    height: 73px;
    background: #141516;
    border-radius: 0;
    padding: 0 20px 0 22px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  

  .site-header__brand {
    align-items: flex-start;
  }
  .site-header__text {
    margin-top: 4px;
  }
  .site-header__name {
      font-size: 18px !important;
      font-weight: 600 !important;
      letter-spacing: 0.02em;
      line-height: 1;
      margin-bottom: 2px;
    }
  .site-header__slogan {
      font-size: 11px !important;
      font-weight: 400 !important;
      line-height: 1;
    }

  .site-header__mobile-icons {
    margin-left: auto;
    display: flex !important;
    align-items: center;
    gap: 33px;
  }
  .site-header__burger {
    display: block;
    width: 24px;
    height: 20px;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
  }
  .site-header__burger span {
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 6px 0;
    border-radius: 2px;
  }
  .site-header__burger span:nth-child(3) {
    display: none;
  }
}
