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

body {
    font-family: 'Changa', 'Tajawal', sans-serif;
    transition: background-color 0.4s ease, color 0.3s ease;
    overflow-x: hidden;
}

#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

    #vanta-bg.ready {
        opacity: 1;
    }

.content {
    position: relative;
    z-index: 10;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0f1f, #0f172a);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

    .loading-screen.hide {
        opacity: 0;
        visibility: hidden;
    }

.loading-logo {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

    .loading-logo img {
        width: 120px;
        height: auto;
        margin-bottom: 1rem;
    }

    .loading-logo h2 {
        font-size: 1.8rem;
        background: linear-gradient(135deg, #ffffff, #38bdf8, #a78bfa);
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }

.progress-container {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.85rem;
    color: #94a3b8;
    letter-spacing: 2px;
}

body.light .loading-screen {
    background: linear-gradient(135deg, #e8f0f8, #d4e4f0);
}

    body.light .loading-screen .loading-logo h2 {
        background: linear-gradient(135deg, #0f172a, #0284c7, #7c3aed);
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }

    body.light .loading-screen .progress-container {
        background: rgba(0, 0, 0, 0.1);
    }

    body.light .loading-screen .progress-bar {
        background: linear-gradient(90deg, #0284c7, #7c3aed);
    }

    body.light .loading-screen .loading-text {
        color: #475569;
    }

.section, section {
    scroll-margin-top: 80px;
}

#home, #why, #company, #policy, #services, #downloads, #centers, #contact {
    scroll-margin-top: 80px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInPage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes borderFlow {
    0% {
        width: 80px;
        opacity: 0.6;
    }

    50% {
        width: 120px;
        opacity: 1;
    }

    100% {
        width: 80px;
        opacity: 0.6;
    }
}

@keyframes borderGlow {
    0% {
        border-color: rgba(56, 189, 248, 0.3);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.1);
    }

    50% {
        border-color: rgba(56, 189, 248, 0.8);
        box-shadow: 0 0 15px 2px rgba(56, 189, 248, 0.4);
    }

    100% {
        border-color: rgba(56, 189, 248, 0.3);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.1);
    }
}

@keyframes borderGlowLight {
    0% {
        border-color: rgba(2, 132, 199, 0.3);
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.1);
    }

    50% {
        border-color: rgba(2, 132, 199, 0.8);
        box-shadow: 0 0 15px 2px rgba(2, 132, 199, 0.4);
    }

    100% {
        border-color: rgba(2, 132, 199, 0.3);
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.1);
    }
}

.card, .center-card, .long-text, .contact-form, .download-card, .gallery-item {
    animation: borderGlow 3s infinite ease-in-out;
}

body.light .card, body.light .center-card, body.light .long-text, body.light .contact-form,
body.light .download-card, body.light .gallery-item {
    animation: borderGlowLight 3s infinite ease-in-out;
}

.nav-links a {
    transition: all 0.3s ease;
}

    .nav-links a:hover {
        color: #38bdf8;
        transform: translateX(-3px);
    }

body.light .nav-links a:hover {
    color: #0284c7;
}

.contact-input, .contact-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.8rem;
    font-family: 'Changa', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid;
}

body.dark .contact-input, body.dark .contact-textarea {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(56, 189, 248, 0.3);
    color: white;
}

body.light .contact-input, body.light .contact-textarea {
    background: white;
    border-color: #cbd5e1;
    color: #1e293b;
}

.contact-input:focus, .contact-textarea:focus {
    outline: none;
    transform: scale(1.01);
    animation: borderGlow 0.8s ease-in-out;
    background: rgba(56, 189, 248, 0.1);
}

body.light .contact-input:focus, body.light .contact-textarea:focus {
    animation: borderGlowLight 0.8s ease-in-out;
    background: rgba(2, 132, 199, 0.05);
}

.contact-textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form {
    border: 1px solid transparent;
    border-radius: 1.5rem;
    backdrop-filter: blur(12px);
    padding: 1.8rem;
    max-width: 550px;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
}

    .contact-form:hover {
        transform: scale(1.01);
    }

body {
    animation: fadeInPage 0.8s ease-out;
}

    /* Dark Mode */
    body.dark {
        background-color: #0a0f1f;
        color: #eef2ff;
    }

        body.dark .navbar {
            background: rgba(8, 12, 24, 0.92);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(56, 189, 248, 0.2);
        }

            body.dark .navbar.scrolled {
                background: rgba(8, 12, 24, 0.98);
                box-shadow: 0 5px 25px rgba(0,0,0,0.3);
            }

        body.dark .nav-links a {
            color: #cbd5e6;
        }

            body.dark .nav-links a:hover {
                color: #38bdf8;
                transform: translateX(-3px);
            }

        body.dark .logo h1 {
            background: linear-gradient(135deg, #ffffff, #38bdf8, #a78bfa);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
        }

        body.dark .btn-primary {
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            box-shadow: 0 4px 15px rgba(59,130,246,0.3);
        }

        body.dark .card {
            background: rgba(15, 25, 45, 0.65);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(56, 189, 248, 0.3);
        }

            body.dark .card:hover {
                border-color: #38bdf8;
                background: rgba(25, 35, 60, 0.8);
                box-shadow: 0 15px 30px -12px rgba(0,0,0,0.4);
            }

            body.dark .card h3 {
                color: #7dd3fc;
            }

        body.dark .long-text {
            background: rgba(10, 15, 31, 0.55);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(56, 189, 248, 0.25);
        }

            body.dark .long-text:hover {
                border-color: #38bdf8;
            }

        body.dark .center-card {
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(56, 189, 248, 0.25);
        }

            body.dark .center-card:hover {
                border-color: #38bdf8;
            }

            body.dark .center-card i {
                color: #38bdf8;
            }

        body.dark .contact-form {
            background: rgba(10, 15, 31, 0.65);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(56, 189, 248, 0.3);
        }

        body.dark .download-card {
            background: rgba(15, 25, 45, 0.65);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(56, 189, 248, 0.3);
        }

            body.dark .download-card:hover {
                border-color: #38bdf8;
                background: rgba(25, 35, 60, 0.8);
            }

        body.dark footer {
            background: rgba(5, 10, 20, 0.9);
            border-top: 1px solid rgba(56, 189, 248, 0.15);
        }

        body.dark .section-title:after {
            background: linear-gradient(90deg, #38bdf8, #a78bfa);
        }

        body.dark .more-btn {
            border-color: #38bdf8;
            color: #38bdf8;
        }

            body.dark .more-btn:hover {
                background: #38bdf8;
                color: #0a0f1f;
            }

        body.dark .scroll-top {
            background: linear-gradient(135deg, #38bdf8, #8b5cf6);
        }

        body.dark .download-btn {
            background: rgba(56, 189, 248, 0.2);
            color: #38bdf8;
        }

            body.dark .download-btn:hover {
                background: #38bdf8;
                color: #0a0f1f;
            }

    /* Light Mode */
    body.light {
        background-color: #e8f0f8;
        color: #1e293b;
    }

        body.light .navbar {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(2, 132, 199, 0.15);
        }

            body.light .navbar.scrolled {
                background: rgba(255, 255, 255, 0.98);
                box-shadow: 0 5px 20px rgba(0,0,0,0.05);
            }

        body.light .nav-links a {
            color: #334155;
        }

            body.light .nav-links a:hover {
                color: #0284c7;
                transform: translateX(-3px);
            }

        body.light .logo h1 {
            background: linear-gradient(135deg, #0f172a, #0284c7, #7c3aed);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
        }

        body.light .btn-primary {
            background: linear-gradient(90deg, #0284c7, #7c3aed);
            box-shadow: 0 4px 15px rgba(2,132,199,0.2);
        }

        body.light .card {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(2, 132, 199, 0.25);
            color: #1e293b;
        }

            body.light .card:hover {
                border-color: #0284c7;
                background: rgba(255, 255, 255, 0.92);
                box-shadow: 0 15px 30px -12px rgba(0,0,0,0.1);
            }

            body.light .card h3 {
                color: #0c4a6e;
            }

        body.light .long-text {
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(2, 132, 199, 0.25);
            color: #1e293b;
        }

            body.light .long-text:hover {
                border-color: #0284c7;
            }

        body.light .center-card {
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(2, 132, 199, 0.25);
            color: #1e293b;
        }

            body.light .center-card:hover {
                border-color: #0284c7;
            }

            body.light .center-card i {
                color: #0284c7;
            }

        body.light .contact-form {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(2, 132, 199, 0.3);
        }

        body.light .download-card {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(2, 132, 199, 0.25);
            color: #1e293b;
        }

            body.light .download-card:hover {
                border-color: #0284c7;
                background: rgba(255, 255, 255, 0.92);
            }

        body.light footer {
            background: rgba(255, 255, 255, 0.9);
            border-top: 1px solid rgba(2, 132, 199, 0.15);
            color: #64748b;
        }

        body.light .section-title:after {
            background: linear-gradient(90deg, #0284c7, #7c3aed);
        }

        body.light .more-btn {
            border-color: #0284c7;
            color: #0284c7;
        }

            body.light .more-btn:hover {
                background: #0284c7;
                color: white;
            }

        body.light .scroll-top {
            background: linear-gradient(135deg, #0284c7, #7c3aed);
        }

        body.light .download-btn {
            background: rgba(2, 132, 199, 0.1);
            color: #0284c7;
        }

            body.light .download-btn:hover {
                background: #0284c7;
                color: white;
            }

/* ========== معرض الصور ثلاثي الأبعاد 3D Carousel ========== */
.gallery-section {
    margin-top: 3rem;
    padding: 2rem 0;
    overflow: hidden;
}

.gallery-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #7dd3fc;
    position: relative;
}

body.light .gallery-title {
    color: #0c4a6e;
}

.gallery-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    margin: 0.5rem auto 0;
    border-radius: 3px;
}

/* Swiper 3D Container */
.swiper-container {
    width: 100%;
    padding: 50px 0 80px;
    overflow: visible;
}

.swiper-slide {
    width: 320px;
    height: auto;
    transition: all 0.3s ease;
}

.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 16/10;
}

    .gallery-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .gallery-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    }

        .gallery-card:hover img {
            transform: scale(1.08);
        }

.gallery-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 20px 15px 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
    transform: translateY(0);
}

.gallery-card-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #38bdf8;
    background: rgba(0,0,0,0.4);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background: #38bdf8;
        color: #0a0f1f;
    }

body.light .swiper-button-next,
body.light .swiper-button-prev {
    color: #0284c7;
    background: rgba(255,255,255,0.6);
}

    body.light .swiper-button-next:hover,
    body.light .swiper-button-prev:hover {
        background: #0284c7;
        color: white;
    }

.swiper-pagination-bullet {
    background: #38bdf8;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #38bdf8;
}

body.light .swiper-pagination-bullet {
    background: #0284c7;
}

/* ========== المراكز المعتمدة - مثل بطاقات التحميل ========== */
.centers-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.center-card {
    background: rgba(15, 25, 45, 0.65);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1.8rem 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(56, 189, 248, 0.3);
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    position: relative;
    overflow: hidden;
}

    .center-card:hover {
        transform: translateY(-8px);
        border-color: #38bdf8;
        background: rgba(25, 35, 60, 0.8);
        box-shadow: 0 15px 30px -12px rgba(0,0,0,0.4);
    }

body.light .center-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: #1e293b;
}

    body.light .center-card:hover {
        border-color: #0284c7;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 15px 30px -12px rgba(0,0,0,0.1);
    }

.center-card i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    transition: transform 0.4s ease;
}

.center-card:hover i {
    transform: scale(1.1);
}

body.dark .center-card i {
    color: #38bdf8;
}

body.light .center-card i {
    color: #0284c7;
}

.center-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.center-card .location {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .center-card .location i {
        font-size: 0.8rem;
        margin: 0;
    }

/* أزرار المركز */
.center-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.center-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: 'Changa', sans-serif;
    border: 1px solid transparent;
    cursor: pointer;
}

    .center-btn.call-btn {
        background: rgba(34, 197, 94, 0.15);
        border-color: #22c55e;
        color: #22c55e;
    }

        .center-btn.call-btn:hover {
            background: #22c55e;
            color: white;
            transform: scale(1.02);
        }

    .center-btn.whatsapp-btn {
        background: rgba(37, 211, 102, 0.15);
        border-color: #25D366;
        color: #25D366;
    }

        .center-btn.whatsapp-btn:hover {
            background: #25D366;
            color: white;
            transform: scale(1.02);
        }

body.light .center-btn.call-btn {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: #16a34a;
}

    body.light .center-btn.call-btn:hover {
        background: #16a34a;
        color: white;
    }

body.light .center-btn.whatsapp-btn {
    background: rgba(37, 211, 102, 0.1);
    color: #128C7E;
    border-color: #128C7E;
}

    body.light .center-btn.whatsapp-btn:hover {
        background: #128C7E;
        color: white;
    }

.center-btn i {
    font-size: 1rem;
    margin: 0 !important;
    transform: none !important;
}

.center-btn:hover i {
    transform: none !important;
}

/* استجابة للشاشات المختلفة */
@media (min-width: 992px) {
    .centers-grid {
        flex-wrap: nowrap;
    }

    .center-card {
        max-width: 350px;
    }
}

@media (max-width: 991px) and (min-width: 769px) {
    .centers-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .center-card {
        flex: 0 1 calc(33.33% - 2rem);
        min-width: 220px;
    }

    .center-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .center-btn {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .centers-grid {
        flex-direction: column;
        align-items: center;
    }

    .center-card {
        width: 100%;
        max-width: 100%;
    }

    .center-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .center-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .center-btn {
        justify-content: center;
    }
}

/* ========== قسم التحميلات ========== */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.download-card {
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

    .download-card:hover {
        transform: translateY(-8px);
    }

    .download-card i {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }

    .download-card h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .download-card p {
        font-size: 0.85rem;
        opacity: 0.8;
        margin-bottom: 1.5rem;
    }

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'Changa', sans-serif;
    border: 1px solid transparent;
}

    .download-btn i {
        font-size: 1rem;
        margin: 0;
    }

    .download-btn.disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

        .download-btn.disabled:hover {
            transform: none;
        }

/* ========== قائمة اختيار اللغة المنسدلة ========== */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: 'Changa', sans-serif;
    font-weight: 500;
}

body.dark .lang-switch {
    border-color: #38bdf8;
    color: #38bdf8;
}

    body.dark .lang-switch:hover {
        background: #38bdf8;
        color: #0a0f1f;
        transform: scale(1.05);
    }

body.light .lang-switch {
    border-color: #0284c7;
    color: #0284c7;
}

    body.light .lang-switch:hover {
        background: #0284c7;
        color: white;
        transform: scale(1.05);
    }

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(10, 15, 31, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

body.light .lang-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #eef2ff;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: 'Changa', sans-serif;
    white-space: nowrap;
}

body.light .lang-menu a {
    color: #1e293b;
}

.lang-menu a:hover {
    background: rgba(56, 189, 248, 0.2);
    padding-right: 20px;
}

body.light .lang-menu a:hover {
    background: rgba(2, 132, 199, 0.1);
}

#langArrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

    #langArrow.rotated {
        transform: rotate(180deg);
    }

body[dir="rtl"] .lang-menu {
    right: 0;
    left: auto;
}

body[dir="ltr"] .lang-menu {
    left: 0;
    right: auto;
}

/* ========== تحسين قائمة اللغات للموبايل - تظهر في منتصف الشاشة ========== */
@media (max-width: 768px) {
    .lang-switch {
        padding: 0.3rem 0.7rem;
    }

    .lang-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(0.95);
        width: 85%;
        max-width: 320px;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 20px;
        background: rgba(10, 15, 31, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        pointer-events: none;
    }

    body.light .lang-menu {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }

    .lang-menu.show {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* شريط تمرير مخصص للقائمة */
    .lang-menu::-webkit-scrollbar {
        width: 4px;
    }

    .lang-menu::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
    }

    .lang-menu::-webkit-scrollbar-thumb {
        background: #38bdf8;
        border-radius: 4px;
    }

    body.light .lang-menu::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1);
    }

    body.light .lang-menu::-webkit-scrollbar-thumb {
        background: #0284c7;
    }

    .lang-menu a {
        padding: 14px 18px;
        font-size: 0.95rem;
        text-align: center;
        white-space: normal;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: block;
        cursor: pointer;
    }

    body.light .lang-menu a {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .lang-menu a:last-child {
        border-bottom: none;
    }

    .lang-menu a:hover {
        background: rgba(56, 189, 248, 0.15);
    }

    /* إزالة الشريحة المموهة */
    body.lang-menu-open::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .lang-menu {
        width: 90%;
        max-width: 280px;
    }

        .lang-menu a {
            padding: 12px 16px;
            font-size: 0.9rem;
        }
}

.controls-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

    .navbar.scrolled {
        padding: 0.4rem 5%;
    }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

    .logo:hover {
        transform: scale(1.02);
    }

.logo-img {
    height: 45px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.4rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.65rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

    .nav-links a {
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        position: relative;
        white-space: nowrap;
        font-size: 0.9rem;
    }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            right: auto;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, #38bdf8, #a78bfa);
            transition: width 0.3s ease;
        }

body.light .nav-links a::after {
    background: linear-gradient(90deg, #0284c7, #7c3aed);
}

.nav-links a:hover::after {
    width: 100%;
}

body[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.theme-switch {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    transition: 0.3s;
}

body.dark .theme-switch {
    color: #fbbf24;
}

body.light .theme-switch {
    color: #0284c7;
}

.theme-switch:hover {
    transform: scale(1.1) rotate(15deg);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: inherit;
    padding: 0.5rem;
}

@media (max-width: 1055px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 65px;
        width: 75%;
        height: calc(100vh - 65px);
        background: rgba(10, 15, 31, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 1.5rem;
        transition: all 0.3s ease;
        z-index: 99;
        border-right: 1px solid rgba(56, 189, 248, 0.2);
        border-left: none;
    }

    body[dir="ltr"] .nav-links {
        left: -100%;
        right: auto;
    }

        body[dir="ltr"] .nav-links.open {
            left: 0;
            right: auto;
        }

    body[dir="rtl"] .nav-links {
        right: -100%;
        left: auto;
        border-right: none;
        border-left: 1px solid rgba(56, 189, 248, 0.2);
    }

        body[dir="rtl"] .nav-links.open {
            right: 0;
            left: auto;
        }

    body.light .nav-links {
        background: rgba(255, 255, 255, 0.98);
    }

    body[dir="ltr"].light .nav-links {
        border-right: none;
        border-left: 1px solid #cbd5e1;
    }

    body[dir="rtl"].light .nav-links {
        border-left: none;
        border-right: 1px solid #cbd5e1;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem;
        white-space: normal;
        text-align: center;
    }

    .controls-group {
        flex-direction: row;
        justify-content: center;
    }

    .hero {
        padding: 2rem 1rem 3rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.2rem;
    }

    .contact-form {
        padding: 1.2rem;
    }

    .contact-input, .contact-textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .swiper-slide {
        width: 260px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
}

@media (min-width: 769px) {
    .nav-links {
        display: flex !important;
    }
}

.btn-primary {
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Changa', sans-serif;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}

.hero {
    text-align: center;
    padding: 5rem 1rem 6rem;
}

    .hero h2 {
        font-size: clamp(2rem, 6vw, 3.5rem);
        margin-bottom: 0.5rem;
        letter-spacing: -1px;
    }

    .hero .logo-hero {
        max-width: 150px;
        margin-bottom: 1rem;
        transition: transform 0.3s ease;
        animation: float 4s ease-in-out infinite;
    }

    .hero p {
        font-size: 1rem;
        max-width: 650px;
        margin: 0 auto 1.5rem;
        min-height: 65px;
        opacity: 0.85;
    }

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

.section {
    padding: 3rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    font-weight: 700;
    letter-spacing: -0.5px;
}

    .section-title:after {
        content: '';
        display: block;
        width: 80px;
        height: 3px;
        margin: 0.7rem auto 0;
        border-radius: 3px;
        animation: borderFlow 3s infinite linear;
    }

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

.slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

    .slide-right.visible {
        opacity: 1;
        transform: translateX(0);
    }

.slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

    .slide-left.visible {
        opacity: 1;
        transform: translateX(0);
    }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-top: 1rem;
}

.card {
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: default;
}

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
        transition: left 0.6s ease;
    }

    .card:hover::before {
        left: 100%;
    }

    .card:hover {
        transform: translateY(-6px);
    }

    .card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 700;
    }

        .card h3 i {
            font-size: 1.4rem;
        }

    .card ul {
        list-style: none;
        padding-right: 0;
    }

    .card li {
        margin-bottom: 0.4rem;
        position: relative;
        transition: transform 0.2s ease;
        font-size: 0.9rem;
    }

        .card li i {
            position: absolute;
            font-size: 0.75rem;
            width: 1rem;
            opacity: 0.7;
        }

.more-btn {
    background: transparent;
    border: 1px solid;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 1.2rem;
    font-family: 'Changa', sans-serif;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

    .more-btn:hover {
        transform: scale(1.02);
    }

.long-text {
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1.8rem;
    margin: 1rem 0;
    text-align: justify;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    line-height: 1.7;
}

    .long-text:hover {
        transform: scale(1.005);
    }

.policy-list {
    list-style: none;
}

    .policy-list li {
        margin-bottom: 0.6rem;
        position: relative;
        transition: transform 0.2s ease;
        font-size: 0.9rem;
    }

        .policy-list li i {
            position: absolute;
            font-size: 0.85rem;
            width: 1.2rem;
            opacity: 0.8;
        }

footer {
    text-align: center;
    padding: 1.2rem;
    margin-top: 2rem;
    font-size: 0.75rem;
}

.social-icons a {
    margin: 0 0.5rem;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s ease;
    opacity: 0.7;
}

    .social-icons a:hover {
        transform: translateY(-3px);
        opacity: 1;
    }

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    color: white;
    font-size: 0.9rem;
}

    .scroll-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .scroll-top:hover {
        transform: translateY(-3px) scale(1.05);
    }

body[dir="rtl"] .card li i,
body[dir="rtl"] .policy-list li i {
    position: absolute;
    right: -0.2rem;
    left: auto;
}

body[dir="ltr"] .card li i,
body[dir="ltr"] .policy-list li i {
    position: absolute;
    left: -0.2rem;
    right: auto;
}

body[dir="rtl"] .card li,
body[dir="rtl"] .policy-list li {
    padding-right: 1.3rem;
    padding-left: 0;
}

body[dir="ltr"] .card li,
body[dir="ltr"] .policy-list li {
    padding-left: 1.3rem;
    padding-right: 0;
}

body[dir="rtl"] .card li:hover,
body[dir="rtl"] .policy-list li:hover {
    transform: translateX(-3px);
}

body[dir="ltr"] .card li:hover,
body[dir="ltr"] .policy-list li:hover {
    transform: translateX(3px);
}

body[dir="rtl"] .more-btn i {
    margin-right: 5px;
    margin-left: 0;
}

body[dir="ltr"] .more-btn i {
    margin-left: 5px;
    margin-right: 0;
}

body[dir="rtl"] .policy-list li i {
    position: absolute;
    right: 0;
    left: auto;
}

body[dir="ltr"] .policy-list li i {
    position: absolute;
    left: 0;
    right: auto;
}

body[dir="rtl"] .policy-list li {
    padding-right: 1.5rem;
    padding-left: 0;
}

body[dir="ltr"] .policy-list li {
    padding-left: 1.5rem;
    padding-right: 0;
}

body[dir="rtl"] .nav-links a:hover {
    transform: translateX(3px);
}

body[dir="ltr"] .nav-links a:hover {
    transform: translateX(-3px);
}

body[dir="rtl"] .more-btn i.fa-arrow-left {
    transform: rotate(180deg);
    display: inline-block;
}

body[dir="ltr"] .more-btn i.fa-arrow-right {
    transform: rotate(0deg);
}

/* ========== نافذة عرض الصور المنبثقة ========== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10002;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

    .image-modal.show {
        display: flex;
    }

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10003;
}

    .modal-close:hover {
        color: #38bdf8;
    }

/* ========== إصلاح ظهور العناصر الديناميكية ========== */
.cards-grid .card,
.centers-grid .center-card {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
    display: block !important;
}

#servicesGrid,
#centersGrid {
    min-height: 200px;
}
