/* ============================================
   АНИМАЦИИ ПРИ СКРОЛЛЕ — Fade In
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Задержки для последовательного появления */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ============================================
   PARALLAX ЭФФЕКТ
   ============================================ */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll; /* На мобильных отключаем parallax */
    }
}

/* ============================================
   MICRO-INTERACTIONS — Карточки
   ============================================ */
.service-card,
.about-feature-card,
.price-card-new,
.review-card-new,
.work-card-new {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.service-card:hover,
.about-feature-card:hover,
.price-card-new:hover,
.review-card-new:hover,
.work-card-new:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(230, 0, 40, 0.15);
}

/* 3D эффект при наведении */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ============================================
   GRADIENT BORDERS
   ============================================ */
.gradient-border {
    position: relative;
    background: #fff;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #E60028, #FF1A3D, #E60028);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Тёмные карточки */
.gradient-border-dark {
    position: relative;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
}

.gradient-border-dark::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #E60028, #FF1A3D, #E60028);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border-dark:hover::before {
    opacity: 1;
}

/* ============================================
   LOADING SKELETON — Изображения
   ============================================ */
.img-skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.img-skeleton img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-skeleton img.loaded {
    opacity: 1;
}

/* ============================================
   GLOW EFFECT — Кнопки
   ============================================ */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.btn-glow:hover::after {
    opacity: 1;
}

/* ============================================
   SHIMMER EFFECT — Текст
   ============================================ */
.shimmer-text {
    background: linear-gradient(
        90deg,
        #fff 0%,
        #E60028 50%,
        #fff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ============================================
   FLOATING ANIMATION — Элементы
   ============================================ */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* ============================================
   PULSE GLOW — Акценты
   ============================================ */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(230, 0, 40, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(230, 0, 40, 0.6);
    }
}

/* ============================================
   RESPONSIVE — Отключаем эффекты на мобильных
   ============================================ */
@media (max-width: 768px) {
    .card-3d {
        transform: none !important;
    }
    
    .service-card:hover,
    .about-feature-card:hover,
    .price-card-new:hover,
    .review-card-new:hover,
    .work-card-new:hover {
        transform: translateY(-4px) !important;
    }
}
