/* Галерея */
.gallery-thumb {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.gallery-thumb:hover {
    transform: scale(1.02);
    text-decoration: none;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Модальное окно */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.modal-dialog {
    max-width: 90%;
    margin: 20px auto;
}

.modal-body {
    position: relative;
    background: #000;
    border-radius: 12px;
}

/* Контент лайтбокса */
.lightbox-content {
    position: relative;
    padding: 40px 20px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.lightbox-caption {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* Кнопка закрытия */
.btn-close {
    background: rgba(0,0,0,0.5);
    padding: 10px;
    opacity: 0.8;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.btn-close:hover {
    opacity: 1;
}

/* Стрелки навигации */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 5;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,0,0,0.7);
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-arrow {
    line-height: 1;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery-image {
        height: 120px;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .lightbox-content {
        padding: 30px 15px;
    }
}

@media (max-width: 576px) {
    .gallery-image {
        height: 100px;
    }
    
    .lightbox-image {
        max-height: 50vh;
    }
    
    .modal-dialog {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .btn-close {
        top: 10px;
        right: 10px;
        padding: 8px;
    }
}