/* Company Documents Section Styles */
.company-documents-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.company-documents-section .sec-title {
    margin-bottom: 60px;
}

/* Equal height row for cards */
.company-documents-section .row {
    display: flex;
    flex-wrap: wrap;
}

.company-documents-section .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.single-company-document {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Set minimum height for consistency */
}

.single-company-document:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.document-image {
    height: 200px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.document-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to show full image */
    transition: transform 0.3s ease;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.single-company-document:hover .document-image img {
    transform: scale(1.02);
    border-color: #fe0000;
    box-shadow: 0 4px 15px rgba(254, 0, 0, 0.15);
}

.document-placeholder {
    color: #6c757d;
    text-align: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.document-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure proper spacing distribution */
}

.document-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.document-content p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: auto; /* Push meta section to bottom */
    flex-grow: 1; /* Allow content to grow */
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 15px; /* Add top margin for spacing */
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}

.document-type {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.document-type:contains("certification") {
    background: #28a745;
}

.document-type:contains("affiliation") {
    background: #17a2b8;
}

.document-type:contains("license") {
    background: #ffc107;
    color: #212529;
}

.document-type:contains("award") {
    background: #dc3545;
}

.document-date {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.document-link {
    display: inline-flex;
    align-items: center;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.document-link:hover {
    color: #0056b3;
    text-decoration: none;
}

.document-link i {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .company-documents-section {
        padding: 60px 0;
    }
    
    .company-documents-section .row {
        display: block; /* Reset flex for mobile - stacked layout */
    }
    
    .single-company-document {
        margin-bottom: 20px;
        min-height: 350px; /* Reduced minimum height for mobile */
    }
    
    .document-image {
        height: 150px;
        padding: 10px; /* Reduced padding for mobile */
    }
    
    .document-image img {
        padding: 8px; /* Reduced padding for mobile */
    }
    
    .document-content {
        padding: 20px;
    }
    
    .document-content h4 {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .company-documents-section {
        padding: 40px 0;
    }
    
    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Animation for smooth loading */
.single-company-document {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.single-company-document:nth-child(1) { animation-delay: 0.1s; }
.single-company-document:nth-child(2) { animation-delay: 0.2s; }
.single-company-document:nth-child(3) { animation-delay: 0.3s; }
.single-company-document:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
