/* --- المتغيرات العامة للألوان والفخامة --- */
:root {
    --bg-color: #050509;
    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --accent-pink: #ff3366;
    --accent-cyan: #00f7ff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --ease-cubic: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* --- حركات النيون الفخمة --- */
@keyframes neonGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255,51,102,0.7), 0 0 20px rgba(255,51,102,0.5), 0 0 30px rgba(255,51,102,0.3); }
    50% { text-shadow: 0 0 15px rgba(255,51,102,0.9), 0 0 25px rgba(255,51,102,0.7), 0 0 40px rgba(255,51,102,0.5); }
}

@keyframes neonBorderGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0,247,255,0.5), inset 0 0 5px rgba(0,247,255,0.2); }
    50% { box-shadow: 0 0 20px rgba(0,247,255,0.8), inset 0 0 10px rgba(0,247,255,0.4); }
}

/* حركة طيران الجزيئات (Particles) */
@keyframes flyUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; scale: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20vh) scale(0); opacity: 0; }
}

/* --- الأنيميشن عند التمرير (بتركات متدرجة) --- */
.hidden-element {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(15px);
    transition: all 1s var(--ease-cubic);
}

.show-element {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* --- حاوية الجزيئات الطائرة --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glowing-particle {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 20px currentColor;
    animation: flyUp infinite linear;
}

/* --- الهيدر --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px max(40px, 8%);
    z-index: 1000;
    background: rgba(5, 5, 9, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo-container { text-decoration: none; }
.logo-img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 30px; }

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: 0.3s var(--ease-cubic);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-cyan);
    transition: width 0.3s var(--ease-cubic);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-link:hover { color: var(--accent-cyan); }
.nav-link:hover::after { width: 100%; }

.nav-btn {
    padding: 10px 25px;
    border: 2px solid var(--accent-cyan);
    border-radius: 50px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-cubic);
    animation: neonBorderGlow 3s infinite;
}

.nav-btn:hover {
    background-color: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 30px var(--accent-cyan);
    transform: scale(1.05);
}

/* --- دوائر الخلفية المتحركة --- */
.bg-blur-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.35;
    mix-blend-mode: screen;
    pointer-events: none;
    transition: transform 0.2s ease-out;
}

.circle-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-pink) 0%, #7928ca 100%);
    top: -10%; left: -10%;
}

.circle-2 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, #0070f3 100%);
    bottom: -15%; right: -10%;
}

/* --- الأقسام --- */
.hero {
    height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    position: relative; padding: 0 20px;
}

.brand-name {
    font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 900; text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 30%, #a5a5a5 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 20px; animation: neonGlow 4s infinite;
}

.tagline { font-size: clamp(1.1rem, 3vw, 1.5rem); color: var(--text-muted); font-weight: 300; margin-bottom: 50px; }

.scroll-down {
    position: absolute; bottom: 40px; display: flex; flex-direction: column;
    align-items: center; gap: 10px; color: #666; font-size: 0.9rem; text-decoration: none;
}

.scroll-down .arrow { font-size: 1.5rem; animation: arrowBounce 2s infinite; color: var(--accent-pink); }

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-10px); opacity: 1; }
}

section { padding: 140px max(40px, 8%); position: relative; }

.section-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 800; margin-bottom: 100px;
    text-align: center; background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; display: inline-block; left: 50%; transform: translateX(-50%);
}

.section-title::after {
    content: ''; position: absolute; bottom: -15px; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
    box-shadow: 0 0 20px var(--accent-pink);
}

/* --- معرض الأعمال --- */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 60px;
}

.project-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px) saturate(120%); border-radius: 30px; padding: 25px;
    overflow: hidden; transition: all 0.6s var(--ease-cubic);
    display: flex; flex-direction: column; gap: 20px;
    position: relative; top: 0;
}

.project-card:hover {
    transform: translateY(-20px) scale(1.03);
    border-color: rgba(0, 247, 255, 0.4);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 247, 255, 0.2);
}

.image-container { width: 100%; height: 600px; border-radius: 20px; overflow: hidden; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-cubic); }
.project-card:hover img { transform: scale(1.15) rotate(2deg); }

.project-info h3 { font-size: 1.6rem; color: #ffffff; margin-bottom: 15px; }
.project-info p { color: var(--text-muted); font-size: 1rem; line-height: 1.8; }

/* --- من نحن --- */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.about-text-block {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 40px; border-radius: 24px; backdrop-filter: blur(10px);
    transition: transform 0.4s var(--ease-cubic);
}

.about-text-block:hover { transform: scale(1.02) translateY(-10px); }
.about-text-block.ar { border-right: 4px solid var(--accent-pink); }
.about-text-block.en { border-left: 4px solid var(--accent-cyan); direction: ltr; }
.about-text-block h3 { font-size: 1.8rem; margin-bottom: 20px; color: #fff; }
.about-text-block.ar h3 { animation: neonGlow 4s infinite; }
.about-text-block.en h3 { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(0,247,255,0.5); }
.about-text-block p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.9; margin-bottom: 15px; }

/* --- اتصل بنا --- */
.contact-container {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 60px; border-radius: 40px; backdrop-filter: blur(20px);
    position: relative; overflow: hidden;
}

.contact-container::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(255,51,102,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.contact-form { display: flex; flex-direction: column; gap: 25px; }
.form-group { position: relative; }

.form-input {
    width: 100%; padding: 18px 25px; background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border); border-radius: 12px; color: #fff;
    font-size: 1rem; transition: 0.3s;
}

.form-input:focus { outline: none; border-color: var(--accent-pink); box-shadow: 0 0 20px rgba(255, 51, 102, 0.3); }

.form-label {
    position: absolute; top: 18px; right: 25px; color: #666;
    transition: 0.3s var(--ease-cubic); pointer-events: none;
}

.form-input:focus ~ .form-label, .form-input:not(:placeholder-shown) ~ .form-label {
    top: -12px; right: 15px; font-size: 0.85rem; color: var(--accent-pink);
    background-color: var(--bg-color); padding: 0 10px; border-radius: 4px;
}

textarea.form-input { height: 150px; resize: none; }

.submit-btn {
    padding: 18px; background: transparent; border: 2px solid var(--accent-pink);
    color: var(--accent-pink); font-size: 1.1rem; font-weight: 700; border-radius: 12px;
    cursor: pointer; transition: all 0.3s var(--ease-cubic); text-transform: uppercase;
    letter-spacing: 1px; margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--accent-pink); color: #fff;
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.8); transform: scale(1.05) translateY(-5px);
}

.contact-info { display: flex; flex-direction: column; gap: 40px; justify-content: center; }
.info-item { display: flex; align-items: center; gap: 20px; transition: transform 0.3s; }
.info-item:hover { transform: translateX(-10px); }
.info-icon { font-size: 2rem; color: var(--accent-cyan); text-shadow: 0 0 15px var(--accent-cyan); }
.info-text h4 { font-size: 1.2rem; color: #fff; margin-bottom: 5px; }
.info-text p { color: var(--text-muted); font-size: 1rem; }

/* --- الموبايل --- */
@media (max-width: 992px) {
    .about-content, .contact-container { grid-template-columns: 1fr; }
    header { padding: 15px 20px; } .nav-links { gap: 15px; } .nav-link { font-size: 0.9rem; }
    .nav-btn { padding: 8px 15px; font-size: 0.9rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; } .portfolio, section { padding: 100px 20px; }
    .image-container { height: 250px; } .bg-blur-circle { filter: blur(80px); opacity: 0.2; }
    .section-title { margin-bottom: 60px; } .contact-container { padding: 30px; }
}