/* Custom Styles for SaaS Landing Page - Modern Design System */

/* CSS Variables for Modern Design System */
:root {
    /* Primary Colors - Modern Blue-Purple Gradient */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-900: #1e3a8a;
    
    /* Accent Colors - Purple */
    --color-accent-500: #8b5cf6;
    --color-accent-600: #7c3aed;
    --color-accent-700: #6d28d9;
    
    /* Neutral Colors */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    /* Shadows - Modern Depth System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.4);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Font Family - Inter (English) & Cairo (Arabic) */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-variant-numeric: oldstyle-nums;
    letter-spacing: -0.01em;
}

/* Arabic Font */
html[dir="rtl"] .font-inter,
html[dir="rtl"] body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar - Modern Design */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary-600), var(--color-accent-600));
    border-radius: 10px;
    border: 2px solid var(--color-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-primary-700), var(--color-accent-700));
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffffff;
    color: var(--color-gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation Styles - Modern Glassmorphism */
#navbar {
    transition: all var(--transition-base);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#navbar.scrolled {
    background: rgba(17, 24, 39, 0.98);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.9375rem;
    color: rgba(209, 213, 219, 1);
    transition: color var(--transition-fast);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary-600), var(--color-accent-600));
    border-radius: 2px;
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-link:hover::before {
    width: 100%;
}

/* Fade In Animation - Enhanced */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Feature Cards - Modern Design with Glassmorphism */
.feature-card {
    position: relative;
    transform: translateY(0);
    transition: all var(--transition-base);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-600), var(--color-accent-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Modern Gradient Backgrounds for Feature Cards */
.feature-card.bg-gradient-to-br {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
}

/* Testimonial Cards Animation */
.testimonial-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
}

/* Pricing Cards Animation */
.pricing-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
}

/* Stat Items Animation - Enhanced */
.stat-item {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Modern Button Styles */
button[type="button"],
a.bg-gradient-to-r {
    position: relative;
    transition: all var(--transition-base);
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.025em;
}

a.bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

a.bg-gradient-to-r:hover::before {
    left: 100%;
}

a.bg-gradient-to-r:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
}

/* Gradient Text Animation - Enhanced */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Modern Text Gradient */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
    animation: gradient-shift 5s ease infinite;
    background-size: 200% 200%;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Modern Blob Animation for Hero */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

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

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Gradient Animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Modern Typography System */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

/* Enhanced Hero Section */
#hero {
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Custom Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #mobile-menu-btn {
        display: none;
    }
}

/* Reduced Motion Support */
@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;
    }
}

/* RTL (Right-to-Left) Support for Arabic */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

html[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

html[dir="rtl"] .space-x-8 > * + * {
    margin-left: 0;
    margin-right: 2rem;
}

html[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

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

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

/* RTL adjustments for flex containers */
html[dir="rtl"] .flex-row-reverse {
    flex-direction: row;
}

/* Language switcher dropdown - Modern Design */
#lang-menu {
    min-width: 140px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(31, 41, 55, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

html[dir="rtl"] #lang-menu {
    right: auto;
    left: 0;
}

/* Modern Icon Containers */
.w-14.h-14,
.w-12.h-12,
.w-16.h-16 {
    position: relative;
    transition: all var(--transition-base);
}

.w-14.h-14:hover,
.w-12.h-12:hover,
.w-16.h-16:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

/* Enhanced Section Backgrounds */
section {
    position: relative;
}

section.bg-gradient-to-br {
    background-attachment: fixed;
}

/* Modern Card Borders */
.border-2 {
    border-width: 2px;
    border-style: solid;
    transition: all var(--transition-base);
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

/* Modern Value Section - Dark Theme Enhancement */
#value {
    position: relative;
    overflow: hidden;
}

#value::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced CTA Section */
#cta {
    position: relative;
    overflow: hidden;
}

#cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

/* Enhanced Section Headings */
section h2 {
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary-600), var(--color-accent-600));
    border-radius: 2px;
}

/* Modern Badge/Pill Styles */
.inline-block.px-4.py-2 {
    transition: all var(--transition-base);
}

.inline-block.px-4.py-2:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Feature Icons */
.feature-card .w-14,
.feature-card .w-12,
.feature-card .w-16 {
    position: relative;
    z-index: 1;
}

.feature-card .w-14::after,
.feature-card .w-12::after,
.feature-card .w-16::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: inherit;
    border-radius: inherit;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
    transition: all var(--transition-base);
}

.feature-card:hover .w-14::after,
.feature-card:hover .w-12::after,
.feature-card:hover .w-16::after {
    opacity: 0.5;
    filter: blur(12px);
    transform: scale(1.1);
}

/* Modern Stat Cards Enhancement */
.stat-item {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Pain Points Section - Enhanced UI */
.pain-points-wrapper {
    position: relative;
}

.pain-points-wrapper::before {
    content: '';
    position: absolute;
    inset: -40px;
    background:
        radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(248, 113, 113, 0.06) 0%, transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    z-index: -1;
}

.pain-points-grid {
    position: relative;
    z-index: 1;
}

.pain-point-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.18), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(248, 113, 113, 0.6);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.pain-point-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.6), rgba(248, 113, 113, 0));
    opacity: 0.7;
    transform: translateX(-100%);
    pointer-events: none;
    transition: transform 0.6s ease;
}

.pain-point-card:hover {
    transform: translateY(-6px);
    border-color: rgba(252, 165, 165, 0.9);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.9);
    background: radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.22), rgba(15, 23, 42, 0.98));
}

.pain-point-card:hover::before {
    transform: translateX(100%);
}

.pain-point-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle, #ef4444 0%, #7f1d1d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 20px rgba(248, 113, 113, 0.55);
}

.pain-point-icon i {
    color: #fee2e2;
    font-size: 0.9rem;
}

/* Improved Button Styles */
a.bg-gradient-to-r,
button.bg-gradient-to-r {
    position: relative;
    z-index: 1;
}

a.bg-gradient-to-r::after,
button.bg-gradient-to-r::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-accent-700));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-base);
}

a.bg-gradient-to-r:hover::after,
button.bg-gradient-to-r:hover::after {
    opacity: 1;
}

/* Enhanced Text Readability */
p {
    line-height: 1.75;
    color: var(--color-gray-600);
}

.text-gray-600 {
    color: var(--color-gray-600);
}

/* Modern Border Styles */
.border-gray-200 {
    border-color: rgba(229, 231, 235, 0.8);
}

.border-gray-100 {
    border-color: rgba(243, 244, 246, 0.8);
}

/* Improved Shadow on Hover */
.hover\:shadow-xl:hover {
    box-shadow: var(--shadow-2xl);
}

.hover\:shadow-lg:hover {
    box-shadow: var(--shadow-xl);
}

/* Modern Footer - Brighter Accent Gradient */
footer {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-accent-600) 50%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.8);
}

footer p,
footer a {
    color: #ffffff !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .feature-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    #hero::before,
    #hero::after {
        display: none;
    }
}

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

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

/* FAQ Section Styles */
.faq-item {
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.faq-question {
    cursor: pointer;
    outline: none;
}

.faq-question:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: -2px;
}

.faq-answer {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rotate-180 {
    transform: rotate(180deg);
}

