body { background-color: #0f0f0f; color: white; transition: all 0.3s ease; }

/* Language Visibility Classes */
html[lang="en"] .lang-ar { display: none !important; }
html[lang="ar"] .lang-en { display: none !important; }
/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0c0c0c; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cda45e; }
/* Font Switching */
html[lang="ar"] body { font-family: 'Cairo', sans-serif; }

/* Slider Animation */
.slider-container { position: relative; width: 100%; height: 80vh; overflow: hidden; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
    transition: opacity 1s ease-in-out, transform 8s ease;
    background-size: cover; background-position: center; transform: scale(1);
}
.slide.active { opacity: 1; transform: scale(1.1); }

.slide:nth-child(1) {
    background-image: url('../images/backgrounds/home1.webp');
}
.slide:nth-child(2) {
    background-image: url('../images/backgrounds/home2.webp');
}
.slide:nth-child(3) {
    background-image: url('../images/backgrounds/home3.webp');
}
.overlay-gradient { background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }

/* Service Card Hover */
.service-card { transition: all 0.4s ease; border: 1px solid rgba(255,255,255,0.05); }
.service-card:hover { border-color: #cda45e; transform: translateY(-5px); background: rgba(255,255,255,0.03); }

/* Skills Badge Style */
.skill-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.skill-badge:hover {
    background: rgba(205, 164, 94, 0.3);
    border-color: #cda45e;
    transform: translateY(-2px);
}

/* تحسينات الفيديو */
video {
    filter: brightness(0.95);
    transition: filter 0.3s ease;
}

video:hover {
    filter: brightness(1.05);
}

/* تحسينات النافذة المنبثقة */
#videoPopup {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* تحسينات زر الفيديو العائم */
#videoPopupTrigger {
    box-shadow: 0 4px 20px rgba(205, 164, 94, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(205, 164, 94, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(205, 164, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(205, 164, 94, 0); }
}

/* تحسينات شريط التقدم */
#progressBar {
    transition: width 0.1s linear;
}

/* تأثيرات التحكم بالفيديو */
#playButton {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

#playButton:hover {
    box-shadow: 0 0 40px rgba(205, 164, 94, 0.8);
    transform: scale(1.1);
}

.project-image-container {
    position: relative;
    overflow: hidden;
}

.dot {
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #cda45e !important;
    transform: scale(1.2);
}

#project-lightbox {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

#lightbox-slider {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Ensure project images maintain aspect ratio */
.project-card .project-image-container {
    min-height: 12rem;
}

/* Fullscreen video background */

/* Loading animation */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    z-index: 10001;
    font-size: 18px;
}

#introVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#introVideo.fade-out {
    opacity: 0;
    pointer-events: none;
}

.skip-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 12px 24px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    cursor: pointer;
    z-index: 10000;
    font-size: 14px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.skip-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.05);
    opacity: 1;
}

.content {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.show-content .content {
    opacity: 1;
}

.cert-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: rgba(205, 164, 94, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(205, 164, 94, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.cert-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(45deg, #0a0a0a, #1a1a1a);
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cert-card:hover .cert-image {
    transform: scale(1.05);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-card:hover .cert-overlay {
    opacity: 1;
}

.cert-info {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-info {
    transform: translateY(0);
}

.cert-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.cert-org {
    font-size: 12px;
    color: #cda45e;
    margin-bottom: 8px;
}

.cert-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(205, 164, 94, 0.15);
    color: #cda45e;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(205, 164, 94, 0.2);
}

.cert-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}


/* تصميم شهادة الجامعة */
.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(205, 164, 94, 0.1);
    border-color: rgba(205, 164, 94, 0.3);
    color: #cda45e;
}

.cert-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: rgba(205, 164, 94, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.cert-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, #0a0a0a, #1a1a1a);
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cert-card:hover .cert-image {
    transform: scale(1.05);
}

.cert-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(205, 164, 94, 0.15);
    color: #cda45e;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(205, 164, 94, 0.2);
    -webkit-backdrop-filter: blur(10px); 
    backdrop-filter: blur(10px);
}

.cert-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cert-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-org {
    font-size: 14px;
    color: #cda45e;
    margin-bottom: 12px;
}

.cert-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-date {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cert-type {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #888;
}

/* تصميم بطاقة التعليم */
     .ultra-single-line-education {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 10px 14px;
        transition: all 0.3s ease;
    }
    
    .ultra-single-line-education:hover {
        border-color: rgba(205, 164, 94, 0.2);
        background: rgba(255, 255, 255, 0.04);
    }
    
    .inline-education {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .inline-icon {
        width: 28px;
        height: 28px;
        background: rgba(205, 164, 94, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1px solid rgba(205, 164, 94, 0.2);
    }
    
    .inline-icon i {
        font-size: 12px;
        color: #cda45e;
    }
    
    .inline-info {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        font-size: 13px;
        color: #ddd;
        overflow: hidden;
        line-height: 1.4;
    }
    
    .inline-year {
        background: linear-gradient(135deg, #cda45e, #b89452);
        color: #000;
        font-weight: 700;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 8px;
        white-space: nowrap;
    }
    
    .inline-university {
        color: white;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .inline-degree {
        color: #cda45e;
        white-space: nowrap;
    }
    
    .inline-separator {
        color: #666;
        font-size: 10px;
    }
    
    .inline-location,
    .inline-duration,
    .inline-focus {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #aaa;
        white-space: nowrap;
    }
    
    .inline-location i,
    .inline-duration i,
    .inline-focus i {
        font-size: 10px;
        color: #cda45e;
    }
    
    /* تحسينات للغة العربية */
    html[lang="ar"] .inline-education {
        gap: 12px;
    }
    
    html[lang="ar"] .inline-info {
        gap: 8px;
    }
    
    /* التصميم المتجاوب */
    @media (max-width: 768px) {
        .ultra-single-line-education {
            padding: 8px 12px;
        }
        
        .inline-info {
            font-size: 12px;
            gap: 8px;
        }
        
        .inline-icon {
            width: 24px;
            height: 24px;
        }
        
        .inline-icon i {
            font-size: 11px;
        }
    }
    
    @media (max-width: 640px) {
        .inline-info {
            font-size: 11px;
            gap: 6px;
        }
        
        .inline-year {
            font-size: 10px;
            padding: 1px 5px;
        }
        
        html[lang="ar"] .inline-separator {
            display: none;
        }
        
        .inline-separator {
            display: none;
        }
        
        .inline-location,
        .inline-duration,
        .inline-focus {
            gap: 3px;
        }
        
        .inline-location i,
        .inline-duration i,
        .inline-focus i {
            font-size: 9px;
        }
    }
    
    @media (max-width: 480px) {
        .inline-education {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
        
        .inline-info {
            width: 100%;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }
        
        .inline-university,
        .inline-degree {
            width: 100%;
        }
    }
