.ucs-header {
  background: white;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.ucs-header__nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.ucs-header__logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ucs-header__company-name {
  font-size: 24px;
  font-weight: 800;
  color: #2c3e50;
  letter-spacing: -0.5px;
}

.ucs-header__tagline {
  font-size: 11px;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.ucs-header__menu {
  display: flex;
  list-style: none;
  gap: 35px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.ucs-header__item {
  position: relative;
}

.ucs-header__link {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 600;
  padding: 10px 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.ucs-header__link:hover {
  color: #667eea;
}

.ucs-header__dropdown-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====================== DESKTOP DROPDOWN ====================== */
.ucs-header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  background: white;
  min-width: 240px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  list-style: none;
  padding: 10px 0;
  margin-top: 5px;
  border: 1px solid #f0f0f0;
  z-index: 999;
}

.ucs-header__item--has-dropdown:hover .ucs-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.ucs-header__item--has-dropdown:hover .ucs-header__dropdown-icon {
  transform: rotate(180deg);
}

.ucs-header__dropdown li {
  margin: 0;
}

.ucs-header__dropdown-link {
  padding: 14px 25px;
  color: #4a5568;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14.5px;
}

.ucs-header__dropdown-link:hover {
  background: linear-gradient(90deg, #f8f9ff, #e8ecff);
  color: #667eea;
  padding-left: 30px;
}

/* ====================== HAMBURGER ====================== */
.ucs-header__hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 10px;
  z-index: 1001;
}

.ucs-header__hamburger span {
  width: 25px;
  height: 3px;
  background: #2c3e50;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

/* ====================== MOBILE STYLES (≤768px) ====================== */
@media (max-width: 768px) {
  .ucs-header__nav {
    height: 70px;
    padding: 0 15px;
  }

  .ucs-header__company-name {
    font-size: 20px;
  }

  .ucs-header__hamburger {
    display: flex;
  }

  .ucs-header__menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 30px 0 30px 20px;
    gap: 0;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 999;
  }

  .ucs-header__menu.ucs-header__menu--active {
    left: 0;
  }

  .ucs-header__item {
    width: 100%;
    border-bottom: 1px solid #f0f2f5;
  }

  .ucs-header__link {
    padding: 18px 20px;
    width: 100%;
    justify-content: space-between;
    font-size: 16px;
  }

  /* ==================== MOBILE DROPDOWN – FULL FIX ==================== */
  .ucs-header__dropdown {
    position: static !important; /* Override absolute */
    left: 0 !important; /* Critical fix – was 50% */
    top: auto !important; /* Critical fix */
    transform: none !important; /* Critical fix – removes translateX(-50%) */
    margin-top: 0 !important;
    width: 100% !important;
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
    border: none;
    border-radius: 0;
  }

  .ucs-header__item--has-dropdown.ucs-header__item--active
    .ucs-header__dropdown {
    max-height: 500px; /* Increased for safety (longer menus) */
    padding: 15px 0;
  }

  .ucs-header__dropdown-link {
    padding: 16px 50px; /* Slightly more indent for visual hierarchy */
    font-size: 15px;
    border-bottom: 1px solid #e9ecef;
  }

  .ucs-header__dropdown-icon {
    margin-left: auto;
  }

  .ucs-header__item--has-dropdown.ucs-header__item--active
    .ucs-header__dropdown-icon {
    transform: rotate(180deg);
  }

  /* Hamburger Animation */
  .ucs-header__hamburger.ucs-header__hamburger--active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .ucs-header__hamburger.ucs-header__hamburger--active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .ucs-header__hamburger.ucs-header__hamburger--active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Demo content spacing */
.ucs-header__content-demo {
  padding-top: 100px;
  padding: 40px 20px;
  min-height: 200vh;
}
