/* Modern Professional Portfolio CSS */

/* Import Cairo Font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

/* Root Variables - Modern Color Palette */
:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-hover: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    
    /* Secondary Colors */
    --secondary-color: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    
    /* Success Colors */
    --success-color: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    
    /* Warning Colors */
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --warning-light: #fbbf24;
    
    /* Danger Colors */
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #f87171;
    
    /* Neutral Colors */
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 50px 100px -20px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --section-padding: 6rem 0;
    --container-padding: 1.5rem;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: text !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--gray-700);
    background-color: var(--gray-50);
    overflow-x: hidden;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--gray-600);
}

/* Main Content */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Modern Navigation */
.navbar {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.75rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-light) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: var(--radius-full);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

/* Hero Section - Modern Design */
.hero-section {
    background: linear-gradient(-45deg, #7f53ac, #647dee, #43cea2, #185a9d);
    background-size: 400% 400%;
    animation: gradientBG 12s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,100 1000,0 1000,100"/></svg>');
    background-size: cover;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.hero-section::before, .hero-section::after, .hero-bg-overlay { z-index: 0 !important; }

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: white;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.hero-content .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-buttons {
    z-index: 10;
    position: relative;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    z-index: 11;
    position: relative;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.hero-buttons .btn::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);
}

.hero-buttons .btn:hover::before {
    left: 100%;
}

.hero-buttons .btn-light {
    background: white;
    color: var(--primary-dark);
    border: none;
}

.hero-buttons .btn-light:hover {
    background: var(--gray-100);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-buttons .btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.hero-buttons .btn-outline-light:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-image-placeholder {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    padding: 4rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

.hero-image-placeholder i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

/* Sections */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section.bg-light {
    background: var(--gray-50);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    background: white;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Product Cards */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    flex: 1;
}

.price-section {
    margin: 1rem 0;
}

.price-section .text-decoration-line-through {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.price-section .fw-bold {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Skill Cards */
.skill-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.skill-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.skill-card h5 {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.skill-card .text-muted {
    color: var(--gray-500) !important;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Progress Bars */
.progress {
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Stats Section */
.stats-section {
    background: var(--gradient-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.05)"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
}

.stat-card {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

.stat-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::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);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-light {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-md);
}

.btn-light:hover {
    background: var(--gray-100);
    color: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Social Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-xl);
    color: white;
}

/* Back to Top Button */
#backToTop {
    background: linear-gradient(135deg, #667eea 0%, #43cea2 100%);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(67,206,162,0.18);
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    animation: bounceIn 1.2s;
}
#backToTop.show {
    animation: bounceIn 1.2s;
}
@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    80% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}
#backToTop:hover {
    background: linear-gradient(90deg, #43cea2 0%, #667eea 100%);
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(67,206,162,0.25);
}

/* Footer */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-light);
}

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

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

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

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

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-custom-lg {
    box-shadow: var(--shadow-lg);
}

.border-radius-custom {
    border-radius: var(--radius);
}

.transition-custom {
    transition: var(--transition);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
        --container-padding: 1rem;
    }
    
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .stat-card {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .skill-card {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .hero-image-placeholder {
        padding: 2rem;
    }
    
    .hero-image-placeholder i {
        font-size: 4rem;
    }
}

/* Dark Mode Support - Enhanced */
.theme-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Ensure smooth transitions for theme switching */
body,
.main-navbar,
.card,
.section,
.footer,
.form-control,
.btn,
.modal-content,
.dropdown-menu,
.navbar-menu,
.language-switcher .btn,
.theme-toggle {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }
    
    body {
        background-color: var(--gray-50);
        color: var(--gray-700);
    }
    
    .card {
        background: var(--gray-100);
        color: var(--gray-700);
    }
    
    .skill-card {
        background: var(--gray-100);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    #backToTop,
    footer {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        min-height: auto;
    }
    
    .section {
        padding: 2rem 0;
    }
}

/* Tech Card Modern */
.tech-card {
    z-index: 1;
    position: relative;
    pointer-events: auto !important;
    background: rgba(255,255,255,0.13);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
    margin: auto;
}
.tech-icons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.tech-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(31,38,135,0.10);
    font-size: 2.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255,255,255,0.25);
    animation: iconSpin 8s linear infinite;
    pointer-events: auto;
}
.tech-icon:hover {
    transform: scale(1.15) rotate(-6deg);
    box-shadow: 0 6px 24px rgba(31,38,135,0.18);
}
.tech-icon.node { color: #68a063; background: #e6f4ea; animation-delay: 0s; }
.tech-icon.react { color: #61dafb; background: #e6f7fb; animation-delay: 1.2s; }
.tech-icon.php { color: #777bb4; background: #f0f0fa; animation-delay: 2.4s; }
.tech-icon.js { color: #f7df1e; background: #fffbe6; animation-delay: 3.6s; }
.tech-icon.css { color: #2965f1; background: #e6f0fa; animation-delay: 4.8s; }
.tech-icon.laravel { color: #ff2d20; background: #ffeaea; animation-delay: 6s; }

.tech-card-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #222;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.tech-card-desc {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .tech-card {
        min-width: 90vw;
        min-height: 160px;
        padding: 1.2rem 0.5rem;
    }
    .tech-icons {
        gap: 0.5rem;
    }
    .tech-icon {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }
}

/* Headings Modern */
h1, .display-3, .display-4 {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

/* Stats Modern */
.hero-stats .stat-item {
    background: rgba(255,255,255,0.10);
    border-radius: 1rem;
    padding: 1.2rem 0.5rem;
    margin: 0 0.2rem;
    min-width: 90px;
}
.hero-stats h4 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.2rem;
}
.hero-stats small {
    color: #e0e0e0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .hero-stats .stat-item { min-width: 70px; padding: 0.7rem 0.2rem; }
    .hero-stats h4 { font-size: 1.2rem; }
}

@keyframes iconSpin {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(10deg) scale(1.08); }
    20% { transform: rotate(-10deg) scale(1.05); }
    30% { transform: rotate(8deg) scale(1.1); }
    40% { transform: rotate(-8deg) scale(1.07); }
    50% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* تعطيل التفاعل فقط للعناصر الزخرفية */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite,
.hero-bg-overlay,
.hero-wave {
  pointer-events: none !important;
  z-index: 0 !important;
}

/* تفعيل التفاعل ورفع الز-index للأزرار والروابط في كل الصفحة */
a, button, .btn, .space-btn, .glow-btn, .hero-buttons a, .hero-buttons .btn {
  pointer-events: auto !important;
  z-index: 99999 !important;
  position: relative !important;
}

/* السماح بتحديد النص في كل الصفحة ما عدا العناصر الزخرفية */
body, .hero-section, .hero-content, .section, .main-content, .card, .skill-card, .product-card, .space-tech-card, .space-profile-card, .space-about-content, .space-feature, .space-stat-card, .space-cta-section, .space-stats-section, .space-skill-card, .space-product-card, .space-tech-badge, .space-badge, .glow-text, .space-title, .space-text, .lead, .card-title, .card-text, .stat-label, .stat-number, .price-section, .section-title, .section-subtitle, .navbar, .footer, .btn, a, button, input, textarea {
  user-select: text !important;
}

.animated-astronaut img {
  user-select: none;
  pointer-events: none;
}

/* إزالة أي قاعدة عامة تمنع تحديد النص */
/* إذا وجدت قاعدة مثل user-select: none لأي عنصر غير زخرفي، يجب حذفها أو استبدالها بـ user-select: text */

/* Parallax Hero */
@media (min-width: 992px) {
  .hero-section { background-attachment: fixed; }
}

/* Animated Gradient Hover for Buttons */
.btn-gradient-primary, .btn-primary, .btn-outline-primary:hover {
  background: linear-gradient(90deg,#667eea 0%,#43cea2 100%);
  background-size: 200% 200%;
  transition: background-position 0.4s, box-shadow 0.2s, transform 0.2s;
}
.btn-gradient-primary:hover, .btn-primary:hover, .btn-outline-primary:focus {
  background-position: 100% 0;
  box-shadow: 0 8px 32px rgba(67,206,162,0.18);
  transform: scale(1.05);
}

/* Card Hover Effect */
.card, .skill-card, .product-card {
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover, .skill-card:hover, .product-card:hover {
  box-shadow: 0 16px 48px 0 rgba(67,206,162,0.18), 0 2rem 4rem rgba(0,0,0,0.10);
  transform: translateY(-8px) scale(1.03);
}

/* Custom Cursor for Buttons */
.btn, .btn-lg, .btn-primary, .btn-outline-primary, .btn-gradient-primary {
  cursor: pointer;
}
.btn:active {
  transform: scale(0.97);
}

/* Hero SVG Wave */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Stronger Glassmorphism */
.card, .skill-card, .product-card, .tech-card {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 8px 32px 0 rgba(67,206,162,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.18);
}

/* Swiper Slider Custom */
.swiper {
  width: 100%;
  padding: 2rem 0;
}
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: auto;
}

/* AOS Animations Enhancements */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
}
[data-aos].aos-animate {
  opacity: 1;
}

/* ===== SPACE THEME - التصميم الفضائي ===== */

/* Space Background Canvas */
.space-canvas {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0 !important;
    pointer-events: none;
}

/* Space Elements */
.space-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.planet {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(100,100,255,0.6), rgba(50,50,150,0.4));
    box-shadow: 0 0 50px rgba(100,100,255,0.3);
    animation: float 20s ease-in-out infinite;
}

.planet-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.planet-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 5%;
    background: radial-gradient(circle at 30% 30%, rgba(255,200,100,0.8), rgba(255,150,50,0.6), rgba(200,100,50,0.4));
    box-shadow: 0 0 40px rgba(255,150,50,0.3);
    animation-delay: -5s;
}

.planet-3 {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 80%;
    background: radial-gradient(circle at 30% 30%, rgba(100,255,200,0.8), rgba(50,200,100,0.6), rgba(50,150,100,0.4));
    box-shadow: 0 0 30px rgba(50,200,100,0.3);
    animation-delay: -10s;
}

.asteroid {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    animation: meteor 8s linear infinite;
}

.asteroid-1 {
    top: 0;
    right: 20%;
    animation-delay: 0s;
}

.asteroid-2 {
    top: 0;
    right: 60%;
    animation-delay: -4s;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100,50,255,0.1), transparent);
    filter: blur(20px);
    animation: nebula-glow 15s ease-in-out infinite;
}

.nebula-1 {
    width: 300px;
    height: 300px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.nebula-2 {
    width: 200px;
    height: 200px;
    top: 70%;
    right: 20%;
    background: radial-gradient(circle, rgba(255,100,200,0.1), transparent);
    animation-delay: -7s;
}

.satellite {
    position: absolute;
    top: 15%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    animation: satellite-orbit 25s linear infinite;
}

.satellite::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: rgba(255,255,255,0.3);
}

/* Space Hero Section */
.space-hero {
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

.space-content {
    position: relative;
    z-index: 2;
}

.space-badge {
    background: rgba(100,100,255,0.2) !important;
    border: 1px solid rgba(100,100,255,0.3);
    backdrop-filter: blur(10px);
    color: #fff !important;
}

.space-badge.text-primary {
    color: #fff !important;
}

.glow-effect {
    box-shadow: 0 0 20px rgba(100,100,255,0.3);
}

.space-title {
    color: #fff !important;
    text-shadow: 0 0 20px rgba(100,100,255,0.5);
}

.glow-text {
    text-shadow: 0 0 30px rgba(100,100,255,0.8);
}

.nebula-text {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(102,126,234,0.8);
}

.space-text {
    color: rgba(255,255,255,0.9) !important;
}

.space-btn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.space-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100,100,255,0.3);
}

.glow-btn {
    box-shadow: 0 0 20px rgba(100,100,255,0.3);
}

.glow-btn:hover {
    box-shadow: 0 0 30px rgba(100,100,255,0.5);
}

.space-stats .stat-item {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 1.5rem;
}

.glow-number {
    color: #fff;
    text-shadow: 0 0 20px rgba(100,100,255,0.8);
    font-weight: bold;
}

.space-tech-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 2.5rem 3rem 2.5rem 3rem;
    min-width: 520px;
    min-height: 220px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.space-tech-title {
    color: #fff;
    text-shadow: 0 0 15px rgba(100,100,255,0.5);
}

.space-tech-desc {
    color: rgba(255,255,255,0.8);
}

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

.floating-icon:nth-child(2) { animation-delay: -0.5s; }
.floating-icon:nth-child(3) { animation-delay: -1s; }
.floating-icon:nth-child(4) { animation-delay: -1.5s; }
.floating-icon:nth-child(5) { animation-delay: -2s; }

.glow-icon {
    text-shadow: 0 0 15px currentColor;
}

/* Space Sections */
.space-section {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.space-about-content {
    color: #fff;
}

.space-feature {
    color: rgba(255,255,255,0.9);
}

.space-feature-icon {
    color: #4CAF50;
}

.space-profile-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.space-avatar {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 0 30px rgba(102,126,234,0.5);
}

.space-tech-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Space Skills */
.space-skill-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    transition: all 0.3s ease;
}

.space-skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(100,100,255,0.2);
}

.space-skill-icon {
    box-shadow: 0 0 30px rgba(100,100,255,0.3);
}

.space-progress {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.space-progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    box-shadow: 0 0 10px rgba(102,126,234,0.5);
}

/* Space Products */
.space-product-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(102,126,234,0.10);
    transition: box-shadow 0.3s, transform 0.2s;
}
.space-product-card:hover {
    box-shadow: 0 6px 24px #764ba2cc, 0 6px 24px 0 rgba(31,38,135,0.10);
    transform: translateY(-4px) scale(1.01);
}
.space-product-card .card-img-top {
    height: 160px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}
.space-product-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #fff;
    text-align: center;
}
.space-product-card .card-text {
    color: #e0e0f0;
    font-size: 0.98rem;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    text-align: center;
}
.space-product-card .price-section {
    text-align: center;
    margin-bottom: 0.5rem;
}
.space-product-card .btn {
    min-width: 90px;
}
.swiper-pagination-bullet {
    background: #764ba2 !important;
    opacity: 0.5;
}
.swiper-pagination-bullet-active {
    background: #fff !important;
    opacity: 1;
}
.swiper-button-next, .swiper-button-prev {
    color: #fff;
    background: rgba(102,126,234,0.13);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: background 0.2s;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background: #764ba2;
}

.space-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.space-pagination .swiper-pagination-bullet-active {
    background: #667eea;
    box-shadow: 0 0 10px rgba(102,126,234,0.5);
}

.space-nav {
    color: #fff;
    text-shadow: 0 0 10px rgba(100,100,255,0.5);
}

/* Space Stats */
.space-stats-section {
    background: rgba(0,0,0,0.5);
}

.space-stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    transition: all 0.3s ease;
}

.space-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(100,100,255,0.2);
}

.space-stat-icon {
    color: #667eea;
}

.space-stat-label {
    color: rgba(255,255,255,0.8);
}

/* Space CTA */
.space-cta-section {
    background: linear-gradient(135deg, rgba(102,126,234,0.8), rgba(118,75,162,0.8));
    position: relative;
    overflow: hidden;
}

.space-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: twinkle 10s linear infinite;
}

.space-back-to-top {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    box-shadow: 0 0 20px rgba(100,100,255,0.3);
}

/* Space Animations */
@keyframes meteor {
    0% { transform: translateY(-100px) translateX(0px); opacity: 1; }
    100% { transform: translateY(100vh) translateX(100px); opacity: 0; }
}

@keyframes nebula-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes satellite-orbit {
    0% { transform: rotate(0deg) translateX(200px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(200px) rotate(-360deg); }
}

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

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Space Responsive */
@media (max-width: 768px) {
    .planet {
        display: none;
    }
    
    .space-stats .stat-item {
        margin-bottom: 1rem;
    }
    
    .space-tech-card {
        padding: 1.5rem;
    }
}

/* Space Dark Mode */
@media (prefers-color-scheme: dark) {
    .space-canvas {
        background: linear-gradient(135deg, #000000 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    }
}

.animated-astronaut {
  position: fixed;
  top: 18%;
  left: 38%;
  bottom: auto;
  z-index: 0;
  pointer-events: none;
  animation: float-astronaut 4s ease-in-out infinite;
  transition: filter 0.3s;
  filter: none;
  transform: translateX(-50%);
}
.animated-astronaut img {
  width: 420px;
  max-width: 60vw;
  filter: none;
  user-select: none;
  pointer-events: none;
  border-radius: 30px;
  box-shadow: none;
  transition: filter 0.3s, transform 0.3s;
}
@keyframes float-astronaut {
  0%, 100% { transform: translateY(0) rotate(-10deg) scaleX(1); }
  50% { transform: translateY(-50px) rotate(15deg) scaleX(1); }
}

/* إضافة قاعدة أكثر دقة لعناصر الزخرفة فقط */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite {
  pointer-events: none !important;
}

/* تأكيد تفاعل الأزرار والروابط دائمًا */
.btn, a, button, .space-btn, .glow-btn {
  pointer-events: auto !important;
  z-index: 20;
  position: relative;
}

/* ===== قواعد نهائية لضمان السماح بالتحديد والضغط ===== */

/* السماح بتحديد النص في كل الصفحة */
html, body, div, p, h1, h2, h3, h4, h5, h6, span, a, button, input, textarea, label, li, td, th {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* السماح بالضغط في كل الصفحة */
html, body, div, p, h1, h2, h3, h4, h5, h6, span, a, button, input, textarea, label, li, td, th {
  pointer-events: auto !important;
}

/* استثناء العناصر الزخرفية فقط */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite,
.hero-bg-overlay,
.hero-wave,
.animated-astronaut,
.animated-astronaut img,
.hero-section::before,
.hero-section::after {
  user-select: none !important;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* تأكيد تفعيل التفاعل للأزرار والروابط */
.btn, a, button, .space-btn, .glow-btn, .hero-buttons a, .hero-buttons .btn, .navbar-nav .nav-link {
  pointer-events: auto !important;
  z-index: 99999 !important;
  position: relative !important;
  user-select: text !important;
  cursor: pointer !important;
}

/* تأكيد السماح بالتحديد في المحتوى الرئيسي */
.hero-content,
.section,
.card,
.skill-card,
.product-card,
.space-tech-card,
.space-profile-card,
.space-about-content,
.space-feature,
.space-stat-card,
.space-cta-section,
.space-stats-section,
.space-skill-card,
.space-product-card,
.navbar,
.footer {
  user-select: text !important;
  pointer-events: auto !important;
}

/* ===== قواعد نهائية قوية جداً لحل المشكلة ===== */

/* تجاوز جميع القواعد السابقة */
* {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  pointer-events: auto !important;
}

/* استثناء العناصر الزخرفية فقط */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite,
.hero-bg-overlay,
.hero-wave,
.animated-astronaut,
.animated-astronaut img,
.hero-section::before,
.hero-section::after {
  user-select: none !important;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* تأكيد قوي للأزرار والروابط */
.btn, a, button, .space-btn, .glow-btn, .hero-buttons a, .hero-buttons .btn, .navbar-nav .nav-link, .tech-card, .tech-icon {
  pointer-events: auto !important;
  z-index: 99999 !important;
  position: relative !important;
  user-select: text !important;
  cursor: pointer !important;
}

/* تأكيد قوي للمحتوى النصي */
p, h1, h2, h3, h4, h5, h6, span, div, .lead, .card-title, .card-text, .stat-label, .stat-number, .price-section, .section-title, .section-subtitle {
  user-select: text !important;
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* تأكيد قوي للمحتوى النصي */
p, h1, h2, h3, h4, h5, h6, span, div, .lead, .card-title, .card-text, .stat-label, .stat-number, .price-section, .section-title, .section-subtitle {
  user-select: text !important;
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* ===== قواعد نهائية قوية جداً لحل المشكلة نهائياً ===== */

/* تجاوز جميع القواعد السابقة بقوة */
html, body, div, p, h1, h2, h3, h4, h5, h6, span, a, button, input, textarea, label, li, td, th, .hero-content, .section, .card, .skill-card, .product-card, .space-tech-card, .space-profile-card, .space-about-content, .space-feature, .space-stat-card, .space-cta-section, .space-stats-section, .space-skill-card, .space-product-card, .navbar, .footer, .btn, .space-btn, .glow-btn, .tech-card, .tech-icon, .tech-card-title, .tech-card-desc, .hero-buttons, .hero-buttons *, .navbar-nav, .navbar-nav * {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  pointer-events: auto !important;
  cursor: auto !important;
}

/* استثناء العناصر الزخرفية فقط */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite,
.hero-bg-overlay,
.hero-wave,
.animated-astronaut,
.animated-astronaut img,
.hero-section::before,
.hero-section::after,
.meteor {
  user-select: none !important;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* تأكيد قوي للأزرار والروابط */
.btn, a, button, .space-btn, .glow-btn, .hero-buttons a, .hero-buttons .btn, .navbar-nav .nav-link, .tech-card, .tech-icon, .tech-card-title, .tech-card-desc {
  pointer-events: auto !important;
  z-index: 99999 !important;
  position: relative !important;
  user-select: text !important;
  cursor: pointer !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* إزالة أي تأثيرات JavaScript قد تمنع التحديد */
* {
  -webkit-touch-callout: default !important;
  -webkit-user-select: text !important;
  -khtml-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* تأكيد السماح بالضغط في كل مكان */
* {
  pointer-events: auto !important;
}

/* استثناء العناصر الزخرفية فقط */
.space-canvas,
.space-elements,
.planet,
.asteroid,
.nebula,
.satellite,
.hero-bg-overlay,
.hero-wave,
.animated-astronaut,
.animated-astronaut img,
.hero-section::before,
.hero-section::after,
.meteor {
  pointer-events: none !important;
}

/* ===== Space Navbar Styles ===== */

.space-navbar {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 1rem 0;
    z-index: 9999;
    position: relative;
}

.space-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.space-navbar.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--primary-color-rgb), 0.1);
    padding: 0.5rem 0;
}

/* Brand/Logo */
.space-brand {
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.space-brand:hover {
    color: var(--primary-color) !important;
    transform: scale(1.05);
}

.brand-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.3);
}

/* Navigation Links */
.space-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.space-nav-link:hover,
.space-nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.space-nav-link::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 ease;
    z-index: -1;
}

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

.space-nav-link i {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

.space-nav-link:hover i {
    transform: scale(1.2);
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

/* Dropdown Menu */
.space-dropdown {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--primary-color-rgb), 0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown.show .space-dropdown {
    opacity: 1;
    transform: translateY(0);
}

.space-dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
    position: relative;
    overflow: hidden;
}

.space-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-color-rgb), 0.1), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.space-dropdown-item:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.space-dropdown-item i {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

.space-dropdown-item:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.space-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.2);
}

/* Search Form */
.space-search {
    position: relative;
}

.space-input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(var(--primary-color-rgb), 0.1);
    transition: all 0.3s ease;
}

.space-input-group:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--primary-color-rgb), 0.2);
}

.space-search-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 0.75rem 1rem;
    border-radius: 25px 0 0 25px;
    transition: all 0.3s ease;
}

.space-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.space-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.space-search-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25), inset 0 0 10px rgba(var(--primary-color-rgb), 0.1);
}

.space-search-btn {
    background: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 0 25px 25px 0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.space-search-btn::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 ease;
}

.space-search-btn:hover {
    background: var(--primary-color-dark) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.space-search-btn:hover::before {
    left: 100%;
}

/* Action Links */
.space-action-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.space-action-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-color-rgb), 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.space-action-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.space-action-link i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

.space-action-link:hover i {
    transform: scale(1.2);
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.space-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* Mobile Toggle */
.space-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.space-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
}

.space-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .space-navbar {
        padding: 0.5rem 0;
    }
    
    .space-nav {
        margin-top: 1rem;
    }
    
    .space-nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
        margin: 0.25rem 0;
    }
    
    .space-search {
        margin: 1rem 0;
    }
    
    .space-actions {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .space-dropdown {
        background: transparent;
        border: none;
        box-shadow: none;
        margin-top: 0;
    }
    
    .space-dropdown-item {
        background: rgba(255, 255, 255, 0.05);
        margin: 0.25rem 0;
        border-radius: 8px;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
}

/* Navbar Scroll Effect */
.navbar-scroll-effect {
    animation: navbarSlideDown 0.5s ease;
}

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

/* Glow Effects */
.glow-icon {
    filter: drop-shadow(0 0 5px var(--primary-color));
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--primary-color));
    }
    50% {
        filter: drop-shadow(0 0 15px var(--primary-color));
    }
}

/* Hover Effects */
.space-nav-link:hover .glow-icon {
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: none;
}

/* Active State Enhancement */
.space-nav-link.active {
    background: linear-gradient(45deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--primary-color-rgb), 0.1));
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.2);
}

.space-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
    box-shadow: 0 0 10px var(--primary-color);
}

/* ===== End Space Navbar Styles ===== */ 

/* ===== Swiper Product Cards Fix ===== */

/* Swiper Container */
.space-swiper {
    padding: 2rem 0;
    overflow: hidden;
}

.space-swiper .swiper-wrapper {
    align-items: stretch;
}

/* Product Card in Swiper */
.space-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.space-swiper .swiper-slide .space-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 450px;
}

.space-swiper .swiper-slide .space-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.space-swiper .swiper-slide .space-product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card:hover .card-img-top {
    transform: scale(1.05);
}

.space-swiper .swiper-slide .space-product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: transparent;
    justify-content: space-between;
}

.space-swiper .swiper-slide .space-product-card .card-title {
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.4;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .card-text {
    flex: 1;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.space-swiper .swiper-slide .space-product-card .space-badge {
    background: rgba(var(--primary-color-rgb), 0.2) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1rem;
    display: inline-block;
    width: fit-content;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .price-section {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .price-section .text-decoration-line-through {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.space-swiper .swiper-slide .space-product-card .price-section .glow-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.space-swiper .swiper-slide .space-product-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
}

.space-swiper .swiper-slide .space-product-card .btn-primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.space-swiper .swiper-slide .space-product-card .btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.space-swiper .swiper-slide .space-product-card .btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Swiper Navigation */
.space-nav {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.space-nav:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.space-nav::after {
    font-size: 1rem;
    font-weight: bold;
}

/* Swiper Pagination */
.space-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.space-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

/* Responsive Design for Swiper */
@media (max-width: 768px) {
    .space-swiper .swiper-slide .space-product-card {
        min-height: 400px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-img-top {
        height: 150px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-title {
        font-size: 1.1rem;
        min-height: 2.2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-text {
        font-size: 0.85rem;
        min-height: 2.5rem;
    }
    
    .space-nav {
        width: 35px;
        height: 35px;
    }
    
    .space-nav::after {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .space-swiper .swiper-slide .space-product-card {
        min-height: 380px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-img-top {
        height: 120px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-title {
        font-size: 1rem;
        min-height: 2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-text {
        font-size: 0.8rem;
        min-height: 2.2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ===== End Swiper Product Cards Fix ===== */ 

/* Swiper Product Cards Fix */
.space-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.space-swiper .swiper-slide .space-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 450px;
}

.space-swiper .swiper-slide .space-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.space-swiper .swiper-slide .space-product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card:hover .card-img-top {
    transform: scale(1.05);
}

.space-swiper .swiper-slide .space-product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: transparent;
    justify-content: space-between;
}

.space-swiper .swiper-slide .space-product-card .card-title {
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.4;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .card-text {
    flex: 1;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.space-swiper .swiper-slide .space-product-card .space-badge {
    background: rgba(var(--primary-color-rgb), 0.2) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1rem;
    display: inline-block;
    width: fit-content;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .price-section {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .price-section .text-decoration-line-through {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.space-swiper .swiper-slide .space-product-card .price-section .glow-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

.space-swiper .swiper-slide .space-product-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.space-swiper .swiper-slide .space-product-card .btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
}

.space-swiper .swiper-slide .space-product-card .btn-primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.space-swiper .swiper-slide .space-product-card .btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.space-swiper .swiper-slide .space-product-card .btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Swiper Navigation */
.space-nav {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.space-nav:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.space-nav::after {
    font-size: 1rem;
    font-weight: bold;
}

/* Swiper Pagination */
.space-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.space-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}

/* Responsive Design for Swiper */
@media (max-width: 768px) {
    .space-swiper .swiper-slide .space-product-card {
        min-height: 400px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-img-top {
        height: 150px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-title {
        font-size: 1.1rem;
        min-height: 2.2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-text {
        font-size: 0.85rem;
        min-height: 2.5rem;
    }
    
    .space-nav {
        width: 35px;
        height: 35px;
    }
    
    .space-nav::after {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .space-swiper .swiper-slide .space-product-card {
        min-height: 380px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-img-top {
        height: 120px;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-title {
        font-size: 1rem;
        min-height: 2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .card-text {
        font-size: 0.8rem;
        min-height: 2.2rem;
    }
    
    .space-swiper .swiper-slide .space-product-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ===== End Swiper Product Cards Fix ===== */ 

/* ===== إصلاح تراكب شريط البحث مع عناصر الهيدر ===== */
.space-navbar .navbar-collapse {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap;
}

.space-search {
  min-width: 220px;
  max-width: 320px;
  margin: 0 1rem !important;
  z-index: 1;
  position: relative;
}

.space-input-group {
  width: 100%;
}

.space-search-input {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  min-width: 0;
}

.navbar-nav.space-nav {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem;
  margin: 0 !important;
}

.navbar-nav.space-actions {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem;
  margin: 0 !important;
}

@media (max-width: 991.98px) {
  .space-navbar .navbar-collapse {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .space-search {
    margin: 1rem 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .navbar-nav.space-nav,
  .navbar-nav.space-actions {
    flex-direction: column !important;
    gap: 0.2rem;
  }
}
/* ===== نهاية إصلاح تراكب شريط البحث ===== */

/* ===== توزيع عناصر الهيدر بشكل صحيح RTL ===== */
.space-navbar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.space-navbar .navbar-brand {
  margin-left: 2rem;
  margin-right: 0;
  flex-shrink: 0;
}

.space-navbar .navbar-collapse {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 1 1 auto;
  gap: 1rem;
  flex-wrap: nowrap;
}

.navbar-nav.space-nav,
.navbar-nav.space-actions {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem;
  margin: 0 !important;
  flex-shrink: 0;
}

.space-search {
  min-width: 180px;
  max-width: 240px;
  margin: 0 0 0 1rem !important;
  z-index: 1;
  position: relative;
  flex-shrink: 0;
}

.space-input-group {
  width: 100%;
}

.space-search-input {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .space-navbar .container,
  .space-navbar .navbar-collapse {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0;
  }
  .space-search {
    margin: 1rem 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .navbar-nav.space-nav,
  .navbar-nav.space-actions {
    flex-direction: column !important;
    gap: 0.2rem;
  }
}
/* ===== نهاية توزيع عناصر الهيدر بشكل صحيح RTL ===== */

/* ===== هيدر عصري ونظيف من الصفر ===== */
.main-navbar {
  background: rgba(10, 12, 30, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  direction: rtl;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 2vw;
  gap: 1rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #b5bfff;
  font-weight: bold;
  font-size: 1.3rem;
  text-decoration: none;
  white-space: nowrap;
}
.navbar-logo img {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #222;
  box-shadow: 0 0 10px #6c63ff44;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-menu li a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.navbar-menu li a:hover,
.navbar-menu li a.active {
  background: #6c63ff22;
  color: #b5bfff;
}

.navbar-search {
  display: flex;
  align-items: center;
  background: #23244a;
  border-radius: 25px;
  padding: 0.2rem 0.5rem;
  margin: 0 1rem;
  min-width: 180px;
  max-width: 250px;
  flex: 0 0 auto;
}
.navbar-search input[type='search'] {
  border: none;
  background: transparent;
  color: #fff;
  padding: 0.5rem 0.5rem;
  outline: none;
  width: 100%;
  font-size: 1rem;
}
.navbar-search button {
  background: none;
  border: none;
  color: #b5bfff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.navbar-social {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.navbar-social a {
  color: #b5bfff;
  font-size: 1.2rem;
  transition: color 0.2s;
}
.navbar-social a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 991.98px) {
  .navbar-container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .navbar-menu {
    gap: 0.5rem;
  }
  .navbar-search {
    min-width: 120px;
    max-width: 100%;
    margin: 0.5rem 0;
  }
}
@media (max-width: 700px) {
  .navbar-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .navbar-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  .navbar-search {
    margin: 0.5rem auto;
  }
  .navbar-social {
    justify-content: center;
  }
}
/* ===== نهاية الهيدر العصري ===== */

/* ===== تحسينات فضائية لنموذج التواصل ===== */
.space-form {
  background: rgba(24, 28, 47, 0.93);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.45), 0 0 0 2px #6c63ff33;
  border-radius: 20px;
  border: 1.5px solid #6c63ff55;
  backdrop-filter: blur(12px);
}

.space-form .form-label {
  color: #b5bfff;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.space-form .form-control, .space-form textarea, .space-input {
  background: rgba(40, 44, 80, 0.92);
  color: #fff;
  border: 1.5px solid #6c63ff77;
  border-radius: 12px;
  box-shadow: 0 0 8px #6c63ff22;
}

.space-form .form-control:focus, .space-form textarea:focus, .space-input:focus {
  border-color: #b5bfff;
  box-shadow: 0 0 16px #b5bfff77;
}

.space-form .btn-gradient-primary {
  background: linear-gradient(90deg, #6c63ff 0%, #23244a 100%);
  color: #fff;
  border: none;
  box-shadow: 0 0 16px #6c63ff55;
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: bold;
  letter-spacing: 1px;
}

.space-form .btn-gradient-primary:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 0 32px #b5bfff99;
}

.space-form .glow-btn {
  box-shadow: 0 0 16px #6c63ff88, 0 0 32px #b5bfff33;
}

.space-form .glow-btn:active {
  box-shadow: 0 0 8px #6c63ffcc;
}

/* رسائل نجاح/خطأ عصرية */
.space-alert {
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 12px #6c63ff33;
  background: linear-gradient(90deg, #23244a 0%, #6c63ff22 100%);
  color: #fff;
  border: 1.5px solid #6c63ff55;
  position: relative;
  z-index: 3;
}

.space-alert-success {
  border-color: #4ade80;
  background: linear-gradient(90deg, #23244a 0%, #4ade8033 100%);
  color: #d1fae5;
}

.space-alert-error {
  border-color: #f87171;
  background: linear-gradient(90deg, #23244a 0%, #f8717133 100%);
  color: #fee2e2;
}

/* أزرار تواصل سريعة */
.contact-info .social-links a {
  background: #23244a;
  color: #b5bfff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 8px #6c63ff33;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.contact-info .social-links a:hover {
  background: #6c63ff;
  color: #fff;
  box-shadow: 0 0 16px #b5bfff99;
}

/* تحسين الخريطة */
.contact-map iframe {
  filter: grayscale(0.2) brightness(0.95) drop-shadow(0 0 8px #6c63ff44);
  border-radius: 16px;
  border: 2px solid #23244a;
}

/* مؤثرات فضائية إضافية */
.contact-section {
  position: relative;
  z-index: 1;
}

/* إزالة الطبقة الشفافة من صفحة التواصل */
.contact-section::before {
  display: none !important;
}

.space-form {
  position: relative;
  z-index: 2;
}

/* ===== نهاية تحسينات التواصل ===== */

body.space-theme, .contact-section {
  background: linear-gradient(135deg, #181c2f 0%, #23244a 100%) fixed;
  min-height: 100vh;
}

.contact-section::before {
  opacity: 0.32;
}

.space-form {
  background: rgba(30, 34, 60, 0.68);
}

/* ===== أنميشن زر إرسال الرسالة ===== */
.space-form .btn-gradient-primary .fa-paper-plane {
  transition: transform 0.4s cubic-bezier(.68,-0.55,.27,1.55);
  display: inline-block;
}

.space-form .btn-gradient-primary.sending .fa-paper-plane {
  animation: plane-spin 0.8s linear infinite;
}

@keyframes plane-spin {
  0% { transform: rotate(0deg) scale(1); }
  80% { transform: rotate(340deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.space-form .btn-gradient-primary:active {
  background: linear-gradient(90deg, #23244a 0%, #6c63ff 100%);
  box-shadow: 0 0 32px #b5bfffcc;
}

.space-form .btn-gradient-primary.sending {
  animation: pulse-btn 0.7s infinite alternate;
}

@keyframes pulse-btn {
  0% { box-shadow: 0 0 16px #6c63ff88, 0 0 32px #b5bfff33; }
  100% { box-shadow: 0 0 32px #b5bfffcc, 0 0 48px #6c63ff55; }
}

/* ===== نهاية أنميشن زر الإرسال ===== */

.contact-section, .contact-section::before {
  position: relative;
  z-index: 1;
}

.contact-section .container {
  padding-top: 70px;
  padding-bottom: 40px;
}
@media (max-width: 991px) {
  .contact-section .container {
    padding-top: 30px;
  }
}
.space-form {
  box-shadow: 0 12px 40px 0 #6c63ff44, 0 0 0 2px #6c63ff33;
}
.space-form .btn-gradient-primary {
  position: relative;
  min-width: 180px;
}
.space-form .btn-gradient-primary .sending-text {
  display: none;
}
.space-form .btn-gradient-primary.sending .sending-text {
  display: inline;
}
.space-form .btn-gradient-primary.sending .default-text {
  display: none;
}

/* رسائل alert عصرية */
.space-alert {
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 12px #6c63ff33;
  background: linear-gradient(90deg, #23244a 0%, #6c63ff22 100%);
  color: #fff;
  border: 1.5px solid #6c63ff55;
  position: relative;
  z-index: 3;
}
.space-alert-success {
  border-color: #4ade80;
  background: linear-gradient(90deg, #23244a 0%, #4ade8033 100%);
  color: #d1fae5;
}
.space-alert-error {
  border-color: #f87171;
  background: linear-gradient(90deg, #23244a 0%, #f8717133 100%);
  color: #fee2e2;
}

.space-footer {
  background: linear-gradient(90deg, #181c2f 0%, #23244a 100%);
  box-shadow: 0 0 32px #6c63ff22;
  border-top: 1.5px solid #23244a;
  position: relative;
  z-index: 2;
}
.space-footer h5 {
  color: #b5bfff;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 16px #6c63ff88, 0 0 32px #b5bfff33;
}
.space-footer p {
  color: #b5bfffcc;
  font-size: 1.1rem;
  margin-bottom: 0;
}
.space-footer .glow-icon {
  color: #fff;
  text-shadow: 0 0 12px #6c63ffcc, 0 0 24px #b5bfff77;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-custom-lg {
    box-shadow: var(--shadow-lg);
}

.border-radius-custom {
    border-radius: var(--radius);
}

.transition-custom {
    transition: var(--transition);
} 

/* تحسين تجاوب صور المنتجات */
@media (max-width: 576px) {
  .card-img-top, .space-product-card .card-img-top {
    width: 100% !important;
    height: auto !important;
    max-width: 100vw;
    object-fit: contain;
  }
  .featured-item, .col-lg-4, .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .card-title, .space-title, .section-title {
    font-size: 1.2rem !important;
  }
  .card-text, .space-text, .section-subtitle {
    font-size: 1rem !important;
  }
  .hero-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 60vh;
  }
}

/* تحسين تكدس الأعمدة في المنتجات والمهارات */
@media (max-width: 768px) {
  .row > [class*='col-'] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
}

/* Tech Showcase - Hexagon Design */
.tech-showcase {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.tech-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(67, 206, 162, 0.05) 0%, transparent 50%);
    border-radius: 30px;
}

/* Hexagon Grid */
.tech-hexagon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    margin-bottom: 30px;
}

.tech-hexagon {
    position: relative;
    width: 100px;
    height: 115px;
    background: linear-gradient(135deg, var(--hex-color) 0%, var(--hex-color-dark) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.tech-hexagon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: 1;
}

.hex-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
}

.hex-content i {
    font-size: 24px;
    color: var(--hex-color);
    filter: drop-shadow(0 0 8px var(--hex-color));
}

.tech-name {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.hex-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, var(--hex-color) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 0;
    filter: blur(15px);
}

.tech-hexagon:hover {
    transform: translateY(-10px) scale(1.1) rotateY(15deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px var(--hex-color);
}

.tech-hexagon:hover .hex-glow {
    opacity: 0.6;
}

.tech-hexagon:hover .hex-content i {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px var(--hex-color));
}

/* Hexagon Colors */
.laravel-hex { --hex-color: #ff2d20; --hex-color-dark: #d91a1a; }
.react-hex { --hex-color: #61dafb; --hex-color-dark: #4fa8c5; }
.node-hex { --hex-color: #68a063; --hex-color-dark: #4a7c59; }
.php-hex { --hex-color: #777bb4; --hex-color-dark: #5a5d8a; }
.js-hex { --hex-color: #f7df1e; --hex-color-dark: #d4b800; }
.css-hex { --hex-color: #1572b6; --hex-color-dark: #0f5a8a; }

/* Tech Info Panel */
.tech-info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.tech-header-section {
    text-align: center;
    margin-bottom: 25px;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tech-badge i {
    font-size: 14px;
}

.tech-main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.tech-description-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.tech-description-box p {
    color: #b8c5d6;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    text-align: right;
}

/* Tech Capabilities */
.tech-capabilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.capability-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.capability-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.capability-info {
    text-align: right;
}

.capability-info h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.capability-info p {
    color: #b8c5d6;
    font-size: 0.85rem;
    margin: 0;
}

/* Tech Metrics */
.tech-metrics {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.metric-item {
    text-align: center;
    position: relative;
}

.metric-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

.metric-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.metric-circle path:first-child {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.metric-circle path:last-child {
    fill: none;
    stroke: #667eea;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    animation: progress-animation 2s ease-out forwards;
}

.metric-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.metric-label {
    font-size: 0.85rem;
    color: #b8c5d6;
    font-weight: 500;
}

/* Animations */
@keyframes progress-animation {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

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

.tech-hexagon:nth-child(1) { animation: hexagon-float 3s ease-in-out infinite; }
.tech-hexagon:nth-child(2) { animation: hexagon-float 3s ease-in-out infinite 0.5s; }
.tech-hexagon:nth-child(3) { animation: hexagon-float 3s ease-in-out infinite 1s; }
.tech-hexagon:nth-child(4) { animation: hexagon-float 3s ease-in-out infinite 1.5s; }
.tech-hexagon:nth-child(5) { animation: hexagon-float 3s ease-in-out infinite 2s; }
.tech-hexagon:nth-child(6) { animation: hexagon-float 3s ease-in-out infinite 2.5s; }

/* Responsive */
@media (max-width: 768px) {
    .tech-showcase {
        padding: 25px 20px;
    }
    
    .tech-hexagon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tech-hexagon {
        width: 80px;
        height: 92px;
    }
    
    .hex-content i {
        font-size: 20px;
    }
    
    .tech-name {
        font-size: 9px;
    }
    
    .tech-capabilities {
        grid-template-columns: 1fr;
    }
    
    .tech-metrics {
        flex-direction: column;
        gap: 15px;
    }
    
    .metric-circle {
        width: 60px;
        height: 60px;
    }
    
    .metric-value {
        font-size: 1rem;
    }
}

/* ===== إصلاح القائمة المنسدلة للجوال وزر اللغة ===== */
/* إصلاح مشكلة الترجح في صفحة index.php */
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

.container, .row, .col-* {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

@media (max-width: 991.98px) {
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .main-content {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}

/* ===== القائمة المنسدلة للجوال ===== */
@media (max-width: 991.98px) {
    /* إخفاء القائمة على الجوال افتراضيًا */
    .navbar-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #10132b;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        z-index: 1000;
        padding: 1rem 0;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* إظهار القائمة عند إضافة كلاس show-mobile-menu */
    .navbar-menu.show-mobile-menu {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }
    
    /* تنسيق عناصر القائمة */
    .navbar-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-menu li:last-child {
        border-bottom: none;
    }
    
    .navbar-menu li a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 1.5rem;
        color: #fff;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .navbar-menu li a:hover {
        background: rgba(108, 99, 255, 0.2);
        color: #b5bfff;
    }
    
    .navbar-menu li a i {
        margin-left: 0.5rem;
        width: 20px;
        text-align: center;
    }
    
    /* إظهار زر القائمة على الجوال فقط */
    .navbar-toggler {
        display: block !important;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .navbar-toggler:hover {
        background: rgba(108, 99, 255, 0.2);
        color: #b5bfff;
    }
    
    /* إخفاء زر القائمة على الشاشات الكبيرة */
    @media (min-width: 992px) {
        .navbar-toggler {
            display: none !important;
        }
    }
}

/* أنيميشن انزلاق القائمة */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات إضافية للقائمة على الجوال */
@media (max-width: 991.98px) {
    /* تحسين مظهر الهيدر على الجوال */
    .main-navbar {
        position: relative;
        z-index: 1001;
    }
    
    .navbar-container {
        position: relative;
    }
    
    /* تحسين مظهر زر القائمة */
    .navbar-toggler {
        position: relative;
        z-index: 1002;
    }
    
    /* تحسين مظهر القائمة المنسدلة */
    .navbar-menu.show-mobile-menu {
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    /* تحسين مظهر روابط القائمة */
    .navbar-menu li a {
        position: relative;
        overflow: hidden;
    }
    
    .navbar-menu li a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.1), transparent);
        transition: left 0.5s;
    }
    
    .navbar-menu li a:hover::before {
        left: 100%;
    }
    
    /* تحسين مظهر أيقونات القائمة */
    .navbar-menu li a i {
        transition: transform 0.3s ease;
    }
    
    .navbar-menu li a:hover i {
        transform: scale(1.2);
    }
}
@media (min-width: 992px) {
  .navbar-toggler {
    display: none !important;
  }
}
.language-switcher .btn {
  font-size: 1rem !important;
  padding: 6px 18px !important;
  border-radius: 20px !important;
  min-width: 60px;
}
@media (max-width: 991.98px) {
  .language-switcher .btn {
    font-size: 0.95rem !important;
    padding: 6px 14px !important;
    min-width: 48px;
  }
}

@media (max-width: 991.98px) {
  .navbar-menu {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    transition: opacity 0.3s, height 0.3s;
  }
  .navbar-menu.show-mobile-menu {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
  }
}

.main-logo-glow {
  box-shadow: 0 0 32px #6c63ff88, 0 0 0 8px #23244a;
  transition: box-shadow 0.4s, transform 0.3s;
  animation: logoPulse 2.5s infinite alternate;
}
@keyframes logoPulse {
  0% { box-shadow: 0 0 32px #6c63ff88, 0 0 0 8px #23244a; transform: scale(1); }
  100% { box-shadow: 0 0 64px #b5bfffcc, 0 0 0 12px #23244a; transform: scale(1.04); }
}

.glow-logo-text {
  text-shadow: 0 0 8px #6c63ff, 0 0 16px #b5bfff, 0 2px 8px #23244a33;
  animation: glowLogoAnim 2.2s infinite alternate;
}
@keyframes glowLogoAnim {
  0% { text-shadow: 0 0 8px #6c63ff, 0 0 16px #b5bfff, 0 2px 8px #23244a33; }
  100% { text-shadow: 0 0 24px #b5bfff, 0 0 32px #6c63ff, 0 2px 8px #23244a33; }
}

/* تحسينات إضافية لتوافق صفحة index مع الهواتف */
@media (max-width: 576px) {
  .hero-section {
    min-height: 70vh;
    padding: 1rem 0 0.5rem 0;
  }
  .hero-content h1, .hero-content .display-3 {
    font-size: 1.1rem !important;
    line-height: 1.2;
    margin-bottom: 0.7rem;
    word-break: break-word;
  }
  .hero-content .lead {
    font-size: 0.93rem !important;
    margin-bottom: 0.7rem;
    word-break: break-word;
  }
  .hero-buttons {
    flex-direction: column !important;
    gap: 0.4rem !important;
    margin-bottom: 0.7rem !important;
  }
  .hero-buttons .btn {
    width: 100% !important;
    font-size: 0.93rem !important;
    padding: 0.6rem 0.4rem !important;
  }
  .hero-stats .row {
    flex-direction: column !important;
    gap: 0.3rem !important;
  }
  .hero-stats .col-4, .hero-stats .col-6 {
    width: 100% !important;
    margin-bottom: 0.3rem !important;
  }
  .stat-item, .space-stat {
    padding: 0.3rem 0 !important;
    font-size: 0.95rem !important;
  }
  .stat-item h4, .stat-number {
    font-size: 1.1rem !important;
  }
  .animated-astronaut img {
    width: 120px !important;
    max-width: 70vw !important;
    margin: 0 auto !important;
    display: block !important;
  }
  .animated-astronaut {
    top: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 100vw !important;
  }
  /* about/company/sections */
  .about-content, .company-content-modern, .professional-profile-container {
    padding: 7px !important;
  }
  .about-buttons, .company-buttons, .profile-actions {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }
  .about-buttons .btn, .company-buttons .btn, .profile-actions .btn {
    width: 100% !important;
    font-size: 0.93rem !important;
    padding: 0.6rem 0.4rem !important;
  }
  .section-title, .section-title-modern {
    font-size: 1.1rem !important;
    margin-bottom: 0.7rem !important;
  }
  .company-features-modern, .company-values-modern {
    padding: 0 !important;
  }
  .features-grid-modern, .values-grid-modern {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }
  .feature-item-modern, .value-item-modern {
    padding: 7px 3px !important;
  }
  .stat-card-modern, .stat-item-modern {
    padding: 7px 3px !important;
    font-size: 0.93rem !important;
  }
  .stat-number, .stat-number-modern {
    font-size: 1rem !important;
  }
  .container, .main-content {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  .card-body {
    padding: 0.5rem !important;
  }
  .space-section, .section {
    padding: 1rem 0 !important;
  }
  /* الأعمدة والبطاقات */
  .row, [class*="col-"] {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .card, .space-product-card, .profile-card-modern {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 1rem !important;
  }
  /* الصور */
  img, .card-img-top, .img-fluid {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  /* القائمة العلوية وأزرار اللغة/الوضع */
  .main-navbar, .navbar-container {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.3rem 0.2rem !important;
  }
  .language-switcher {
    width: 100vw !important;
    justify-content: center !important;
    margin-bottom: 5px !important;
    gap: 4px !important;
  }
  .language-switcher .btn, .theme-toggle {
    font-size: 0.95rem !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }
  .theme-toggle {
    background: var(--primary-color, #6366f1) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px #6366f133 !important;
    transition: background 0.2s;
  }
  .theme-toggle:hover, .theme-toggle:focus {
    background: var(--primary-dark, #4f46e5) !important;
    color: #fff !important;
  }
  /* القائمة المنسدلة للجوال */
  .navbar-menu {
    width: 100vw !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .navbar-menu li, .navbar-menu .nav-item {
    width: 100vw !important;
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
  }
  .navbar-menu a, .navbar-menu .nav-link {
    width: 100vw !important;
    justify-content: center;
    font-size: 1.1rem;
    padding: 12px 0;
    color: #fff !important;
    font-weight: bold;
  }
  /* منع التمرير الأفقي نهائيًا */
  html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* إصلاح نهائي لمشكلة الفراغ الجانبي والتمرير الأفقي في الهواتف */
html, body {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative;
}

.container, .main-content, .row, [class*="col-"] {
  max-width: 100vw !important;
  width: 100vw !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

img, .card-img-top, .img-fluid {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

@media (max-width: 576px) {
  .navbar-menu, .language-switcher, .main-navbar, .navbar-container {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
}
