.header {
  position: relative;
  width: 100%;
  z-index: 1000;
}

.header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--background-color);
  /* інші стилі для фіксованої шапки */
}

.header.floating {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100; /* завжди зверху */
  background: var(--background-color);
  transition: none !important; /* без анімації */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* приклад ефекту */
}

.header.fixed.always-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: none !important; /* без анімації приховування */
}

.header-content {
    padding: 32px 0 8px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}


/* Логотип */
.logo-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: var(--logo-color);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: bold;
    font-size: 16px;
}

.logo-header svg {
    min-width: 16px;
    width: 16px;
    height: 16px;
    fill: var(--logo-color);
}

.logo-name {
    margin-left: 8px;
}



/* Навігаційне меню */
.nav {
display: flex;
flex-direction: row;
justify-content: end;
}

.nav-list {
    display: flex;
    flex-direction: row;
    gap: 32px;
}

.list-item {
    list-style: none;
    align-items: center;
    display: flex;
}

.list-item a {
    text-decoration: none;
    color: var(--nav-color);
    font-family: var(--font-primary);
    font-weight: normal;
    font-size: 16px;
    transition: color 0.3s ease-in-out;
}

.list-item a:hover,
.list-item a:focus {
    color: var(--nav-active-color);
}

.list-item a.active {
    color: var(--nav-active-color);
}

.list-item span {
    color: var(--accent-color);
}





/* Перемикач мови */
.language-switcher {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    margin-left: 32px;
}

.language-switcher__button {
    padding: 0;
    margin: 0;
    border: 0;
    background-color: transparent;
    color: var(--nav-color);
    font-family: var(--font-primary);
    font-weight: normal;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: color 0.3s ease-in-out;
}

.language-switcher__button:hover,
.language-switcher__button:focus {
    color: var(--nav-active-color);
}

.language-switcher__button svg {
    margin-left: 8px;
    min-width: 10px;
    width: 10px;
    color: var(--nav-color);
}


/* Стилізація випадаючого меню */
.language-switcher__dropdown {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 100%;
    right: 0;
    background-color: var(--background-color);
    border: 1px solid var(--nav-color);
    margin-top: 4px;
    padding: 8px;
    gap: 8px;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.language-switcher__dropdown.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.language-switcher__dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-switcher__dropdown button {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-primary);
    font-weight: normal;
    font-size: 16px;
    color: var(--nav-color);
}

/* Стилізація стрілки */
.down-arrow-language svg {
    min-width: 10px;
    width: 10px;
    color: var(--nav-color);
    transition: transform 0.3s ease;
}

.down-arrow-language svg.rotated {
    transform: rotate(180deg);
    color: var(--nav-active-color);
}





/* Стилізація під телефон */

/* Початково приховати меню на мобільних */
.nav {
    display: flex;
    gap: 2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    align-items: end;
    width: 24px;
}

.hamburger span {
    
    height: 3px;
    background-color: var(--nav-color);
    border-radius: 2px;
}

.hamburger span:nth-child(1) {
    width: 100%;
}
.hamburger span:nth-child(2) {
    width: 50%;
}


.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    transform: rotate(-45deg) translate(1px, -1px);
    width: 100%;
}
.hamburger span {
    transition: 0.3s;
}

/* Заборона прокрутки */
.no-scroll {
  overflow: hidden;
}


/* Медіа-запит для мобільних */
@media (max-width: 800px) {
    /* Початковий стан меню - приховане, але не display:none */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  padding: 47px 100px 175px 100px;

  height: 100vh;
  width: 100%;

  flex-direction: column;
  gap: 32px;
  align-items: start;
  justify-content: start;
  overflow-y: auto;

  opacity: 0;
  pointer-events: none; /* щоб не "клацалось" коли приховано */
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;

  background-color: var(--background-color);
}

/* Коли меню активне */
.nav.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  display: flex; /* на всяк випадок */
}

    .nav > *:nth-child(3),
    .nav > *:nth-child(4),
    .nav > *:nth-child(5) {
        margin-top: auto;
        margin-left: auto;
        margin-right: auto;
    }

    .nav::-webkit-scrollbar {
    width: 10px;
    height: 1px;
    }

    .nav::-webkit-scrollbar-thumb {
    background-color: var(--background-color);
    border-radius: 10px;
    }

    .nav::-webkit-scrollbar-track {
    background-color: var(--accent-color);
    }

    .nav-list{
        display: flex;
        flex-direction: column;
        gap: 32px;
        align-items: start;
        justify-content: start;
    }
    .list-item a{
        font-size: 32px;
    }

    .nav.active {
        display: flex; /* показати при активації */
    }

    .language-switcher{
        margin: 0;
        padding: 0;
    }
    .language-switcher button {
        margin: 0;
        padding: 0;
        font-size: 32px;
        color: var(--nav-color);
    }

    .hamburger {
        display: flex; /* показати бургер */
    }

    .mobile-social-list{
        display: flex;
        flex-direction: row;
        
        
        gap: 32px;
        align-items: center;
        justify-content: center;
    }
    .mobile-social-list svg{
        min-height: 42px;
        width: auto;
        color: var(--nav-color);
    }
}


/* Під 600px */
@media (max-width: 600px) {
    .nav{
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* Медіа-запит для мобільних */
@media (max-width: 400px) {
    .nav{
        padding-left: 16px;
        padding-right: 16px;
    }
}




.header {
  opacity: 0;
  transform: translateY(-90px);
  animation: headerFadeIn 0.3s ease forwards; /* forwards — щоб зберегти кінцевий стан */
}

@keyframes headerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
