.header {
  position: fixed;
  width: 100%;
  background: var(--c_milk);
  border-bottom: 1px solid var(--c_greylight);
  z-index: 10;
}

/* Описание обертки и сетки шапки. Ключевая переменная --header-height, заданая в root и базово равная 3rem определяет все остальные элементы в шапке, в том числе размеры inline svg-логотипов через коэффициент соотношения из ширины и высоты из их viewbox (для логотипа ПЛН это 4.184).
  Сетка задана таким образом, чтобы 1, 3 и 4 колонки занимали размер по контенту, а 2 колонка (где представлены логотипы партнерских сайтов и разделы меню / бургер-иконка меню) - всю оставшуюся от родителя ширину) */  

.header_wrapper {
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem ;
  margin: 0;
  padding: var(--header-h-padding);
}
  
/* Обертка для блока логотипа, чтобы высчитать её ширину по формуле: (высота шапки - (высота внутреннего вертикального отступа шапки * 2)) * на коэффициент соотношения ширины и высоты inline svg логотипа) */

.header_logo--wrapper {
  width: calc((var(--header-height) - (var(--header-h-padding) * 2)) * 6.976);
}
  
/* Стилизация логотипа */
.gplogo--el {
  fill:var(--c_plnred)!important;
}

.gplogo--el_white {
  fill:var(--c_milk)!important;
}
  
.header_logo--wrapper:hover .gplogo--el,
.header_logo--wrapper:focus .gplogo--el,
.header_logo--wrapper:target .gplogo--el,
.header_logo--wrapper:active .gplogo--el {
  fill:var(--c_milk)!important;
}
  
.header_logo--wrapper:hover,
.header_logo--wrapper:focus,
.header_logo--wrapper:target,
.header_logo--wrapper:active {
  background:var(--c_plnred)!important;
  box-shadow: 0 -0.2rem 0 var(--header-h-padding) var(--c_plnred);
  -webkit-transition: all .2s ease-out;
  -moz-transition: all .2s ease-out;
  -o-transition: all .2s ease-out;
  transition: all .2s ease-out;
}
  
/* Обертка для блока в хэдере с меню */
.header_navigation--wrapper {
  display: grid;
  grid-template-columns: 1fr min-content;
  gap: 2rem ;
  align-items: center;
}
  
.nav-menubox {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  gap: 2rem ;
}

/* Стилизация меню */
.nav-items {
  display: grid;
  align-items: center;
}
  
.nav-items_links {
  margin-left: 0;
  padding-left: 0;
  list-style-type: none;
  display: flex;
  gap: 2rem;
  column-gap: 2rem;
}

/* Фикс для отступов в старых Safari с gap у flexbox */

@supports not (gap: 2rem) {
  .nav-items_links > * + * {
    margin-right: 1.5rem;
    padding-right: 1.5rem;
  }
}
  
.menublock {
  padding: 0 1ch;
}

.nav-items_links li a {
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.08rem;
  color: var(--c_greyblack);
  -webkit-text-decoration-color: var(--c_plnred)!important;
  text-decoration-color: var(--c_plnred)!important;
}
  
.nav-items_links li a:hover,
.nav-items_links li a:focus,
.nav-items_links li a:active,
.nav-items_links li a:target {
  color: var(--c_plnred);
}
  
.nav-items_links li.menublock:hover,
.nav-items_links li.menublock:focus,
.nav-items_links li.menublock:active,
.nav-items_links li.menublock:target {
  text-decoration: underline 0.8rem;
}
  
/* Стилизация выпадающего меню */
  .nav-items_links ul {
  position: absolute;
  height: auto;
  list-style-type: square;
  background: var(--c_milk);
  box-shadow: var(--shadow_sm);
  padding: 1.1rem 1.3rem;
  top: 2.15rem;
  background-clip: padding-box;
  opacity: 0;
  visibility: hidden;
}
  
.nav-items_links li:hover ul{
  opacity: 1;
  visibility: visible;
}
  
.nav-items_links ul li a{
  display: block;
  width: 100%;
  line-height: 1.5rem;
}
  
.nav-items_links ul li::marker{
  font-size: 1.8rem;
  -webkit-transition: all 0.2s ease-in-out;
  -moz-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
} 

.nav-items_links ul li:hover,
.nav-items_links ul li:focus,
.nav-items_links ul li:target,
.nav-items_links ul li:active > li::marker {
  -webkit-transform: scale(1.11);
  -ms-transform: scale(1.11);
  transform: scale(1.11);
}
  
.buttonplace-menu{
  opacity: 0;
  visibility: hidden;
}
  
/* Адаптивное меню  */
@media screen and (max-width: 870px) {
  .buttonplace-menu{
    opacity: 1;
    visibility: visible;
  }

  .nav-items {
      margin-top: 15rem;
  }

  .nav-menubox{
      flex-direction: column;
      justify-content: center; 
      position: fixed;
      background: var(--c_greylight);
      max-height: calc(100% - var(--header-height));
      width: 100%;
      top: var(--header-height);
      left: -100%;
      margin-left: 0;
      padding: 1.5rem;
      overflow-x: hidden;
      overflow-y: scroll!important;
      transition: all .2s ease-in-out;  
  }

  .nav-menubox.active{
      left: 0;
  }

  .nav-partners{
      padding-bottom: 1.5rem;
      border-bottom: 1px solid var(--c_grey);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 2rem;
      align-items: center;
  }

  .nav-items_links{
      font-size: 1.2rem;
      flex-direction: column;
  }

  .plnfmlogo--wrapper,
  .cdilogo--wrapper {
      margin: 0 auto;
      max-width: 8rem;
  }

  /* Стилизация выпадающего меню в мобильном виде */

  .nav-items_links ul{
      position: static;
      opacity: 1;
      visibility: visible;
      background: none;
      box-shadow: none;
      border-bottom: none;
      top: 0;
      padding: 1rem 1rem 1rem 0.8rem
  }

  .nav-items_links li.menublock:hover,
  .nav-items_links li.menublock:focus,
  .nav-items_links li.menublock:active,
  .nav-items_links li.menublock:target {
      text-decoration: none;
  }  

  .nav-items_links ul li{
      margin: 0 1rem;
  }

  .nav-items_links ul li a{
      font-size: 1.1rem;
  } 
}
  
/* Стилизация блока кнопок поиска и аутентификации (логина) */
.nav-service {
  width: auto;
  height: calc((var(--header-height) - (var(--header-h-padding) * 2)));
  display: grid;
  grid-template-areas: "servicearea-menu";
  gap: 2.5rem;
  align-items: stretch;
  justify-content: end;
  position: absolute;
  right: var(--header-h-padding);
}
  
.buttonplace-menu {
  grid-area: servicearea-menu;
}
  
.button_icon {
  fill: var(--c_plnred)!important;
  width: calc(var(--header-height) - (var(--header-h-padding) * 2.6));
  cursor: pointer;
}
  
.button_icon:hover,
.button_icon:target,
.button_icon:focus,
.button_icon:active {
  fill: var(--c_plnred)!important;
}
  
.button_svg {
  stroke: var(--c_plnred);
  stroke-width: var(--icon_big--stroke); 
  stroke-linecap: round;
  stroke-linejoin: round; 
  stroke-miterlimit: var(--icon_big--stroke);
}
  
.button_svg:hover,
.button_svg:target,
.button_svg:focus,
.button_svg:active {
  stroke: var(--c_plnred)!important;
}
  
/* Служебные классы для скрипта, скрывающего и отображающего кнопки*/
  
.buttonplace-menu,
.buttonplace-search,
.buttonplace-login {
  position: relative;
}
  
.button_menu,
.button_search,
.button_login,
.button_avatar {
  position: absolute;
  top: 0;
  right: 0;
}

.footer--wrapper {
  padding: 3rem 0;
  margin: 0;
}

.footer_logo {
  width: 100%;
  max-width: 20rem;
}