/* =====================================================
   HEADER — Хедер, навігація, lang-switcher, бургер
   ===================================================== */

.site-header {
  width: 100%;
  height: clamp(60px, 8vw, 124px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
}

.site-header__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-switcher--home {
  display: none;

  @media (min-width: 768px) {
    display: flex;
    align-items: center;
    gap: 4px;

    position: absolute;
    top: 32px;
    right: 40px;
    z-index: 100;
  }
}

.site-header--home {
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  display: flex;
  width: 100vw;

  @media (min-width: 768px) {
    display: none;
  }
}

/* Логотип */
.site-logo {
  flex-shrink: 0;
  display: none;
  @media (min-width: 768px) {
    display: block;
  }
}

.site-mobilelogo {
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;
  @media (min-width: 768px) {
    display: none;
  }
}

.site-mobilelogo__img {
  width: 59px;
  height: 40px;
}

.site-logo img {
  width: clamp(60px, 6vw, 96px);
  height: clamp(60px, 6vw, 96px);
}

/* Навігація */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;

  @media (max-width: 768px) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 32px 48px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: var(--shadow-hover);
  }
}

.site-nav.open {
  @media (max-width: 768px) {
    transform: translateX(0);
  }
}

.nav-list {
  display: flex;
  gap: clamp(60px, 3vw, 120px);
  align-items: center;

  @media (max-width: 768px) {
    flex-direction: column;
    gap: 0;
    text-align: left;
    width: 100%;
  }
}

.nav-list li {
  @media (max-width: 768px) {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }
}

.nav-list li:first-child {
  @media (max-width: 768px) {
    border-top: 1px solid var(--color-border);
  }
}

.nav-list li a {
  @media (max-width: 768px) {
    display: block;
    font-size: 18px;
    font-weight: 500;
    padding: 16px 0;
    color: var(--color-dark);
  }
}

.nav-list li a,
.footer-nav-list li a {
  font-size: clamp(16px, 1vw, 20px);
  font-weight: 500;
  color: var(--color-dark);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-list li a::after,
.footer-nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-dark);
  transition: width var(--transition);
}

.nav-list li a:hover,
.footer-nav-list li a:hover,
.lang-link:hover {
  color: var(--color-primary);
}

.nav-list li.current-menu-item a::after,
.footer-nav-list li.current-menu-item a::after {
  width: 100%;
  background: var(--color-dark);
}

.nav-list li a:hover::after,
.footer-nav-list li a:hover::after {
  width: 100%;
  background: var(--color-primary);
}

.nav-list li.current-menu-item a,
.footer-nav-list li.current-menu-item a {
  font-weight: 700;
  /* text-decoration: underline; */
  /* text-underline-offset: 4px; */
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
}

/* Lang switcher */
/* .lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
} */

.lang-link {
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 500;
  color: #8d8d9d;
  transition: color var(--transition);
}

/* .lang-link:hover {
  color: #0b0b37;
} */

.lang-switcher--inner {
  display: none;
  @media (min-width: 768px) {
    display: flex;
    align-items: center;
    gap: 4px;
  }
}

.lang-switcher .lang-link--active {
  color: #0b0b37;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-sep {
  color: #0b0b37;
  font-size: clamp(16px, 1.5vw, 24px);
}

/* Lang switcher — головна сторінка */

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--color-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;

  @media (max-width: 768px) {
    display: flex;
    z-index: 101;
  }
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Лого всередині меню — тільки мобілка */
.site-logo--nav {
  display: none;

  @media (max-width: 768px) {
    position: absolute;
    top: 0;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    z-index: 101;
  }
}

.lang-switcher--nav {
  display: none;

  @media (max-width: 768px) {
    width: 100%;
    height: 56px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 20px;
    background: #1823401a;
  }
}

/* Ховаємо лого в хедері коли меню відкрите */
@media (max-width: 768px) {
  .site-nav.open ~ * .site-logo,
  .burger.active ~ .site-logo {
    opacity: 0;
    pointer-events: none;
  }
}
