﻿/* ============================================
   ARBIYO - Animation & AOS Styles
   ============================================ */

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Process Cards Animation */
.process-card {
    animation: slideInScale 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.process-card:nth-child(1) {
    animation-delay: 0s;
}

.process-card:nth-child(2) {
    animation-delay: 0.1s;
}

.process-card:nth-child(3) {
    animation-delay: 0.2s;
}

.process-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(107, 165, 57, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(107, 165, 57, 0.8);
    }
}

@keyframes subtleGlow {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    100% {
        box-shadow: 0 8px 16px rgba(107, 165, 57, 0.12);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */

.card {
    animation: fadeIn 0.8s ease-in-out;
}

/* Card hover animation removed - only image zoom effect is used */

/* ============================================
   ICON ANIMATIONS
   ============================================ */

.service-icon {
    animation: float 3s ease-in-out infinite;
}

.service-card:hover .service-icon {
    animation: bounce 0.6s ease-in-out !important;
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

.hero-section h1 {
    animation: slideInUp 0.9s ease-in-out forwards;
}

.hero-section p {
    animation: slideInUp 0.9s ease-in-out 0.1s forwards;
    opacity: 0;
}

.hero-section .btn {
    animation: slideInUp 0.9s ease-in-out 0.2s forwards;
    opacity: 0;
}

/* ============================================
   SWIPER ANIMATIONS
   ============================================ */

.swiper-slide {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.swiper-slide-active {
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    animation: fadeIn 0.8s ease-in-out;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    animation: glow 1.5s ease-in-out infinite;
}

/* ============================================
   SCROLL PROGRESS ANIMATIONS
   ============================================ */

.progress-bar {
    background: linear-gradient(90deg, #6BA539, #5a9530);
    transition: width 0.3s ease;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.gradient-animated {
    background: linear-gradient(-45deg, #6BA539, #5a9530, #4a7a28, #6BA539);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ============================================
   TRANSITION UTILITIES
   ============================================ */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.6s ease;
}

/* ============================================
   TRANSFORM UTILITIES
   ============================================ */

.scale-hover:hover {
    transform: scale(1.05);
}

.translate-y-hover:hover {
    transform: translateY(-5px);
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

/* ============================================
   OPACITY ANIMATIONS
   ============================================ */

.opacity-on-hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.opacity-on-hover:hover {
    opacity: 1;
}

/* ============================================
   MOBILE ANIMATIONS
   ============================================ */

@media (max-width: 768px) {
    .hero-section h1 {
        animation-delay: 0s;
        font-size: 2.5rem;
    }

    [data-aos] {
        animation-duration: 0.6s !important;
    }

    .btn {
        animation-duration: 0.6s !important;
    }

    .card {
        animation-duration: 0.6s !important;
    }

    /* Disable animations on smaller screens for better performance */
    .service-icon {
        animation: none;
    }

    .service-card:hover .service-icon {
        animation: bounce 0.6s ease-in-out !important;
    }
}

/* ============================================
   FEATURE CARD ANIMATIONS & HOVER EFFECTS
   ============================================ */

/* Feature Card Hover Effect */
.feature-card {
    transition: all 0.3s ease-in-out;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(34, 139, 34, 0.15) !important;
    border-left: 4px solid #228B22 !important;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
}

.feature-card .feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(34, 139, 34, 0.1);
    font-size: 1.75rem;
    transition: all 0.3s ease-in-out;
}

.feature-card:hover .feature-icon {
    background: rgba(34, 139, 34, 0.2);
    transform: scale(1.1) rotate(5deg);
}

/* Transition utility class */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CTA CARD ANIMATIONS
   ============================================ */

/* CTA Card Entry Animation */
@keyframes ctaCardEntry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-card {
    animation: ctaCardEntry 0.6s ease-out 0.2s both;
}

/* CTA Button Pulse */
@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(107, 165, 57, 0.2);
    }
    50% {
        box-shadow: 0 8px 25px rgba(107, 165, 57, 0.4);
    }
}

.btn-light:hover {
    animation: buttonPulse 0.5s ease-in-out;
}

/* CTA Section Fade In */
.cta-section [data-aos="fade-right"] {
    animation: fadeInRight 0.8s ease-out;
}

.cta-section [data-aos="fade-left"] {
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (max-width: 768px) {
    .feature-card {
        margin-bottom: 1rem;
    }

    .feature-card:hover {
        transform: translateY(-4px);
    }

    .cta-card {
        animation: ctaCardEntry 0.6s ease-out both;
    }

    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translateX(0);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes fadeInLeft {
        from {
            opacity: 0;
            transform: translateX(0);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}
