/* Multilingual Support CSS */

/* Language Switcher Enhanced Styles */
.language-switcher {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

.language-btn {
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.08), rgba(0, 114, 188, 0.05));
  border: 2px solid rgba(0, 114, 188, 0.15);
  border-radius: 50px;
  padding: 12px 20px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-width: 110px;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 114, 188, 0.08);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.language-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.language-btn:hover::before {
  left: 100%;
}

.language-btn:hover {
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.15), rgba(40, 167, 69, 0.1));
  border-color: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 114, 188, 0.2);
}

.language-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.3);
}

.language-btn:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 114, 188, 0.15);
}

.globe-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--primary-color);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.language-btn:hover .globe-icon {
  color: var(--secondary-color);
  transform: rotate(20deg) scale(1.1);
}

.language-code {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.language-btn:hover .language-code {
  color: var(--secondary-color);
  transform: scale(1.05);
}

/* Loading state with pulse effect */
.language-btn.loading {
  opacity: 0.8;
  pointer-events: none;
  animation: pulse 2s infinite;
}

.language-btn.loading .globe-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* RTL/LTR Support */
[dir="rtl"] .language-switcher {
  margin-left: 0;
  margin-right: 15px;
}

[dir="rtl"] .language-btn {
  flex-direction: row-reverse;
}

[dir="ltr"] .language-switcher {
  margin-left: 15px;
  margin-right: 0;
}

/* English language specific styles */
[dir="ltr"] body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="ltr"] .navbar-nav {
  flex-direction: row;
}

[dir="ltr"] .navbar-nav .nav-link {
  text-align: left;
}

[dir="ltr"] .login-btn {
  flex-direction: row;
}

[dir="ltr"] .d-flex.align-items-center.gap-3 {
  flex-direction: row;
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .language-switcher {
    width: 100%;
    margin: 15px 0;
    display: flex;
    justify-content: center;
  }

  .language-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  .globe-icon {
    font-size: 1.4rem;
  }
  
  .language-code {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .language-btn {
    min-width: 90px;
    padding: 10px 15px;
  }
  
  .globe-icon {
    font-size: 1.2rem;
  }
  
  .language-code {
    font-size: 0.8rem;
  }
}

/* Animation for language change */
@keyframes languageChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.language-btn.changing {
  animation: languageChange 0.3s ease-in-out;
}

/* Success feedback */
.language-btn.success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.1));
  border-color: var(--secondary-color);
}

.language-btn.success .globe-icon,
.language-btn.success .language-code {
  color: var(--secondary-color);
} 