/* --- 3D SUPER GALLERY STYLES --- */

.page-gallery {
    width: 100%;
    height: 500px; /* Увеличили высоту для 3D эффекта */
    position: relative;
    perspective: 1000px; /* Глубина 3D */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
    /* Легкий фон для акцента */
    background: radial-gradient(circle at center, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
}

.gallery-3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item-3d {
    position: absolute;
    width: 340px; /* Размер фото */
    height: 460px;
    background: #000;
    border: 2px solid #333;
    border-radius: 12px;
    transition: all 0.5s ease-out;
    cursor: pointer;
    overflow: hidden;
    /* Отражение снизу */
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, rgba(0,0,0,0.4));
}

.gallery-item-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Затемняем неактивные */
    transition: 0.5s;
}

/* АКТИВНЫЙ СЛАЙД (ЦЕНТР) */
.gallery-item-3d.active {
    z-index: 10;
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), inset 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateX(0) scale(1.1); /* Чуть увеличиваем */
}

.gallery-item-3d.active img {
    filter: brightness(1);
}

/* Кнопки управления */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.gallery-nav-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 20px var(--cyan);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

/* Адаптивность */
@media (max-width: 768px) {
    .page-gallery { height: 400px; }
    .gallery-item-3d { width: 240px; height: 320px; }
    .gallery-nav-btn { width: 40px; height: 40px; font-size: 18px; }
}
