:root {
  --club-header-ink: #ffffff;
  --club-header-blue: #0d67f8;
  --club-header-cyan: #67e7ff;
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after { box-sizing: border-box; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 82px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 24, 75, .16), rgba(3, 20, 64, .34)),
    linear-gradient(120deg, #0757a7 0%, #063b83 43%, #03154a 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(3, 21, 74, .08);
  font-family: Arial, Helvetica, sans-serif;
}

.site-header a { text-decoration: none; }
.site-header button { font: inherit; }

.site-header-shell {
  width: min(1440px, calc(100% - 64px));
  min-height: 82px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.site-header-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
}
.site-header-brand img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 0 22px rgba(25,214,255,.14);
}

.header-mobile-panel { min-width: 0; }
.header-mobile-panel__top { display: none; }

.site-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.55vw, 28px);
  min-width: 0;
}

.site-header-nav > a,
.site-header-nav__button,
.site-header-account-group > a,
.site-header-account-group > .site-header-nav__button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: rgba(255,255,255,.95);
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease;
}
.site-header-nav > a:hover,
.site-header-nav__button:hover,
.site-header-account-group > a:hover { color: var(--club-header-cyan); }

.site-header-account-group {
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.25vw, 22px);
  margin-left: auto;
  min-width: 0;
}

.site-header-user {
  min-height: 36px;
  max-width: 165px;
  padding: 0 10px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.27);
  border-radius: 9px;
  color: #fff;
  background: rgba(3,25,70,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.site-header-user__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #67e7ff;
  background: rgba(25,214,255,.08);
  border: 1px solid rgba(25,214,255,.28);
}
.site-header-user__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-header-user__login {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.site-header-language { position: relative; flex: 0 0 auto; }
.site-header-language summary {
  min-height: 36px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 9px;
  color: #fff;
  background: rgba(3,25,70,.20);
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  user-select: none;
}
.site-header-language summary::-webkit-details-marker { display: none; }
.site-header-language summary::marker { display: none; content: ''; }
.site-header-language summary:hover,
.site-header-language[open] summary { border-color: rgba(103,231,255,.5); background: rgba(255,255,255,.07); }
.site-header-language__flag { display: inline-flex; width: 18px; justify-content: center; font-size: 14px; line-height: 1; }
.site-header-language__chevron { color: rgba(255,255,255,.65); font-size: 9px; transition: transform .18s ease; }
.site-header-language[open] .site-header-language__chevron { transform: rotate(180deg); }
.site-header-language__dropdown {
  position: absolute;
  z-index: 130;
  top: calc(100% + 8px);
  left: 0;
  min-width: 178px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: #061a4a;
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
}
.site-header-language__dropdown a {
  min-height: 38px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  color: rgba(255,255,255,.83);
  font-size: 13px;
}
.site-header-language__dropdown a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-header-language__dropdown a.is-active { color: #fff; background: rgba(13,103,248,.18); }
.site-header-language__check { margin-left: auto; color: #67e7ff; }

.header-chat-link { position: relative; }
.header-chat-unread-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  position: absolute;
  top: -5px;
  right: -13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: 9px;
  font-weight: 800;
}
.hidden { display: none !important; }

.header-menu-toggle { display: none; }
.header-mobile-backdrop { display: none; }

/* Login modal */
.header-login-modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 10, 34, .62);
  backdrop-filter: blur(8px);
}
.header-login-modal__content {
  width: min(420px, 100%);
  position: relative;
  padding: 28px;
  border-radius: 18px;
  color: #081a3f;
  background: #fff;
  border: 1px solid #dbe7f6;
  box-shadow: 0 28px 70px rgba(1,10,34,.28);
}
.header-login-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 27px;
  cursor: pointer;
}
.header-login-modal__title { margin: 0 0 18px; color: #081a3f; font-size: 26px; }
.header-login-error { margin-bottom: 12px; padding: 10px 12px; border-radius: 9px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.header-login-form { display: grid; gap: 12px; }
.header-login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dbe7f6;
  border-radius: 9px;
  color: #081a3f;
  background: #fff;
  outline: 0;
  font: inherit;
}
.header-login-form input:focus { border-color: #7ab7ff; box-shadow: 0 0 0 3px rgba(13,103,248,.09); }
.header-login-form button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #0d67f8;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1220px) {
  .site-header-shell { width: min(100% - 36px, 1440px); grid-template-columns: 90px minmax(0,1fr); gap: 12px; }
  .site-header-brand img { width: 62px; height: 62px; }
  .site-header-nav { gap: 13px; }
  .site-header-nav > a,
  .site-header-nav__button,
  .site-header-account-group > a { font-size: 12px; }
  .site-header-account-group { gap: 11px; }
  .site-header-user { max-width: 128px; min-height: 32px; padding: 0 8px 0 7px; gap: 6px; }
  .site-header-user__icon { width: 18px; height: 18px; flex-basis: 18px; }
  .site-header-user__icon svg { width: 14px; height: 14px; }
  .site-header-user__login { font-size: 11px; }
  .site-header-language summary { min-height: 32px; padding: 0 7px; font-size: 11px; }
}

@media (max-width: 980px) {
  .site-header { min-height: 74px; }
  .site-header-shell { min-height: 74px; width: min(100% - 24px, 1440px); grid-template-columns: 1fr auto; }
  .site-header-brand img { width: 58px; height: 58px; }
  .header-menu-toggle {
    width: 43px;
    height: 40px;
    padding: 9px;
    display: block;
    justify-self: end;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 9px;
    background: rgba(3,20,65,.44);
    cursor: pointer;
  }
  .header-menu-toggle span { display: block; height: 2px; margin: 4px 0; border-radius: 3px; background: #fff; }
  .header-mobile-panel {
    position: fixed;
    z-index: 220;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 87vw);
    padding: 76px 22px 26px;
    background: #04184b;
    box-shadow: -18px 0 50px rgba(0,0,0,.32);
    transform: translateX(105%);
    transition: transform .2s ease;
    overflow-y: auto;
  }
  body.site-menu-open .header-mobile-panel { transform: translateX(0); }
  .header-mobile-panel__top {
    position: absolute;
    top: 18px;
    left: 22px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
  }
  .header-mobile-close { border: 0; background: transparent; color: #fff; font-size: 30px; cursor: pointer; }
  .site-header-nav { width: 100%; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; }
  .site-header-nav > a,
  .site-header-nav__button,
  .site-header-account-group > a,
  .site-header-account-group > .site-header-nav__button {
    width: 100%;
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.94);
    font-size: 15px;
  }
  .site-header-account-group { width: 100%; margin-left: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .site-header-user { width: 100%; max-width: none; min-height: 46px; margin-top: 7px; padding: 0 10px; }
  .site-header-user__login { font-size: 13px; }
  .site-header-language { width: 100%; margin-bottom: 5px; }
  .site-header-language summary { width: 100%; min-height: 46px; padding: 0 10px; justify-content: flex-start; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; background: transparent; font-size: 14px; }
  .site-header-language__chevron { margin-left: auto; }
  .site-header-language__dropdown { position: static; width: 100%; min-width: 0; margin-top: 4px; padding: 5px; border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035); box-shadow: none; }
  .header-mobile-backdrop {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: block;
    background: rgba(0,8,30,.48);
    backdrop-filter: blur(3px);
  }
}
