/* === ADVANCED ANIMATIONS === */

/* Rainbow Easter Egg Animation */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Pulse Animation for CTAs */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(139, 157, 131, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(139, 157, 131, 0.8);
    }
}

/* Shimmer Effect for Product Cards */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::after {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

/* Floating Animation for Hero Image */
.hero-image-wrapper {
    animation: float 6s ease-in-out infinite;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Bounce In Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Typing Cursor Effect */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Apply gradient shift to buttons on hover */
.btn-primary:hover {
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
}

/* Stat Card Count Animation Enhancement */
.stat-card.visible .stat-number {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Instagram Post Hover Effect */
.instagram-post {
    position: relative;
    overflow: hidden;
}

.instagram-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 157, 131, 0.8) 0%, rgba(196, 121, 107, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.instagram-post:hover::before {
    opacity: 1;
}

.instagram-post::after {
    content: '📸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 3rem;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.instagram-post:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Testimonial Card Entrance */
.testimonial-card {
    animation: slideInUp 0.6s ease-out;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Star Rating Animation */
.testimonial-rating .star {
    display: inline-block;
    animation: bounceIn 0.4s ease-out;
}

.testimonial-rating .star:nth-child(1) { animation-delay: 0.1s; }
.testimonial-rating .star:nth-child(2) { animation-delay: 0.2s; }
.testimonial-rating .star:nth-child(3) { animation-delay: 0.3s; }
.testimonial-rating .star:nth-child(4) { animation-delay: 0.4s; }
.testimonial-rating .star:nth-child(5) { animation-delay: 0.5s; }

/* Button Press Effect */
.btn:active {
    transform: scale(0.95);
}

/* Smooth transitions for all interactive elements */
a, button, .btn, .product-card, .feature-card, .testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Skeleton (if needed for async content) */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

/* Reduce 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;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .social-links,
    .contact {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}
