/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Arabic Font Support */
[dir="rtl"] {
    font-family: 'Cairo', sans-serif !important;
}

[dir="rtl"] * {
    font-family: 'Cairo', sans-serif !important;
}

/* Navigation Styles */
#navbar {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled {
    background: rgba(17, 24, 39, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f97316;
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 100%);
}

.hero-bg {
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%23ffffff" fill-opacity="0.05" fill-rule="evenodd"/%3E%3C/svg%3E');
    opacity: 0.3;
}

/* Stats Animation */
.stat-card {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Cards */
.step-card {
    position: relative;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-10px);
}

.step-icon-container {
    transition: all 0.3s ease;
}

.step-card:hover .step-icon-container {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.step-number {
    position: absolute;
    top: -20px;
    right: 10px;
    opacity: 0.2;
    font-size: 5rem;
    z-index: -1;
}

/* Feature Tabs */
.feature-tab {
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    font-weight: 600;
}

.feature-tab.active {
    background: white;
    color: #f97316;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #f97316;
}

.feature-card i {
    transition: transform 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Technology Cards */
.tech-card {
    transition: all 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
}

/* Investment Calculator */
#machinesSlider {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #f97316 0%, #f97316 25%, #d1d5db 25%, #d1d5db 100%);
}

#machinesSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #f97316;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#machinesSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #f97316;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* City Cards */
.city-card {
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

/* Button Hover Effects */
button,
.cta-button,
.cta-button-outline {
    position: relative;
    overflow: hidden;
}

button::before,
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before,
.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll to Top Button */
#scrollTop {
    transition: all 0.3s ease;
    z-index: 1000;
}

#scrollTop.visible {
    opacity: 1;
    pointer-events: all;
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    .step-number {
        font-size: 3rem;
        top: -10px;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .nav-link::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .step-number {
    right: auto;
    left: 10px;
}

/* Smooth Transitions */
* {
    transition: font-family 0s;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Selection Color */
::selection {
    background: #f97316;
    color: white;
}

::-moz-selection {
    background: #f97316;
    color: white;
}

/* Animation Delays */
[data-aos][data-aos-delay="100"] {
    transition-delay: 0.1s;
}

[data-aos][data-aos-delay="200"] {
    transition-delay: 0.2s;
}

[data-aos][data-aos-delay="300"] {
    transition-delay: 0.3s;
}

[data-aos][data-aos-delay="400"] {
    transition-delay: 0.4s;
}

[data-aos][data-aos-delay="500"] {
    transition-delay: 0.5s;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shadow Utilities */
.shadow-orange {
    box-shadow: 0 10px 40px rgba(249, 115, 22, 0.3);
}

.shadow-orange-lg {
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.4);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.glow:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.8);
}

/* Print Styles */
@media print {
    nav, footer, #scrollTop {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f97316;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .nav-link,
    button,
    a {
        text-decoration: underline;
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme, no changes needed */
}

/* Mobile Menu Transitions */
#mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.active {
    max-height: 500px;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f97316;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Success Message */
.success-message {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Message */
.error-message {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: #1f2937;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Image Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Video Styles */
video {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.overflow-hidden {
    overflow: hidden;
}

.pointer-events-none {
    pointer-events: none;
}

.select-none {
    user-select: none;
}

/* Grid Auto Flow */
.grid-flow-dense {
    grid-auto-flow: dense;
}

/* Aspect Ratio Containers */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}