/* ========================================
   Simple Lightbox - Самый простой лайтбокс
   ======================================== */

/* Основной контейнер лайтбокса */
.simple-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

/* Контейнер изображения */
.simple-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Изображение */
.simple-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Кнопка закрытия */
.simple-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.simple-lightbox .close-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
}

/* Стрелки навигации */
.simple-lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.simple-lightbox .nav-btn:hover {
    background: rgba(106, 184, 238, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.simple-lightbox .prev-btn {
    left: 30px;
}

.simple-lightbox .next-btn {
    right: 30px;
}

/* Счетчик изображений */
.simple-lightbox .counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10000;
}

/* Заголовок изображения */
.simple-lightbox .caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
    z-index: 10000;
}

/* Анимация появления */
.simple-lightbox.active {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.simple-lightbox img {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .simple-lightbox img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .simple-lightbox .close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .simple-lightbox .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .simple-lightbox .prev-btn {
        left: 15px;
    }
    
    .simple-lightbox .next-btn {
        right: 15px;
    }
    
    .simple-lightbox .counter {
        top: 15px;
        left: 15px;
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .simple-lightbox .caption {
        bottom: 15px;
        padding: 10px 20px;
        font-size: 14px;
        max-width: 90%;
    }
}

/* Стили для миниатюр галереи */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Обеспечиваем одинаковые размеры для всех миниатюр */
.portfolio-item {
    position: relative;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Адаптивные размеры миниатюр */
@media (max-width: 991px) {
    .portfolio-item {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .portfolio-item {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .portfolio-item {
        height: 150px;
    }
}
