/* Documents Reviews Slider */
.documents-reviews-section {
    padding: 80px 0;
    background-color: var(--color-white);
    position: relative;
}

.documents-reviews-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.documents-reviews-heading {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.documents-reviews-title {
    font-size: var(--font-size-xxl);
    color: var(--color-black);
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding-bottom: 20px;
    position: relative;
    display: inline-block;
}

.documents-reviews-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-eco-horizontal);
    border-radius: 2px;
}

/* Swiper for 3 items */
.documents-swiper {
    width: 100%;
    padding: 20px 0 60px;
}

/* Document Item Styles */
.document-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    position: relative;
    border: 3px solid transparent;
    background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
        linear-gradient(135deg,
            var(--color-eco-vibrant) 0%,
            var(--color-eco-fresh) 25%,
            var(--color-eco-green) 50%,
            var(--color-eco-forest) 100%) border-box;
}

.document-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.document-preview-wrapper {
    position: relative;
    padding-bottom: 130%; /* Соотношение для документа A4 (210x297 ≈ 1:1.414) */
    height: 0;
    overflow: hidden;
}

.document-preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
    padding: 15px;
    transition: transform 0.3s ease;
}

.document-item:hover .document-preview-image {
    transform: scale(1.03);
}

/* Zoom overlay */
.document-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 120, 32, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.document-item:hover .document-zoom-overlay {
    background: rgba(44, 120, 32, 0.1);
}

.document-zoom-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.document-item:hover .document-zoom-icon {
    transform: scale(1);
}

.document-zoom-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--color-eco-green);
}

/* Navigation buttons */
.documents-prev,
.documents-next {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -24px;
}

.documents-prev:hover,
.documents-next:hover {
    background: var(--color-white);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.documents-prev:after,
.documents-next:after {
    font-size: 20px;
    color: var(--color-text);
    font-weight: bold;
}

.documents-prev {
    left: 20px;
}

.documents-next {
    right: 20px;
}

/* Pagination */
.documents-pagination {
    position: absolute;
    bottom: 20px !important;
    left: 0;
    width: 100%;
    text-align: center;
}

.documents-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: all var(--transition-fast);
}

.documents-pagination .swiper-pagination-bullet-active {
    background: var(--color-eco-green);
    transform: scale(1.2);
}

/* Gallery Popup Styles */
.documents-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.documents-popup-overlay.active {
    opacity: 1;
    display: flex;
}

.documents-popup-container {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.documents-popup-overlay.active .documents-popup-container {
    transform: translateY(0);
}

.documents-popup-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.documents-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.documents-popup-close svg {
    width: 20px;
    height: 20px;
    fill: var(--color-white);
}

/* Декорации для попапа как в lead-block */
.documents-popup-container::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--color-eco-vibrant);
    border-radius: 50%;
    opacity: 0.15;
    z-index: -1;
}

.documents-popup-container::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: var(--color-eco-forest);
    border-radius: 50%;
    opacity: 0.15;
    z-index: -1;
}

.documents-popup-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(var(--color-black), var(--color-black)) padding-box,
        linear-gradient(135deg,
            var(--color-eco-vibrant) 0%,
            var(--color-eco-fresh) 25%,
            var(--color-eco-green) 50%,
            var(--color-eco-forest) 100%) border-box;
}

.documents-popup-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    display: none;
}

.documents-popup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-white);
    font-size: 18px;
}

/* Mobile version */
@media (max-width: 768px) {
    .documents-reviews-section {
        padding: 60px 0;
    }
    
    .documents-reviews-title {
        font-size: var(--font-size-xl);
    }
    
    .documents-swiper {
        padding: 20px 0 50px;
    }
    
    .document-preview-wrapper {
        padding-bottom: 140%;
    }
    
    .document-zoom-icon {
        width: 40px;
        height: 40px;
    }
    
    .document-zoom-icon svg {
        width: 20px;
        height: 20px;
    }
    
    /* Mobile navigation */
    .documents-prev,
    .documents-next {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .documents-prev:after,
    .documents-next:after {
        font-size: 16px;
    }
    
    .documents-prev {
        left: 10px;
    }
    
    .documents-next {
        right: 10px;
    }
    
    /* Mobile pagination */
    .documents-pagination {
        bottom: 15px !important;
    }
    
    .documents-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    /* Mobile popup */
    .documents-popup-container {
        width: 95%;
        height: 85vh;
    }
    
    .documents-popup-close {
        top: -45px;
        width: 36px;
        height: 36px;
    }
    
    .documents-popup-close svg {
        width: 18px;
        height: 18px;
    }
    
    .documents-popup-image {
        padding: 15px;
    }
    
    /* Скрыть декорации на мобильных */
    .documents-popup-container::before,
    .documents-popup-container::after {
        display: none;
    }
}

/* Dark theme */
/* @media (prefers-color-scheme: dark) {
    .documents-reviews-section {
        background-color: var(--color-dark-bg);
    }
    
    .documents-reviews-title {
        color: var(--color-white);
    }
    
    .document-item {
        background: linear-gradient(var(--color-dark-bg), var(--color-dark-bg)) padding-box,
            linear-gradient(135deg,
                var(--color-eco-vibrant) 0%,
                var(--color-eco-fresh) 25%,
                var(--color-eco-green) 50%,
                var(--color-eco-forest) 100%) border-box;
    }
    
    .document-preview-image {
        background: rgba(40, 40, 40, 0.8);
    }
    
    .documents-prev,
    .documents-next {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .documents-prev:hover,
    .documents-next:hover {
        background: rgba(40, 40, 40, 0.95);
    }
    
    .documents-prev:after,
    .documents-next:after {
        color: var(--color-white);
    }
    
    .document-zoom-overlay {
        background: rgba(44, 120, 32, 0);
    }
    
    .document-item:hover .document-zoom-overlay {
        background: rgba(44, 120, 32, 0.15);
    }
} */