/* Button Base Styles */
.button,
.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-size: 1rem;
  gap: 8px;
  min-width: 160px; /* Ensure minimum width */
  text-align: center;
  white-space: nowrap; /* Prevent text wrapping */
}

/* RTL specific adjustments */
/* Language-specific font settings */
[dir="rtl"] .button,
[dir="rtl"] .cta-button {
  font-family: "Cairo", sans-serif;
  font-size: 1.1rem;
  min-width: 160px;
}

[dir="ltr"] .button,
[dir="ltr"] .cta-button {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  min-width: 160px;
}

/* Primary Button Style */
.button.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.button.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

/* Outline Button Style */
.button.outline {
  background: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
}

.button.outline:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.button.outline:active {
  transform: translateY(0);
  background: rgba(37, 99, 235, 0.2);
}

/* CTA Button Style */
.cta-button {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  font-weight: 700;
  padding: 14px 32px;
  min-width: 180px; /* Larger minimum width for CTA buttons */
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, #d97706, #b45309);
}

.cta-button:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

/* Hero Buttons Container */
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap; /* Allow wrapping on very small screens */
}

.hero-buttons .button {
  min-width: 180px; /* Consistent width for hero buttons */
}

/* Submit Button Size */
button[type="submit"].button.primary {
  min-width: 200px; /* Consistent width for submit button */
  margin: 0 auto; /* Center the submit button */
}

/* Submit Button Style */
button[type="submit"].button.primary {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Button Ripple Effect */
.button::after,
.cta-button::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 10%,
    transparent 70%
  );
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:active::after,
.cta-button:active::after {
  transform: scale(2);
  opacity: 0;
  transition: 0s;
}

/* RTL Support */
[dir="rtl"] .button,
[dir="rtl"] .cta-button {
  font-family: "Cairo", sans-serif;
}

/* Language Toggle Button */
.lang-toggle {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.lang-toggle:hover {
  background: rgba(37, 99, 235, 0.15);
}

.lang-toggle .separator {
  margin: 0 4px;
  opacity: 0.5;
}

/* Menu Toggle Button */
.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  gap: 6px;
}

/* Only show menu toggle on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #2563eb;
}

/* Social Link Buttons */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-2px);
}

.social-link:active {
  transform: translateY(0);
}
