/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ АНИМАЦИИ ПРИ ПРОКРУТКЕ
   ======================================== */

/* Анимация появления снизу */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация появления слева */
.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Анимация появления справа */
.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Анимация увеличения */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Анимация поворота */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rotate-in.is-visible {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Плавное появление с блюром */
.blur-in {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blur-in.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* Анимация "отпрыгивания" */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounce-in 0.8s ease-out;
}

/* Волновая анимация для текста */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.wave-text span {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

.wave-text span:nth-child(1) { animation-delay: 0s; }
.wave-text span:nth-child(2) { animation-delay: 0.1s; }
.wave-text span:nth-child(3) { animation-delay: 0.2s; }
.wave-text span:nth-child(4) { animation-delay: 0.3s; }
.wave-text span:nth-child(5) { animation-delay: 0.4s; }

/* Градиентная анимация фона */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background: linear-gradient(270deg, #5C2626, #FFCC00, #1a1a1a);
    background-size: 600% 600%;
    animation: gradient-shift 10s ease infinite;
}

/* Параллакс эффект для изображений */
.parallax-img {
    transition: transform 0.3s ease-out;
}

/* Hover эффекты для карточек */
.card-hover {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-hover:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Анимация линии под заголовками */
.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 3px;
    background-color: #5C2626;
    transition: width 0.8s ease-out;
}

.underline-animate.is-visible::after {
    width: 100%;
}

/* Пульсирующий круг */
@keyframes pulse-circle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.pulse-circle {
    animation: pulse-circle 2s ease-in-out infinite;
}

/* Плавающая анимация */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Задержки для последовательной анимации */
.delay-100 { transition-delay: 100ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }
.delay-500 { transition-delay: 500ms !important; }
.delay-600 { transition-delay: 600ms !important; }
.delay-700 { transition-delay: 700ms !important; }
.delay-800 { transition-delay: 800ms !important; }

/* Анимация для счетчиков */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: count-up 1s ease-out;
}

/* Shimmer эффект для загрузки */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 20%, #f0f0f0 40%, #f0f0f0 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Анимация автоматической карусели логотипов */
@keyframes infinite-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1100%);
    }
}

.auto-scroll-carousel {
    display: flex;
    overflow: hidden;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
}

.auto-scroll-carousel-inner {
    display: flex;
    animation: infinite-scroll 999s linear infinite;
    width: 1200%;
    will-change: transform;
}

.auto-scroll-carousel:hover .auto-scroll-carousel-inner {
    animation-play-state: paused;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 300px;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}

.logo-item:hover {
    transform: scale(1.1);
}

.logo-item img {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%);
}

/* ========================================
   АНИМАЦИИ МОДАЛЬНОГО ОКНА
   ======================================== */

/* Анимация фона модального окна */
@keyframes modal-backdrop-in {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

#main-modal {
    animation: modal-backdrop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимация появления окна */
@keyframes modal-scale-bounce {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(100px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#main-modal .bg-white {
    animation: modal-scale-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимация для иконки Telegram */
@keyframes icon-pop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    70% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

#main-modal .bg-white img {
    animation: icon-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

/* Анимация для заголовка */
@keyframes title-fade-slide {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-modal .bg-white h2 {
    animation: title-fade-slide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* Анимация для описания */
#main-modal .bg-white p {
    animation: title-fade-slide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

/* Анимация для кнопки */
@keyframes button-slide-up {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-modal .bg-white .btn {
    animation: button-slide-up 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#main-modal .bg-white .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(92, 38, 38, 0.3);
}

/* Анимация закрытия окна */
@keyframes modal-close {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(100px);
    }
}

#main-modal.closing {
    animation: modal-close 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
