/**
 * Auskunftsanwalt.de - Animations Stylesheet
 * 
 * CSS Animations & Transitions
 * 
 * Inhaltsverzeichnis:
 * 1. Fade Animations
 * 2. Slide Animations
 * 3. Scale Animations
 * 4. Scroll Animations (Initial States)
 * 5. Keyframe Definitions
 * 6. Delay Classes
 * 7. Loading Animation
 */

/* ==========================================================================
   1. Fade Animations
   ========================================================================== */

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-up {
    animation: fadeUp 0.6s ease forwards;
}

.animate-fade-down {
    animation: fadeDown 0.6s ease forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.6s ease forwards;
}

.animate-fade-right {
    animation: fadeRight 0.6s ease forwards;
}

/* ==========================================================================
   2. Slide Animations
   ========================================================================== */

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.animate-slide-down {
    animation: slideDown 0.5s ease forwards;
}

.animate-slide-left {
    animation: slideLeft 0.5s ease forwards;
}

.animate-slide-right {
    animation: slideRight 0.5s ease forwards;
}

/* ==========================================================================
   3. Scale Animations
   ========================================================================== */

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.animate-scale-out {
    animation: scaleOut 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

/* ==========================================================================
   4. Scroll Animations (Initial States)
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Specific scroll animation variants */
.animate-on-scroll--fade {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.animate-on-scroll--fade.animated {
    opacity: 1;
}

.animate-on-scroll--left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll--left.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-on-scroll--right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll--right.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-on-scroll--scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll--scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   5. Keyframe Definitions
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ==========================================================================
   6. Delay Classes
   ========================================================================== */

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

.animate-delay-6 {
    animation-delay: 0.6s;
}

.animate-delay-7 {
    animation-delay: 0.7s;
}

.animate-delay-8 {
    animation-delay: 0.8s;
}

/* Stagger delays for scroll animations */
.animate-on-scroll.stagger-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.stagger-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.stagger-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll.stagger-4 {
    transition-delay: 0.4s;
}

.animate-on-scroll.stagger-5 {
    transition-delay: 0.5s;
}

/* ==========================================================================
   7. Loading Animation
   ========================================================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-gray-light);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-logo {
    position: absolute;
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Skeleton loading effect */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-gray-light) 25%,
        var(--color-background-alt) 50%,
        var(--color-gray-light) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   8. Hover Animation Utilities
   ========================================================================== */

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-grow {
    transition: transform var(--transition-normal);
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* ==========================================================================
   9. Text Animation Utilities
   ========================================================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-underline-animate {
    position: relative;
    display: inline-block;
}

.text-underline-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-normal);
}

.text-underline-animate:hover::after {
    width: 100%;
}

/* ==========================================================================
   10. Icon Animation Utilities
   ========================================================================== */

.icon-spin {
    animation: spin 2s linear infinite;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.icon-bounce {
    animation: bounce 1s ease infinite;
}

.icon-float {
    animation: float 3s ease-in-out infinite;
}
