/* ==========================================================================
   Header Component - Eazy Communications (Universal & Reusable)
   ========================================================================== */

.site-header {
  position: relative;
  width: 100%;
  height: 104px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  padding: 20px var(--section-px);
  z-index: 100;
}

.header-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  width: 136px;
  height: 64px;
  flex-shrink: 0;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Desktop Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 57px;
  margin-left: 184px;
}

.header-nav-link {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--color-dark);
  white-space: nowrap;
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.header-nav-link:hover,
.header-nav-link.active {
  color: var(--primary-bright);
}

.header-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient-horizontal);
  transition: width var(--transition-fast);
}

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.header-user-btn:hover {
  opacity: 0.8;
}

.header-user-btn img {
  width: 18px;
  height: 20px;
}

.header-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.15);
}

/* Custom Header Actions with Cart & Profile Avatar Pill (Figma Node 196:332) */
.header-actions-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  text-decoration: none;
  transition: transform var(--transition-fast, 0.2s);
}

.header-cart-btn:hover {
  transform: scale(1.08);
}

.header-divider-custom {
  width: 1px;
  height: 19px;
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.header-avatar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50px;
  background: linear-gradient(270deg, #c4e7ff 0%, #f3f5f7 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 10px rgba(0, 174, 239, 0.12);
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-avatar-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 174, 239, 0.22);
}

.header-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.mobile-menu-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--color-gray-dark);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Menu Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 104px;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px var(--section-px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  z-index: 99;
}

.mobile-nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer .header-nav-link {
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* Responsive Header */
@media (max-width: 1280px) and (min-width: 1025px) {
  .header-nav {
    margin-left: clamp(40px, 8vw, 184px);
    gap: clamp(24px, 3.5vw, 57px);
  }
}

@media (max-width: 1024px) {
  .site-header {
    padding: 16px 40px;
    height: 80px;
  }
  .header-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-nav-drawer {
    top: 80px;
    padding: 24px 40px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 20px;
    height: 72px;
  }
  .btn-get-started span.btn-label {
    display: none;
  }
  .btn-get-started {
    padding: 5px;
  }
  .mobile-nav-drawer {
    top: 72px;
    padding: 20px;
  }

  .header-avatar-pill {
    width: 40px;
    height: 40px;
    padding: 3px;
  }

  .header-avatar-img {
    width: 34px;
    height: 34px;
  }

  .header-actions-custom {
    gap: 8px;
  }

  .header-divider-custom {
    height: 16px;
  }
}
