:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 22, 0.6);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent-neon: #8b5cf6; /* Electric Purple */
    --accent-neon-hover: #a78bfa;
    --accent-cyan: #06b6d4;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* Background Glow Effects */
.glow-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-neon) 0%, transparent 70%);
}

.glow-2 {
    top: 40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-neon);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background: var(--accent-neon-hover);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--text-main);
    color: var(--bg-dark);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-neon);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-container {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--accent-neon-hover);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Services */
.services {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-neon-hover);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 2rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.service-features i {
    color: var(--accent-cyan);
}

/* Portfolio */
.portfolio {
    padding: 8rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.portfolio-info p {
    font-size: 0.85rem;
    color: var(--accent-neon-hover);
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h5 {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 0.8rem;
}

.link-group a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.link-group a:hover {
    color: var(--accent-neon-hover);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

/* Lang Switch */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switch {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

.lang-switch:hover {
    border-color: var(--accent-neon);
}

.lang-switch option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    font-family: 'Cairo', var(--font-body);
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] h4, 
html[dir="rtl"] h5, 
html[dir="rtl"] .btn {
    font-family: 'Cairo', var(--font-heading);
}

html[dir="rtl"] .hero-actions {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    html[dir="rtl"] .hero-actions {
        flex-direction: column;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    padding: 3rem;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(-20px);
    transition: transform var(--transition-smooth);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.close-modal:hover {
    color: var(--accent-neon);
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.modal-content p {
    margin-bottom: 2rem;
}

.email-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.email-box:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.email-box i {
    color: var(--accent-neon);
    font-size: 1.2rem;
}

.email-box a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.email-box a:hover {
    color: var(--accent-neon-hover);
}

.mt-4 {
    margin-top: 1rem;
}
