/* Documentation Section Styles */
.documentation-section {
    background: #f8f9fa;
    position: relative;
}

.documentation-section .section-tittle h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 20px;
}

.documentation-section .section-tittle p {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Document Cards */
.document-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.document-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.document-card:hover::before {
    transform: scaleX(1);
}

.document-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.document-icon i {
    font-size: 2.2rem;
    color: #fff;
}

.document-card:hover .document-icon {
    transform: scale(1.1) rotate(5deg);
}

.document-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.document-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.document-details {
    margin-bottom: 25px;
}

.reg-number {
    display: block;
    font-weight: 600;
    color: #ff6b35;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.file-type {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* View Button */
.view-btn {
    display: inline-block;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-bottom: 10px;
}

.view-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
}

.view-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.25);
}

.view-btn i {
    margin-right: 8px;
}

/* Security Notice */
.security-notice {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.security-notice i {
    margin-right: 5px;
}

/* Document Viewer Modal */
.modal-xl {
    max-width: 95%;
    z-index: 1055 !important;
}

/* Modal Backdrop Fix */
.modal-backdrop {
    z-index: 1040 !important;
}

/* Modal Dialog Fix */
.modal.show {
    z-index: 1050 !important;
    display: block !important;
    pointer-events: auto !important;
}

.modal-dialog {
    pointer-events: auto !important;
    z-index: 1051 !important;
}

.modal-content {
    pointer-events: auto !important;
    position: relative;
    z-index: 1052 !important;
}

.modal-header,
.modal-body,
.modal-footer {
    pointer-events: auto !important;
    z-index: 1053 !important;
    position: relative;
}

/* Ensure buttons are clickable */
.modal-header .close,
.modal-footer .btn {
    pointer-events: auto !important;
    z-index: 1054 !important;
    position: relative;
    cursor: pointer !important;
}

.document-viewer-container {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    pointer-events: auto !important;
}

.viewer-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.document-info h6 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.security-watermark {
    margin-top: 5px;
    opacity: 0.8;
    font-size: 0.85rem;
}

.security-watermark i {
    margin-right: 5px;
    color: #f7931e;
}

.viewer-controls .btn {
    white-space: nowrap;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1054 !important;
    position: relative;
}

.viewer-content {
    padding: 0;
    height: 80vh;
    max-height: 80vh;
    background: #fff;
    overflow-y: auto !important;
    overflow-x: hidden;
    display: block;
    position: relative;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto !important;
}

.pdf-container {
    width: 100%;
    height: 1500px !important;
    min-height: 100%;
    border: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto !important;
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.document-placeholder {
    text-align: center;
    color: #6c757d;
}

.document-sample {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.document-sample::before {
    content: 'SAMPLE - FOR VERIFICATION ONLY';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 107, 53, 0.1);
    z-index: 1;
    white-space: nowrap;
}

.document-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b35;
}

.document-header h6 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

.document-header p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.sample-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    text-align: left;
}

.viewer-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #e9ecef;
}

.viewer-footer .security-notice {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
    flex: 1;
    max-width: 60%;
}

.timestamp {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Request Copy Modal */
.alert {
    border-radius: 10px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .viewer-header {
        flex-direction: column;
        text-align: center;
    }

    .viewer-footer {
        flex-direction: column;
        text-align: center;
    }

    .viewer-footer .security-notice {
        max-width: 100%;
    }

    .document-sample::before {
        font-size: 1.5rem;
    }

    .document-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .modal-xl {
        max-width: 100%;
        margin: 10px;
    }

    .viewer-content {
        padding: 15px;
    }

    .document-sample {
        padding: 20px;
    }

    .document-sample::before {
        font-size: 1.2rem;
    }
}

/* Verification Notice */
.verification-notice {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 40px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.verification-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.verification-icon {
    flex-shrink: 0;
}

.verification-icon i {
    font-size: 3rem;
    color: #f7931e;
}

.verification-text h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.verification-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.verification-contacts {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.contact-item i {
    color: #f7931e;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .verification-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .verification-contacts {
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .document-card {
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    .document-icon {
        width: 70px;
        height: 70px;
    }

    .document-icon i {
        font-size: 2rem;
    }

    .document-info h4 {
        font-size: 1.2rem;
    }

    .verification-notice {
        padding: 30px 20px;
    }

    .verification-icon i {
        font-size: 2.5rem;
    }

    .verification-text h4 {
        font-size: 1.3rem;
    }

    .verification-contacts {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .contact-item {
        flex-direction: column;
        gap: 5px;
    }

    .document-description {
        font-size: 0.9rem;
    }

    .download-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Animation Effects */
.document-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.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;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verification-notice {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

/* Focus States for Accessibility */
.download-btn:focus {
    outline: 3px solid rgba(255, 107, 53, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .documentation-section {
        background: #fff;
        padding: 40px 0;
    }

    .document-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }

    .download-btn {
        background: #fff;
        color: #333;
        border: 1px solid #333;
    }

    .verification-notice {
        background: #f8f9fa;
        color: #333;
        border: 1px solid #ddd;
    }
}

/* Loading State (for future dynamic content) */
.document-loading {
    text-align: center;
    padding: 60px 20px;
}

.document-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Security Badge */
.security-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.document-card:hover .security-badge {
    background: #1e7e34;
}

/* Document Type Icons */
.document-icon.certificate {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.document-icon.tax {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.document-icon.constitution {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
}

.document-icon.report {
    background: linear-gradient(135deg, #17a2b8, #6610f2);
}

.document-icon.audit {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.document-icon.board {
    background: linear-gradient(135deg, #6c757d, #495057);
}