/* Global Webs - Main CSS File */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    
    /* Secondary Colors */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --danger-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --info-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Text Colors */
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Background Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 1.5rem;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Arabic Language Support */
.ar-lang {
    font-family: 'Cairo', 'Inter', sans-serif;
    direction: rtl;
    text-align: right;
}

.ar-lang .navbar-nav {
    flex-direction: row-reverse;
}

.ar-lang .dropdown-menu {
    right: 0;
    left: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Language Switcher */
.flag {
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    z-index: 1;
}

.btn-hover-effect::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: var(--transition);
    z-index: -1;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

/* Success Gradient Buttons */
.btn-outline-success {
    border-color: var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-gradient);
    border-color: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    border-color: var(--warning-color);
    color: white;
}

.btn-outline-info {
    border-color: var(--info-color);
    color: var(--info-color);
}

.btn-outline-info:hover {
    background: var(--info-gradient);
    border-color: var(--info-color);
    color: white;
}

.btn-outline-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-gradient);
    border-color: var(--danger-color);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background: var(--secondary-gradient);
    border-color: var(--secondary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: particles 20s linear infinite;
}

@keyframes particles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-150px, -100px); }
}

.hero-content {
    color: white;
    z-index: 3;
    position: relative;
}

.hero-badge .badge {
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content h1 {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

/* Hero Stats */
.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item h3 {
    margin-bottom: 0.25rem;
    font-size: 2rem;
    font-weight: 700;
}

.stat-item small {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Hero Image */
.hero-image {
    position: relative;
    z-index: 2;
}

.hero-devices-mockup {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.device-mockup {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: white;
}

.desktop-mockup {
    width: 100%;
    margin-bottom: 2rem;
}

.mobile-mockup {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 40%;
    transform: rotate(15deg);
}

.device-frame {
    padding: 1rem;
    background: linear-gradient(145deg, #f0f0f0, #cacaca);
    border-radius: var(--radius-xl);
}

.device-screen {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

.device-screen img {
    width: 100%;
    height: auto;
    display: block;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-icon:nth-child(2) {
    animation-delay: -2s;
}

.floating-icon:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.scroll-down:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-5px);
}

.scroll-down i {
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
}

/* Services Section */
#services {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.service-card {
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    background: white;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.1);
}

.service-card.featured {
    border: 2px solid var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--warning-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.service-icon {
    margin-bottom: 1.5rem;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    position: relative;
}

.bg-primary-gradient {
    background: var(--primary-gradient);
}

.bg-success-gradient {
    background: var(--success-gradient);
}

.bg-warning-gradient {
    background: var(--warning-gradient);
}

.bg-danger-gradient {
    background: var(--danger-gradient);
}

.bg-info-gradient {
    background: var(--info-gradient);
}

.bg-secondary-gradient {
    background: var(--secondary-gradient);
}

.service-features ul li {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.service-features ul li i {
    width: 16px;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.service-card:hover .service-overlay {
    opacity: 1;
}

/* Shadows */
.shadow-hover {
    box-shadow: var(--shadow);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-hover);
}

/* Utility Classes */
.bg-light {
    background-color: var(--bg-light) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.rounded-4 {
    border-radius: var(--radius-xl) !important;
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .hero-devices-mockup {
        max-width: 400px;
    }
    
    .mobile-mockup {
        width: 35%;
        bottom: -40px;
        right: -40px;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        padding-top: 80px;
        text-align: center;
    }
    
    .hero-devices-mockup {
        margin-top: 3rem;
        max-width: 350px;
    }
    
    .mobile-mockup {
        position: static;
        transform: none;
        width: 200px;
        margin: 2rem auto 0;
    }
    
    .floating-elements {
        display: none;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .display-4 {
        font-size: 2.25rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 3rem 0;
    }
    
    .hero-section {
        min-height: 100vh;
        padding-top: 70px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    h1 { font-size: 1.75rem; }
    .display-4 { font-size: 2rem; }
    
    .hero-stats {
        margin: 2rem 0;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-stats .row {
        gap: 1rem;
    }
    
    .hero-stats .col-4 {
        flex: 1;
        min-width: 80px;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    .featured-badge {
        right: 15px;
        top: -8px;
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .floating-elements,
    .scroll-indicator,
    #preloader {
        display: none !important;
    }
    
    .service-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ====================================
   Client & Testimonials Styles
==================================== */

/* Client Logos */
.client-logo {
    transition: all 0.3s ease;
    filter: grayscale(1);
    opacity: 0.7;
}

.client-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.testimonial-card img {
    border: 3px solid #e5e7eb;
    transition: border-color 0.3s ease;
}

.testimonial-card:hover img {
    border-color: var(--primary-color);
}

/* Portfolio Images */
.portfolio-image {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.portfolio-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Service Icons */
.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Image Overlays */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.8), rgba(139, 92, 246, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.portfolio-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay .btn {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .image-overlay .btn {
    transform: translateY(0);
}

/* Logo Animations */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-logo {
    animation: logoFloat 3s ease-in-out infinite;
}

.floating-logo:nth-child(2) {
    animation-delay: -0.5s;
}

.floating-logo:nth-child(3) {
    animation-delay: -1s;
}

.floating-logo:nth-child(4) {
    animation-delay: -1.5s;
}

/* Client Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

/* Stars Rating */
.rating-stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

/* Testimonial Quote */
.testimonial-quote {
    position: relative;
    font-style: italic;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -20px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000FF;
        --text-dark: #000000;
        --text-muted: #333333;
        --bg-light: #FFFFFF;
    }
    
    .service-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles-bg,
    .floating-icon,
    .scroll-down i {
        animation: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1f2937 !important;
        color: #f9fafb;
    }
    
    .text-dark {
        color: #f9fafb !important;
    }
    
    .service-card {
        background-color: #374151 !important;
        color: #f9fafb;
    }
}