.slider {
    margin-top: 25px;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 40px;
    display: none;
  }


.slider.active {
    display: block;
    pointer-events: auto;
  }
  
  .image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
  }
  
  .image-before {
    z-index: 1;
  }
  
  .image-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0); /* Начальное состояние */
  }
  
  .resizer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    cursor: ew-resize;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
  }
  
  .resizer:hover {
    background: rgba(255, 255, 255, 0.8);
  }
  
  .resizer:hover::before {
    transform: scale(1.1);
  }
  
  /* Навигация */
  .nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #ffffffdd;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
  }
  
  .nav-button.prev {
    left: 10px;
  }
  
  .nav-button.next {
    right: 10px;
  }