/* ===================================
   Animations CSS
   Barbara Walker Website
   =================================== */

/* Keyframe 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);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

@keyframes loaderDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animation Classes */
.animate {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate-fast {
    animation-duration: 0.5s;
}

.animate-slow {
    animation-duration: 2s;
}

.animate-delay-1 {
    animation-delay: 0.2s;
}

.animate-delay-2 {
    animation-delay: 0.4s;
}

.animate-delay-3 {
    animation-delay: 0.6s;
}

.animate-delay-4 {
    animation-delay: 0.8s;
}

.animate-delay-5 {
    animation-delay: 1s;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.fade-in {
    animation: fadeIn 1s ease;
}

.animate-on-scroll.fade-in-up {
    animation: fadeInUp 1s ease;
}

.animate-on-scroll.fade-in-down {
    animation: fadeInDown 1s ease;
}

.animate-on-scroll.fade-in-left {
    animation: fadeInLeft 1s ease;
}

.animate-on-scroll.fade-in-right {
    animation: fadeInRight 1s ease;
}

/* Hover Animations */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-shrink {
    transition: transform 0.3s ease;
}

.hover-shrink:hover {
    transform: scale(0.95);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hover-sink {
    transition: all 0.3s ease;
}

.hover-sink:hover {
    transform: translateY(5px);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Notification Animations */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    color: #333;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #4CAF50;
    color: white;
}

.notification-error {
    background: #f44336;
    color: white;
}

.notification-info {
    background: #2196F3;
    color: white;
}

.notification-warning {
    background: #ff9800;
    color: white;
}

/* Chat Widget Animations */
.chat-widget {
    animation: bounceIn 1s ease;
}

.chat-window {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.chat-window.active {
    animation-name: slideUp;
}

.chat-message {
    animation: fadeInUp 0.5s ease;
    margin-bottom: 15px;
}

.chat-message.user-message {
    animation: fadeInRight 0.5s ease;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 15px 15px 5px 15px;
    margin-left: auto;
    max-width: 70%;
    text-align: right;
}

.chat-message.bot-message {
    animation: fadeInLeft 0.5s ease;
    background: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px 15px 15px 5px;
    max-width: 70%;
}

/* Gallery Animations */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.fade-in {
    animation: fadeIn 0.5s ease;
}

.gallery-item:hover {
    animation: hover-lift 0.3s ease forwards;
}

/* Lightbox Animations */
.lightbox {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* Form Animations */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    animation: glow 2s ease infinite;
}

.submit-btn {
    transition: all 0.3s ease;
}

.submit-btn:hover {
    animation: pulse 1s ease infinite;
}

.submit-btn:active {
    transform: scale(0.95);
}

/* Navigation Animations */
.nav-links a {
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 100%;
}

/* Parallax Effect */
.parallax {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Text Animations */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cursor Effects */
.cursor-pointer {
    cursor: pointer;
}

.cursor-move {
    cursor: move;
}

.cursor-wait {
    cursor: wait;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Transition Utilities */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition-duration: 0.15s;
}

.transition-slow {
    transition-duration: 0.5s;
}

.transition-none {
    transition: none;
}