:root {
  --header-height-desktop-large: 90px;
  --header-height-desktop-medium: 76px;
  --header-height-mobile: 60px;
}

.header {
  --height: var(--header-height-desktop-large);

  height: var(--height);
  position: relative;
  z-index: 1111;
  background: #fff;
}

.header_shadow {
  box-shadow: 0 0 24px rgba(39, 34, 34, .08), 0 0 2px rgb(49, 109, 239, .18);
}

.header_size_medium,
.header_size_medium .header__programs {
  --height: var(--header-height-desktop-medium);
}

.header__inner {
  position: relative;
  z-index: 2;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: background-color;
}

@media (min-width: 992px) {
  .header__inner {
    padding-left: 30px;
    padding-right: 30px;
    transition: background-color .2s ease;
  }
}

@media (max-width: 575.98px) {
  .header {
    height: 70px;
  }
}

.header__inner, .header__container {
  height: 100%;
}

.header__container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 0 15px;
}

.header__leftside, .header__rightside {
  width: 210px;
}

.header__rightside {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
}
.header__wrap-login {
  padding: 5px;
}
.header__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 30px;
  position: relative;
  color: #161A41;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  background: none;
  box-shadow: none;
  text-shadow: none;
}

.header__button::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23161A41" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10.5 7.5 15 12l-4.5 4.5M3 12h11"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  left: 0;
  transition: background-image 0.3s ease;
}

.header__button:hover, .header__button.navbar:hover, .header_show_mobile-menu .header__wrap-login .header__button:hover, .antialiased .header_show_mobile-menu .header__wrap-login .header__button:hover {
  color: #3D5AFE;
  background: none;
  transition: color 0.3s ease;
}

a.header__button.navbar::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23f8fafc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10.5 7.5 15 12l-4.5 4.5M3 12h11"/%3E%3C/svg%3E');
}

.header_show_mobile-menu .header__wrap-login .header__button {
  color: white;
}
#blog .header_show_mobile-menu .header__wrap-login .header__button::before, .header_show_mobile-menu .header__wrap-login .header__button::before, .header_show_mobile-menu .header__wrap-login .header__button.navbar::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10.5 7.5 15 12l-4.5 4.5M3 12h11"/%3E%3C/svg%3E');
}
#blog a.header__button.navbar::before, .offset-top-header-mobile a.header__button.navbar::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23161A41" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10.5 7.5 15 12l-4.5 4.5M3 12h11"/%3E%3C/svg%3E');
}
.header__button:hover::before, a.header__button.navbar:hover::before, .header_show_mobile-menu .header__wrap-login .header__button:hover::before, #blog a.header__button.navbar:hover::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%233D5AFE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10.5 7.5 15 12l-4.5 4.5M3 12h11"/%3E%3C/svg%3E');
}

.header__button-chat {
  cursor: pointer;
  font-size: 0;
  padding: 10px;
  margin-right: 4px;
}

.header__button-chat svg {
  width: 32px;
  height: 32px;
  fill: none;
  opacity: 0.2;
  transition: all .2s ease;
}
.header__button-chat_active::before {
  top: 10px;
  right: 9px;
}

.header__button-chat:hover svg {
  opacity: .4;
}

.header_show_catalog .header__button-chat svg, 
.header_show_mobile-menu .header__button-chat svg {
  fill: #ffffff;
  opacity: 1;
}
.offset-top-header-mobile .navbar__link, .offset-top-header-mobile .header__button, .offset-top-header-mobile .header__navbar .bluegreentextfon span {
  font-weight: 500 !important;
}

.antialiased .header_shadow {
  box-shadow: none;
}

.header__mobile-burger {
  display: none;
  background: none;
  border: none;
  font-size: 0;
  cursor: pointer;
  padding: 10px;
  margin-right: 8px;
  margin-left: -12px;
}

.header__mobile-burger:hover,
.header__mobile-burger:focus,
.header__mobile-burger:active {
  outline: none;
  background: none;
}

.header__mobile-burger svg {
  width: 24px;
  fill: #161A41;
}

.header__logo {
  display: block;
  height: 60px;
  background: url("https://4brain.ru/images/main/logo-v2.svg") left no-repeat;
  font-size: 0;
  background-size: 140px;
  color: transparent;
  text-decoration: none;
}
@media (max-width: 991.98px) {
  .header__button {
    padding: 12px 6px 12px 30px;
  }
  .header__wrap-login {
    padding-left: 5px;
  }
}

@media (max-width: 767.98px) {
  .header__logo {
    width: 54px;
  }
}

@media (max-width: 575.98px) {
  .header__logo {
    width: 46px;
    background-size: 150px;
  }
}


.header__navbar_active {
  visibility: visible;
  opacity: 1;
  top: 60px;
}

.header__navbar-closed {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.05);
}

.header__navbar_active + .header__navbar-closed {
  display: block;
}

.header__button-dots {
  display: none;
  line-height: 0;
  padding: 12px 6px;
  cursor: pointer;
}

.header__button-dots svg {
  width: 20px;
  fill: #ababab;
}

@media (max-width: 991.98px) {
  .header__button-dots {
    display: inline-block;
  }
}



.header__button, .header__user {
  vertical-align: middle;
}

.header__user {
  width: 50px;
  height: 50px;
  margin: 8px;
  border-radius: 50%;
  display: inline-block;
  background: center/cover no-repeat;
  -webkit-box-shadow: 0px 8px 30px 0px rgba(189, 195, 228, 0.34);
          box-shadow: 0px 8px 30px 0px rgba(189, 195, 228, 0.34);
}

@media (min-width: 992px) {
  .header_show_catalog .header__inner {
    background-color: #23222F;
    box-shadow: 0 1px 0px rgba(249, 249, 255, 0.1);
  }

  .header_show_catalog .header__programs {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }

  .header_show_catalog .header__programs-grid-content,
  .header_show_catalog .header__programs-grid-sidebar {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
    transition: .4s;
    transition-delay: .2s;
  }

  .header_show_catalog .header__programs-grid-sidebar {
    transition-delay: .25s; 
  }

  .header_show_catalog .header__logo {
    background-image: url(https://4brain.ru/about/firstyle/logo-horizontal-white.svg);
  }

  .header_show_catalog .navbar {
    color: #ffffff;
  }

  .header_show_catalog .navbar__link {
    -webkit-text-stroke: .02em rgba(51,51,51,0.50);
  }
}

.header__programs {
  --height: var(--header-height-desktop-large);
  
  background-color: #23222F;
  padding: 62px 0 44px;
  box-shadow: 0px 16px 40px rgba(35, 34, 47, 0.3);
  position: absolute;
  left: 0;
  top: var(--height);
  right: 0;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
  transition: opacity .2s,-webkit-transform .2s;
  transition: opacity .2s,transform .2s;
  transition: opacity .2s,transform .2s,-webkit-transform .2s;
}

.header__programs-link,
.header__programs-footer-link {
  font-family: "Raleway", sans-serif;
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 4px 0 4px 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  -webkit-text-stroke: .025em rgba(51,51,51,0.50);
  transition: color .2s ease-in;
}

.header__programs-link + .header__programs-link {
  margin-top: 10px;
}

.header__programs-link:hover,
.header__programs-footer-link:hover {
  color: #3D5AFE;
}

.header__programs-grid {
  display: grid;
  grid-template-columns: [sidebar] 2fr [content] 1fr;
  max-width: 1200px;
  margin: 0 auto;
}

.header__programs-grid-content,
.header__programs-grid-sidebar {
  padding: 0 34px;
  opacity: 0;
  -webkit-transform: translateY(-25px);
  transform: translateY(-25px);
}

.header__banner {
  display: block;
  margin-left: auto;
  text-decoration: none;
  border-radius: 10px;
  background: rgba(240, 241, 250, 0.1);
  padding: 26px 20px;
  color: #fff;
  width: 218px;
  -webkit-text-stroke: .025em rgba(51,51,51,0.50);
}

.header__banner:hover .header__banner-title {
  color: #3D5AFE;
}

.header__banner-badge {
  display: inline-block;
  font-family: 'Open Sans';
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.04em;
  color: #161A41;
  background: #F9F9FF;
  border-radius: 10px;
  padding: 1px 12px 2px;
}

.header__banner-title {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  margin-top: 28px;
  transition: color .2s ease-in;
}

.header__banner-text {
  font-family: 'Open Sans';
  font-size: 14px;
  line-height: 18px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.header__banner-text b {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}

.header__banner-image {
  width: 84px;
  float: right;
  margin-top: -14px;
  margin-right: -6px;
}

.header__programs-list {
  column-count: 2;
  column-gap: 6%;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(249, 249, 255, 0.1);
}

.header__programs-footer {
  padding-top: 24px;
}

.header__programs-footer-link {
  padding: 0;
}

.header__programs-footer-link-description {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  margin-top: 6px;
}

.header__mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-height-mobile);
  z-index: -1;
  padding: 58px 20px 52px;
  background: #23222F;
  box-shadow: 0px 16px 40px rgba(35, 34, 47, 0.3);
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translateY(-100%);
  transform: translateY(-20px);
  transition: opacity .2s,transform 8s, -webkit-transform 8s;
}

.header__mobile-item,
.header__mobile-banner {
  opacity: 0;
  -webkit-transform: translateX(-25px);
  transform: translateX(-25px);
}

.header__mobile-link {
  display: block;
  font-family: "Raleway", sans-serif;
  font-size: 26px;
  line-height: 28px;
  font-weight: 300;
  color: #ffffff;
  padding: 12px 0;
  text-decoration: none;
}

.header__mobile-link_icon_slide {
  position: relative;
}

.header__mobile-link_icon_slide svg {
  position: absolute;
  width: 16px;
  right: 0;
  top: 19px;
  transition: all .4s ease;
}

.header__mobile-item_active .header__mobile-link_icon_slide svg {
  transform: rotate(180deg);
}

.header__mobile-banner {
  margin-top: 48px;
}

@media (max-width: 991.98px) {
  .offset-top-header-mobile {
    padding-top: var(--header-height-mobile);
  }

  .header {
    height: var(--header-height-mobile);
  }

  .header_fixed_mobile {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
  }

  .header_fixed_mobile .header__mobile-menu {
    position: fixed;
    bottom: 0;
    overflow-y: scroll;
  }

  .header__programs {
    display: none;
  }

  .header__container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .header__leftside {
    width: auto;
    display: flex;
    align-items: center;
    padding-left: 8px;
  }

  .header__logo {
    width: 123px;
    height: 34px;
    background-size: 123px;
  }

  .header__user {
    position: relative;
    width: 28px;
    height: 28px;
  }

  .header__user::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: solid 2px #3D5AFE;
  }

  /* .header__button {
    color: #3D5AFE;
    font-size: 15px;
    line-height: 20px;
    padding: 12px 8px 12px 8px;
    background: none;
    box-shadow: none;
    text-shadow: 0px 0px 20px rgba(99, 45, 255, 0.6);
  }

  .header__button:hover {
    background: none;
    color: rgb(59 130 246 / var(--tw-text-opacity));
  } */

  .header__button-chat {
    margin-right: 0;
  }

  .header__button-chat svg {
    width: 24px;
    height: 24px;
  }

  .header__mobile-programs {
    height: 0;
    visibility: hidden;
  }

  .header__mobile-programs .header__programs-grid-content {
    padding: 0;
    padding-left: 10px;
    transform: none;
    opacity: 0;
    -webkit-transform: translateX(-25px);
    transform: translateX(-25px);
  }

  .header__programs-list {
    column-count: 1;
    padding-bottom: 9px;
  }

  .header__programs-link {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: rgba(255, 255, 255, .6);
  }

  .header__programs-link,
  .header__programs-footer-link {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header__programs-link + .header__programs-link {
    margin-top: 0;
  }

  .header__programs-footer {
    padding-top: 8px;
  }

  .header__navbar {
    display: none;
  }

  .header__banner {
    margin: 0;
    width: 100%;
  }

  /* анимация мобильного меню */
  .header_show_mobile-menu .header__inner {
    background-color: #23222F;
    box-shadow: 0 1px 0px rgba(249, 249, 255, 0.1);
  }

  .header_show_mobile-menu .header__mobile-menu {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    transform: translateY(0);
    transition: opacity .2s,transform .1s, -webkit-transform .4s;
  }

  .header_show_mobile-menu .header__logo {
    background-image: url(https://4brain.ru/about/firstyle/logo-horizontal-white.svg);
  }

  .header_show_mobile-menu .header__mobile-burger svg,
  .header_show_mobile-menu .header__button-dots svg {
    fill: #ffffff;
  }

  .header_show_mobile-menu .header__mobile-item {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    transition: .4s;
  }

  .header_show_mobile-menu .header__mobile-item:nth-child(1) {
    transition-delay: .2s;
  }
  
  .header_show_mobile-menu .header__mobile-item:nth-child(2) {
    transition-delay: .36s;
  }
  .header_show_mobile-menu .header__mobile-item:nth-child(3) {
    transition-delay: .52s;
  }

  .header_show_mobile-menu .header__mobile-banner {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    transition: .8s;
    transition-delay: .8s;
  }

  .header__mobile-item_active .header__mobile-programs {
    height: auto;
    visibility: visible;
    padding-bottom: 24px;
  }

  .header__mobile-item_active .header__programs-grid-content {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    transition: .4s;
    transition-delay: .2s;
  }
}

.navbar {
  color: #161A41;
  font-family: "Raleway", sans-serif;
  background: inherit;
  box-shadow: none;
  width: auto;
  height: auto;
  line-height: initial;
  font-size: 16px;
}

.navbar__list, .navbar__item {
  padding: 0;
  margin: 0;
}

.navbar__list {
  list-style-type: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
}

.navbar__link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 20px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  -webkit-transition: color .2s ease-in;
  transition: color .2s ease-in;
  -webkit-text-stroke: 0.015em rgb(255, 255, 255, .5);
}

.navbar__link:hover {
  color: #3D5AFE;
  background: initial;
}

.navbar__link_highlighted {
  padding: 15px 20px;
}

.navbar__link_highlighted span {
  display: inline-block;
  color: #FFFFFF;
  text-transform: uppercase;
  padding: 5px 16px;
  background: #F81F1F;
  border-radius: 10px;
  font-weight: 700;
  -webkit-box-shadow: 0px 10px 20px rgba(238, 0, 114, 0.1);
          box-shadow: 0px 10px 20px rgba(238, 0, 114, 0.1);
  -webkit-transition: all .2s ease-in;
  transition: all .2s ease-in;
}

.navbar__link_highlighted span:hover {
  background-color: #E80707;
}

.navbar__link_catalog {
  color: #3D5AFE;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.navbar__link_catalog::before {
  content: '';
  background-color: rgb(61, 90, 254, .5);
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  top: -4px;
  border-radius: 70%;
  filter: blur(40px);
  opacity: 0;
}

.navbar__link_catalog.navbar__link_active::before {
  opacity: 1;
}

.navbar__link-icon {
  display: inline-block;
  width: 24px;
  font-size: 0;
  line-height: 4px;
  margin-right: 10px;
}

@media (max-width: 991.98px) {
  .navbar__link {
    display: block;
    color: #fff;
    font-size: 26px;
    line-height: 28px;
    font-weight: 300;
    padding: 12px 0px;
    -webkit-text-stroke: initial;
  }

  .navbar__link:hover {
    color: #fff;
  }

  .navbar__link_highlighted {
    padding: 12px 0px;
  }
  
  .navbar__list, 
  .navbar__item {
    display: block;
  }

  .navbar__link_catalog .navbar__link-icon {
    display: none;
  }
}

@media screen and (max-width: 800px) {
  .header__mobile-burger {
    display: block;
  }
}
.noburger .header__mobile-burger, .nochat .header__button-chat {display:none;}

/*.bluegreentextfon span {display: inline-block; color:white; background: #F81F1F; padding:8px 15px; border-radius:8px;   -webkit-transition: all .2s ease-in;  transition: all .2s ease-in; position:relative;}
.bluegreentextfon span:hover {background:#161A41;  -webkit-transition: all .2s ease-in;  transition: all .2s ease-in;}*/

.header__navbar .bluegreentextfon {position:relative;}
/* .header__navbar .bluegreentextfon:before { content:""; background: linear-gradient(223deg,#4f46e5,#3D5AFE);  border-radius: 8px;  line-height: 100%; position: absolute; top: 19px;  left: 19px; right:19px; bottom:19px; z-index:1;}
.header__navbar .bluegreentextfon:hover:before {background: linear-gradient(223deg,#4d45d8,#3853ec);  -webkit-transition: all .2s ease-in;  transition: all .2s ease-in; } */

.header__navbar .bluegreentextfon {
  position: relative;
  display: inline-block;
  padding: 2px;
  margin-left: 20px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(223deg,#4f46e5,#3D5AFE);
  backdrop-filter: blur(2px);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  --transition-duration: 400ms;
  --transition-easing: ease-out;
  transition: transform var(--transition-duration) var(--transition-easing);
}

.header__navbar .bluegreentextfon::before {
  content: "";
  background: rgba(255, 255, 255, 0.4);
  width: 60%;
  height: 100%;
  top: 0;
  left: -125%;
  transform: skew(45deg);
  position: absolute;
  transition: left var(--transition-duration) var(--transition-easing);
  border-radius: 4px;
  z-index: 1;
}

.header__navbar .bluegreentextfon:hover::before {
  left: 150%;
}

.header__navbar .bluegreentextfon .text {
  position: relative;
  z-index: 2;
}

.header__navbar .bluegreentextfon span {position:relative; z-index:2; color:white; padding: 8px 16px; margin:2px; display: inline-block;  border-radius: 5px;  -webkit-transition: all .2s ease-in;  transition: all .2s ease-in; font-family: "Raleway", sans-serif !important; font-weight:600 !important;}
