/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

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

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

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

/* Staggered animations for grid items */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* Hero animations */
.hero-logo-image {
    animation: heroLogoAppear 2s ease-out;
}

.hero-subtitle {
    animation: heroSubtitleFadeIn 1.5s ease-out 0.5s both;
}

.hero-description {
    animation: heroDescriptionFadeIn 1.5s ease-out 0.8s both;
}

.cta-button {
    animation: heroButtonFadeIn 1.5s ease-out 1.1s both;
}

@keyframes heroLogoAppear {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-10px) scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

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

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

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

/* Floating animation for service icons */
.service-icon {
    animation: float 3s ease-in-out infinite;
}

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

/* Pulse animation for CTA buttons */
.cta-button, .price-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 215, 0, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    }
}

/* Hover animations */
.service-card:hover .service-icon {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}



/* Navbar scroll effect */
.navbar.scrolled {
    background: rgba(248, 249, 250, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Service Section Animations */

/* Auto Section Animation - Slide from left */
.auto-section .service-image {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s ease-out;
}

.auto-section .service-content {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease-out 0.3s;
}

.auto-section.visible .service-image,
.auto-section.visible .service-content {
    opacity: 1;
    transform: translateX(0);
}

/* Image Section Animation - Fade in with scale */
.imizh-section .service-image {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1.2s ease-out;
}

.imizh-section .service-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out 0.4s;
}

.imizh-section.visible .service-image {
    opacity: 1;
    transform: scale(1);
}

.imizh-section.visible .service-content {
    opacity: 1;
    transform: translateY(0);
}

/* Events Section Animation - Flash effect */
.events-section .service-image {
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.8s ease-out;
}

.events-section .service-content {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s ease-out 0.2s;
}

.events-section.visible .service-image {
    opacity: 1;
    transform: scale(1);
}

.events-section.visible .service-content {
    opacity: 1;
    transform: translateY(0);
}

/* Beauty Section Animation - Petals effect */
.beauty-section .service-image {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
    transition: all 1.5s ease-out;
}

.beauty-section .service-content {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 1s ease-out 0.5s;
}

.beauty-section.visible .service-image {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.beauty-section.visible .service-content {
    opacity: 1;
    transform: translateX(0);
}

/* Couples Section Animation - Particle effect */
.couples-section .service-image {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1.3s ease-out;
}

.couples-section .service-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.6s;
}

.couples-section.visible .service-image {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.couples-section.visible .service-content {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth reveal for sections */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Counter animation for stats */
.stat-number {
    display: inline-block;
}

.stat-number.animate {
    animation: countUp 2s ease-out;
}

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

/* Form focus animations */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    animation: formFocus 0.3s ease-out;
}

@keyframes formFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile menu animation */
.nav-menu.active {
    animation: slideDown 0.3s ease-out;
}

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

/* Hamburger menu animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Parallax effect for hero background */
.hero {
    position: relative;
    overflow: hidden;
}

/* Убираем второй паттерн точек - теперь используем фоновое изображение */
/* .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
    transform: translateZ(0);
    will-change: transform;
} */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Loading state for form submission */
.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success animation for form */
.contact-form.success {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Error animation for form */
.contact-form.error {
    animation: errorShake 0.6s ease-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Portfolio filter animation */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.3s;
}

.filter-btn:hover::before {
    left: 100%;
}

/* Price card hover effect */
.price-card {
    position: relative;
    overflow: hidden;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 215, 0, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease-out;
}

.price-card:hover::before {
    transform: translateX(100%);
}

/* Review card star animation */
.review-stars {
    position: relative;
}

/* Убираем серые звезды - они не нужны */
/* .review-stars::before {
    content: '★★★★★';
    position: absolute;
    top: 0;
    left: 0;
    color: var(--border-light);
    z-index: -1;
} */

/* Local card gradient animation */
.local-card {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive animations */
@media (max-width: 768px) {
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        transition-duration: 0.4s;
    }
    
    .stagger-item:nth-child(n) {
        transition-delay: 0.1s;
    }
    
    .hero-title {
        animation-duration: 1s;
    }
    
    .hero-subtitle {
        animation-duration: 1s;
        animation-delay: 0.2s;
    }
    
    .hero-description {
        animation-duration: 1s;
        animation-delay: 0.4s;
    }
    
    .cta-button {
        animation-duration: 1s;
        animation-delay: 0.6s;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
