/* =======================================
   GALLERY BEFORE/AFTER SLIDER
   Галерея До/После - полные стили
   ======================================= */

/* Container */
.before-after-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    cursor: col-resize;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    user-select: none;
    -webkit-user-select: none;
}

/* Images container */
.slider-images {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.gallery-item-large .slider-images {
    height: 500px;
}

/* Individual images */
.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-image.before {
    z-index: 1;
}

.slider-image.after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

/* Slider handle */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #ff6b35;
    cursor: col-resize;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: white;
    border: 3px solid #ff6b35;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.slider-handle::after {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b35;
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
}

/* Large gallery handle */
.gallery-item-large .slider-handle {
    width: 6px;
}

.gallery-item-large .slider-handle::before {
    width: 60px;
    height: 60px;
    border: 4px solid #ff6b35;
}

.gallery-item-large .slider-handle::after {
    font-size: 28px;
}

/* Labels */
.slider-labels {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 4;
    pointer-events: none;
}

.slider-label {
    background: rgba(26, 35, 50, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gallery-item-large .slider-label {
    padding: 12px 24px;
    font-size: 16px;
}

/* Gallery info */
.gallery-info {
    padding: 25px 20px;
    text-align: center;
}

.gallery-item-large .gallery-info {
    padding: 30px 20px;
}

.gallery-info h3 {
    font-size: 24px;
    color: #1a2332;
    margin-bottom: 10px;
}

.gallery-item-large .gallery-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.gallery-info p {
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-item-large .gallery-info p {
    font-size: 16px;
}

/* Gallery link card */
.gallery-link-card {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa07a 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.gallery-link-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

.gallery-link-card p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.6;
}

.gallery-link-card .btn {
    background: white;
    color: #ff6b35;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.gallery-link-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .slider-images {
        height: 300px;
    }
    
    .gallery-item-large .slider-images {
        height: 350px;
    }
    
    .slider-labels {
        padding: 0 15px;
        top: 15px;
    }
    
    .slider-label {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .slider-handle::before {
        width: 40px;
        height: 40px;
    }
    
    .slider-handle::after {
        font-size: 20px;
    }
    
    .gallery-info h3 {
        font-size: 20px;
    }
    
    .gallery-item-large .gallery-info h3 {
        font-size: 24px;
    }
    
    .gallery-link-card {
        padding: 30px 20px;
    }
    
    .gallery-link-card h3 {
        font-size: 22px;
    }
    
    .gallery-link-card .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Hover effects */
.before-after-container:hover .slider-handle {
    background: #ff8c5a;
}

.before-after-container:hover .slider-handle::before {
    border-color: #ff8c5a;
}

.before-after-container:active {
    cursor: grabbing;
}

/* Animation */
@keyframes slideHint {
    0%, 100% {
        left: 50%;
    }
    25% {
        left: 30%;
    }
    75% {
        left: 70%;
    }
}

.slider-handle.hint {
    animation: slideHint 2s ease-in-out;
}