/* Enhanced Animations & Effects for GREENXA Website */

/* Page Load Animation */
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    animation: pageLoad 0.8s ease-out;
}

/* Scroll Reveal Animation */
@keyframes scrollReveal {
    from { 
        opacity: 0; 
        transform: translateY(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    animation: scrollReveal 0.6s ease-out forwards;
}

/* Animated Counter for Stats */
@keyframes countUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.stat-box h2 {
    animation: countUp 0.8s ease-out;
}

/* Ripple Effect for Buttons */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Product Card Animations */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

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

/* Gallery Image Enhanced Zoom */
.gallery-item-unique img,
.gallery-item-full img {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item-unique:hover img,
.gallery-item-full:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* Animated Section Transitions */
@keyframes slideInLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

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

/* Hero Section Enhanced Animation */
.hero-text h1 {
    animation: slideInLeft 1s ease-out 0.3s both;
}

.hero-text p {
    animation: slideInLeft 1s ease-out 0.6s both;
}

/* Stats Section Staggered Animation */
.stat-box:nth-child(1) { animation-delay: 0.1s; }
.stat-box:nth-child(2) { animation-delay: 0.2s; }
.stat-box:nth-child(3) { animation-delay: 0.3s; }
.stat-box:nth-child(4) { animation-delay: 0.4s; }

/* Features List Animation */
.features li {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.features li:nth-child(1) { animation-delay: 0.1s; }
.features li:nth-child(2) { animation-delay: 0.2s; }
.features li:nth-child(3) { animation-delay: 0.3s; }
.features li:nth-child(4) { animation-delay: 0.4s; }
.features li:nth-child(5) { animation-delay: 0.5s; }
.features li:nth-child(6) { animation-delay: 0.6s; }
.features li:nth-child(7) { animation-delay: 0.7s; }

/* Product Cards Staggered Animation */
.product-card:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.2s both; }
.product-card:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.4s both; }
.product-card:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.6s both; }

/* Premium Features Animation */
.features-list-unique li {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.7s ease-out forwards;
}

.features-list-unique li:nth-child(1) { animation-delay: 0.1s; }
.features-list-unique li:nth-child(2) { animation-delay: 0.2s; }
.features-list-unique li:nth-child(3) { animation-delay: 0.3s; }
.features-list-unique li:nth-child(4) { animation-delay: 0.4s; }
.features-list-unique li:nth-child(5) { animation-delay: 0.5s; }
.features-list-unique li:nth-child(6) { animation-delay: 0.6s; }

/* Trusted Logos Animation */
.trusted-logo {
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Gallery Grid Animation */
.gallery-item-unique {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Certification Logos Animation */
.certification-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Enhanced Testimonial Animation */
.testimonial-card-unique {
    animation: none;
}

.testimonial-card-unique.active {
    animation: fadeInSlide 0.8s ease-out;
}

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

/* Button Hover Enhancements */
.cta-button, .cta-btn, .about-btn-unique, .cta-button1 {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.cta-button:hover, .cta-btn:hover, .about-btn-unique:hover, .cta-button1:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Navbar Enhanced Animation */
.nav-links li {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }
.nav-links li:nth-child(5) { animation-delay: 0.5s; }
.nav-links li:nth-child(6) { animation-delay: 0.6s; }
.nav-links li:nth-child(7) { animation-delay: 0.7s; }
.nav-links li:nth-child(8) { animation-delay: 0.8s; }

/* Logo Animation */
.logo img {
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* CTA Button Animation */
.cta-button {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.8s ease-out 0.9s forwards;
}

/* Floating Animation for Icons */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.features-list-unique .icon {
    animation: float 3s ease-in-out infinite;
}

.features-list-unique li:nth-child(1) .icon { animation-delay: 0s; }
.features-list-unique li:nth-child(2) .icon { animation-delay: 0.5s; }
.features-list-unique li:nth-child(3) .icon { animation-delay: 1s; }
.features-list-unique li:nth-child(4) .icon { animation-delay: 1.5s; }
.features-list-unique li:nth-child(5) .icon { animation-delay: 2s; }
.features-list-unique li:nth-child(6) .icon { animation-delay: 2.5s; }

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

.stat-box.highlight {
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth Section Transitions */
section, main-wrapper, page-container, architect-container, 
engineer-container, consultant-container, builder-container, 
gallery-container, testimonial-wrapper {
    opacity: 0;
    transform: translateY(30px);
}

/* Loading Animation */
@keyframes loading {
    0% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 0.5; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.page-loading {
    animation: loading 1.2s ease-out;
}

/* Hover Effects for Social Icons */
.social-icon-link {
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Enhanced Footer Animation */
.footer-column {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(2) { animation-delay: 0.2s; }
.footer-column:nth-child(3) { animation-delay: 0.3s; }
.footer-column:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .scroll-reveal {
        transform: translateY(30px);
    }
    
    .product-card:hover {
        transform: translateY(-10px) scale(1.01);
    }
    
    .gallery-item-unique:hover img,
    .gallery-item-full:hover img {
        transform: scale(1.05);
    }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}