/* ==========================================================================
   Advanced Animation Styles
   ========================================================================== */

/* Keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(3deg);
    }
    66% {
        transform: translateY(10px) rotate(-2deg);
    }
}

@keyframes floatFast {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@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);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes blobMorph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 167, 157, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 167, 157, 0.6), 0 0 30px rgba(0, 167, 157, 0.4);
    }
}

@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Hero Section Animations */
.hero-banner {
    animation: fadeIn 1s ease-out;
}

.hero-text {
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-visual {
    animation: slideInRight 1s ease-out 0.4s both;
}

.highlight-pill {
    animation: pulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.highlight-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite linear;
    border-radius: var(--radius-pill);
}

.hero-title-line {
    animation: slideInLeft 0.8s ease-out both;
}

.hero-title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title-line:nth-child(2) { animation-delay: 0.4s; }
.hero-title-line:nth-child(3) { animation-delay: 0.5s; }
.hero-title-line:nth-child(4) { animation-delay: 0.6s; }

.hero-subtitle {
    animation: slideInLeft 0.8s ease-out 0.7s both;
}

.hero-values .value-tag {
    animation: scaleIn 0.5s ease-out both;
}

.hero-values .value-tag:nth-child(1) { animation-delay: 0.8s; }
.hero-values .value-tag:nth-child(2) { animation-delay: 0.9s; }
.hero-values .value-tag:nth-child(3) { animation-delay: 1s; }

.hero-cta {
    animation: slideInLeft 0.8s ease-out 1.1s both;
}

/* Image Carousel Animations */
.carousel-slide {
    animation: fadeIn 0.8s ease-out;
}

.carousel-slide.active {
    z-index: 2;
}

.nav-dot {
    position: relative;
    overflow: hidden;
}

.nav-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.nav-dot.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.current-service {
    animation: textGlow 3s ease-in-out infinite;
}

/* Blob Animations */
.blob {
    animation: blobMorph 20s ease-in-out infinite, float 25s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s, 0s;
}

.blob-2 {
    animation-delay: 5s, 3s;
    animation-duration: 25s, 20s;
}

.blob-3 {
    animation-delay: 10s, 6s;
    animation-duration: 30s, 25s;
}

.blob-4 {
    animation-delay: 0s, 2s;
    animation-duration: 22s, 18s;
}

.blob-5 {
    animation-delay: 8s, 4s;
    animation-duration: 28s, 22s;
}

/* Background Shape Animations */
.bg-shape {
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    animation-delay: 0s;
    animation-duration: 20s;
}

.shape-2 {
    animation-delay: 5s;
    animation-duration: 25s;
}

.shape-3 {
    animation-delay: 10s;
    animation-duration: 18s;
}

/* Service Icon Animations */
.service-icon,
.sub-icon {
    animation: scaleIn 0.6s ease-out 0.5s both, floatFast 4s ease-in-out infinite;
}

.service-icon i,
.sub-icon i {
    animation: rotateIn 0.8s ease-out 0.7s both;
}

/* Card Animations */
.service-card,
.sub-card {
    animation: scaleIn 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.3s; }
.service-card:nth-child(3) { animation-delay: 0.4s; }

.sub-card:nth-child(1) { animation-delay: 0.2s; }
.sub-card:nth-child(2) { animation-delay: 0.3s; }
.sub-card:nth-child(3) { animation-delay: 0.4s; }
.sub-card:nth-child(4) { animation-delay: 0.5s; }
.sub-card:nth-child(5) { animation-delay: 0.6s; }

/* Image Hover Effects */
.service-image img,
.sub-image img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img,
.sub-card:hover .sub-image img {
    transform: scale(1.1) rotate(1deg);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s ease;
}

.btn:hover::after {
    left: 100%;
}

.btn-primary {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Stat Counter Animation */
.stat-number {
    position: relative;
}

.stat-number::after {
    content: '+';
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s ease;
}

.stat-number.animated::after {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Link Animations */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-teal);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-pill);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

/* Social Icon Animations */
.social-icons a {
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-teal);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.social-icons a:hover::before {
    transform: scale(1);
}

.social-icons a i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icons a:hover i {
    transform: rotate(360deg) scale(1.2);
}

/* Footer Link Animations */
.footer-links a {
    position: relative;
    overflow: hidden;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.footer-links a:hover::before {
    transform: translateX(0);
}

/* CTA Section Gradient Animation */
.cta-section {
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Value Tag Animations */
.value-tag {
    animation: floatFast 6s ease-in-out infinite;
}

.value-tag:nth-child(1) { animation-delay: 0s; }
.value-tag:nth-child(2) { animation-delay: 2s; }
.value-tag:nth-child(3) { animation-delay: 4s; }

/* Loading Animation for Images */
.slide-image {
    animation: fadeIn 1s ease-out;
}

/* Hover Effects for Service Cards */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Mobile Menu Animation */
.nav-menu {
    transform: translateX(10%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.active {
    transform: translateX(0);
}

.nav-link,
.dropdown-btn {
    opacity: 50;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.active .nav-link,
.nav-menu.active .dropdown-btn {
    opacity: 1;
    transform: translateX(0);
}

.nav-menu.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active .nav-link:nth-child(2) { transition-delay: 0.2s; }
.nav-menu.active .nav-link:nth-child(3) { transition-delay: 0.3s; }
.nav-menu.active .nav-link:nth-child(4) { transition-delay: 0.4s; }
.nav-menu.active .nav-link:nth-child(5) { transition-delay: 0.5s; }

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations for Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Loading State for Interactive Elements */
.btn:disabled,
.btn.loading {
    position: relative;
    color: transparent;
}

.btn:disabled::after,
.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: iconSpin 0.8s linear infinite;
}

.btn-secondary:disabled::after,
.btn-secondary.loading::after {
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: var(--eblack);
}

/* Ripple Effect for Buttons */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}