/* CSS Grid для отображения документов */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.document-card-wrapper {
    display: flex;
}

.document-card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    background: white;
}

.document-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #1e4f9e;
}

.document-preview {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.document-card:hover .document-preview {
    transform: scale(1.05);
}

.document-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: background 0.3s ease;
}

.document-card:hover .document-placeholder {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.pdf-preview {
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.document-card .card-title a {
    color: #1a3d6c;
    font-weight: 600;
    transition: color 0.2s ease;
}

.document-card .card-title a:hover {
    color: #1e4f9e;
}

.document-card .card-body {
    padding: 1.25rem;
}

.document-card .card-text {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Адаптивность для разных экранов */
@media (min-width: 1400px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .document-preview,
    .document-placeholder,
    .pdf-preview {
        height: 180px;
    }
}

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-card-wrapper {
    animation: fadeInUp 0.4s ease-out forwards;
}

.document-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
.document-card-wrapper:nth-child(2) { animation-delay: 0.1s; }
.document-card-wrapper:nth-child(3) { animation-delay: 0.15s; }
.document-card-wrapper:nth-child(4) { animation-delay: 0.2s; }
.document-card-wrapper:nth-child(5) { animation-delay: 0.25s; }
.document-card-wrapper:nth-child(6) { animation-delay: 0.3s; }

/* Стиль для пустого состояния */
.documents-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 2rem 0;
}

.documents-empty i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.documents-empty h3 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.documents-empty p {
    color: #6c757d;
}
