/* أنماط خاصة بصفحة التعاون الجماعي */
.collaboration-hero {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.collaboration-hero .container {
    position: relative;
    z-index: 1;
}

.collaboration-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.collaboration-hero h1 i {
    margin-left: 15px;
    color: #ffd700;
}

.collaboration-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffd700;
}

.hero-stats .label {
    font-size: 1rem;
    opacity: 0.9;
}

/* تنقل التعاون */
.collaboration-nav {
    background: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.collab-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--secondary-color);
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn i {
    font-size: 1.1rem;
}

.notification-badge {
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    left: 10px;
}

/* محتوى التعاون */
.collaboration-content {
    padding: 40px 0 80px;
    background: var(--light-color);
    min-height: 60vh;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-header {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.content-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-header p {
    color: #666;
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
}

/* شبكة المنتديات */
.forums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.forum-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.forum-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.forum-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.forum-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.forum-info {
    flex: 1;
}

.forum-title {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.forum-category {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.forum-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.forum-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.forum-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.forum-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.forum-activity {
    font-size: 0.8rem;
    color: #999;
}

/* قائمة المشاريع */
.projects-list {
    display: grid;
    gap: 20px;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.project-category {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-in-progress {
    color: var(--accent-color);
}

.status-completed {
    color: var(--success-color);
}

.project-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.project-progress {
    margin-bottom: 20px;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.project-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-members {
    display: flex;
}

.team-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: -8px;
    border: 2px solid white;
}

.project-deadline {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* شبكة الملفات */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.file-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.file-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
    word-break: break-word;
}

.file-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
}

.file-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.file-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.file-uploader {
    font-size: 0.9rem;
    color: #666;
}

.file-downloads {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* نظام الرسائل */
.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 600px;
}

.conversations-list {
    border-left: 1px solid #eee;
    background: var(--light-color);
}

.conversations-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: white;
}

.conversations-header h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.conversations {
    overflow-y: auto;
    height: calc(600px - 80px);
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.conversation-item:hover,
.conversation-item.active {
    background: var(--secondary-color);
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
}

.conversation-partner {
    font-weight: 500;
    margin-bottom: 5px;
}

.conversation-preview {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.conversation-time {
    font-size: 0.8rem;
    color: #999;
}

.conversation-unread {
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-area {
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: white;
}

.chat-partner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.partner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.partner-info h4 {
    margin-bottom: 5px;
}

.status {
    font-size: 0.8rem;
}

.status.online {
    color: var(--success-color);
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-color);
}

.btn-icon:hover {
    background: var(--secondary-color);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message.sent .message-content {
    background: var(--primary-color);
    color: white;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: var(--shadow);
}

.message-content p {
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input .input-actions {
    display: flex;
    gap: 5px;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: var(--transition);
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

/* التجاوب للجوال */
@media (max-width: 768px) {
    .collaboration-hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .collab-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 15px 10px;
    }
    
    .forums-grid {
        grid-template-columns: 1fr;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .conversations-list {
        border-left: none;
        border-bottom: 1px solid #eee;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .project-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .collaboration-hero {
        padding: 60px 0;
    }
    
    .collaboration-hero h1 {
        font-size: 1.7rem;
    }
    
    .hero-stats .number {
        font-size: 2rem;
    }
    
    .content-header {
        padding: 20px 15px;
    }
    
    .forum-header,
    .file-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .forum-icon,
    .file-icon {
        align-self: center;
    }
    
    .forum-stats {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}