/* 
* Wisdom Design Limited - Animations Stylesheet
* Author: Wisdom Design Team
* Version: 1.0
*/

/* ========== SCROLL ANIMATIONS ========== */

/* Fade animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.fade-in.animated {
    opacity: 1;
}

/* Scale animations */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.animated {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animations */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animated {
    animation: fadeUpStagger 0.5s ease forwards;
}

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

/* ========== HOVER ANIMATIONS ========== */

/* Button hover effects */
.btn-hover-float {
    transition: transform 0.3s ease;
}

.btn-hover-float:hover {
    transform: translateY(-5px);
}

/* Image hover effects */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* Card hover effects */
.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* ========== TEXT ANIMATIONS ========== */

/* Text reveal animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.text-reveal.animated span {
    animation: textReveal 0.5s ease forwards;
}

@keyframes textReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Typing text effect */
.typing-text {
    overflow: hidden;
    border-right: 0.15em solid var(--color-blue);
    white-space: nowrap;
    width: 0;
}

.typing-text.animated {
    animation: typing 3.5s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--color-blue) }
}

/* ========== LOGO ANIMATIONS ========== */

/* Logo pulse */
.logo-pulse {
    animation: logoPulse 2s infinite;
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Logo spin */
.logo-spin {
    animation: logoSpin 10s linear infinite;
}

@keyframes logoSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========== SCROLL INDICATOR ========== */

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-light);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

.scroll-indicator:before {
    content: '';
    position: absolute;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--color-light);
    border-radius: 50%;
    animation: scrollIndicator 2s infinite;
}

@keyframes scrollIndicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* ========== LOADER ANIMATIONS ========== */

/* Spinner loader */
.spinner-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-blue);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dot loader */
.dot-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dot-loader span {
    width: 8px;
    height: 8px;
    background-color: var(--color-blue);
    border-radius: 50%;
    opacity: 0;
    animation: dotPulse 1.5s infinite;
}

.dot-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.dot-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== CURSOR EFFECTS ========== */

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--color-blue);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.cursor-hover {
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(53, 186, 203, 0.2);
}

/* ========== BACKGROUND ANIMATIONS ========== */

.animated-bg {
    position: relative;
    overflow: hidden;
}

.animated-bg:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent 30%
    );
    animation: rotateGradient 10s linear infinite;
}

@keyframes rotateGradient {
    100% {
        transform: rotate(1turn);
    }
}

/* ========== SVG ANIMATIONS ========== */

.svg-draw path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawSvg 2s forwards;
}

@keyframes drawSvg {
    to {
        stroke-dashoffset: 0;
    }
}

.svg-fill path {
    fill-opacity: 0;
    animation: fillSvg 1s 2s forwards;
}

@keyframes fillSvg {
    to {
        fill-opacity: 1;
    }
}

/* ========== NUMBER COUNTER ========== */

.counter {
    display: inline-block;
}

.counter.animated {
    animation: countUp 2s forwards;
}

@keyframes countUp {
    from {
        content: "0";
    }
    to {
        content: attr(data-count);
    }
}

/* ========== SHADOW ANIMATIONS ========== */

.shadow-pulse {
    animation: shadowPulse 2s infinite;
}

@keyframes shadowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(53, 186, 203, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(53, 186, 203, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(53, 186, 203, 0);
    }
}

/* ========== UTILITIES ========== */

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Animation durations */
.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }