/* ==========================================================================
   Site header (shared)
   Scope: .site-header on all page templates
   ========================================================================== */

.site-header {
  position: relative;
  width: 100%;
  overflow: visible;
  color: #f8fafc;
  background-color: #25282d;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(12px);
}

.site-header-wrapper-content {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.site-header__background {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: top -21px center;
  min-height: 100%;
  opacity: 1;
}

.site-header--home {
  background-image: var(--home-header-bg-1600);
  background-size: cover;
  background-position: top -21px center;
  background-repeat: no-repeat;
}

@media (min-width: 1900px) {
  .site-header--home {
    background-image: var(--home-header-bg-1900, var(--home-header-bg-1600));
  }
}

@media (min-width: 2173px) {
  .site-header--home {
    background-image: var(--home-header-bg-2173, var(--home-header-bg-1900, var(--home-header-bg-1600)));
  }
}

.site-header__wrapper {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 30px;
}

.site-header__frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-header__frame-edge {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
}

.site-header__frame-edge--top {
  top: 3px;
  left: 68px;
  right: 30px;
  height: 20px;
  border-bottom: 1px solid #444548;
  width: calc(100% - 158px);
}

.site-header__frame-edge--bottom {
  bottom: -6px;
  left: 68px;
  right: 30px;
  height: 20px;
  border-top: 1px solid #5f6062;
  width: calc(100% - 158px);
}

.site-header__frame-edge--left {
  top: 22px;
  left: 25px;
  width: 43px;
  height: 100%;
  background: url("../images/ramka-l.png") no-repeat top left;
}

.site-header__frame-edge--right {
  top: 22px;
  right: 25px;
  width: 66px;
  height: 100%;
  background: url("../images/ramka-r.png") no-repeat top right;
}

.site-header__inner {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 5px 25px;
  display: grid;
  align-items: center;
  gap: 32px;
}

.site-header__row {
  display: grid;
  align-items: center;
}

.site-header__row--top {
  grid-template-columns: 20% 50% 30%;
  gap: 24px;
  border-bottom: 1px solid #BDB9B6;
  padding-bottom: 9px;
}

.site-header__col--logo,
.site-header__col--nav,
.site-header__col--actions {
  display: flex;
}

.site-header__col--logo {
  padding: 13px 10px 10px 7px;
}

.site-header__col--nav {
  justify-content: center;
  padding-left: 70px;
}

.site-header__col--actions {
  justify-content: flex-end;
  padding-right: 45px;
  align-items: center;
  position: relative;
}

.site-header__col--theme {
  position: absolute;
  bottom: -51px;
  right: 55px;
  margin-top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-header__theme-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 122.88 122.88'%3E%3Cpath fill='%23ffffff' fill-rule='evenodd' clip-rule='evenodd' d='M122.88 61.44c0 8.47-1.5 16.34-4.5 23.58-.49 1.19-1.02 2.35-1.59 3.49-2.92 5.89-6.89 11.35-11.92 16.36-1.67 1.68-3.4 3.24-5.17 4.68-1.78 1.45-3.61 2.78-5.48 3.98C84.58 119.77 73.64 122.88 61.44 122.88c-8.47 0-16.33-1.5-23.58-4.5-1.19-.49-2.35-1.02-3.49-1.59-5.89-2.92-11.35-6.89-16.36-11.92-1.68-1.67-3.24-3.4-4.68-5.17-1.45-1.78-2.78-3.61-3.98-5.48C3.11 84.58 0 73.64 0 61.44c0-8.47 1.5-16.33 4.5-23.58.49-1.19 1.02-2.35 1.59-3.49 2.92-5.89 6.89-11.35 11.92-16.36 1.67-1.68 3.4-3.24 5.17-4.68 1.78-1.45 3.61-2.78 5.48-3.98C38.3 3.11 49.24 0 61.44 0c8.47 0 16.33 1.5 23.58 4.5 1.19.49 2.35 1.02 3.49 1.59 5.89 2.92 11.35 6.89 16.36 11.92 1.68 1.67 3.24 3.4 4.68 5.17 1.45 1.78 2.78 3.61 3.98 5.48C119.77 38.3 122.88 49.24 122.88 61.44zM61.44 10.96c.11 0 .22 0 .32 0v100.96c-.11 0-.22 0-.32 0-27.88 0-50.48-22.6-50.48-50.48C10.96 33.56 33.56 10.96 61.44 10.96z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

html[data-prc-theme="dark"] .site-header__theme-icon {
  transform: scaleX(-1);
}

.site-header__col--theme .prc-theme-switch {
  display: inline-flex;
  align-items: stretch;
  border: 0;
  border-radius: 0px;
  overflow: hidden;
}

.site-header__col--theme .prc-theme-switch__option {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: rgba(248, 250, 252, 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  padding: 5px 14px;
  cursor: pointer;
  transition: color .12s, background .12s;
  box-shadow: none;
}

.site-header__col--theme .prc-theme-switch__option + .prc-theme-switch__option {
  border-left: 1px solid rgba(148, 163, 184, 0.35);
}

.site-header__col--theme .prc-theme-switch__option:hover {
  color: #f8fafc;
  background: transparent;
}

.site-header__col--theme .prc-theme-switch__option--active {
  background: rgba(255, 144, 64, 0.1);
  color: #ff9040;
}

.site-header__col--theme .prc-theme-switch__option--active:hover {
  background: rgba(255, 144, 64, 0.1);
  color: #ff9040;
}

.site-header__col--theme .prc-theme-switch__option:focus-visible {
  outline: 2px solid #ff9040;
  outline-offset: -2px;
}

.site-header__brand-link {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #0f172a;
  text-decoration: none;
}

.site-header__login-link {
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  max-height: 27px;
  padding: 2px 7px;
  margin: 0 19px 0 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: transparent;
  border: none;
  border-radius: 0;
  user-select: none;
  --c: 8px;
  --t: 2px;
  --o: 1px;
  --col: transparent;
  transition: color 0.12s ease;
}

.site-header__login-link::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--o));
  pointer-events: none;
  background:
    linear-gradient(var(--col), var(--col)) bottom right / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom right / var(--c) var(--t) no-repeat;
}

.site-header__login-link:hover {
  --col: var(--color-accent, #ff9040);
  color: #f8fafc;
  background: transparent;
  text-decoration: none;
}

.site-header__login-link.is-active,
.site-header__login-link[aria-current="page"] {
  --col: #ffffff;
  color: var(--almax-primary-color, #ff9040);
  text-decoration: none;
}

.site-header__login-link-icon {
  display: inline-flex;
  margin-right: 4px;
}

.site-header__login-link-icon img {
  width: 19px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.header-nav__item {
  position: relative;
}

.header-nav__item-shape {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.site-header__nav > .header-nav__item > .site-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0px 8px;
  padding: 2px 8px;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: none;
  position: relative;
  user-select: none;
  --c: 8px;
  --t: 2px;
  --o: 1px;
  --col: transparent;
  transition: color 0.12s ease;
}

.site-header__nav > .header-nav__item > .site-header__nav-link::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--o));
  pointer-events: none;
  background:
    linear-gradient(var(--col), var(--col)) bottom right / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom right / var(--c) var(--t) no-repeat;
}

.site-header__nav > .header-nav__item > .site-header__nav-link:hover {
  --col: var(--color-accent, #ff9040);
  color: #f8fafc;
  text-decoration: none;
}

.site-header__nav > .header-nav__item--active > .site-header__nav-link,
.site-header__nav > .header-nav__item > .site-header__nav-link.is-active,
.site-header__nav > .header-nav__item > .site-header__nav-link[aria-current="page"] {
  --col: #ffffff;
  color: var(--almax-primary-color, #ff9040);
  text-decoration: none;
}

/* ==========================================================================
   Hero social (shared home + inner)
   ========================================================================== */

.hero-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.hero-panel__inner {
  position: relative;
  display: grid;
  align-items: stretch;
  justify-content: space-between;
}

.hero-panel__side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-social {
  width: 48px;
  height: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  text-decoration: none;
  border: none;
  --c: 8px;
  --t: 1.5px;
  --o: 3px;
  --col: transparent;
  transition: background .12s, color .12s;
}

.hero-social::before,
.hero-social::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--o));
  pointer-events: none;
}

.hero-social::before {
  background:
    linear-gradient(var(--col), var(--col)) top left / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) top left / var(--c) var(--t) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom right / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom right / var(--c) var(--t) no-repeat;
}

.hero-social::after {
  background:
    linear-gradient(var(--col), var(--col)) top right / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) top right / var(--c) var(--t) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom left / var(--t) var(--c) no-repeat,
    linear-gradient(var(--col), var(--col)) bottom left / var(--c) var(--t) no-repeat;
}

.hero-social:hover {
  --col: #ffffff;
  text-decoration: none;
}

.hero-social__image {
  width: 17px;
  height: auto;
}

/* ==========================================================================
   Responsive (shared header)
   ========================================================================== */

@media (max-width: 1280px) {
  .site-header__row--top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-header__col--nav,
  .site-header__col--actions {
    justify-content: center;
  }

  .site-header__col--theme {
    right: 50%;
    transform: translateX(50%);
  }
}

@media (max-width: 768px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
  }
}
