/* Animations.css - CSS-Animationen und Übergänge */

/* Hover-Effekte */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Fade-In-Animation */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulsieren-Animation für Buttons */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 180, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 180, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 180, 0, 0);
    }
}

/* Rotation für Icons */
.rotate-icon {
    transition: transform 0.5s ease;
}

.rotate-icon:hover {
    transform: rotate(360deg);
}

/* Slide-In von links */
.slide-in-left {
    animation: slideInLeft 0.5s ease-in-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide-In von rechts */
.slide-in-right {
    animation: slideInRight 0.5s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bounce-Animation */
.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Schwebende Animation */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Shake-Animation für Fehlermeldungen */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Fade-In-Up für Sektionen */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ripple-Effekt für Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Flip-Animation */
.flip {
    perspective: 1000px;
}

.flip-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip:hover .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    backface-visibility: hidden;
}

.flip-back {
    transform: rotateY(180deg);
}

/* Highlight-Effekt */
.highlight {
    transition: background-color 0.3s ease;
}

.highlight:hover {
    background-color: rgba(255, 180, 0, 0.1);
}

/* Expandieren-Animation */
.expand {
    transition: all 0.3s ease;
}

.expand:hover {
    transform: scale(1.05);
}

/* Border-Animation */
.border-anim {
    position: relative;
}

.border-anim::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: transparent;
    border-bottom: 2px solid var(--accent-color);
    transition: width 0.3s ease;
}

.border-anim:hover::before {
    width: 100%;
}

/* Shadow-Pulse für wichtige Elemente */
.shadow-pulse {
    animation: shadowPulse 2s infinite;
}

@keyframes shadowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 95, 86, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 95, 86, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 95, 86, 0);
    }
}

/* Typing-Animation für Text */
.typing {
    border-right: 0.15em solid var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(30, end), 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(--accent-color); }
}

/* Hintergrund-Gradient-Animation */
.bg-gradient-anim {
    background: linear-gradient(270deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 600% 600%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text-Schatten-Animation */
.text-shadow-anim {
    animation: textShadowPulse 2s infinite;
}

@keyframes textShadowPulse {
    0% {
        text-shadow: 0 0 0 rgba(255, 180, 0, 0);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 180, 0, 0.5);
    }
    100% {
        text-shadow: 0 0 0 rgba(255, 180, 0, 0);
    }
}
