/* ============================================
   Advanced Animations & Effects
   ============================================ */

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf, #00d4ff);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 5px 25px rgba(0, 212, 255, 0.5);
    font-size: 1.5rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 35px rgba(0, 212, 255, 0.7), 0 0 30px rgba(123, 44, 191, 0.5);
}

.back-to-top:active {
    transform: translateY(-3px) scale(1.05);
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7b2cbf, #00d4ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 5px 25px rgba(123, 44, 191, 0.5);
    animation: pulse-float 2s ease-in-out infinite;
    text-decoration: none;
    color: var(--white);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.floating-contact:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 40px rgba(123, 44, 191, 0.7), 0 0 30px rgba(0, 212, 255, 0.5);
}

@keyframes pulse-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* Parallax Effect */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Reveal Animation on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Hover Tilt Effect */
.tilt-card {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

/* Glow Effect */
.glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5),
                    0 0 40px rgba(123, 44, 191, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.8),
                    0 0 60px rgba(123, 44, 191, 0.5);
    }
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.floating {
    animation: floating 4s ease-in-out infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid #00d4ff;
    white-space: nowrap;
    animation: typewriter 4s steps(40) 1s 1 normal both;
}

/* Counter Animation */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: #00d4ff;
}

/* Image Hover Zoom */
.image-zoom {
    overflow: hidden;
    border-radius: 15px;
}

.image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom:hover img {
    transform: scale(1.15);
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    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;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient Border Animation */
@keyframes gradient-border {
    0%, 100% {
        border-image-source: linear-gradient(90deg, #00d4ff, #7b2cbf);
    }
    50% {
        border-image-source: linear-gradient(90deg, #7b2cbf, #00d4ff);
    }
}

.animated-border {
    border: 3px solid;
    border-image-slice: 1;
    animation: gradient-border 3s ease infinite;
}

/* Scale on Hover */
.scale-hover {
    transition: transform 0.3s ease;
}

.scale-hover:hover {
    transform: scale(1.05);
}

/* Fade In */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide In from Bottom */
.slide-in-bottom {
    animation: slideInBottom 0.8s ease-out;
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate In */
.rotate-in {
    animation: rotateIn 0.6s ease-out;
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}
