.highslide { 
    cursor: pointer; 
    transition: transform 0.3s ease;
}
.highslide:hover {
    transform: scale(1.02);
}

/* Lightbox стили */
.lightbox {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0);
    z-index: 10000;
    transition: background 0.4s ease;
}

.lightbox.active {
    background: rgba(0,0,0,0.9);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s ease;
}

.lightbox.active .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border: 2px solid transparent;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s ease 0.1s;
}

.lightbox.active img {
    opacity: 1;
    transform: scale(1) translateY(0);
    border-color: white;
}

/* Кнопки навигации */
.lightbox .close, 
.lightbox .prev, 
.lightbox .next {
    position: absolute;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 96px;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
    opacity: 0;
    transform: translateY(-20px);
}

.lightbox.active .close,
.lightbox.active .prev,
.lightbox.active .next {
    opacity: 1;
    transform: translateY(0);
}

.lightbox .close { 
    top: 20px; 
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-delay: 0.2s;
}

.lightbox .prev { 
    left: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    transition-delay: 0.3s;
}

.lightbox.active .prev {
    transform: translateY(-50%) translateX(0);
}

.lightbox .next { 
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    transition-delay: 0.3s;
}

.lightbox.active .next {
    transform: translateY(-50%) translateX(0);
}

.lightbox .close:hover, 
.lightbox .prev:hover, 
.lightbox .next:hover {
	background: #424242;
/*    background: rgba(0,100,200,0.9);
    transform: scale(1.1);*/
}

.lightbox .prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox .next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Счетчик изображений */
.lightbox .counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.7);
    padding: 10px 15px;
    border-radius: 20px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease 0.4s;
}

.lightbox.active .counter {
    opacity: 1;
    transform: translateY(0);
}

/* Анимации для смены картинок */
.lightbox img.fade-out {
    opacity: 0;
    transform: scale(0.8) translateX(-50px);
}

.lightbox img.fade-in {
    opacity: 0;
    transform: scale(0.8) translateX(50px);
}

.lightbox img.active {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* Затемнение фона при открытии */
@keyframes darkenBackground {
    from { background: rgba(0,0,0,0); }
    to { background: rgba(0,0,0,0.9); }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .lightbox .prev { left: 10px; padding: 12px; }
    .lightbox .next { right: 10px; padding: 12px; }
    .lightbox .close { top: 10px; right: 10px; padding: 12px; }
    .lightbox img { max-width: 98%; max-height: 98%; }
}