@import url('mobile_nav.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Rajdhani", sans-serif;
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
  background: #0a0a0f;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: 1rem 0;
  z-index: 1000;
  border-bottom: 2px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 255, 255, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #00ffff;
  font-size: 2rem;
  font-weight: 900;
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.4);
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.logo:hover {
  text-shadow: 0 0 30px rgba(0, 255, 255, 1), 0 0 60px rgba(0, 255, 255, 0.6);
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Orbitron", sans-serif;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #00ffff;
  transform: translateY(-2px);
}

.nav-links a:hover::before {
  width: 100%;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(10, 10, 15, 0.98);
  min-width: 200px;
  box-shadow: 0 8px 32px 0 rgba(0, 255, 255, 0.2);
  z-index: 1000;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 10px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0;
  backdrop-filter: blur(10px);
}

.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dropdown-content a {
  color: #e0e0e0;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  font-size: 1rem;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0.5px;
}

.dropdown-content a::before {
  display: none;
  /* Remove the bottom line effect for dropdown items */
}

.dropdown-content a:hover {
  background: rgba(0, 255, 255, 0.1);
  transform: translateX(5px);
}

/* Nested Dropdown Styles */
.nested-dropdown {
  position: relative;
  width: 100%;
}

.nested-dropbtn {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

.nested-dropdown-content {
  display: none;
  position: absolute;
  left: 100%; /* Position to the right of the parent */
  top: 0;
  background-color: rgba(10, 10, 15, 0.98);
  min-width: 200px;
  box-shadow: 0 8px 32px 0 rgba(0, 255, 255, 0.2);
  z-index: 1001; /* Higher index than parent */
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.nested-dropdown:hover .nested-dropdown-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.nested-dropdown-content a {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  color: #e0e0e0;
}

.nested-dropdown-content a:hover {
  background: rgba(0, 255, 255, 0.1);
  color: #00ffff;
  transform: translateX(5px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Footer */
footer {
  background: #050508;
  padding: 2rem;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: #b0b0b0;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin: 0 0.5rem;
}

.footer-links a:hover {
  color: #00ffff;
}

.footer-container p {
  color: #666670;
  font-size: 0.8rem;
}

/* Language Toggle Button */
.lang-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-left: 1rem;
  text-decoration: none;
  font-family: inherit;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* Better Arabic font support */
}

[dir="rtl"] .nav-links {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .dropdown .dropdown-content {
  right: auto;
  left: 0;
  text-align: right;
}

[dir="rtl"] .nested-dropdown-content {
  left: auto; /* Reset left property */
  right: 100%; /* Position to the left of the parent */
  text-align: right;
}

[dir="rtl"] .nested-dropdown-content a:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .lang-btn {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .step,
[dir="rtl"] .controller-features {
  text-align: right;
}

[dir="rtl"] .step-number {
  left: auto;
  right: -15px;
}

[dir="rtl"] .cta-button,
[dir="rtl"] .download-btn {
  display: inline-block;
}

/* Ensure Logo stays correct text flow if needed, mostly zController is English connection */
[dir="rtl"] .logo {
  direction: ltr;
  display: inline-block;
}

/* Responsive (Nav) */
/* Moved to mobile_nav.css */

/* Scroll To Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  /* Ensure it's above other elements */
  border: none;
  outline: none;
  background: rgba(10, 10, 15, 0.8);
  color: #00ffff;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  /* Prevent clicks when transparent */
  transform: translateY(20px);
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

#scrollToTopBtn:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
  transform: translateY(-5px);
  /* Lift effect */
  color: #fff;
}

#scrollToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* RTL Specific Component Fixes */
[dir="rtl"] .step-number {
  margin-right: 0;
  margin-left: 1.5rem;
}

[dir="rtl"] .controller-features li {
  padding-left: 0;
  padding-right: 3rem;
}

[dir="rtl"] .controller-features li::before {
  left: auto;
  right: 0;
  content: "◀";
}

[dir="rtl"] .controller-features li:hover {
  padding-left: 0;
  padding-right: 3.5rem;
}