﻿.photo-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-color: #f0f4f8; Светлый фон */
    padding: 20px;
    width: 100%;
    animation: container-appear 0.5s ease-out;
}

/* Анимация появления контейнера */
@keyframes container-appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Стили для фото */
.volume-photo {
    max-width: 90%;
    max-height: 90vh; /* Ограничиваем высоту, чтобы оставить отступы */
    width: auto;
    height: auto;
    object-fit: contain; /* Сохраняет пропорции, не обрезает */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    /* Анимация появления фото */
    animation: photo-fade-in 1.2s ease-out 0.3s both, photo-scale-up 1s ease-out 0.5s both, photo-float 6s ease-in-out 1.5s infinite alternate;
    /* Начальное состояние для анимации */
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    /* Создаем 3D эффект для объема */
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 1. Плавное появление с прозрачности */
@keyframes photo-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 2. Масштабирование при появлении */
@keyframes photo-scale-up {
    from {
        transform: scale(0.8) translateY(20px);
    }

    to {
        transform: scale(1) translateY(0);
    }
}

/* 3. Плавное плавающее движение после появления */
/*@keyframes photo-float {
    0% {
        transform: translateY(0) rotateX(0.5deg) rotateY(0.5deg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    50% {
        transform: translateY(-15px) rotateX(-0.5deg) rotateY(-0.5deg);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    100% {
        transform: translateY(0) rotateX(0.5deg) rotateY(0.5deg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }
}*/

/* Эффект объемной рамки */
.volume-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0.05) 70%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
    animation: frame-glow 4s ease-in-out infinite alternate;
}

@keyframes frame-glow {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.9;
    }
}

/* Эффект блика */
.volume-photo::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 40%;
    border-radius: 16px 16px 50% 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 80%);
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

/* Подпись под фото */
.photo-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #444;
    font-size: 1.2rem;
    opacity: 0;
    animation: caption-appear 1s ease-out 1.8s both;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    max-width: 80%;
}

@keyframes caption-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Элементы фона для дополнительной анимации */
.bg-element {
    position: fixed;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(120, 150, 230, 0.1), rgba(200, 220, 255, 0.05));
    z-index: -1;
    animation: bg-float 20s linear infinite;
}

    .bg-element:nth-child(1) {
        width: 100px;
        height: 100px;
        top: 10%;
        left: 10%;
        animation-delay: 0s;
    }

    .bg-element:nth-child(2) {
        width: 150px;
        height: 150px;
        top: 60%;
        right: 10%;
        animation-delay: -5s;
    }

    .bg-element:nth-child(3) {
        width: 80px;
        height: 80px;
        bottom: 20%;
        left: 20%;
        animation-delay: -10s;
    }

    .bg-element:nth-child(4) {
        width: 120px;
        height: 120px;
        top: 20%;
        right: 20%;
        animation-delay: -15s;
    }

@keyframes bg-float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
    }

    50% {
        transform: translateY(0) rotate(180deg);
    }

    75% {
        transform: translateY(20px) rotate(270deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* Инструкция */
.instructions {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    z-index: 100;
    backdrop-filter: blur(5px);
    max-width: 90%;
    animation: instructions-appear 0.8s ease-out 0.5s both;
}

@keyframes instructions-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .photo-caption {
        font-size: 1rem;
        padding: 12px 20px;
        bottom: 30px;
    }

    .instructions {
        font-size: 0.8rem;
        padding: 10px 20px;
    }

    .volume-photo {
        max-width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .photo-caption {
        font-size: 0.9rem;
        padding: 10px 15px;
        bottom: 20px;
    }

    .instructions {
        font-size: 0.7rem;
        padding: 8px 15px;
    }
}

/* Эффект перезагрузки анимации при наведении */
.photo-container:hover .volume-photo {
    animation: photo-fade-in 1.2s ease-out 0.3s both, photo-scale-up 1s ease-out 0.5s both, photo-float 4s ease-in-out 0s infinite alternate;
}

/* Вариант без наведения - фото появляется сразу при загрузке */
.volume-photo.load-on-view {
    /* Анимация будет запущена когда элемент появится в viewport */
    animation-play-state: paused;
}



/*.photo-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}*/

/* Стили для фото */
/*.volume-photo {
    max-width: 90%;
    max-height: 90vh;*/ /* Ограничиваем высоту, чтобы оставить отступы */
    /*width: auto;
    height: auto;
    object-fit: contain;*/ /* Сохраняет пропорции, не обрезает */
    /*border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}*/

