/* Custom styles for Safari Riders website */

* {
  scroll-behavior: smooth;
}

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

/* Olive Green Color Palette */
.text-olive-600 {
  color: #6B7F39;
}

.text-olive-700 {
  color: #5A6B2F;
}

.bg-olive-600 {
  background-color: #6B7F39;
}

.bg-olive-700 {
  background-color: #5A6B2F;
}

.bg-olive-100 {
  background-color: #E8EDD5;
}

.hover\:bg-olive-700:hover {
  background-color: #5A6B2F;
}

.hover\:text-olive-600:hover {
  color: #6B7F39;
}

.border-olive-200 {
  border-color: #D4DBBB;
}

.focus\:border-olive-500:focus {
  border-color: #7A8F44;
}

/* Animation for hero section and modal */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out;
}

/* Modal backdrop blur effect */
#newsletterModal {
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal content slide up animation */
#newsletterModal > div {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Card hover effects */
.hover\:shadow-2xl {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
  background: #7D8B3F;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6B7F39;
}

/* Mobile menu toggle */
@media (max-width: 768px) {
  nav .hidden {
    display: none;
  }
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #7D8B3F;
  box-shadow: 0 0 0 3px rgba(125, 139, 63, 0.1);
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Stats counter animation */
@keyframes count-up {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading states */
button:active {
  transform: scale(0.98);
}

/* Discount badge pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* RTL (Right-to-Left) Support for Arabic */
.rtl {
  direction: rtl;
  text-align: right;
}

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

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

/* RTL Font Support - Better Arabic Font */
[dir="rtl"], .rtl {
  font-family: 'Cairo', 'Tajawal', 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Import Arabic Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* RTL Spacing Adjustments */
.rtl .mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

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

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

.rtl .ml-4 {
  margin-left: 0;
  margin-right: 1rem;
}

/* RTL Flex Direction */
.rtl .flex-row-reverse {
  flex-direction: row-reverse;
}

.rtl .space-x-reverse > * + * {
  margin-right: var(--space-x-reverse-value);
  margin-left: 0;
}

/* RTL Border Radius */
.rtl .rounded-l-lg {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.rtl .rounded-r-lg {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}
