:root {
    --primary-color: #0d6efd;
    --dark-bg: #f4f7f6;
    --light-bg: #f4f7f6;
    --accent-blue: #0dcaf0;
}
.text-purple {
    color: #7952b3 !important;
}
/* التنسيقات العامة */
p, h1, h2, h3, h4, h5, h6, li, span:not(.text-primary):not(.typing-text) {
    color: white !important;
}

body {
    background-color: #111;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: #0a0e1a;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

section { padding: 40px 0; }

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.text-gradient {
    background: linear-gradient(45deg, #0d6efd, #0dcaf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* تأثيرات البطاقات */
.about-card, .performance-card, .card, .project-card {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.about-card {
    border-left: 6px solid var(--primary-color) !important;
}

html[dir="ltr"] .about-card { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .about-card {
    margin-right: 0; margin-left: auto;
    border-left: none !important;
    border-right: 6px solid var(--primary-color) !important;
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(13, 110, 253, 0.25) !important;
    border-color: var(--accent-blue) !important;
}

.project-img-wrapper {
    background: rgba(0,0,0,0.3);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* إصلاح نصوص وصف المشاريع */
.project-card p.small {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* حركة الكاتبة التلقائية */
.typing-container { display: inline-block; }
.typing-text {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    font-weight: 800;
    width: 0;
    animation: typing 4s steps(25) infinite, blink .6s step-end infinite;
    color: white !important;
}

html[dir="rtl"] .typing-text {
    border-right: none;
    border-left: 3px solid var(--primary-color);
    animation: typing 4s steps(25) infinite, blinkRtl .6s step-end infinite;
}

@keyframes typing { 0%, 100% { width: 0 } 50%, 80% { width: 100% } }
@keyframes blink { from, to { border-color: transparent } 50% { border-color: var(--primary-color) } }
@keyframes blinkRtl { from, to { border-color: transparent } 50% { border-color: var(--primary-color) } }

.form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
}

.form-control:focus {
    background: rgba(255,255,255,0.15);
    color: white;
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Navbar */
.lang-btn-nav {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 7px 18px !important;
    margin: 0 8px;
    transition: all 0.4s ease;
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn-nav:hover {
    border-color: var(--accent-blue) !important;
    background-color: rgba(13, 202, 240, 0.2);
    box-shadow: 0 0 12px rgba(13, 202, 240, 0.5);
    transform: translateY(-2px);
}

.navbar-nav .nav-item .nav-link {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 7px 20px !important;
    margin: 0 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.navbar-nav .nav-item .nav-link:hover {
    border-color: var(--accent-blue) !important;
    background-color: rgba(13, 202, 240, 0.1);
    box-shadow: 0 0 12px rgba(13, 202, 240, 0.4);
    transform: translateY(-3px);
}

.btn-contact-nav {
    border-radius: 50px !important;
    border: 2px solid var(--primary-color) !important;
    background: linear-gradient(45deg, rgba(13, 110, 253, 0.1), rgba(13, 202, 240, 0.1)) !important;
    color: white !important;
    font-size: 0.9rem !important;
    padding: 7px 22px !important;
    font-weight: 600 !important;
    transition: 0.3s ease-in-out;
}

.btn-contact-nav:hover {
    background: var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.6) !important;
    transform: scale(1.05) translateY(-2px);
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    transition: all 0.3s ease;
}

.skill-card:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* واتساب */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    background-color: #25d366;
    color: white !important;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

html[dir="ltr"] .whatsapp-float { right: 30px; left: auto; }
html[dir="rtl"] .whatsapp-float { left: 30px; right: auto; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #128c7e; }

html[dir="ltr"] .icon-margin { margin-right: 1rem; }
html[dir="rtl"] .icon-margin { margin-left: 1rem; }

.offer-badge-container { background-color: rgba(13, 110, 253, 0.15); border: 2px solid #0d6efd; }
.perf-badge-container { background-color: rgba(25, 135, 84, 0.2); border: 2px solid #2ecc71; }

.social-link-custom {
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 14px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.social-link-custom:hover { background-color: rgba(255,255,255,0.1); }

html[dir="rtl"] .btn i {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {

    html { font-size: 16px; }
    body { font-size: 16px !important; }

    /* Navbar icons */
    .navbar-nav .nav-item .nav-link {
        font-size: 1.05rem !important;
        padding: 10px 18px !important;
        margin: 4px 0 !important;
    }

    .lang-btn-nav {
        font-size: 1.05rem !important;
        padding: 10px 18px !important;
    }

    .btn-contact-nav {
        font-size: 1.05rem !important;
        padding: 10px 18px !important;
    }

    /* Hero */
    .hero-section {
        min-height: 50vh;
        padding: 40px 15px !important;
    }

    .hero-section h1,
    .hero-section .display-4 {
        font-size: 2.4rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
    }

    .hero-section .lead {
        font-size: 1.1rem !important;
        line-height: 1.8 !important;
    }

    .hero-section p.fs-6 {
        font-size: 0.9rem !important;
    }

    /* About */
    .about-card .fs-2 {
        font-size: 1.9rem !important;
        font-weight: 700 !important;
    }

    .about-card .fs-5 {
        font-size: 1.05rem !important;
        line-height: 1.8 !important;
    }

    /* Headings */
    h2.display-6 {
        font-size: 2rem !important;
        font-weight: 800 !important;
    }

    h2.display-5 {
        font-size: 1.9rem !important;
        font-weight: 800 !important;
    }

    h4, .card h4, .project-card h4 {
        font-size: 1.3rem !important;
        font-weight: 700 !important;
    }

    /* Paragraphs */
    p, .card p, .project-card p {
        font-size: 1rem !important;
        line-height: 1.8 !important;
    }

    .small, p.small, .project-card p.small {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    /* Skill cards */
    .skill-card p.small {
        font-size: 0.85rem !important;
    }

    .skill-card i {
        font-size: 2rem !important;
    }

    /* Section spacing */
    section { padding: 30px 0; }

    /* WhatsApp */
    .whatsapp-float span { display: none !important; }
    .whatsapp-float { padding: 14px; bottom: 20px; }

    footer { padding-bottom: 40px; }
}