/* Стили для шапки */
header {
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-family-garamond);
  position: relative;
}

.header-left {
  flex: 1;
  transition: transform 0.3s ease;
}

.header-right {
  flex-shrink: 0;
  position: relative;
  z-index: 1001; /* Выше панели навигации */
}

.logo-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

.logo {
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--primary-text);
  font-weight: normal;
}

.logo-subtitle {
  font-size: 18px;
  color: var(--secondary-text);
  line-height: 1.4;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 100px;
}

.user-name {
  font-size: 20px;
  color: var(--primary-text);
  font-weight: normal;
}

.nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  color: var(--secondary-text);
  text-decoration: none;
  font-size: 20px;
  transition: color 0.3s ease;
  position: relative;
  padding: 5px 0;
}

.nav-link:hover {
  color: var(--highlight-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--highlight-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.logout-form {
  display: inline;
}

.logout-button {
  background: none;
  border: none;
  color: var(--secondary-text);
  padding: 5px 0;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
  font-family: var(--font-family-garamond);
  position: relative;
}

.logout-button:hover {
  color: var(--highlight-color);
}

.logout-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--highlight-color);
  transition: width 0.3s ease;
}

.logout-button:hover::after {
  width: 100%;
}

/* Сдвиг левой части шапки при открытой панели */
body.nav-panel-open .header-left {
  transform: translateX(280px);
}

/* Адаптивность */
@media (max-width: 768px) {
  header {
    padding: 20px;
    flex-direction: column;
    gap: 20px;
  }

  .header-left {
    width: 100%;
  }

  .header-right {
    width: 100%;
  }

  .logo-section {
    text-align: center;
  }

  .header-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .nav {
    flex-direction: column;
    gap: 15px;
  }

  .logo {
    font-size: 24px;
  }

  .logo-subtitle {
    font-size: 16px;
  }

  .nav-link,
  .logout-button,
  .user-name {
    font-size: 18px;
  }
  
  /* Отключаем сдвиг на мобильных устройствах */
  body.nav-panel-open .header-left {
    transform: none;
  }
}