/**
 * Livara Health - Custom Animations CSS
 * Additional animation styles and overrides
 */

/* Mobile Menu Animations - Fixed for all pages */
#mobile-menu {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                padding 0.4s ease !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#mobile-menu.active {
    max-height: 600px !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

#mobile-menu.active > div {
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu.active > div > * {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

#mobile-menu.active > div > *:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active > div > *:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active > div > *:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active > div > *:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active > div > *:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.active > div > *:nth-child(6) { animation-delay: 0.3s; }
#mobile-menu.active > div > *:nth-child(7) { animation-delay: 0.35s; }
#mobile-menu.active > div > *:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile dropdown animation */
.mobile-dropdown-menu {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

.mobile-dropdown-menu:not(.hidden) {
    max-height: 300px;
    opacity: 1;
}

/* Navbar animations */
.main-nav {
    transition: all 0.3s ease;
}

/* Button hover animations */
.btn-primary,
.btn-outline,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(138, 32, 97, 0.3);
}

.btn-outline:hover {
    transform: translateY(-2px);
}

/* Card hover animations */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(138, 32, 97, 0.15);
}

/* Image hover animations */
.why-image,
.tour-image {
    overflow: hidden;
    transition: transform 0.5s ease;
}

.why-image:hover,
.tour-image:hover {
    transform: scale(1.02);
}

.why-image img,
.tour-image img {
    transition: transform 0.5s ease;
}

.why-image:hover img,
.tour-image:hover img {
    transform: scale(1.05);
}

/* Footer social icons animation */
.footer-social a {
    transition: all 0.3s ease;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

/* Back to top animation enhancement */
.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* Hero slider enhancements */
.hero-slider-arrow {
    transition: all 0.3s ease;
}

.hero-slider-dot {
    transition: all 0.3s ease;
}

/* Stagger animation delays for children */
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

/* Counter animation support */
.stat-value {
    transition: transform 0.3s ease;
}

.stat-value:hover {
    transform: scale(1.05);
}

/* Popup animation */
.popup-content {
    animation: popupIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Smooth reveal for sections */
section {
    overflow: hidden;
}

/* Footer links hover */
.footer-links a {
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #8a2061;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Loading animation */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Feature cards animations */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(138, 32, 97, 0.15);
}

/* Service cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Icon boxes */
.icon-box {
    transition: all 0.3s ease;
}

.icon-box:hover {
    transform: scale(1.05);
}

/* Testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Form elements */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: #8a2061;
    box-shadow: 0 0 0 3px rgba(138, 32, 97, 0.1);
}

/* Team member cards */
.team-member {
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

/* CTA button glow */
.cta-glow {
    position: relative;
}

.cta-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #8a2061, #a83277, #8a2061);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-glow:hover::before {
    opacity: 1;
    animation: glow 2s linear infinite;
}

@keyframes glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Breadcrumb animation */
.breadcrumb-item {
    transition: all 0.2s ease;
}

.breadcrumb-item:hover {
    color: #8a2061;
}

/* Filter buttons */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: scale(1.05);
}

.filter-btn.active {
    transform: scale(1.02);
}
