@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --site-header-bg: rgba(246, 244, 239, 0.98);
  --site-header-border: rgba(12, 15, 20, 0.12);
  --site-header-shadow: 0 12px 28px rgba(12, 15, 20, 0.08);
  --site-header-text: #0f2540;
  --site-header-muted: rgba(15, 37, 64, 0.72);
  --site-header-accent: #1d4ed8;
  --site-header-accent-soft: #e8f0ff;
  --site-header-chip-bg: #ffffff;
  --site-header-font:
    "Manrope",
    system-ui,
    -apple-system,
    "Segoe UI",
    Arial,
    sans-serif;
  --site-header-height: 78px;
}

.site-header {
  position: sticky !important;
  top: 0;
  z-index: 3000;
  background: var(--site-header-bg) !important;
  border-bottom: 1px solid var(--site-header-border) !important;
  box-shadow: var(--site-header-shadow);
  backdrop-filter: none !important;
}

.modal-backdrop {
  z-index: 3190 !important;
}

.modal {
  z-index: 3200 !important;
}

.site-header .container {
  width: min(1180px, 92vw);
  max-width: none;
}

.site-header .navbar {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.site-header .navbar > .container {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--site-header-height);
  padding: 0;
}

.site-header,
.site-header * {
  font-family: var(--site-header-font);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--site-header-height);
  padding: 0;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  padding-left: 4px;
  flex: 0 0 auto;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--site-header-text);
}

.site-header__brand:hover,
.site-header__brand:focus-visible {
  color: var(--site-header-text);
}

.site-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--site-header-text) !important;
}

.site-header .navbar-brand:hover,
.site-header .navbar-brand:focus-visible {
  color: var(--site-header-text) !important;
  text-decoration: none;
}

.site-header .logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 8px 18px rgba(12, 15, 20, 0.1);
}

.site-header .brand-title,
.site-header .navbar-brand .brand-title,
.site-header__brand .brand-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--site-header-text) !important;
}

.site-header .navbar-brand:hover .brand-title,
.site-header .navbar-brand:focus-visible .brand-title,
.site-header__brand:hover .brand-title,
.site-header__brand:focus-visible .brand-title {
  color: var(--site-header-text) !important;
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--site-header-border);
  border-radius: 14px;
  background: #ffffff;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--site-header-text);
}

.site-header__panel {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}

.site-header .navbar-collapse {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}

.site-header .nav-tools {
  display: flex;
  align-items: center;
  gap: 22px !important;
  margin-left: auto;
  flex: 0 0 auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header #navAuth,
.site-header .navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .nav-item {
  list-style: none;
}

.site-header .site-nav-login-mobile {
  display: none;
}

.site-header .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--site-header-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
  color: var(--site-header-text);
  background: var(--site-header-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.12);
}

.site-header .nav-link.is-active,
.site-header .nav-link[aria-current="page"] {
  color: var(--site-header-text);
  background: var(--site-header-accent-soft);
  box-shadow:
    inset 0 0 0 1px rgba(29, 78, 216, 0.18),
    0 8px 18px rgba(29, 78, 216, 0.08);
}

.site-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex: 0 0 auto;
}

.site-header .lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--site-header-border);
  border-radius: 999px;
  background: var(--site-header-chip-bg);
  box-shadow: none;
}

.site-header .lang-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--site-header-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  padding: 8px 11px;
  min-width: 44px;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.site-header .lang-btn.is-active {
  background: var(--site-header-accent);
  color: #ffffff;
}

.site-header .lang-btn:not(.is-active):hover,
.site-header .lang-btn:not(.is-active):focus-visible {
  background: var(--site-header-accent-soft);
  color: var(--site-header-text);
}

.site-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 110px;
}

.site-header #navRight {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 110px;
}

.site-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--site-header-text);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(15, 37, 64, 0.16);
  transition:
    transform 0.15s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-header__login:hover,
.site-header__login:focus-visible {
  background: var(--site-header-accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}

.site-header .dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.site-header__auth-placeholder {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15, 37, 64, 0.08);
}

.site-user-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0 !important;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.site-user-toggle:hover,
.site-user-toggle:focus-visible {
  transform: translateY(-1px);
}

.site-user-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}

.site-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-user-toggle:hover .site-user-avatar,
.site-user-toggle:focus-visible .site-user-avatar {
  background: #0f2540;
  box-shadow: 0 10px 20px rgba(15, 37, 64, 0.16);
}

.site-user-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header .d-none,
.site-header .site-user-badge.d-none {
  display: none !important;
}

.site-header .dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  min-width: 230px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  border: 1px solid var(--site-header-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(12, 15, 20, 0.14);
}

.site-header .dropdown.is-open .dropdown-menu {
  display: block;
}

.site-header .dropdown-header {
  padding: 8px 16px 6px;
  color: var(--site-header-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-header .dropdown-divider {
  margin: 6px 0;
  border: 0;
  border-top: 1px solid rgba(12, 15, 20, 0.08);
}

.site-header .dropdown-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  color: var(--site-header-text);
  text-align: left;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus-visible {
  background: var(--site-header-accent-soft);
  color: var(--site-header-text);
}

.site-header .theme-toggle {
  display: none !important;
}

.site-header .navbar-toggler {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--site-header-border);
  border-radius: 14px;
  background: #ffffff !important;
  box-shadow: none !important;
}

.site-header .navbar-toggler:focus {
  box-shadow: none !important;
}

.site-header .navbar-toggler-icon {
  width: 18px;
  height: 18px;
  background-image:
    linear-gradient(var(--site-header-text), var(--site-header-text)),
    linear-gradient(var(--site-header-text), var(--site-header-text)),
    linear-gradient(var(--site-header-text), var(--site-header-text));
  background-position: center 4px, center 8px, center 12px;
  background-repeat: no-repeat;
  background-size: 18px 2px, 18px 2px, 18px 2px;
  filter: none !important;
}

.header-spacer {
  display: none !important;
}

.home-page #turniri {
  padding-top: 1.05rem !important;
}

@media (max-width: 767.98px) {
  .site-header .container {
    width: min(100%, calc(100vw - 20px));
  }

  .site-header__inner {
    gap: 10px;
    min-height: 64px;
  }

  .site-header .navbar > .container {
    min-height: 64px;
  }

  .site-header .logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .site-header .brand-title,
  .site-header .navbar-brand .brand-title {
    font-size: 0.94rem;
    max-width: 122px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--site-header-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 36px rgba(12, 15, 20, 0.12);
    max-height: calc(100dvh - 84px);
    overflow: auto;
  }

  .site-header__panel.is-open {
    display: flex;
  }

  .site-header__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .site-header .nav-link {
    justify-content: flex-start;
    width: 100%;
    padding: 12px 13px;
    border-radius: 14px;
  }

  .site-header__meta {
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin-left: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(12, 15, 20, 0.08);
  }

  .site-header .lang-switch {
    width: 100%;
    margin-right: 0;
    justify-content: space-between;
  }

  .site-header .lang-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .site-header__actions {
    gap: 20px;
    padding-left: 0;
  }

  .site-header__right,
  .site-header #navRight {
    min-width: 0;
    width: auto;
    justify-content: flex-end;
  }

  .site-header__login {
    min-height: 40px;
    padding: 10px 14px;
  }

  .site-header .navbar-collapse {
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--site-header-border);
    border-radius: 18px;
    background: #ffffff !important;
    box-shadow: 0 20px 36px rgba(12, 15, 20, 0.12);
    max-height: calc(100dvh - 84px);
    overflow: auto;
  }

  .site-header .navbar-collapse.show {
    display: flex !important;
  }

  .site-header #navAuth,
  .site-header .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .site-header .nav-tools {
    order: 0;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    padding-top: 0;
    border-top: 0;
    gap: 20px !important;
  }

  .site-header #navRight {
    min-width: 0;
  }

  .site-header .nav-tools #navRight {
    width: auto;
  }

  .site-header .nav-tools .site-header__login {
    width: auto;
    min-height: 38px;
    padding: 10px 13px;
  }

  .site-header .site-nav-login-mobile {
    display: list-item;
  }

  .site-header .site-nav-login-mobile .nav-link {
    background: var(--site-header-text);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 37, 64, 0.14);
  }

  .site-header .site-nav-login-mobile .nav-link:hover,
  .site-header .site-nav-login-mobile .nav-link:focus-visible {
    background: var(--site-header-accent);
    color: #ffffff;
  }

  .site-header #navRight .site-header__login,
  .site-header #navRight .site-header__auth-placeholder {
    display: none;
  }

  .site-header .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }

  .home-page #turniri {
    padding-top: 0.82rem !important;
  }
}

@media (max-width: 420px) {
  .site-header .brand-title,
  .site-header .navbar-brand .brand-title {
    max-width: 96px;
    font-size: 0.9rem;
  }

  .site-header .logo-img {
    width: 36px;
    height: 36px;
  }

  .site-header__actions {
    gap: 18px;
    padding-left: 0;
  }
}
