:root {
    --primary: #FFC107;
    --primary-hover: #FFD54F;
    --dark-bg: #0b0b0b;
    --card-bg: #151515;
    --text-white: #ffffff;
    --text-gray: #B0B0B0;
    --whatsapp: #25D366;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

body { 
    background-color: var(--dark-bg); 
    color: var(--text-white); 
    font-family: 'Cairo', sans-serif; 
}

html[lang="en"] body { font-family: 'Poppins', sans-serif; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Floating Buttons --- */
.floating-buttons { position: fixed; bottom: 30px; z-index: 990; display: flex; flex-direction: column; gap: 15px; }
.float-btn { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.6); transition: transform 0.3s; }
.float-btn:hover { transform: scale(1.1); }
.float-whatsapp { background-color: var(--whatsapp); }
.float-call { background-color: var(--primary); color: #000; }

html[dir="rtl"] .floating-buttons { left: 20px; }
html[dir="ltr"] .floating-buttons { right: 20px; }

/* --- Navbar --- */
.navbar { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    background: #0b0b0b !important; 
    border-bottom: 1px solid rgba(255,193,7,0.1); 
    z-index: 2000 !important; 
    padding: 15px 0; 
    height: 80px; 
}
.navbar .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 90%; 
    max-width: 1200px; 
    margin: auto; 
    padding: 0 20px; 
    flex-wrap: nowrap; 
}
.logo { font-size: 1.8rem; font-weight: 900; color: var(--text-white); z-index: 2001; white-space: nowrap; }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text-white); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }
.lang-switch { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 5px 12px; font-size: 0.8rem; cursor: pointer; border-radius: 4px; }
.lang-switch:hover { background: var(--primary); color: #000; }

/* Burger Menu */
.burger { display: none; cursor: pointer; z-index: 2002; }
.burger div { 
    width: 30px; 
    height: 3px; 
    background-color: #ffffff !important; 
    margin: 6px 0; 
    transition: all 0.4s ease; 
    border-radius: 4px;
    opacity: 1 !important;
}

.burger.toggle .line1 { transform: rotate(-45deg) translate(-6px, 6px); background-color: var(--primary) !important; }
.burger.toggle .line2 { opacity: 0 !important; }
.burger.toggle .line3 { transform: rotate(45deg) translate(-6px, -6px); background-color: var(--primary) !important; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 12px 35px; border-radius: 50px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.primary-btn { background: var(--primary); color: #000; border: 2px solid var(--primary); box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3); }
.primary-btn:hover { background: transparent; color: var(--primary); transform: translateY(-2px); }
.secondary-btn { border: 2px solid var(--text-white); color: var(--text-white); margin-inline-start: 15px; }
.secondary-btn:hover { border-color: var(--primary); color: var(--primary); }
.big-btn { padding: 15px 40px; font-size: 1.1rem; }
.full-width { width: 100%; text-align: center; }

/* --- Hero Section --- */
#hero { 
    height: 100vh; 
    min-height: 600px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    position: relative; 
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover; 
    padding-top: 80px; 
}
.hero-bg-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to bottom, rgba(0,0,0,0.8), var(--dark-bg)); }
.hero-content { position: relative; z-index: 2; padding: 0 20px; width: 100%; }
.hero-content h3 { color: var(--primary); letter-spacing: 2px; text-transform: uppercase; font-size: 1.2rem; margin-bottom: 10px; line-height: 1.6; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 900; line-height: 1.2; }
.hero-content p { color: var(--text-gray); font-size: 1.2rem; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }

.hero-socials, .social-links-contact { display: flex; justify-content: center; gap: 15px; }
.hero-socials { margin-top: 40px; }
.social-links-contact { margin-top: 30px; justify-content: flex-start; }
.hero-socials a, .social-links-contact a { width: 50px; height: 50px; background: #222; border: 1px solid #333; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-white); font-size: 1.2rem; transition: all 0.3s ease; }
.hero-socials a:hover, .social-links-contact a:hover { background: var(--primary); color: #000; border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 0 15px rgba(255, 193, 7, 0.4); }

/* --- General Layout --- */
.section-padding { padding: 100px 0; overflow: hidden; }
.container { width: 90%; max-width: 1200px; margin: auto; padding: 0 20px; position: relative; }
.section-title { font-size: 2.5rem; margin-bottom: 50px; color: var(--text-white); font-weight: 800; position: relative; display: inline-block; }
.center-text { text-align: center; }

/* --- Live Demo Banner --- */
.live-demo-banner {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(0,0,0,0.8));
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 15px;
    padding: 30px 40px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: 0.3s;
}
.live-demo-banner:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.2);
}
.banner-content h3 { color: var(--primary); font-size: 1.5rem; margin-bottom: 10px; font-weight: 700; }
.banner-content p { color: var(--text-gray); font-size: 1rem; margin: 0; line-height: 1.6; }

/* --- About Section --- */
.about-wrapper { display: flex; align-items: center; gap: 50px; }
.about-img { flex: 1; max-width: 100%; }
.about-img img { width: 100%; border-radius: 20px; border: 1px solid rgba(255,193,7,0.3); box-shadow: 0 20px 40px rgba(0,0,0,0.5); object-fit: cover; }
.about-text { flex: 1; }
.tech-stack { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tech-stack span { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--primary); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; }

/* --- Services & Process Grid --- */
.services-grid, .process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; position: relative; padding: 20px 0; }

.service-card, .process-card { background: linear-gradient(145deg, #1a1a1a, #111111); border-radius: 20px; padding: 35px 25px; position: relative; overflow: hidden; transition: all 0.4s ease-out; border: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.service-card:hover, .process-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0,0,0,0.5); border-color: rgba(255, 193, 7, 0.4); }

.icon-box, .card-icon-box { width: 70px; height: 70px; background: #222; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--text-gray); margin-bottom: 20px; position: relative; z-index: 2; border: 1px solid rgba(255,255,255,0.1); transition: 0.4s; }
.service-card:hover .icon-box, .process-card:hover .card-icon-box { background: var(--primary); color: #000; border-color: var(--primary); transform: rotateY(180deg); }

.card-bg-number { position: absolute; top: -15px; right: -10px; font-size: 6rem; font-weight: 900; color: rgba(255, 255, 255, 0.03); z-index: 0; transition: 0.4s; font-family: sans-serif; line-height: 1; }
html[dir="ltr"] .card-bg-number { right: auto; left: -10px; }
.process-card:hover .card-bg-number { color: rgba(255, 193, 7, 0.1); transform: scale(1.1) rotate(-5deg); }

.card-content h3, .service-card h3 { font-size: 1.3rem; color: #fff; margin-bottom: 10px; font-weight: 700; position: relative; z-index: 2; }
.card-content p, .service-card p { color: var(--text-gray); font-size: 0.9rem; line-height: 1.6; position: relative; z-index: 2; }
.card-border-glow { position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent); opacity: 0; transition: 0.4s; }
.process-card:hover .card-border-glow { opacity: 1; }


/* ======================================================== */
/* 🔴 الحل الجذري النهائي لمنع انكماش الصور (باستخدام CSS Grid) 🔴 */
/* ======================================================== */
.portfolio-grid.horizontal-scroll { 
    display: grid !important; /* تحويل القسم من Flex إلى Grid الصارم */
    grid-auto-flow: column !important; /* ترتيب العناصر كأعمدة أفقية */
    grid-auto-columns: 300px !important; /* 🔴 إجبار المتصفح أن عرض كل عمود هو 300 بكسل لا ينقص ملليمتراً 🔴 */
    gap: 20px !important; 
    overflow-x: auto !important; 
    padding-bottom: 20px !important; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    width: 100% !important; 
}
.portfolio-grid.horizontal-scroll::-webkit-scrollbar { display: none; }

.portfolio-item { 
    width: 100% !important; /* العنصر يأخذ مساحة العمود المخصصة له في الشبكة (300px) */
    height: 350px !important; 
    background: var(--card-bg); 
    border-radius: 15px; 
    overflow: hidden; 
    position: relative; 
    border: 1px solid rgba(255,255,255,0.05); 
    margin: 0 !important;
}

.portfolio-img { width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.6s; }
.portfolio-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; opacity: 0; transition: 0.3s; transform: translateY(20px); }
.portfolio-item:hover .portfolio-img { transform: scale(1.1); }
.portfolio-item:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }
.portfolio-overlay h3 { color: var(--primary); margin-bottom: 5px; font-size: 1.3rem; font-weight: 700; }
.portfolio-overlay p { font-size: 0.95rem; color: #ddd; }


/* --- Contact Section --- */
.contact-container { display: flex; gap: 50px; align-items: center; background: #151515; padding: 50px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); width: 100%; }
.contact-info, .contact-form { flex: 1; width: 100%; }
.info-item { display: flex; align-items: center; margin: 20px 0; font-size: 1.1rem; }
.info-item i { width: 50px; height: 50px; background: rgba(255, 193, 7, 0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-inline-end: 15px; }
.contact-form input, .contact-form textarea { width: 100%; background: #0b0b0b; border: 1px solid #333; padding: 15px; color: white; margin-bottom: 20px; font-family: inherit; border-radius: 8px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 10px rgba(255, 193, 7, 0.1); }
.contact-form button { width: 100%; border: none; }

footer { background: #000; padding: 40px; text-align: center; border-top: 1px solid #222; margin-top: 0; color: var(--text-gray); width: 100%; }

/* ======================================================== */
/* حقل الهاتف */
/* ======================================================== */
.phone-ltr-wrapper { margin-bottom: 20px; width: 100%; }
.iti { width: 100% !important; display: block !important; direction: ltr !important; }
.iti__country-list { background-color: #1E1E1E !important; color: #fff !important; border: 1px solid #333 !important; text-align: left !important; direction: ltr !important; width: 320px !important; min-width: 320px !important; max-width: 90vw !important; white-space: nowrap !important; left: 0 !important; right: auto !important; box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important; overflow-x: hidden !important; }
.iti__country { display: flex !important; align-items: center !important; padding: 10px !important; }
.iti__country-name { margin-right: 8px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 180px !important; }
.iti__dial-code { color: #FFC107 !important; white-space: nowrap !important; }
.iti__country:hover, .iti__country.iti__highlight { background-color: #333 !important; }
.iti__arrow { border-top-color: #FFC107 !important; }
.iti__selected-dial-code { direction: ltr !important; unicode-bidi: isolate !important; color: #fff !important; }
.iti input, .iti input[type="tel"] { width: 100% !important; text-align: left !important; padding-left: 95px !important; padding-right: 15px !important; font-family: 'Poppins', sans-serif !important; direction: ltr !important; }

/* ======================================================== */
/* Orbit Animation System */
/* ======================================================== */
.tech-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.tech-text-box { flex: 1; z-index: 2; }
.tech-grid-items { display: flex; flex-wrap: wrap; gap: 15px; max-width: 500px; }
.tech-box { width: 60px; height: 60px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 30px; transition: all 0.3s ease; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.tech-box:hover { transform: translateY(-5px); background: rgba(255, 193, 7, 0.1); border-color: var(--primary); box-shadow: 0 10px 25px rgba(255, 193, 7, 0.2); }

.tech-orbit-box { flex: 1; display: flex; justify-content: center; align-items: center; height: 500px; position: relative; z-index: 1; }
.orbit-system { position: relative; width: 400px; height: 400px; display: flex; justify-content: center; align-items: center; }

.sun-center { position: absolute; width: 110px; height: 110px; background: linear-gradient(135deg, #FFC107, #FF9800); border-radius: 50%; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(255, 193, 7, 0.6), inset 0 0 15px rgba(255,255,255,0.5); }
.sun-title { font-weight: 900; color: #000; font-size: 1.1rem; line-height: 1.1; }
.sun-subtitle { font-size: 0.6rem; color: #333; font-weight: 700; margin-top: 3px; }

.orbit { position: absolute; border: 1px dashed rgba(255, 255, 255, 0.15); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.orbit-1 { width: 200px; height: 200px; animation: spinOrbit 15s linear infinite; }
.orbit-2 { width: 320px; height: 320px; animation: spinOrbit 25s linear infinite reverse; }
.orbit-3 { width: 440px; height: 440px; animation: spinOrbit 35s linear infinite; }

.planet-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.planet { position: absolute; top: -18px; left: calc(50% - 18px); width: 36px; height: 36px; background: #111; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1px solid rgba(255, 193, 7, 0.3); box-shadow: 0 0 10px rgba(0,0,0,0.8); }

.orbit-1 .p-icon { animation: spinCounter 15s linear infinite reverse; }
.orbit-2 .p-icon { animation: spinCounter 25s linear infinite; }
.orbit-3 .p-icon { animation: spinCounter 35s linear infinite reverse; }

@keyframes spinOrbit { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinCounter { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ======================================================== */
/* 📱 MOBILE RESPONSIVE FIXES 📱 */
/* ======================================================== */

@media (max-width: 992px) { 
    .process-grid, .services-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px; } 
    .about-wrapper { flex-direction: column; } 
    .contact-container { flex-direction: column; padding: 30px; }
    .tech-container { flex-direction: column; text-align: center; }
    .tech-grid-items { justify-content: center; margin: 0 auto; }
}

@media (max-width: 768px) {
    .burger { display: block !important; }
    .nav-links { position: fixed !important; top: 80px !important; right: -100% !important; bottom: 0 !important; width: 100% !important; height: calc(100vh - 80px) !important; background-color: #0b0b0b !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; z-index: 1000 !important; padding-top: 50px !important; gap: 25px !important; border-left: none !important; overflow-y: auto !important; transition: right 0.4s ease-in-out !important; transform: none !important; }
    .nav-links.nav-active { right: 0 !important; }
    html[dir="ltr"] .nav-links { left: -100% !important; right: auto !important; transition: left 0.4s ease-in-out !important; }
    html[dir="ltr"] .nav-links.nav-active { left: 0 !important; }
    .nav-links li { margin: 0 !important; font-size: 1.5rem !important; opacity: 1 !important; }
    .process-grid, .services-grid { grid-template-columns: 1fr !important; margin-top: 40px; display: grid !important; } 
    #hero { height: auto; min-height: 100vh; padding-top: 120px; padding-bottom: 50px; overflow: hidden; }
    .hero-content h1 { font-size: 2rem !important; line-height: 1.4; }
    .hero-content p { font-size: 1rem !important; padding: 0 10px; }
    .hero-btns { display: flex; flex-direction: column; gap: 15px; width: 100%; }
    .btn { width: 100%; text-align: center; margin: 0 !important; }
    .section-padding { padding: 60px 0 !important; }
    .container { padding: 0 15px !important; width: 100%; }
    .about-img img { box-shadow: none; }
    .orbit-system { transform: scale(0.7); margin-top: -50px; margin-bottom: -50px; }
    .live-demo-banner { flex-direction: column; text-align: center; padding: 25px; }
    .live-demo-banner .btn { width: 100%; margin-top: 15px; }
}