/* Mizizi Animations CSS
 * Animations for all website sections
 */

/* Global animation styles */
.animated-element {
    position: absolute;
    pointer-events: none; /* Ensures elements don't interfere with clicks */
    z-index: 1;
    opacity: 0.4; /* Reduced opacity from 0.85 to 0.6 */
    transition: all 0.5s ease;
    display: block;
    height: 250px; /* Fixed height to ensure visibility */
}

/* Section positioning for animation elements */
section, footer {
    position: relative;
    overflow: hidden !important;
}

/* Logo container positioning for root animations */
.logo {
    position: relative;
    overflow: visible;
}

/* ===== HEADER LOGO ROOT ANIMATIONS ===== */
/* Root animation elements for the Mizizi logo */
.root-animated-element {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: all 0.5s ease;
    display: block;
}

/* Vertical root animation - growing downward from logo */
.logo-root-vertical {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 120px; /* Increased from 100px to 120px */
    height: 400px; /* Increased from 300px to 400px */
    background: url('../../img/animation-elements/leaves-down-transparent.png') no-repeat;
    background-size: contain;
    background-position: top center;
    animation: rootGrowDown 4s ease-in-out 3s forwards; /* Increased duration from 2.5s to 4s */
    transform-origin: top center;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Horizontal root animation - growing rightward from logo */
.logo-root-horizontal {
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(0);
    width: 450px; /* Increased from 350px to 450px */
    height: 120px; /* Increased from 100px to 120px */
    background: url('../../img/animation-elements/leaves-right-transparent.png') no-repeat;
    background-size: contain;
    background-position: center left;
    animation: rootGrowRight 4s ease-in-out 3.8s forwards; /* Increased duration from 2.5s to 4s */
    transform-origin: left center;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ===== BANNER SECTION ANIMATIONS ===== */
.banner-area {
    overflow: hidden !important;
}

/* Banner leaf element 1 */
.banner-leaf-1 {
    top: 15%;
    left: 5%;
    width: 180px; /* Increased from 150px */
    height: 180px; /* Increased from 150px */
    background: url('../../img/animation-elements/leaves1-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 12s ease-in-out infinite;
}

/* Banner leaf element 2 */
.banner-leaf-2 {
    bottom: 20%;
    right: 8%;
    width: 220px; /* Increased from 180px */
    height: 220px; /* Increased from 180px */
    background: url('../../img/animation-elements/leaves2-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 15s ease-in-out infinite reverse;
}

/* Banner cane element */
.banner-cane {
    top: 30%;
    right: 15%;
    width: 150px; /* Increased from 120px */
    height: 250px; /* Increased from 200px */
    background: url('../../img/animation-elements/cane-large-transparent.png') no-repeat;
    background-size: contain;
    transform: rotate(-25deg);
    animation: rotateAnimation 20s linear infinite;
}

/* ===== STORY SECTION ANIMATIONS ===== */
/* Story lime element */
.story-lime {
    bottom: 10%;
    left: 5%;
    width: 160px; /* Increased from 130px */
    height: 160px; /* Increased from 130px */
    background: url('../../img/animation-elements/lime-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 10s ease-in-out infinite;
}

/* Story leaves element */
.story-leaves {
    top: 15%;
    right: 10%;
    width: 170px; /* Increased from 140px */
    height: 170px; /* Increased from 140px */
    background: url('../../img/animation-elements/leaves2-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 13s ease-in-out infinite reverse;
}

/* ===== ABOUT SECTION ANIMATIONS ===== */
/* About cane element */
.about-cane {
    bottom: 15%;
    right: 5%;
    width: 130px; /* Increased from 110px */
    height: 220px; /* Increased from 180px */
    background: url('../../img/animation-elements/cane-normal-transparent.png') no-repeat;
    background-size: contain;
    transform: rotate(15deg);
    animation: rotateAnimation 18s linear infinite reverse;
}

/* About streak element */
.about-streak {
    top: 20%;
    left: 10%;
    width: 110px; /* Increased from 90px */
    height: 110px; /* Increased from 90px */
    background: url('../../img/animation-elements/green-streak-transparent.png') no-repeat;
    background-size: contain;
    animation: pulseAnimation 5s ease-in-out infinite;
}

/* ===== FAQ SECTION ANIMATIONS ===== */
/* FAQ ginger element */
.faq-ginger {
    top: 30%;
    right: 5%;
    width: 190px; /* Increased from 160px */
    height: 190px; /* Increased from 160px */
    background: url('../../img/animation-elements/ginger-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 14s ease-in-out infinite;
}

/* ===== CONTACT SECTION ANIMATIONS ===== */
/* Contact leaves element */
.contact-leaves {
    bottom: 20%;
    left: 5%;
    width: 160px; /* Increased from 130px */
    height: 160px; /* Increased from 130px */
    background: url('../../img/animation-elements/leaves1-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 11s ease-in-out infinite;
}

/* Contact cane element */
.contact-cane {
    top: 15%;
    right: 10%;
    width: 120px; /* Increased from 100px */
    height: 220px; /* Increased from 180px */
    background: url('../../img/animation-elements/cane-normal-transparent.png') no-repeat;
    background-size: contain;
    transform: rotate(-10deg);
    animation: rotateAnimation 16s linear infinite;
}

/* ===== FOOTER ANIMATIONS ===== */
/* Footer streak element */
.footer-streak {
    top: 30%;
    left: 50%;
    width: 100px; /* Increased from 80px */
    height: 100px; /* Increased from 80px */
    background: url('../../img/animation-elements/green-streak-transparent.png') no-repeat;
    background-size: contain;
    animation: pulseAnimation 6s ease-in-out infinite;
}

/* ===== PRODUCT SECTION SPECIFIC ANIMATIONS ===== */
/* Leaf element 1 - top left */
.leaf-element-1 {
    top: 5%;
    left: 2%;
    width: 150px; /* Increased from 120px */
    height: 150px; /* Increased from 120px */
    background: url('../../img/animation-elements/leaves1-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 8s ease-in-out infinite;
}

/* Leaf element 2 - bottom right */
.leaf-element-2 {
    bottom: 10%;
    right: 5%;
    width: 180px; /* Increased from 150px */
    height: 180px; /* Increased from 150px */
    background: url('../../img/animation-elements/leaves2-transparent.png') no-repeat;
    background-size: contain;
    animation: floatAnimation 10s ease-in-out infinite reverse;
}

/* Ginger element - middle right */
.ginger-element {
    top: 40%;
    right: -30px;
    width: 220px; /* Increased from 180px */
    height: 220px; /* Increased from 180px */
    background: url('../../img/animation-elements/ginger-transparent.png') no-repeat;
    background-size: contain;
    animation: slideInRight 1.5s ease forwards, floatAnimation 12s ease-in-out infinite;
}

/* Lime element - bottom left */
.lime-element {
    bottom: 5%;
    left: -20px;
    width: 170px; /* Increased from 140px */
    height: 170px; /* Increased from 140px */
    background: url('../../img/animation-elements/lime-transparent.png') no-repeat;
    background-size: contain;
    animation: slideInLeft 1.5s ease forwards, floatAnimation 9s ease-in-out infinite;
}

/* Cane element - top right */
.cane-element {
    top: 10%;
    right: 10%;
    width: 120px; /* Increased from 100px */
    height: 220px; /* Increased from 180px */
    background: url('../../img/animation-elements/cane-normal-transparent.png') no-repeat;
    background-size: contain;
    transform: rotate(-15deg);
    animation: rotateAnimation 15s linear infinite;
}

/* Green streak - middle left */
.green-streak {
    top: 50%;
    left: 5%;
    width: 100px; /* Increased from 80px */
    height: 100px; /* Increased from 80px */
    background: url('../../img/animation-elements/green-streak-transparent.png') no-repeat;
    background-size: contain;
    animation: pulseAnimation 4s ease-in-out infinite;
}

/* 100% nature badge - appears on scroll */
.nature-badge {
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px; /* Increased from 100px */
    height: 120px; /* Increased from 100px */
    background: url('../../img/animation-elements/100-nature-transparent.png') no-repeat;
    background-size: contain;
    animation: popIn 0.5s ease forwards;
}

/* ===== NAVIGATION ANIMATIONS ===== */
/* Nav hover animation */
.nav-menu a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: var(--brand-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover:after {
    width: 100%;
}

.nav-hover {
    transform: translateY(-3px);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Scroll reveal base styles */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for groups */
.single-story:nth-child(1),
.single-faq:nth-child(1),
.single-feature:nth-child(1) {
    transition-delay: 0.1s;
}

.single-story:nth-child(2),
.single-faq:nth-child(2),
.single-feature:nth-child(2) {
    transition-delay: 0.2s;
}

.single-story:nth-child(3),
.single-faq:nth-child(3),
.single-feature:nth-child(3) {
    transition-delay: 0.3s;
}

.single-story:nth-child(4),
.single-faq:nth-child(4),
.single-feature:nth-child(4) {
    transition-delay: 0.4s;
}

/* ===== BUTTON ANIMATIONS ===== */
.genric-btn {
    overflow: hidden;
    position: relative;
}

.genric-btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.4s ease;
}

.genric-btn:hover:after {
    left: 100%;
}

/* ===== FORM FIELD ANIMATIONS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    transform: translateY(-3px);
    box-shadow: 0 0 1px 2px var(--brand-primary);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991px) {
    .animated-element {
        transform: scale(0.8);
    }
    
    .logo-root-vertical, .logo-root-horizontal {
        transform: scale(0.8);
    }
    
    .logo-root-vertical {
        width: 100px; /* Increased from 80px */
        height: 350px; /* Increased from 260px */
    }
    
    .logo-root-horizontal {
        width: 380px; /* Increased from 300px */
        height: 100px; /* Increased from 80px */
    }
    
    @keyframes rootGrowDown {
        0% {
            opacity: 0;
            transform: translateX(-50%) translateY(0);
            clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        }
        10% {
            opacity: 0.6;
        }
        100% {
            opacity: 0.6;
            transform: translateX(-50%) translateY(350px); /* Increased from 260px */
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        }
    }
    
    @keyframes rootGrowRight {
        0% {
            opacity: 0;
            transform: translateY(-50%) translateX(0);
            clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        }
        10% {
            opacity: 0.6;
        }
        100% {
            opacity: 0.6;
            transform: translateY(-50%) translateX(380px); /* Increased from 300px */
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        }
    }
}

@media (max-width: 768px) {
    .animated-element {
        transform: scale(0.7);
    }
    
    .banner-leaf-1, .banner-leaf-2 {
        width: 100px;
        height: 100px;
    }
    
    .banner-cane {
        width: 80px;
        height: 140px;
    }
    
    .story-lime, .story-leaves {
        width: 90px;
        height: 90px;
    }
    
    .about-cane {
        width: 70px;
        height: 120px;
    }
    
    .about-streak {
        width: 70px;
        height: 70px;
    }
    
    .faq-ginger {
        width: 100px;
        height: 100px;
    }
    
    .contact-leaves {
        width: 80px;
        height: 80px;
    }
    
    .contact-cane {
        width: 80px;
        height: 140px;
    }
    
    .footer-streak {
        width: 60px;
        height: 60px;
    }
    
    .logo-root-vertical, .logo-root-horizontal {
        transform: scale(0.7);
    }
    
    .logo-root-vertical {
        width: 80px; /* Increased from 60px */
        height: 300px; /* Increased from 220px */
    }
    
    .logo-root-horizontal {
        width: 320px; /* Increased from 250px */
        height: 80px; /* Increased from 60px */
    }
    
    @keyframes rootGrowDown {
        0% {
            opacity: 0;
            transform: translateX(-50%) translateY(0);
            clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        }
        10% {
            opacity: 0.6;
        }
        100% {
            opacity: 0.6;
            transform: translateX(-50%) translateY(300px); /* Increased from 220px */
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        }
    }
    
    @keyframes rootGrowRight {
        0% {
            opacity: 0;
            transform: translateY(-50%) translateX(0);
            clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        }
        10% {
            opacity: 0.6;
        }
        100% {
            opacity: 0.6;
            transform: translateY(-50%) translateX(320px); /* Increased from 250px */
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        }
    }
}

/* ===== STATIC IMAGE ANIMATIONS ===== */

/* Banner image animation */
.banner-img {
    animation: gentlePulse 8s ease-in-out infinite;
    transform-origin: center center;
}

/* About section image animation */
.about-img img {
    animation: floatUpDown 6s ease-in-out infinite;
    transform-origin: center center;
}

/* Story section images */
.single-story img {
    transition: all 0.5s ease;
    transform-origin: center center;
}

.single-story:hover img {
    animation: gentleRotate 2s ease-in-out;
}

/* Bottle image animations */
.icon img[src*="Bottle"], 
img[src*="bottle"] {
    /* Removed animation: animation: gentleTilt 10s ease-in-out infinite; */
    transform-origin: bottom center;
}

/* Logo subtle animation */
.logo img {
    animation: subtlePulse 5s ease-in-out infinite;
}

/* Additional keyframes for static image animations */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

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

@keyframes gentleRotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(3deg);
    }
    75% {
        transform: rotate(-3deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.section-title {
    position: relative;
    overflow: hidden;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--brand-primary);
    animation: expandWidth 3s ease-in-out infinite;
}

@keyframes expandWidth {
    0%, 100% {
        width: 60px;
    }
    50% {
        width: 80px;
    }
}

/* ===== ANIMATION KEYFRAMES ===== */
/* Root growth animations */
@keyframes rootGrowDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    10% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(400px); /* Increased from 300px to 400px */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes rootGrowRight {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(0);
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    10% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.6;
        transform: translateY(-50%) translateX(450px); /* Increased from 350px to 450px */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Contact Section Background Animation */
.contact-area {
    position: relative;
    overflow: hidden;
}

.contact-area::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background: url('../../img/animation-elements/leaves1-transparent.png') no-repeat -100px -100px,
                url('../../img/animation-elements/leaves2-transparent.png') no-repeat right -50px top -50px,
                url('../../img/animation-elements/ginger-transparent.png') no-repeat left -30px bottom -30px,
                url('../../img/animation-elements/lime-transparent.png') no-repeat right -20px bottom -20px;
    background-size: 300px, 250px, 200px, 150px;
    opacity: 0.15;
    animation: floatingElements 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Animated background elements */
.contact-bg-element {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
}

.contact-bg-element.leaves-1 {
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: url('../../img/animation-elements/leaves1-transparent.png') no-repeat center;
    background-size: contain;
    animation: floatLeaves1 15s ease-in-out infinite;
}

.contact-bg-element.leaves-2 {
    top: 20%;
    right: -30px;
    width: 150px;
    height: 150px;
    background: url('../../img/animation-elements/leaves2-transparent.png') no-repeat center;
    background-size: contain;
    animation: floatLeaves2 18s ease-in-out infinite;
}

.contact-bg-element.ginger {
    bottom: -40px;
    left: 10%;
    width: 180px;
    height: 180px;
    background: url('../../img/animation-elements/ginger-transparent.png') no-repeat center;
    background-size: contain;
    animation: floatGinger 20s ease-in-out infinite;
}

.contact-bg-element.lime {
    bottom: 20%;
    right: 5%;
    width: 120px;
    height: 120px;
    background: url('../../img/animation-elements/lime-transparent.png') no-repeat center;
    background-size: contain;
    animation: floatLime 17s ease-in-out infinite;
}

/* Floating animations */
@keyframes floatingElements {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(1deg);
    }
    50% {
        transform: translate(-5px, 5px) rotate(-1deg);
    }
    75% {
        transform: translate(-8px, -8px) rotate(0.5deg);
    }
}

@keyframes floatLeaves1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(15px, 15px) rotate(3deg);
    }
}

@keyframes floatLeaves2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-10px, 10px) rotate(-2deg);
    }
}

@keyframes floatGinger {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(8px, -12px) rotate(2deg);
    }
}

@keyframes floatLime {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-12px, -8px) rotate(-3deg);
    }
} 