/* css/projects.css */

.projects-content {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

/* قسم المقدمة */
.hero-section {
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon points="0,1000 1000,200 1000,1000" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat center center;
    background-size: cover;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* المحتوى الرئيسي */
.main-content {
    padding: 80px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شبكة المشاريع */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    margin-bottom: 80px;
}

.project-card {
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--medium-gray);
    transition: all 0.4s ease;
    opacity: 1;
    transform: scale(1);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.project-card.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.15);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.project-status {
    position: absolute;
    top: 18px;
    right: 18px;
}

.status-badge {
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(10px);
}

.status-badge.active {
    background: var(--success-color);
}

.status-badge.upcoming {
    background: var(--primary-color);
}

.status-badge.completed {
    background: var(--text-light);
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* شريط التقدم */
.progress-section {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.progress-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar {
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 1s ease;
}

.project-dates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.date-item i {
    color: var(--primary-color);
    width: 18px;
}

.project-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 25px;
}

.project-actions {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 22px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 33, 159, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 1px solid var(--medium-gray);
}

.btn-secondary:hover {
    background: var(--medium-gray);
    transform: translateY(-2px);
}

/* لا توجد مشاريع */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.no-projects-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.4;
}

.no-projects h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 0;
    border-radius: 25px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
    max-height: 65vh;
    overflow-y: auto;
}

/* التجاوب مع الشاشات المختلفة */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 60px 0;
    }
    
    .hero-section {
        height: 300px;
    }
    
    .project-content {
        padding: 25px 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
}