/* Floating Menu Styles */
.floating-menu {
  position: fixed;
  top: 45%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 1000;
  font-style: oblique;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.menu-button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

/* Hamburger Icon */
.hamburger {
  width: 20px;
  height: 16px;
  position: relative;
  margin-bottom: 2px;
}

.hamburger .line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #4a90e2;
  border-radius: 1px;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line1 {
  top: 0;
}

.hamburger .line2 {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger .line3 {
  bottom: 0;
}

/* Hamburger to X animation */
.hamburger.active .line1 {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active .line2 {
  opacity: 0;
}

.hamburger.active .line3 {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.menu-text {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1;
  margin-bottom: 1px;
}

.lang-indicator {
  font-size: 8px;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
}

.menu-box {
  position: absolute;
  left: 90px;
  top: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.menu-box.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.menu-links {
  list-style: none;
  margin: 0;
  padding: 15px 0;
}

.menu-links li {
  margin: 0;
  padding: 0;
}

.menu-links a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  text-align: left;
  direction: ltr;
}

.menu-links a:hover {
  background: #f8f9fa;
  color: #667eea;
  padding-left: 25px;
}

.floating-menu[data-lang="he"] .menu-links a:hover {
  padding-left: 20px;
  padding-right: 25px;
}

.language-toggle {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.lang-btn {
  background: none;
  border: 2px solid #e9ecef;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.lang-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .floating-menu {
    left: 15px;
  }

  .menu-button {
    width: 50px;
    height: 50px;
  }

  .hamburger {
    width: 16px;
    height: 12px;
    margin-bottom: 1px;
  }

  .hamburger .line {
    height: 2px;
  }

  .menu-text {
    font-size: 8px;
    margin-bottom: 1px;
  }

  .lang-indicator {
    font-size: 7px;
  }

  .menu-box {
    left: 75px;
    min-width: 180px;
  }

  .menu-links a {
    font-size: 13px;
    padding: 10px 15px;
  }

  .language-toggle {
    padding: 12px 15px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* Language-specific text alignment */
.floating-menu[data-lang="en"] .menu-links a {
  text-align: left;
  direction: ltr;
}

.floating-menu[data-lang="he"] .menu-links a {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .language-toggle {
  direction: ltr; /* Keep language buttons in LTR order */
}

/* Animation for smooth transitions */
.floating-menu * {
  box-sizing: border-box;
}

/* Subtle pulse animation for attention */
.menu-button::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(102, 126, 234, 0.4);
  top: 0;
  left: 0;
  opacity: 0;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
