/* Modern Header Styles */
:root {
  --header-height: 70px;
  --header-bg: rgba(255, 255, 255, 0.98);
  --header-bg-blur: rgba(255, 255, 255, 0.85);
  --nav-text: #2c3e50;
  --nav-hover: #0066cc;
  --accent-color: #ff6600;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Header Base */
.header-modern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  z-index: 1000;
  transition: all var(--transition-medium);
  animation: headerSlideDown 0.6s ease-out;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scrolled State */
.header-modern.scrolled {
  background: var(--header-bg-blur);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--border-color);
}

/* Container */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}

/* Navigation */
.nav-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo Section */
.logo-modern {
  position: relative;
  animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  transition: transform var(--transition-fast);
}

.logo-link:hover {
  transform: scale(1.02);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nav-text);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.75rem;
  color: #7f8c8d;
  margin-top: 2px;
}


/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 1s ease-out 0.2s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item-wrapper {
  position: relative;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nav-hover);
  transform: translateX(-50%);
  transition: width var(--transition-fast);
}

.nav-item:hover {
  color: var(--nav-hover);
  background: rgba(0, 102, 204, 0.05);
}

.nav-item:hover::before {
  width: 30px;
}

.dropdown-icon {
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  min-width: 280px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all var(--transition-medium);
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--nav-text);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(0, 102, 204, 0.05);
  transform: translateX(4px);
}

.dropdown-icon-wrapper {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 102, 204, 0.05));
  border-radius: 8px;
}

.dropdown-item-icon {
  color: var(--nav-hover);
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.dropdown-item-desc {
  font-size: 0.8rem;
  color: #7f8c8d;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Search Button */
.search-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--nav-text);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
}

/* Language Switcher */
.language-switcher-modern {
  display: flex;
  gap: 4px;
  z-index: 10;
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--nav-text);
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-btn.active {
  background: rgba(0, 102, 204, 0.1);
  border-color: var(--nav-hover);
  color: var(--nav-hover);
}

.lang-btn svg {
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* CTA Button */
.cta-btn-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--nav-hover), #0052a3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.cta-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
  background: linear-gradient(135deg, #0052a3, var(--nav-hover));
}

.cta-btn-modern svg {
  transition: transform var(--transition-fast);
}

.cta-btn-modern:hover svg {
  transform: translateX(4px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition-fast);
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all var(--transition-medium);
  transform-origin: center;
}

.mobile-menu-btn.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: white;
  z-index: 999;
  transition: right var(--transition-medium);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu-panel.active {
  right: 0;
}

.mobile-menu-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.mobile-menu-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo img {
  height: 40px;
}

.mobile-logo span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nav-text);
}

.mobile-nav {
  flex: 1;
}

.mobile-nav-item,
.mobile-nav-subitem {
  display: block;
  padding: 12px 16px;
  color: var(--nav-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.mobile-nav-item {
  font-weight: 500;
  font-size: 1rem;
}

.mobile-nav-subitem {
  font-size: 0.95rem;
  padding-left: 32px;
  color: #7f8c8d;
}

.mobile-nav-item:hover,
.mobile-nav-subitem:hover {
  background: rgba(0, 102, 204, 0.05);
  color: var(--nav-hover);
}

.mobile-nav-section {
  margin: 20px 0;
}

.mobile-nav-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  margin-bottom: 8px;
}

.mobile-nav-cta {
  display: block;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--nav-hover), #0052a3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  margin-top: 20px;
  transition: all var(--transition-fast);
}

.mobile-nav-cta:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.mobile-lang-switcher {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.mobile-lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nav-text);
}

.mobile-lang-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.mobile-lang-btn.active {
  background: rgba(0, 102, 204, 0.1);
  border-color: var(--nav-hover);
  color: var(--nav-hover);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }
  
  .search-btn {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .language-switcher-modern {
    display: none;
  }
  
  .cta-btn-modern {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }
  
  .logo-tagline {
    display: none;
  }
  
  .logo-img {
    height: 40px;
  }
}

/* Animations for page load */
.nav-item-wrapper {
  animation: navItemFade 0.6s ease-out backwards;
}

.nav-item-wrapper:nth-child(1) { animation-delay: 0.1s; }
.nav-item-wrapper:nth-child(2) { animation-delay: 0.2s; }
.nav-item-wrapper:nth-child(3) { animation-delay: 0.3s; }
.nav-item-wrapper:nth-child(4) { animation-delay: 0.4s; }

@keyframes navItemFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust page content to account for fixed header */
body {
  padding-top: var(--header-height);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --header-bg: rgba(30, 30, 30, 0.98);
    --header-bg-blur: rgba(30, 30, 30, 0.85);
    --nav-text: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.1);
  }
  
  .dropdown-menu,
  .mobile-menu-panel {
    background: #1e1e1e;
  }
  
  .dropdown-item:hover,
  .mobile-nav-item:hover,
  .mobile-nav-subitem:hover,
  .lang-btn:hover,
  .mobile-lang-btn:hover,
  .search-btn:hover,
  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}