/* ============================================
   DARK MODE - مطابق للوحة التحكم
   ============================================ */
:root {
    --bg-primary: #0b0c10;
    --bg-secondary: #1a1a2e;
    --bg-card: #141425;
    --bg-input: #12121f;
    --border-color: #2a2a4a;
    --text-primary: #e0e0e0;
    --text-secondary: #8a8aa0;
    --text-muted: #555;
    --accent: #6c63ff;
    --accent-hover: #8a7aff;
    --gradient-primary: linear-gradient(135deg, #6c63ff, #b388ff);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    --radius: 16px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== SERVICES CARDS ====== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        max-width: 400px;
        margin: 0 auto;
    }
}

    /* تأثير hover على الصور */
    .games-image-wrapper:hover img {
        transform: scale(1.05);
    }
    .games-image-wrapper {
        transition: all 0.3s ease;
    }
    .games-image-wrapper:hover {
        border-color: rgba(108, 99, 255, 0.3);
        box-shadow: 0 0 40px rgba(108, 99, 255, 0.15), 0 15px 50px rgba(0, 0, 0, 0.6) !important;
    }

    /* ====== تجاوب ====== */
    @media (max-width: 768px) {
        .games-images-grid {
            grid-template-columns: 1fr !important;
            gap: 20px !important;
        }
        .games-images-grid img {
            height: 200px !important;
        }
        .games-images-grid h3 {
            font-size: 18px !important;
        }
    }

    @media (max-width: 480px) {
        .games-images-grid img {
            height: 160px !important;
        }
        .games-images-grid h3 {
            font-size: 16px !important;
        }
    }

    /* ====== زر مضيء ====== */
    .btn-glow {
        display: inline-block;
        padding: 14px 36px;
        background: linear-gradient(135deg, #6c63ff, #8a7aff);
        color: #fff;
        border-radius: 50px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 8px 30px rgba(108, 99, 255, 0.3);
        border: none;
        cursor: pointer;
    }
    .btn-glow:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 0 30px rgba(108, 99, 255, 0.6), 
                    0 15px 40px rgba(108, 99, 255, 0.4);
        color: #fff;
    }
    .btn-glow i {
        transition: transform 0.3s ease;
    }
    .btn-glow:hover i {
        transform: translateX(5px);
    }

    /* ====== تجاوب ====== */
    @media (max-width: 992px) {
        .section-grid {
            grid-template-columns: 1fr !important;
            gap: 40px !important;
        }
        .section-grid .section-image {
            max-height: 350px;
        }
        .section-grid h2 {
            font-size: 30px !important;
        }
    }

    @media (max-width: 768px) {
        .section-rounded {
            border-radius: 30px !important;
            margin: 30px 10px 0 10px !important;
            padding: 50px 0 !important;
        }
    }

    @media (max-width: 480px) {
        .section-grid h2 {
            font-size: 24px !important;
        }
        .section-grid p {
            font-size: 14px !important;
        }
        .btn-glow {
            padding: 12px 28px !important;
            font-size: 14px !important;
        }
        .section-rounded {
            border-radius: 20px !important;
            margin: 20px 5px 0 5px !important;
            padding: 40px 0 !important;
        }
    }

    /* دعم RTL */
    [dir="rtl"] .btn-glow i {
        margin-left: 0;
        margin-right: 8px;
    }
    [dir="rtl"] .btn-glow:hover i {
        transform: translateX(-5px);
    }
    .why-card {
        transition: all 0.3s ease;
    }
    .why-card:hover {
        transform: translateY(-8px);
        border-color: rgba(108, 99, 255, 0.3);
        box-shadow: 0 0 40px rgba(108, 99, 255, 0.15), 0 15px 50px rgba(0, 0, 0, 0.6) !important;
    }
    .why-card:hover .why-icon {
        background: rgba(108, 99, 255, 0.25) !important;
        transform: scale(1.05);
    }
    .why-icon {
        transition: all 0.3s ease;
    }

    @media (max-width: 992px) {
        .why-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }

    @media (max-width: 768px) {
        .why-grid {
            grid-template-columns: 1fr !important;
            max-width: 450px;
            margin: 0 auto;
        }
        .why-card {
            padding: 30px 20px !important;
        }
    }

    
/* CSS لتأثيرات السوشيال ميديا */
    /* التأثيرات العامة */
    .social-link-fb:hover,
    .social-link-ig:hover,
    .social-link-yt:hover,
    .social-link-be:hover,
    .social-link-li:hover {
        transform: translateY(-6px) scale(1.05);
        border-color: transparent !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        color: #fff !important;
    }

    /* فيسبوك */
    .social-link-fb:hover {
        background: #1877f2 !important;
        box-shadow: 0 0 30px rgba(24, 119, 242, 0.4) !important;
    }

    /* إنستغرام (تدرج) */
    .social-link-ig:hover {
        background: radial-gradient(circle at 30% 110%, #ffdb7c, #fbad50, #f46f30, #d62976, #bc2a8d, #5b51d8) !important;
        box-shadow: 0 0 30px rgba(225, 48, 108, 0.4) !important;
    }

    /* يوتيوب */
    .social-link-yt:hover {
        background: #ff0000 !important;
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.4) !important;
    }

    /* بيهانس */
    .social-link-be:hover {
        background: #1769ff !important;
        box-shadow: 0 0 30px rgba(23, 105, 255, 0.4) !important;
    }

    /* لينكد إن */
    .social-link-li:hover {
        background: #0a66c2 !important;
        box-shadow: 0 0 30px rgba(10, 102, 194, 0.4) !important;
    }

    /* ====== RESPONSIVE ====== */
    @media (max-width: 768px) {
        .social-link-fb,
        .social-link-ig,
        .social-link-yt,
        .social-link-be,
        .social-link-li {
            width: 60px !important;
            height: 60px !important;
            font-size: 22px !important;
        }
        .social-links-wrapper {
            gap: 15px !important;
        }
    }

    @media (max-width: 480px) {
        .social-link-fb,
        .social-link-ig,
        .social-link-yt,
        .social-link-be,
        .social-link-li {
            width: 50px !important;
            height: 50px !important;
            font-size: 18px !important;
        }
        .social-links-wrapper {
            gap: 12px !important;
        }
    }

    /* تأثير التركيز على الحقول */
    #contact-name:focus,
    #contact-email:focus,
    #contact-message:focus {
        border-color: #6c63ff !important;
        outline: none !important;
        box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1) !important;
    }

    /* ====== RESPONSIVE ====== */
    @media (max-width: 768px) {
        .contact-grid {
            grid-template-columns: 1fr !important;
        }
        .btn-glow {
            width: 100% !important;
            max-width: 100% !important;
        }
    }

    /* ============================================
   PROJECTS PAGE STYLES
   ============================================ */

.projects-page {
    padding: 100px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 95%;
}

/* ====== HEADER ====== */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color, #2a2a4a);
}

.projects-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 50px;
    color: var(--text-secondary, #8a8aa0);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.projects-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #f0f0f0, #b0b0c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-title i {
    -webkit-text-fill-color: #6c63ff;
}

/* ====== FILTERS ====== */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
    background: var(--bg-card, #141425);
    padding: 15px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #2a2a4a);
}

.filters-bar label {
    color: var(--text-secondary, #8a8aa0);
    font-weight: 500;
    font-size: 14px;
}

.filters-bar select,
.filters-bar .filter-btn {
    padding: 8px 16px;
    background: var(--bg-primary, #0b0c10);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 10px;
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-bar select:focus,
.filters-bar .filter-btn:focus {
    border-color: #6c63ff;
}

.filters-bar select:hover,
.filters-bar .filter-btn:hover {
    border-color: #6c63ff;
}

.filter-btn.active {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.filters-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filters-bar .filter-group:not(:last-child) {
    border-right: 1px solid var(--border-color, #2a2a4a);
    padding-right: 20px;
}

/* ====== PROJECTS GRID ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: 0 0 40px rgba(108, 99, 255, 0.15), 0 15px 50px rgba(0, 0, 0, 0.6);
}

.project-card .card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--bg-primary, #0b0c10);
}

.project-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.project-card .card-image .featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #6c63ff, #b388ff);
    color: #fff;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.project-card .card-body {
    padding: 20px 22px 25px;
}

.project-card .card-body .category-tag {
    display: inline-block;
    background: rgba(108, 99, 255, 0.12);
    color: #b388ff;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-card .card-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.3;
}

.project-card .card-body p {
    font-size: 14px;
    color: var(--text-secondary, #8a8aa0);
    line-height: 1.7;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .card-body .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid var(--border-color, #2a2a4a);
    padding-top: 12px;
}

.project-card .card-body .card-footer .date {
    font-size: 12px;
    color: var(--text-muted, #555);
}

.project-card .card-body .card-footer .btn-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: transparent;
    border: 1px solid #6c63ff;
    border-radius: 30px;
    color: #6c63ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-card .card-body .card-footer .btn-details:hover {
    background: #6c63ff;
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

/* ====== EMPTY STATE ====== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary, #8a8aa0);
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color, #2a2a4a);
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 8px;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
html[dir="rtl"] .filters-bar .filter-group:not(:last-child) {
    border-right: none;
    border-left: 1px solid var(--border-color, #2a2a4a);
    padding-right: 0;
    padding-left: 20px;
}

html[dir="rtl"] .projects-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .project-card .card-image .featured-badge {
    right: auto;
    left: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    .projects-page {
        padding: 90px 15px 40px;
    }
    .projects-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }
    .filters-bar .filter-group:not(:last-child) {
        border-right: none !important;
        border-left: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        border-bottom: 1px solid var(--border-color, #2a2a4a);
        padding-bottom: 12px;
    }
    .filters-bar .filter-group {
        flex-wrap: wrap;
        gap: 8px;
    }
    .project-card .card-image {
        height: 180px;
    }
    html[dir="rtl"] .filters-bar .filter-group:not(:last-child) {
        border-left: none !important;
        border-right: none !important;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    .projects-title {
        font-size: 22px;
    }
    .btn-back {
        padding: 8px 16px;
        font-size: 13px;
    }
    .project-card .card-image {
        height: 160px;
    }
}


/* ============================================
   PROJECTS PAGE STYLES
   ============================================ */

.projects-page {
    padding: 100px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 95%;
}

/* ====== HEADER ====== */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color, #2a2a4a);
}

.projects-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 50px;
    color: var(--text-secondary, #8a8aa0);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.projects-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #f0f0f0, #b0b0c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-title i {
    -webkit-text-fill-color: #6c63ff;
}

/* ====== LANGUAGE SWITCHER ====== */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.06);
}

.lang-switcher a {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #8a8aa0);
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-switcher a.active {
    background: #6c63ff;
    color: #fff;
}

.lang-switcher a:hover:not(.active) {
    color: #fff;
}

/* ====== FILTERS ====== */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
    background: var(--bg-card, #141425);
    padding: 15px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #2a2a4a);
}

.filters-bar label {
    color: var(--text-secondary, #8a8aa0);
    font-weight: 500;
    font-size: 14px;
}

.filters-bar select,
.filters-bar .filter-btn {
    padding: 8px 16px;
    background: var(--bg-primary, #0b0c10);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 10px;
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-bar select:focus,
.filters-bar .filter-btn:focus {
    border-color: #6c63ff;
}

.filters-bar select:hover,
.filters-bar .filter-btn:hover {
    border-color: #6c63ff;
}

.filter-btn.active {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.filters-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filters-bar .filter-group:not(:last-child) {
    border-right: 1px solid var(--border-color, #2a2a4a);
    padding-right: 20px;
}

/* ====== PROJECTS GRID ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: 0 0 40px rgba(108, 99, 255, 0.15), 0 15px 50px rgba(0, 0, 0, 0.6);
}

.project-card .card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--bg-primary, #0b0c10);
}

.project-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.project-card .card-image .featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #6c63ff, #b388ff);
    color: #fff;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.project-card .card-body {
    padding: 20px 22px 25px;
}

.project-card .card-body .category-tag {
    display: inline-block;
    background: rgba(108, 99, 255, 0.12);
    color: #b388ff;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-card .card-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.3;
}

.project-card .card-body p {
    font-size: 14px;
    color: var(--text-secondary, #8a8aa0);
    line-height: 1.7;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .card-body .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid var(--border-color, #2a2a4a);
    padding-top: 12px;
}

.project-card .card-body .card-footer .date {
    font-size: 12px;
    color: var(--text-muted, #555);
}

.project-card .card-body .card-footer .btn-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: transparent;
    border: 1px solid #6c63ff;
    border-radius: 30px;
    color: #6c63ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-card .card-body .card-footer .btn-details:hover {
    background: #6c63ff;
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

/* ====== EMPTY STATE ====== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary, #8a8aa0);
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color, #2a2a4a);
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 8px;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
html[dir="rtl"] .filters-bar .filter-group:not(:last-child) {
    border-right: none;
    border-left: 1px solid var(--border-color, #2a2a4a);
    padding-right: 0;
    padding-left: 20px;
}

html[dir="rtl"] .projects-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .project-card .card-image .featured-badge {
    right: auto;
    left: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    .projects-page {
        padding: 90px 15px 40px;
    }
    .projects-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }
    .filters-bar .filter-group:not(:last-child) {
        border-right: none !important;
        border-left: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        border-bottom: 1px solid var(--border-color, #2a2a4a);
        padding-bottom: 12px;
    }
    .filters-bar .filter-group {
        flex-wrap: wrap;
        gap: 8px;
    }
    .project-card .card-image {
        height: 180px;
    }
    html[dir="rtl"] .filters-bar .filter-group:not(:last-child) {
        border-left: none !important;
        border-right: none !important;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    .projects-title {
        font-size: 22px;
    }
    .btn-back {
        padding: 8px 16px;
        font-size: 13px;
    }
    .project-card .card-image {
        height: 160px;
    }
}

/* ============================================
   PROJECT DETAILS - STYLES
   ============================================ */

.project-detail-page {
    padding: 100px 20px 60px;
    max-width: 1100px;
    margin: 0 auto;
    width: 95%;
}

/* ====== HEADER ====== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color, #2a2a4a);
}

.detail-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 50px;
    color: var(--text-secondary, #8a8aa0);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #f0f0f0, #b0b0c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-title i {
    -webkit-text-fill-color: #6c63ff;
}

/* ====== LANGUAGE SWITCHER ====== */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.06);
}

.lang-switcher a {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #8a8aa0);
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-switcher a.active {
    background: #6c63ff;
    color: #fff;
}

.lang-switcher a:hover:not(.active) {
    color: #fff;
}

/* ====== PROJECT HERO IMAGE ====== */
.project-hero-image {
    width: 100%;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;        /* اختياري */
    overflow: hidden;
    background: #1a1a2e;
}

.project-hero-image img {
    width: 100%;
    height: auto;               /* الارتفاع يتغير تلقائياً حسب النسبة */
    display: block;
}

.project-hero-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 48.828%;       /* نسبة 500/1024 * 100% للحفاظ على المساحة */
    background: #1a1a2e;
    color: #555;
    font-size: 48px;
}

/* ====== PROJECT INFO ====== */
.project-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.project-info .left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-info .left .category-badge {
    display: inline-block;
    background: rgba(108, 99, 255, 0.15);
    color: #b388ff;
    padding: 4px 16px;
    border-radius: 30px ;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

.project-info .left h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.project-info .left .brief {
    font-size: 16px;
    color: var(--text-secondary, #8a8aa0);
    line-height: 1.8;
}

.project-info .right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 0 0 16px 16px;
    padding: 24px 28px;
}

.project-info .right .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #2a2a4a);
}

.project-info .right .info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-info .right .info-item .label {
    color: var(--text-secondary, #8a8aa0);
    font-size: 14px;
}

.project-info .right .info-item .value {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.project-info .right .info-item .value.featured {
    color: #b388ff;
}

/* ====== DESCRIPTION ====== */
.project-description {
    margin-bottom: 40px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 16px;
    padding: 30px 35px;
}

.project-description h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.project-description h3 i {
    color: #6c63ff;
    margin-right: 8px;
}

.project-description .content {
    font-size: 16px;
    color: var(--text-secondary, #8a8aa0);
    line-height: 1.9;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ====== GALLERY ====== */
.project-gallery {
    margin-bottom: 40px;
}

.project-gallery h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.project-gallery h3 i {
    color: #6c63ff;
    margin-right: 8px;
}

/* ====== GALLERY - DYNAMIC ORIENTATION ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-flow: dense; /* لملء الفراغات */
    gap: 16px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color, #2a2a4a);
    background: var(--bg-primary, #0b0c10);
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: #6c63ff;
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* ====== الصور العرضية (أفقية) ====== */
.gallery-item.landscape {
    grid-column: span 1;
}

/* ====== الصور الطولية (عمودية) ====== */
.gallery-item.portrait {
    grid-row: span 2;
}

/* ====== الصور المربعة ====== */
.gallery-item.square {
    grid-column: span 1;
    grid-row: span 1;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .gallery-item.landscape {
        grid-column: span 1; /* في الشاشات الصغيرة نلغي التمدد */
    }
    .gallery-item.portrait {
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
}

/* ====== VIDEOS ====== */
.project-videos {
    margin-bottom: 40px;
}

.project-videos h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.project-videos h3 i {
    color: #6c63ff;
    margin-right: 8px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.videos-grid .video-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color, #2a2a4a);
    background: var(--bg-primary, #0b0c10);
}

.videos-grid .video-item iframe,
.videos-grid .video-item video {
    width: 100%;
    height: 200px;
    display: block;
    border: none;
}

/* ====== DOWNLOAD LINKS ====== */
.project-links {
    margin-bottom: 40px;
}

.project-links h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.project-links h3 i {
    color: #6c63ff;
    margin-right: 8px;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.links-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card, #141425);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 50px;
    color: var(--text-secondary, #8a8aa0);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.links-list a:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}

.links-list .empty-links {
    width: 100%;
    text-align: center;
    color: var(--text-muted, #555);
    padding: 10px;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
html[dir="rtl"] .project-info .right .info-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .detail-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-back i {
    transform: rotate(180deg);
    display: inline-block;
}

html[dir="rtl"] .project-description h3 i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .project-gallery h3 i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .project-videos h3 i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .project-links h3 i {
    margin-right: 0;
    margin-left: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .project-info {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .project-hero-image {
        height: 300px;
    }
    .project-detail-page {
        padding: 90px 15px 40px;
    }
    .detail-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .project-hero-image {
        height: 220px;
    }
    .project-info .right {
        padding: 18px 20px;
    }
    .videos-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .gallery-grid img {
        height: 120px;
    }
    .project-description {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .project-hero-image {
        height: 180px;
    }
    .detail-title {
        font-size: 20px;
    }
    .btn-back {
        padding: 8px 16px;
        font-size: 13px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .gallery-grid img {
        height: 100px;
    }
}

/* ====== RTL: عكس ترتيب التسمية والقيمة ====== */
[dir="rtl"] .project-info .right .info-item {
    flex-direction: row-reverse;
}

/* التنسيق العام للـ header */
.detail-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 25px;
}

/* الصف العلوي: عنوان + لغة */
.detail-header-top {
    display: flex;
    justify-content: space-between;  /* يوزع العناصر على طرفي الصف */
    align-items: center;
    margin-bottom: 10px;             /* فاصل بين الصفين */
}

/* زر اللغة */
.lang-switcher a {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background: #2a2a4a;
    border-radius: 6px;
    color: #b0b0c8;
    text-decoration: none;
    font-size: 14px;
}
.lang-switcher a.active {
    background: #6c63ff;
    color: #fff;
}

/* الصف السفلي: زر الرجوع */
.detail-header-bottom {
    display: flex;
    justify-content: flex-start; /* في RTL سيكون البداية = اليمين، في LTR = اليسار */
}

/* يمكن ضبط مظهر زر الرجوع حسب رغبتك */
.btn-back {
    background: #2a2a4a;
    color: #b0b0c8;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}
.btn-back:hover {
    background: #3a3a5a;
    color: #fff;
}