.legal-documents-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.legal-documents-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    background: linear-gradient(270deg,#c8141f,#008b45);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg,#c8141f,#008b45);
    border-radius: 2px;
} */

.section-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.document-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.document-preview {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8fafc;
}

.document-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
    background: white;
    padding: 10px;
}

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

.document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.8));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-card:hover .document-overlay {
    opacity: 1;
}

.document-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.preview-btn:hover {
    background: rgba(37, 99, 235, 0.95);
    transform: translateY(-2px);
}

.card-content {
    padding: 25px;
}

.document-title {
    font-family: var(--e-global-typography-8e643e6-font-family) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #1e293b !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.section-footer {
    text-align: center;
}

.legal-note {
    color: #64748b;
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    background: white;
    width: 95%;
    max-width: 1000px;
    height: 95vh;
    margin: 2.5vh auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    height: calc(100% - 83px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 20px;
}

/* Animation delays for staggered effect */
[data-aos] {
    opacity: 0;
    transition: all 0.8s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.2rem;
    }

    .documents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .document-preview {
        height: 200px;
    }

    .document-overlay {
        padding: 15px;
        opacity: 1;
        background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.8));
    }

    .preview-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .modal-container {
        width: 98%;
        height: 98vh;
        margin: 1vh auto;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}