/* Базовые анимации и эффекты для сайта */

/* Fade-in анимации */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Параллакс контейнеры */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Hover эффекты для карточек */
.card {
    transition: all 0.3s ease;
    transform-origin: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Анимации для кнопок */
.button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.button:hover::before {
    left: 100%;
}

/* Стили для текстовых анимаций */
.split-text {
    overflow: hidden;
}

.split-text .word {
    display: inline-block;
    overflow: hidden;
}

.split-text .char {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s ease;
}

/* Анимации загрузки */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Утилитарные классы для анимаций */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

/* Задержки для последовательных анимаций */
.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; }

/* Стили для слайдера отзывов */
.quotes-slider-container {
    position: relative;
    overflow: hidden;
}

.quotes-slider-track {
    display: flex;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.quote-slide {
    flex-shrink: 0;
    width: 100%;
    opacity: 0.7;
    transform: scale(0.95);
    transition: all 0.5s ease;
}

.quote-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Стили для слайдера логотипов с CSS анимацией */
.logo-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slider.infinite-scroll {
    overflow: hidden;
    width: 100%;
}

.logo-scroll-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.logo-scroll-track {
    display: flex;
    align-items: center;
    animation: scrollLogos 60s linear infinite;
    will-change: transform;
    width: max-content;
    gap: 0;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    min-width: 200px;
    margin: 0;
}

.logo-item:hover {
    opacity: 1;
}

.logo-item img {
    max-height: 80px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(80%);
    transition: filter 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%);
}

/* Анимация бесконечного скролла справа налево */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

/* Пауза анимации при наведении на контейнер */
.logo-slider-container:hover .logo-scroll-track {
    animation-play-state: paused;
}

/* Responsive стили для логотипов */
@media (max-width: 1200px) {
    .logo-scroll-track {
        animation-duration: 50s;
    }
    
    .logo-item {
        padding: 0 35px;
        min-width: 180px;
    }
    
    .logo-item img {
        max-height: 70px;
        max-width: 140px;
    }
}

@media (max-width: 768px) {
    .logo-scroll-track {
        animation-duration: 40s;
    }
    
    .logo-item {
        padding: 0 30px;
        min-width: 160px;
    }
    
    .logo-item img {
        max-height: 60px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .logo-scroll-track {
        animation-duration: 30s;
    }
    
    .logo-item {
        padding: 0 25px;
        min-width: 140px;
    }
    
    .logo-item img {
        max-height: 50px;
        max-width: 100px;
    }
}

/* Кнопки навигации слайдера */
.slider-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-button.prev {
    left: 20px;
}

.slider-nav-button.next {
    right: 20px;
}

/* Индикаторы слайдера */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator.active {
    background: #007bff;
    transform: scale(1.2);
}

/* Параллакс эффекты */
.parallax-element {
    will-change: transform;
}

/* Плавные переходы для всех интерактивных элементов */
a, button, .clickable {
    transition: all 0.3s ease;
}

/* Стили для lazy loading изображений */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Улучшения производительности */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive анимации */
@media (max-width: 768px) {
    .card:hover {
        transform: none;
    }
    
    .button:hover::before {
        display: none;
    }
    
    .slider-nav-button {
        width: 40px;
        height: 40px;
    }
    
    .slider-nav-button.prev {
        left: 10px;
    }
    
    .slider-nav-button.next {
        right: 10px;
    }
}

/* Waypoints анимации */
.fade-in:not(.animated) {
    opacity: 0;
    transform: translateY(30px);
}

.slide-up:not(.animated) {
    opacity: 0;
    transform: translateY(50px);
}

.slide-left:not(.animated) {
    opacity: 0;
    transform: translateX(-50px);
}

.slide-right:not(.animated) {
    opacity: 0;
    transform: translateX(50px);
}

.animated {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Счетчики */
.counter {
    font-weight: bold;
    font-size: 2em;
    color: var(--primary-color, #007bff);
    display: inline-block;
}

/* Прогресс-бары */
.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color, #007bff), var(--secondary-color, #28a745));
    border-radius: 4px;
    width: 0%;
    transition: width 1.5s ease-in-out;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

/* Consent Manager стили */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.consent-banner.show {
    transform: translateY(0);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax-element {
        transform: none !important;
    }
    
    .animated {
        transition: none !important;
    }
    
    .fade-in:not(.animated),
    .slide-up:not(.animated),
    .slide-left:not(.animated),
    .slide-right:not(.animated) {
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Останавливаем анимацию логотипов для пользователей с ограниченной подвижностью */
    .logo-scroll-track {
        animation: none !important;
        transform: none !important;
    }
    
    .logo-item {
        opacity: 1 !important;
    }
} 