/* Doctor J Premium Dental Care - Animations */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Rotate Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }

    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Wave Animation */
@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-10px);
    }

    75% {
        transform: translateY(10px);
    }
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Shake Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(10, 123, 131, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(10, 123, 131, 0.8), 0 0 40px rgba(10, 123, 131, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(10, 123, 131, 0.5);
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Loading Dots */
@keyframes loadingDots {

    0%,
    80%,
    100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}

/* Scroll Reveal Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-rotate {
    animation: rotate 20s linear infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Stagger Animation Delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* Hero Section Animations - Synchronized with Loader */
.hero-waiting .hero-badge,
.hero-waiting .hero-title .line-1,
.hero-waiting .hero-title .line-2,
.hero-waiting .hero-title .line-3,
.hero-waiting .hero-description,
.hero-waiting .hero-actions,
.hero-waiting .hero-stats,
.hero-waiting .hero-image-wrapper {
    opacity: 0;
}

.hero-animate .hero-badge {
    animation: fadeInDown 1s ease-out forwards;
}

.hero-animate .hero-title .line-1 {
    animation: fadeInLeft 1s ease-out 0.2s both;
}

.hero-animate .hero-title .line-2 {
    animation: fadeInLeft 1s ease-out 0.4s both;
}

.hero-animate .hero-title .line-3 {
    animation: fadeInLeft 1s ease-out 0.6s both;
}

.hero-animate .hero-description {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-animate .hero-actions {
    animation: fadeInUp 1s ease-out 1s both;
}

.hero-animate .hero-stats {
    animation: fadeInUp 1s ease-out 1.2s both;
}

.hero-animate .hero-image-wrapper {
    animation: scaleIn 1s ease-out 0.5s both;
}

/* Service Cards Hover Effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover .service-icon {
    animation: pulse 0.8s;
}

/* Button Hover Effects */
.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.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(10, 123, 131, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 50;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-circle {
    animation: scaleIn 0.3s ease-out;
}

.checkmark-path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark 0.3s ease-out 0.3s forwards;
}

/* Error Animation */
@keyframes error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-8px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(8px);
    }
}

.error-shake {
    animation: error-shake 0.5s ease-out;
}

/* Parallax Effects */
.parallax {
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Cursor Effects */
.cursor-grow {
    transition: transform 0.3s ease;
}

.cursor-grow:hover {
    transform: scale(1.05);
}

/* Text Animation Effects */
@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end);
}

/* Underline Animation */
.underline-animation {
    position: relative;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.underline-animation:hover::after {
    width: 100%;
}

/* Card Flip Animation */
@keyframes cardFlip {
    0% {
        transform: rotateY(0);
    }

    100% {
        transform: rotateY(180deg);
    }
}

.card-flip {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-flip:hover {
    transform: rotateY(180deg);
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::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%);
}

.ripple:active::before {
    width: 100px;
    height: 100px;
    animation: ripple 0.6s ease-out;
}