.site-header {
  background: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.site-header.scrolled {
  position: fixed;
  transform: translateY(-100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.site-header.visible {
  transform: translateY(0);
}

.header-wrapper {
  display: flex;
  flex-direction: column;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  z-index: 1000;
  padding: 14px 0;
  gap: 32px;
}

/* Lewa strona */
.header-left {
  display: flex;
  align-items: center;
  gap: 64px;
}

.site-branding a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-branding img {
  width: auto;
  height: 60px;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation .menu {
  flex-wrap: wrap;
}

/* Wspólne style dla menu */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu a {
  color: var(--neutral-900);
  text-decoration: none;
  font-size: var(--font-size-16);
  line-height: 140%;
  transition: color 0.3s ease;
}

/* Style specyficzne dla headera */
.main-navigation .menu,
.main-navigation .menu > ul {
  display: flex;
  column-gap: 32px;
  row-gap: 16px;
}

.main-navigation .menu a {
  font-weight: 500;
}

.main-navigation .menu a:hover {
  color: var(--primary-500);
}

/* Prawa strona */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language switcher */
.language-switch {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
}

.language-switch > i {
  font-size: var(--font-size-16);
  color: var(--neutral-900);
  transition: transform 0.3s ease;
}

.language-switch.active > i {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  min-width: 120px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

.language-options.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  color: var(--neutral-900);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.language-option:hover {
  background-color: var(--neutral-50);
}

.language-option.active {
  color: var(--primary-500);
}

.language-option i {
  color: var(--primary-500);
  font-size: var(--font-size-12);
}

/* Login button */
.login-button {
  display: flex;
  align-items: center;
  color: var(--neutral-900);
  text-decoration: none;
  padding: 8px 0;
}

.login-button i {
  font-size: var(--font-size-16);
}

/* CTA button */
.header-right .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  width: max-content;
}

.header-right .btn svg {
  min-width: 10px;
}

.header-right .btn-primary svg path {
  stroke: #fff;
}

/* Ukryj elementy mobilne na desktopie */
.hamburger-menu,
.mobile-menu {
  display: none;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  width: 48px;
  height: 48px;
  border: 2px solid var(--primary-500);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.hamburger-line {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background-color: var(--primary-500);
  transition: transform 0.3s ease;
  transform: translate(-50%, -50%);
}

.hamburger-line:first-child {
  top: 40%;
}

.hamburger-line:last-child {
  top: 60%;
}

/* Hamburger Animation */
.menu-open .hamburger-line:first-child {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-open .hamburger-line:last-child {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* WCAG switcher */
.wcag-switch {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
}

.wcag-switch .wcag-icons .wcag-contrast-option {
  outline: none;
  border: none;
  background-color: transparent;
}

.wcag-switch .wcag-icons .wcag-ts-option {
  outline: none;
  border: none;
  background-color: transparent;
}

.wcag-switch svg {
  width: 24px;
  height: 24px;
}

.wcag-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 16px 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wcag-options.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.wcag-option {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wcag-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wcag-icons svg {
  cursor: pointer;
  width: 32px;
  height: 32px;
}

@media (max-width: 1300px) {
  .header-left {
    gap: 32px;
  }

  /* Pokaż hamburger */
  .hamburger-menu {
    display: block;
  }

  /* Ukryj elementy na mobile */
  .main-navigation,
  .header-right .btn,
  .header-right .login-button,
  .header-right .language-switch,
  .header-right .wcag-switch {
    display: none;
  }

  /* Dostosuj layout headera */
  .header-wrapper {
    justify-content: space-between;
  }

  .header-left {
    gap: 0;
  }

  /* Mobile Menu Panel */
  .mobile-menu {
    position: fixed;
    top: 88px;
    right: 0;
    width: 100%;
    height: calc(100vh - 88px);
    height: calc(100dvh - 88px); /* dynamic viewport height */
    background: var(--white);
    padding: 32px 24px 48px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  /* Logo i hamburger zawsze widoczne */
  .site-branding,
  .hamburger-menu {
    position: relative;
    z-index: 1001;
  }

  .menu-open .mobile-menu {
    transform: translateX(0);
  }

  /* Mobile Menu Content */
  .mobile-menu .menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    width: 100%;
  }

  .mobile-menu .menu li {
    width: 100%;
    text-align: center;
    padding-bottom: 32px;
    padding-top: 32px;
    border-bottom: 1px solid var(--primary-200);
  }

  .mobile-menu .menu li:first-child {
    padding-top: 0;
  }

  .mobile-menu .menu a {
    text-decoration: none;
    color: var(--primary-900);
  }

  .mobile-menu .menu ul {
    width: 100%;
  }

  /* Mobile Menu Buttons */
  .mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    width: 100%;
    gap: 16px;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    height: 100dvh; /* dynamic viewport height */
    left: 0;
  }

  .mobile-menu-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 32px;
    gap: 10px;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
  }

  .mobile-menu-buttons .btn svg {
    min-width: 10px;
  }

  .mobile-menu-buttons .bottom-options {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 32px;
  }

  .mobile-menu-buttons .language-switch,
  .mobile-menu-buttons .wcag-switch {
    color: var(--primary-900);
    text-decoration: none;
  }

  .mobile-menu-buttons .btn-primary svg path {
    stroke: #fff;
  }

  /* Mobile Language Switcher */
  .mobile-menu .language-options {
    position: absolute;
    top: 0;
    transform: translateY(-100%);
  }

  .site-header.scrolled {
    transform: none; /* Header zawsze widoczny na mobile */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .site-header.visible {
    transform: none;
  }

  /* Mobile adjustments */
  .header-right .wcag-switch {
    display: none;
  }

  .mobile-menu-buttons .wcag-switch {
    justify-content: space-between;
    padding: 16px 0;
  }

  .mobile-menu-buttons .wcag-options {
    position: absolute;
    top: 0;
    transform: translateY(-100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 16px 24px;
    min-width: 200px;
    background: var(--white);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-menu-buttons .wcag-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-100%);
    pointer-events: all;
  }
}

.language-switch svg,
.login-button svg {
  width: 24px;
  height: 24px;
}

.language-switch > svg {
  margin-left: 8px;
}

.language-option svg {
  width: 20px;
  height: 20px;
}

.login-button svg {
  margin-right: 8px;
}
