/* ============================================
   Taleeb - Custom Styles
   Extends Tailwind CSS
   ============================================ */

/* CSS Custom Properties (matches Tailwind config) */
:root {
  --primary: #00A651;
  --primary-hover: #4CAF50;
  --primary-dark: #006400;
  --secondary: #212121;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL Ready - Toggle these when switching to Arabic */
[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

[dir="rtl"] .logo {
  font-family: 'Noto Sans Arabic', sans-serif;
}

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

@keyframes bounce-slow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes scroll-down {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
  opacity: 0;
}

.animate-bounce-slow {
  animation: bounce-slow 3s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-scroll-down {
  animation: scroll-down 1.5s ease-in-out infinite;
}

/* Animation Delays */
.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-500 {
  animation-delay: 0.5s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

.animation-delay-800 {
  animation-delay: 0.8s;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-1500 {
  animation-delay: 1.5s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Header scroll effect */
.header-scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Custom Gradient Utilities */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.gradient-hero {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

/* Selection Color */
::selection {
  background-color: var(--primary);
  color: white;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* Image Placeholders */
.img-placeholder {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Ripple Effect (optional) */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.3s;
}

.btn-ripple:active::after {
  transform: scale(2);
  opacity: 1;
  transition: 0s;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Print Styles */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Dark Mode Ready (uncomment when needed) */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a2e;
    --text-primary: #ffffff;
  }
}
*/

/* RTL Specific Adjustments */
[dir="rtl"] .hero-cta svg,
[dir="rtl"] .learn-more-arrow {
  transform: rotate(180deg);
}

[dir="rtl"] .group:hover .group-hover\:translate-x-1 {
  transform: translateX(-0.25rem);
}

/* WhatsApp Button Pulse */
.whatsapp-pulse {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Testimonial Card Gradient Border */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 8px 8px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonial-card:hover::before {
  opacity: 1;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Feature Icon Gradient Backgrounds */
.feature-icon-1 { background: linear-gradient(135deg, #00A651 0%, #4CAF50 100%); }
.feature-icon-2 { background: linear-gradient(135deg, #EAB308 0%, #FACC15 100%); }
.feature-icon-3 { background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%); }
.feature-icon-4 { background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%); }

/* Sticky CTA Bar (Mobile) */
@media (max-width: 640px) {
  .sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 40;
  }
}

/* Custom container max-widths */
.container-narrow {
  max-width: 768px;
  margin: 0 auto;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
}
