/* Marketing/Landing Page Styles */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-feature-settings: "ss01", "ss02", "cv01", "cv02", "cv03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes pulse-custom {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes float-delayed {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-6px) translateX(2px); }
}

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

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes line-grow {
  from { width: 0%; }
  to { width: 100%; }
}

/* Animation classes */
.animate-pulse-custom {
  animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

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

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

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

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

.animate-cursor-blink {
  animation: cursor-blink 1s ease-in-out infinite;
}

.animate-pulse-scale {
  animation: pulse-scale 2s ease-in-out infinite;
}

.animate-line-grow {
  animation: line-grow 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Hover animations */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* FAQ */

.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

.faq-content-inner {
  overflow: hidden;
}

.faq-item.is-open .faq-content {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* Icon states */
.faq-item .faq-icon-plus {
  display: block;
}

.faq-item .faq-icon-minus {
  display: none;
}

.faq-item.is-open .faq-icon-plus {
  display: none;
}

.faq-item.is-open .faq-icon-minus {
  display: block;
}

/* Header scroll state */
.header-scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E6E6E6;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-transparent {
  background-color: transparent;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* RTL Support for Arabic */

html.lang-ar,
html.lang-ar body,
[dir="rtl"],
[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif !important;
}

[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] a,
[dir="rtl"] button {
  line-height: 1.7;
}

html.lang-ar *,
[dir="rtl"] * {
  font-family: inherit;
}

html:not(.lang-ar) body {
  font-family: 'Inter', sans-serif;
}

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* Hero Section RTL */
[dir="rtl"] .hero-grid {
  direction: ltr;
}

/* RTL: Desktop - swap columns */
@media (min-width: 1024px) {
	[dir="rtl"] .hero-grid > .hero-content {
		order: 2;
	}

	[dir="rtl"] .hero-grid > .phone-section {
		order: 1;
	}
}

/* RTL: Mobile */
[dir="rtl"] .hero-grid > .hero-content {
	direction: rtl;
}

[dir="rtl"] .hero-grid > .phone-section {
	direction: rtl;
}

/* Floating cards - LTR positioning */
.floating-card-left {
	left: -2rem;
	right: auto;
}

@media (min-width: 640px) {
	.floating-card-left {
		left: -4rem;
	}
}

.floating-card-right {
	right: -1rem;
	left: auto;
}

@media (min-width: 640px) {
	.floating-card-right {
		right: -0.5rem;
	}
}

/* Floating cards - RTL positioning (swap sides) */
[dir="rtl"] .floating-card-left {
	left: auto;
	right: -2rem;
}

@media (min-width: 640px) {
	[dir="rtl"] .floating-card-left {
		right: -4rem;
	}
}

[dir="rtl"] .floating-card-right {
	right: auto;
	left: -1rem;
}

@media (min-width: 640px) {
	[dir="rtl"] .floating-card-right {
		left: -0.5rem;
	}
}

/* Demo button - keep icon before text in RTL */
[dir="rtl"] .demo-btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .stat-item {
  text-align: right;
}

/* How It Works floating cards - LTR positioning */
.how-it-works-float-card {
	right: -1rem;
	left: auto;
}

@media (min-width: 640px) {
	.how-it-works-float-card {
		right: -2rem;
	}
}

/* How It Works floating cards - RTL positioning */
[dir="rtl"] .how-it-works-float-card {
	right: auto;
	left: -1rem;
}

@media (min-width: 640px) {
	[dir="rtl"] .how-it-works-float-card {
		left: -2rem;
	}
}

/* Animations RTL */
[dir="rtl"] .scroll-animate-left {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[dir="rtl"] .scroll-animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

[dir="rtl"] .scroll-animate-right {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[dir="rtl"] .scroll-animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Utility Classes */
[dir="rtl"] .font-mono {
  direction: ltr;
  display: inline-block;
}

.font-arabic {
  font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif !important;
}
