/* ===== Базовые анимации ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from { 
        opacity: 0;
        transform: translateX(30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from { 
        opacity: 0;
        transform: translateX(-30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== Классы анимаций ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

.animate-slide-down {
    animation: slideDown 0.6s ease forwards;
}

.animate-slide-left {
    animation: slideLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideRight 0.6s ease forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ===== Задержки для анимаций ===== */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1.0s; }

/* ===== Анимации для конкретных элементов ===== */
/* Анимация появления шапки при скролле */
.header.scrolled {
    animation: slideDown 0.5s ease forwards;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Анимация для карточек объектов при наведении */
.object-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.object-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Анимация для кнопок */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Анимация для формы */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 107, 237, 0.1);
}

/* Анимация для счетчиков на странице "О компании" */
.counter-up {
    animation: counterUp 2s ease forwards;
}

@keyframes counterUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация для галереи объектов */
.gallery-thumb {
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-thumb.active {
    transform: scale(1.1);
    border: 2px solid #2c6bed;
}

/* Анимация появления элементов при скролле */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.2s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
/* ===== Стили для полноэкранной галереи ===== */
.gallery-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-fullscreen.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-fullscreen__container {
    position: relative;
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-fullscreen__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-fullscreen.active .gallery-fullscreen__image {
    transform: scale(1);
    opacity: 1;
}

.gallery-fullscreen__caption {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
    max-width: 80%;
}

.gallery-fullscreen__close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.gallery-fullscreen__close:hover {
    transform: scale(1.2);
}

.gallery-fullscreen__nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none;
    z-index: 10001;
}

.gallery-fullscreen__button {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
}

.gallery-fullscreen__button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-fullscreen__button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-fullscreen__button:disabled:hover {
    transform: scale(1);
    background-color: rgba(255, 255, 255, 0.1);
}

.gallery-fullscreen__counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.gallery-fullscreen__thumbnails {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    max-width: 100%;
}

.gallery-fullscreen__thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-fullscreen__thumbnail:hover,
.gallery-fullscreen__thumbnail.active {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-fullscreen__thumbnail.active {
    border-color: #2c6bed;
}

/* Кнопка полноэкранного режима в основной галерее */
.gallery-fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Анимация загрузки для галереи */
.gallery-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .gallery-fullscreen__container {
        width: 95%;
        height: 70%;
    }
    
    .gallery-fullscreen__button {
        width: 40px;
        height: 40px;
    }
    
    .gallery-fullscreen__close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
    
    .gallery-fullscreen__caption {
        font-size: 1rem;
    }
    
    .gallery-fullscreen__thumbnails {
        bottom: 10px;
    }
    
    .gallery-fullscreen__thumbnail {
        width: 40px;
        height: 40px;
    }
}

/* Анимация перехода между изображениями */
@keyframes gallerySlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-slide-in {
    animation: gallerySlideIn 0.4s ease forwards;
}

/* Эффект увеличения при двойном клике */
.gallery-fullscreen__image.zoom {
    transform: scale(1.5);
    transition: transform 0.3s ease;
}