/* Language Selector Styles */
.language-selector {
  position: relative;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  z-index: 10;
}

/* Flag icon size in navbar */
.language-selector > img:first-child,
.language-selector .language-flag {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* Arrow icon size */
.language-selector > img:last-child {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.language-selector:hover {
  background: rgba(255, 255, 255, 0.05);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(22, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 160px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 500;
}

.language-dropdown.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background: linear-gradient(90deg, rgba(255, 176, 0, 0.2), rgba(255, 176, 0, 0.1));
  color: #FFB000;
  transform: translateX(3px);
}

.language-option:hover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #FFB000, #FF7A00);
}

.language-option span:first-child {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.language-option span:last-child {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .language-selector {
    z-index: 998;
    position: relative !important;
  }
  
  .language-dropdown {
    /* Center the dropdown on mobile */
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    min-width: 140px;
    z-index: 998;
    max-width: calc(100vw - 40px);
  }
  
  .language-dropdown.active {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  
  .language-option {
    padding: 12px 16px;
    font-size: 14px;
    justify-content: center;
  }
  
  .language-option span:first-child {
    font-size: 18px;
  }
  
  .language-option span:last-child {
    font-size: 14px;
    font-weight: 600;
  }
  
  /* Hide language selector dropdown when mobile menu is open */
  .nav-menu.mobile-open ~ * .language-dropdown {
    display: none !important;
  }
}