/* ArabKo Custom Styles */

* {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* RTL Support for Arabic */
body.rtl {
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body.rtl .flex-row-reverse {
  flex-direction: row-reverse;
}

body.rtl .text-left {
  text-align: right;
}

body.rtl .text-right {
  text-align: left;
}

body.rtl .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

body.rtl .mr-2, body.rtl .mr-3, body.rtl .mr-4 {
  margin-right: 0;
}

body.rtl .mr-2 {
  margin-left: 0.5rem;
}

body.rtl .mr-3 {
  margin-left: 0.75rem;
}

body.rtl .mr-4 {
  margin-left: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDelay1 {
  0%, 20% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDelay2 {
  0%, 40% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDelay3 {
  0%, 60% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-delay-1 {
  animation: fadeInDelay1 1.2s ease-out forwards;
}

.animate-fade-in-delay-2 {
  animation: fadeInDelay2 1.6s ease-out forwards;
}

.animate-fade-in-delay-3 {
  animation: fadeInDelay3 2s ease-out forwards;
}

/* Navbar scroll effect */
#main-nav.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Modal animations */
.modal-step {
  animation: fadeIn 0.3s ease-out;
}

/* Counter animation */
.counter {
  transition: all 0.5s ease;
}

/* Smooth hover effects */
a, button {
  transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #1976D2;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1565C0;
}

/* Hero canvas styling */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Language button active state */
.lang-btn.active {
  background: #1976D2;
  color: white;
  font-weight: bold;
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #1976D2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Mobile menu transition */
#mobile-menu {
  transition: all 0.3s ease;
}

/* Grayscale logo hover effect */
.grayscale {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.grayscale:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Card hover effects */
.hover\:shadow-2xl:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

/* Print styles */
@media print {
  nav, footer, .whatsapp-button {
    display: none;
  }
}

/* Accessibility improvements */
.focus\:ring:focus {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #1976D2;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tooltip styles */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #0A1929;
  color: white;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 8px;
}

.tooltip:hover::before {
  opacity: 1;
}

/* Success/Error messages */
.message-success {
  background: #10B981;
  color: white;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  animation: fadeIn 0.3s ease;
}

.message-error {
  background: #EF4444;
  color: white;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  animation: fadeIn 0.3s ease;
}

/* 3D elements */
.transform-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Progress bars */
.progress-bar {
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1976D2, #42A5F5);
  transition: width 0.3s ease;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-blue {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-green {
  background: #D1FAE5;
  color: #065F46;
}

.badge-red {
  background: #FEE2E2;
  color: #991B1B;
}

/* Grid patterns for backgrounds */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(25, 118, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 118, 210, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ROI Calculator styles */
#roi-calculator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Interactive map styles */
#interactive-map {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.map-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #1976D2;
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.map-marker:hover {
  transform: scale(1.3);
  background: #42A5F5;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Pulse animation for important elements */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.counter-animate {
  animation: countUp 0.6s ease-out;
}
