/* Language switcher */
body .language-switcher {
  /* Remove fixed positioning */
  position: static;
  top: auto;
  right: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: auto;
  margin-left: var(--spacing-md); /* Add margin from nav */

}
body .language-switcher .globe-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
body .lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 94, 156, 0.548);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 106, 176, 0.397); /* Similar to social media border color */
  border-radius: 8px;
  color: var(--color-text-inverse);
  cursor: pointer;
  transition: var(--transition-quick);
  font-size: 0.875rem;
  font-family: 'Calibri Light', Calibri, sans-serif;
  font-weight: 500;
  min-width: 50px;
  outline: none;
}
body .current-lang-display {
  font-weight: 600;
  letter-spacing: 0.5px;
}
body .professional-language-switcher {
  position: relative;
  display: inline-block;
  z-index: 1020;
}
body .header-right .professional-language-switcher .globe-icon {
  height: 18px ;
  min-height: 18px !important;
  max-height: 18px !important;
  width: 18px ;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}
.header-right .professional-language-switcher .globe-icon:hover {
  transform: none !important;
  filter: none !important;
}
.lang-switcher-btn:hover {

  transform: translateY(-2px);
  /* Enhanced glow on hover - similar to social media hover */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4),
              0 0 20px #00436fbc,
              0 0 0 1px #00436fbc inset;
}

body .globe-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
body .current-lang-display {
  font-weight: 600;
  letter-spacing: 0.5px;
}
body .dropdown-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.lang-switcher-btn[aria-expanded='true'] .dropdown-arrow {
  transform: rotate(180deg);
}
body .lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  min-width: 180px;
  max-width: var(--language-switcher-width);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}
.site-header:has(.lang-dropdown-menu.open) {
  overflow: visible !important;
}
.site-header.dropdown-open {
  overflow: visible !important;
}
.lang-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-dropdown-menu::before {
  display: none;
}
body .lang-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--color-text-inverse);
  cursor: pointer;
  transition: var(--transition-quick);
  font-size: 0.875rem;
  font-family: inherit;
  text-align: left;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 56px;
  pointer-events: auto;
  z-index: 1;
  border-bottom: 1px solid transparent;
}
.lang-option::after {
  display: none;
}
.lang-option:last-child::after {
  opacity: 0;
}
.lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-inverse);
}
.lang-option:focus {
  outline: none;
  background: rgba(67, 137, 184, 0.2);
  color: #4389b8;
}
.lang-option.active {
  background: rgba(67, 137, 184, 0.15);
  color: #4389b8;
  position: relative;
}
.lang-option.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #4389b8;
}
.lang-option.active .lang-label,
.lang-option.active .lang-code {
  font-weight: 600;
}
body .flag-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body .lang-label {
  font-family: 'Calibri Light', Calibri, sans-serif;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body .lang-code {
  font-family: 'Calibri Light', Calibri, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}
.lang-option.active .lang-code {
  color: #4389b8;
}
body .translation-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
body .loading-content {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
body .loading-spinner {
  display: none;
}
body .loading-text {
  color: var(--color-text-inverse);
  font-family: 'Calibri Light', Calibri, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
}
body .language-switcher {
  right: var(--space-xs) !important;
  gap: var(--space-xs) ;
}

@supports selector(:focus-visible) {
  .lang-switcher-btn:focus:not(:focus-visible) {
    outline: none;
  }
  .lang-option:focus:not(:focus-visible) {
    background: transparent;
    color: inherit;
  }
}

/* Responsive Design - Media Queries */
@media (prefers-reduced-motion: reduce) {
  .lang-switcher-btn,
  .lang-dropdown-menu,
  .lang-option,
  .dropdown-arrow,
  body .globe-icon {
    transition: none;
  }
  body .loading-spinner {
    animation: none;
  }
  body .translation-loading-indicator {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  body .lang-switcher-btn {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.1);
  }
  body .lang-dropdown-menu {
    border-color: currentColor;
    background: #000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
  }
  .lang-option:hover {
    background: rgba(255, 255, 255, 0.3);
  }
}

@media (max-width: 480px) {
  body .language-switcher {
    top: calc(var(--header-height, 50px) + var(--news-banner-height, 35px) + var(--space-xs)) !important;
    right: var(--space-xs) !important;
    padding: calc(var(--space-xs) / 2) ;
  }
  body .language-switcher-button {
    padding: calc(var(--space-xs) / 2) ;
    min-width: 40px ;
    font-size: 0.75rem ;
  }
  body .globe-icon {
    width: 12px ;
    height: 12px ;
  }
}

@media (max-width: 640px) {
  .lang-switcher-btn,
  body .language-switcher-button {
    min-height: 40px !important;
    padding: var(--space-xs) var(--space-sm) ;
  }
}

@media (max-width: 768px) {
  body .language-switcher {
    position: static !important;
    top: auto !important;
    transform: none !important;
    z-index: 1003 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    order: 2; /* LEFT SIDE */

  }
  
  body .language-switcher-button,
  body .lang-switcher-btn {
    padding: var(--space-xs) var(--space-sm) !important;
    min-width: 45px !important;
    font-size: 0.8rem !important;
    background: #00436fbc !important;
    border: 1px solid #0572bb !important;
  }
  
  body .globe-icon {
    width: 14px !important;
    height: 14px !important;
  }
  
  /* Ensure dropdown appears above mobile menu when open */
  body .lang-dropdown-menu {
    z-index: 10000 !important;
    position: fixed !important;
    top: calc(var(--header-height, 60px) + 5px) !important;
    left: var(--space-sm) !important; /* Changed from right to left */
    right: auto !important;
  }
}
