/**
 * HIPTON Germany - Animations & Transitions
 * Smooth animations using AOS (Animate On Scroll) library + custom animations
 */

/* ==================== AOS Library Setup ==================== */
/* Include AOS library in your HTML: https://michalsnik.github.io/aos/ */
/* <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> */
/* <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> */

/* ==================== Custom Keyframe Animations ==================== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== Page Load Animations ==================== */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

/* ==================== Hover Effects ==================== */

/* Shine Hover Effect */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.shine-effect:hover::before {
    left: 100%;
}

/* Lift Effect */
.lift-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Glow Effect on Hover */
.glow-on-hover {
    transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

/* ==================== Text Animations ==================== */

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(
        270deg,
        var(--color-gold),
        var(--color-red),
        var(--color-gold)
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 3s ease infinite;
}

/* Typing Effect */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--color-gold);
    white-space: nowrap;
    animation: typing 3s steps(40) 1s 1 normal both,
               blinkCursor 0.75s step-end infinite;
}

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

@keyframes blinkCursor {
    50% {
        border-color: transparent;
    }
}

/* ==================== Loading States ==================== */

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-tertiary) 25%,
        var(--color-bg-card) 50%,
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-bg-tertiary);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== Transition Classes ==================== */

/* Fade Transitions */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Slide Transitions */
.slide-enter {
    transform: translateX(-100%);
}

.slide-enter-active {
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.slide-exit {
    transform: translateX(0);
}

.slide-exit-active {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

/* ==================== Parallax Effect ==================== */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ==================== Scroll Reveal Effects ==================== */
[data-scroll] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-scroll].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-scroll="fade-up"] {
    transform: translateY(30px);
}

[data-scroll="fade-down"] {
    transform: translateY(-30px);
}

[data-scroll="fade-left"] {
    transform: translateX(-30px);
}

[data-scroll="fade-right"] {
    transform: translateX(30px);
}

[data-scroll="scale"] {
    transform: scale(0.9);
}

/* ==================== Stagger Animation Delays ==================== */
.stagger-animation > * {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

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

/* ==================== Notification Animation ==================== */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    max-width: 400px;
    padding: 20px 25px;
    background: var(--color-bg-card);
    border-left: 4px solid var(--color-gold);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    right: 30px;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.notification-message {
    color: var(--color-text-primary);
    font-size: 15px;
}

.notification-close {
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.notification-close:hover {
    color: var(--color-gold);
}

/* Notification Types */
.notification-success {
    border-left-color: #4CAF50;
}

.notification-error {
    border-left-color: #F44336;
}

.notification-warning {
    border-left-color: #FF9800;
}

.notification-info {
    border-left-color: var(--color-gold);
}

/* ==================== Mobile Animations ==================== */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile for performance */
    * {
        animation-duration: 0.3s !important;
    }
    
    .parallax {
        background-attachment: scroll;
    }
}

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