/* Стили для отображения прикрепленных файлов в новостях */

.attached-files-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.attached-files-section .section-title {
    color: #495057;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.attached-files-section .section-title i {
    color: #007bff;
    font-size: 22px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.files-list .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.files-list .file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.file-item:hover .file-icon {
    background: #e3f2fd;
    border-color: #2196f3;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.file-size,
.file-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-size::before {
    content: "📁";
    font-size: 12px;
}

.file-date::before {
    content: "📅";
    font-size: 12px;
}

.file-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border-color: #dee2e6;
}

.btn-outline:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .attached-files-section {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .files-list .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .file-info {
        width: 100%;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .file-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .file-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
    
    .file-name {
        font-size: 14px;
    }
}

/* Анимации */
.file-item {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Специальные стили для разных типов файлов */
.file-item[data-type="pdf"] .file-icon {
    background: #fff5f5;
    border-color: #fed7d7;
}

.file-item[data-type="doc"] .file-icon {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.file-item[data-type="xls"] .file-icon {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.file-item[data-type="ppt"] .file-icon {
    background: #fff7ed;
    border-color: #fed7aa;
}

.file-item[data-type="zip"] .file-icon {
    background: #faf5ff;
    border-color: #e9d5ff;
}


