/* Enhanced Header Styles */
.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #1f2937;
  font-weight: 700;
  font-size: 1.5rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  z-index: 1050;
}

.header__logo:hover {
  transform: scale(1.02);
}

.header__logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Navigation Styles */
.header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav__link:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.nav__link--active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #3b82f6;
  border-radius: 1px;
}

.nav__icon {
  transition: transform 0.2s ease;
}

.nav__link:hover .nav__icon {
  transform: rotate(180deg);
}

/* Dropdown Styles */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  min-width: 220px;
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.nav__item:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav__dropdown-link:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  justify-content: flex-end;
  z-index: 1050;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn--outline {
  background: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.btn--outline:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.btn--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

/* Mobile Menu Toggle */
.header__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  z-index: 1050;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.header__mobile-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header__mobile-toggle span {
  width: 24px;
  height: 3px;
  background: #1f2937;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
  margin: 0;
}

.header__mobile-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(0px, 7px);
}

.header__mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__mobile-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(0px, -7px);
}

/* Prevent body scroll when mobile nav is open */
body.menu-open {
  overflow: hidden !important;
}

/* Mobile Navigation - Override external styles */
.header__mobile-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  background: white !important;
  z-index: 1040 !important;
  display: none !important;
  flex-direction: column !important;
  padding: 100px 1.5rem 1.5rem !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s ease !important;
  overflow-y: auto !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
}

.header__mobile-nav.is-open {
  display: flex !important;
  transform: translateX(0) !important;
}

/* Mobile nav backdrop */
.header__mobile-nav::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header__mobile-nav.is-open::before {
  opacity: 1;
}

.header__mobile-nav .nav__list {
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  list-style: none !important;
}

.header__mobile-nav .nav__link {
  width: 100% !important;
  justify-content: flex-start !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  display: block !important;
  text-align: left !important;
  color: #4b5563 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.header__mobile-nav .nav__link:hover {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #3b82f6 !important;
}

/* Hidden Mobile Utility */
.hidden-mobile {
  display: inline-flex;
}

/* Responsive Design */
@media (min-width: 1401px) {
  .header__mobile-nav {
    display: none !important;
  }
  
  .header__mobile-nav.is-open {
    display: none !important;
  }
  
  .header__mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 1500px) {
  .header__container {
    padding: 1rem 1.5rem;
  }
  
  .nav__list {
    gap: 0.4rem;
  }
  
  .nav__link {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 1450px) {
  .header__container {
    padding: 1rem 1.25rem;
  }
  
  .nav__list {
    gap: 0.3rem;
  }
  
  .nav__link {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1400px) {
  .header__container {
    padding: 1rem;
  }
  
  .hidden-mobile {
    display: none;
  }
  
  .header__nav {
    display: none;
  }
  
  .header__mobile-toggle {
    display: flex !important;
    order: 2;
    margin-left: auto;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .header__actions {
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .header__container {
    padding: 1rem;
    flex-wrap: nowrap;
  }
  
  .header__nav {
    display: none;
  }
  
  .header__logo {
    flex-shrink: 0;
    font-size: 1.1rem;
  }
  
  .header__logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .header__actions {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  
  .hidden-mobile {
    display: none;
  }
  
  .header__mobile-toggle {
    display: flex !important;
    order: 2;
    margin-left: auto;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .header__container {
    padding: 0.75rem;
    position: relative;
  }
  
  .header__logo {
    font-size: 1rem;
    gap: 0.5rem;
  }
  
  .header__logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .header__actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .header__mobile-nav {
    padding: 80px 1rem 1rem;
  }
}
