/* DCICI Design Institute - Animations Stylesheet */

/* AOS (Animate On Scroll) Custom Animations */
[data-aos="fade-up"] {
    transform: translate3d(0, 100px, 0);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-down"] {
    transform: translate3d(0, -100px, 0);
    opacity: 0;
}

[data-aos="fade-down"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(-100px, 0, 0);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(100px, 0, 0);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.6);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

[data-aos="zoom-out"] {
    transform: scale(1.2);
    opacity: 0;
}

[data-aos="zoom-out"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

[data-aos="slide-up"] {
    transform: translate3d(0, 100px, 0);
    opacity: 0;
}

[data-aos="slide-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="slide-down"] {
    transform: translate3d(0, -100px, 0);
    opacity: 0;
}

[data-aos="slide-down"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="flip-left"] {
    transform: perspective(2500px) rotateY(-100deg);
    opacity: 0;
}

[data-aos="flip-left"].aos-animate {
    transform: perspective(2500px) rotateY(0deg);
    opacity: 1;
}

[data-aos="flip-right"] {
    transform: perspective(2500px) rotateY(100deg);
    opacity: 0;
}

[data-aos="flip-right"].aos-animate {
    transform: perspective(2500px) rotateY(0deg);
    opacity: 1;
}

/* Custom Keyframe Animations */

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.bounce-animation {
    animation: bounce 2s infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.shake-animation {
    animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-animation {
    animation: rotate 2s linear infinite;
}

/* Scale Animation */
@keyframes scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.scale-animation {
    animation: scale 2s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(229, 62, 62, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(229, 62, 62, 0.8), 0 0 30px rgba(229, 62, 62, 0.6);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animation {
    background: linear-gradient(-45deg, #E53E3E, #2B6CB0, #FF8C00, #9F7AEA);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

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

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #E53E3E;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid #E53E3E;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typewriter 3.5s steps(40, end), blinkCursor 0.75s step-end infinite;
}

/* Slide In 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;
    }
}

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

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

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

.slide-in-up {
    animation: slideInUp 1s ease-out;
}

.slide-in-down {
    animation: slideInDown 1s ease-out;
}

/* Fade 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);
    }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.fade-in-down {
    animation: fadeInDown 1s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.fade-in-right {
    animation: fadeInRight 1s ease-out;
}

/* Zoom Animations */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: scale(0.3);
    }
}

.zoom-in {
    animation: zoomIn 1s ease-out;
}

.zoom-out {
    animation: zoomOut 1s ease-out;
}

/* Flip Animations */
@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-20deg);
    }
    60% {
        transform: perspective(400px) rotateX(10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotateX(-5deg);
    }
    to {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes flipInY {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateY(-20deg);
    }
    60% {
        transform: perspective(400px) rotateY(10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotateY(-5deg);
    }
    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

.flip-in-x {
    animation: flipInX 1s ease-out;
}

.flip-in-y {
    animation: flipInY 1s ease-out;
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E53E3E;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.6);
}

/* Text Animations */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(229, 62, 62, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(229, 62, 62, 0.8), 0 0 30px rgba(229, 62, 62, 0.6);
    }
}

.text-glow {
    animation: textGlow 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; }

/* Infinite Animations */
.infinite { animation-iteration-count: infinite; }

/* Animation Durations */
.duration-fast { animation-duration: 0.5s; }
.duration-normal { animation-duration: 1s; }
.duration-slow { animation-duration: 2s; }
.duration-slower { animation-duration: 3s; }

/* Animation Timing Functions */
.ease-in { animation-timing-function: ease-in; }
.ease-out { animation-timing-function: ease-out; }
.ease-in-out { animation-timing-function: ease-in-out; }
.linear { animation-timing-function: linear; }

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Micro Interactions */
.micro-bounce {
    transition: transform 0.2s ease;
}

.micro-bounce:active {
    transform: scale(0.95);
}

.micro-shake:hover {
    animation: shake 0.5s ease-in-out;
}

/* Loading States */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Entrance Animations for Page Load */
.page-enter {
    animation: fadeInUp 0.8s ease-out;
}

.page-enter-stagger {
    animation: fadeInUp 0.8s ease-out;
}

.page-enter-stagger:nth-child(1) { animation-delay: 0.1s; }
.page-enter-stagger:nth-child(2) { animation-delay: 0.2s; }
.page-enter-stagger:nth-child(3) { animation-delay: 0.3s; }
.page-enter-stagger:nth-child(4) { animation-delay: 0.4s; }
.page-enter-stagger:nth-child(5) { animation-delay: 0.5s; }

/* Mobile Optimized Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

