/* Шапка с фиксированным позиционированием */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-top {
  background-color: var(--primary-blue);
  color: var(--text-light);
  padding: 8px 0;
  font-size: 14px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-contact {
  display: flex;
  gap: 20px;
}

.header-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.header-contact a:hover {
  color: var(--primary-yellow);
}

.header-contact i {
  color: var(--primary-yellow);
}

.header-social {
  display: flex;
  gap: 10px;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text-light);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
}

.header-social a:hover {
  border-color: var(--primary-yellow);
  color: var(--primary-yellow);
  transform: scale(1.1);
}

.header-main {
  padding: 8px 0; /* Уменьшили отступы для меньшей высоты */
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-blue);
}


.logo img {
  height: 60px; /* Уменьшили высоту логотипа */
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
}

nav a {
  font-weight: 600;
  color: var(--primary-blue);
  transition: color 0.3s;
  text-decoration: none;
}

nav a:hover {
  color: var(--primary-yellow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-blue);
  cursor: pointer;
  padding: 8px;
}

.user-menu-item {
  position: relative;
}

.user-login-link {
  color: var(--primary-blue) !important;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.user-login-link:hover {
  color: var(--dark-blue) !important;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-blue);
  cursor: pointer;
  transition: color 0.3s ease;
}

.user-profile:hover {
  color: var(--primary-yellow);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--primary-blue);
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 91, 170, 0.15);
  min-width: 120px;
  z-index: 1000;
  display: none;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 15px;
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.user-dropdown a:hover {
  color: var(--primary-yellow);
}

/* Выпадающий список услуг */
.services-dropdown {
  position: relative;
}

.services-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--primary-blue);
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 91, 170, 0.15);
  min-width: 200px;
  z-index: 1000;
  display: none;
}

.services-dropdown-menu.show {
  display: block;
}

.services-dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--primary-blue) !important;
  text-decoration: none;
  transition: background 0.3s ease;
}

.services-dropdown-menu a:hover {
  color: var(--primary-yellow) !important;
}

/* Адаптивность */
@media (max-width: 1200px) {
  /* Большие планшеты */
  nav ul {
    gap: 20px;
  }
  
  .btn.btn-primary {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  /* Планшеты */
  .header-top {
    padding: 6px 0;
    font-size: 13px;
  }
  
  .header-contact {
    gap: 15px;
  }
  
  .header-social {
    gap: 8px;
  }
  
  .header-main {
    padding: 8px 0;
  }
  
  .header-main .container {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .logo img {
    height: 50px;
  }
  
  nav ul {
    gap: 15px;
    font-size: 14px;
  }
  
  .btn.btn-primary {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .user-dropdown {
    min-width: 100px;
  }
}

@media (max-width: 862px) {
  /* Мобильные устройства */
  .header-top {
    padding: 5px 0;
    font-size: 12px;
  }
  
  .header-contact a:nth-child(2) {
    display: none; /* Скрываем email */
  }
  
  .header-social a {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .header-main {
    padding: 8px 0;
  }
  
  .header-main .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo button burger";
    align-items: center;
    gap: 10px;
    min-height: 50px;
  }
  
  .logo {
    grid-area: logo;
  }
  
  .logo img {
    height: 40px;
  }
  
  .btn.btn-primary {
    grid-area: button;
    justify-self: center;
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
  }
  
  .mobile-menu-btn {
    grid-area: burger;
    display: flex;
    justify-self: end;
  }
  
  nav {
    grid-column: 1 / -1;
    order: 1;
  }
  
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    margin: 0;
    border-top: 1px solid #eee;
  }
  
  nav ul.mobile-menu-open {
    display: flex !important;
  }
  
  nav ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  nav ul li:last-child {
    border-bottom: none;
  }
  
  .user-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    margin-top: 10px;
  }
}

@media (min-width: 863px) {
  /* Десктоп */
  nav ul {
    display: flex !important;
  }
  
  .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 576px) {
  /* Маленькие мобильные */
  .header-top {
    padding: 4px 0;
    font-size: 11px;
  }
  
  .header-contact {
    gap: 8px;
  }
  
  .header-social {
    gap: 5px;
  }
  
  .header-social a {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  
  .header-main .container {
    gap: 8px;
    min-height: 45px;
  }
  
  .logo img {
    height: 35px;
  }
  
  .btn.btn-primary {
    padding: 5px 10px;
    font-size: 10px;
  }
  
  .mobile-menu-btn {
    font-size: 18px;
    padding: 5px;
  }
  
  nav ul {
    padding: 10px;
  }
  
  nav ul li {
    padding: 10px 0;
  }
}
