body { font-family: 'Cairo', sans-serif; }

/* هوية الألوان */
:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --secondary: #004E89;
    --accent: #00D4FF;
    --light-bg: #ffffff;
    --light-section: #f9f9f9;
    --heading-blue: #1A1A2E;
    --body-gray-blue: #64748B;
    --card-border: #E2E8F0;
    --card-shadow: rgba(14, 165, 233, 0.08);

    --dark-bg: #1e293b;     
    --dark-card: #334155;   
    --dark-text: #f8fafc;   
}

/* ===== ألوان مساعدة للمشاريع ===== */
.text-heading-blue {
    color: var(--heading-blue);
}
.text-body-gray-blue {
    color: var(--body-gray-blue);
}
.bg-primary\/10 {
    background-color: rgba(14, 165, 233, 0.1);
}
.bg-secondary\/10 {
    background-color: rgba(0, 78, 137, 0.1);
}
.bg-accent\/10 {
    background-color: rgba(0, 212, 255, 0.1);
}

/* ===== قسم المشاريع ===== */
#projects {
    position: relative;
}

/* Glow circles decoration */
.glow-circle {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ===== قسم المشاريع ===== */

/* ===== بطاقات المشاريع العادية (Grid Cards) - الكلاسات الموجودة في HTML ===== */
#projects-container > div {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
}

#projects-container > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0EA5E9, #004E89);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#projects-container > div:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

#projects-container > div:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

/* ===== أنيميشن ظهور البطاقات ===== */
#projects-container > div {
    opacity: 0;
    transform: translateY(30px);
    animation: projectFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#projects-container > div:nth-child(1) { animation-delay: 0.1s; }
#projects-container > div:nth-child(2) { animation-delay: 0.15s; }
#projects-container > div:nth-child(3) { animation-delay: 0.2s; }
#projects-container > div:nth-child(4) { animation-delay: 0.25s; }
#projects-container > div:nth-child(5) { animation-delay: 0.3s; }
#projects-container > div:nth-child(6) { animation-delay: 0.35s; }
#projects-container > div:nth-child(7) { animation-delay: 0.4s; }
#projects-container > div:nth-child(8) { animation-delay: 0.45s; }

@keyframes projectFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== تحسين الصور داخل البطاقات ===== */
#projects-container > div > div:first-child {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

#projects-container > div > div:first-child div[style*="background-image"] {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#projects-container > div:hover > div:first-child div[style*="background-image"] {
    transform: scale(1.08);
}

/* ===== تحسين زر "شاهد التفاصيل" ===== */
#projects-container > div button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    color: #0EA5E9 !important;
    border: 2px solid #0EA5E9 !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: auto !important;
}

#projects-container > div button:hover {
    background: #0EA5E9 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3) !important;
}

/* ===== تحسين النصوص داخل البطاقات ===== */
#projects-container > div h3 {
    transition: color 0.3s ease;
}

#projects-container > div:hover h3 {
    color: #0EA5E9;
}

#projects-container > div ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

#projects-container > div ul li svg {
    width: 16px;
    height: 16px;
    color: #0EA5E9;
    flex-shrink: 0;
}

#projects-container > div ul li span {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* ===== المودال (Modal) ===== */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.custom-modal.flex {
    display: flex;
}

.custom-modal-content {
    background-color: white;
    padding: 0;
    border-radius: 24px;
    max-width: 64rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scrollbar styling for modal */
.custom-modal-content::-webkit-scrollbar {
    width: 6px;
}
.custom-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.custom-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.custom-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== قسم الخدمات ===== */
.services {
    max-width: 900px;
    margin: auto;
    padding: 25px;
    direction: rtl;
}

.section-title {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary);
}

/* صندوق الخدمة */
.service-box {
    background: var(--light-bg);
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 18px;
    border-radius: 14px;
    transition: 0.3s;
}

.service-box:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* زر المزيد */
.more-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    margin-top: 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s;
}

.more-btn:hover {
    background: #e65d2d;
    transform: scale(1.03);
}

/* تفاصيل الخدمة */
.details {
    display: none;
    margin-top: 18px;
    padding: 15px;
    background: var(--light-section);
    border-right: 4px solid var(--primary);
    border-radius: 12px;
}

.details h4 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 8px;
}

/* ===== Line clamp for descriptions ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
    #projects-container > div {
        padding: 16px !important;
    }
    #projects-container > div h3 {
        font-size: 1.1rem !important;
    }
}

/* ===== Dark Mode ===== */
.dark .service-box {
    background: var(--dark-card);
    border-color: #475569;
    color: var(--dark-text);
}

.dark .details {
    background: #273449;
    color: var(--dark-text);
}

.dark .section-title {
    color: var(--primary);
}

.dark .more-btn {
    background: var(--primary);
}
