/* Documents Section Styles - Consolidated and Mobile Optimized */

:root {
    --primary: rgb(30, 150, 200);
    --primary-light: #e6f0fd;
    --dark: #2d3748;
    --gray: #718096;
    --gray-light: #f7fafc;
    --light: #ffffff;
}

/* Section Container */
.documents-data-section {
    padding: 3rem 1rem;
    background-color: var(--gray-light);
}

/* Document Card */
.document-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.document-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.document-card:hover::before {
    transform: scaleX(1);
}

.document-card:nth-child(1) { animation-delay: 0.1s; }
.document-card:nth-child(2) { animation-delay: 0.2s; }
.document-card:nth-child(3) { animation-delay: 0.3s; }
.document-card:nth-child(4) { animation-delay: 0.4s; }
.document-card:nth-child(5) { animation-delay: 0.5s; }
.document-card:nth-child(6) { animation-delay: 0.6s; }

/* Document Info Flex */
.document-info {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.document-icon {
    font-size: 1.5rem;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.document-icon.pdf {
    background-color: #d64541;
}

.document-icon.excel {
    background-color: #107c41;
}

.document-icon.word {
    background-color: #2b6cb0;
}

.document-details {
    flex: 1;
    min-width: 0;
}

.document-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.3rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: color 0.3s ease;
}

.document-card:hover .document-title {
    color: var(--primary);
}

.document-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
}

.document-meta small {
    font-weight: 500;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 36px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-download:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 111, 239, 0.3);
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download i {
    margin-right: 0.3rem;
}

/* No Documents */
.no-documents {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.no-documents i {
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.no-documents h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.no-documents p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design - Enhanced for Mobile */
@media (max-width: 768px) {
    .documents-data-section {
        padding: 3.5rem 1rem;
    }

    .documents-grid {
        --bs-gutter-x: 1rem;
    }

    .document-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }

    .document-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .document-icon {
        font-size: 1.2rem;
        padding: 0.4rem;
        min-width: 35px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }

    .document-icon i {
        font-size: 1.3rem;
    }

    .document-title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .document-meta {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .btn-download {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
        width: auto;
        border-radius: 25px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    /* Reduce animation duration for performance */
    .document-card {
        animation-duration: 0.4s;
    }
}

@media (max-width: 600px) {
    .documents-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .document-info {
        gap: 0.75rem;
    }

    .document-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .documents-data-section {
        padding: 4rem 0.75rem;
    }

    .container {
        padding: 0 0.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }

    .section-description {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .documents-grid {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .document-card {
        padding: 1.5rem;
        margin: 0 auto;
        max-width: 100%;
        border-radius: 12px;
    }

    .document-info {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .document-icon {
        font-size: 2rem;
        padding: 0.8rem;
        width: 70px;
        height: 70px;
        border-radius: 50%;
    }

    .document-icon i {
        font-size: 2rem;
    }

    .document-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        padding: 0 0.25rem;
        text-align: center;
    }

    .document-meta {
        align-items: center;
        font-size: 0.85rem;
        gap: 0.3rem;
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .btn-download {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 8px;
    }

    .no-documents {
        padding: 3rem 1rem;
    }

    .no-documents i {
        font-size: 3rem;
    }

    .no-documents h3 {
        font-size: 1.3rem;
    }

    /* Disable hover effects on touch devices */
    .document-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .btn-download:hover::before {
        left: -100%;
    }

    .btn-download:hover {
        background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    }
}

/* Touch device specific */
@media (hover: none) and (pointer: coarse) {
    .document-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .btn-download:hover {
        background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    }
}
