/* ============================================================
   STRAATZAKEN026 — Animations
   ============================================================
   Smooth transitions, keyframe animations, micro-interactions
   ============================================================ */


/* ----------------------------------------
   1. SCROLL REVEAL
   ---------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
                transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
                transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
                transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.93);
    transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1),
                transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: none;
}

/* ----------------------------------------
   2. STAGGER CHILDREN
   ---------------------------------------- */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.4,0,0.2,1),
                transform 0.45s cubic-bezier(0.4,0,0.2,1);
    transition-delay: calc(var(--stagger-i, 0) * 80ms);
}

/* Trigger: voeg class "stagger-visible" toe aan de parent */
.stagger-children.stagger-visible .stagger-item,
/* OF: gebruik IntersectionObserver vanuit animations.js */
.stagger-children.revealed .stagger-item {
    opacity: 1;
    transform: none;
}


/* ----------------------------------------
   3. CARD HOVER DIEPTE
   ---------------------------------------- */
.card-hover {
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.25s cubic-bezier(0.4,0,0.2,1),
                border-color 0.25s ease;
    will-change: transform;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5),
                0 0 0 1px rgba(56,189,248,0.15);
    border-color: rgba(56, 189, 248, 0.25);
}

/* Tilt variant — transform wordt via JS gezet */
.tilt-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    will-change: transform;
    transform-style: preserve-3d;
}
.tilt-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.5),
                0 0 0 1px rgba(56,189,248,0.2);
}

/* ----------------------------------------
   4. GLOW PULSE (voor logo / accent elementen)
   ---------------------------------------- */
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(234,170,0,0.3); }
    50%       { text-shadow: 0 0 20px rgba(234,170,0,0.7), 0 0 40px rgba(234,170,0,0.3); }
}
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ----------------------------------------
   5. FADE IN (generiek, geen scroll nodig)
   ---------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4,0,0.2,1) both;
}

/* ----------------------------------------
   6. SKELETON LOADER
   ---------------------------------------- */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
.skeleton {
    background: linear-gradient(
        90deg,
        var(--card-bg) 25%,
        rgba(255,255,255,0.06) 50%,
        var(--card-bg) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: var(--radius);
}

/* ----------------------------------------
   7. SPIN (voor loaders)
   ---------------------------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 0.8s linear infinite;
}

/* ----------------------------------------
   8. HERO GRADIENT BEWEGING
   ---------------------------------------- */
@keyframes heroGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-animated-bg {
    background-size: 200% 200%;
    animation: heroGradientShift 8s ease infinite;
}
/* ========================================
   1. FADE ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   2. SLIDE ANIMATIONS
   ======================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ========================================
   3. BOUNCE & PULSE
   ======================================== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   4. SPIN & ROTATE
   ======================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* ========================================
   5. BLINK
   ======================================== */
@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

@keyframes blinkWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========================================
   6. ANIMATION CLASSES
   ======================================== */
.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.4s ease forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.3s ease forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.3s ease forwards;
}

.animate-bounce {
    animation: bounce 0.6s ease infinite;
}

.animate-pulse {
    animation: pulse 2s ease infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-spin-slow {
    animation: spinSlow 3s linear infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-wiggle {
    animation: wiggle 0.5s ease;
}

.animate-blink {
    animation: blink 1s step-end infinite;
}

/* ========================================
   7. DELAY ANIMATIONS (Stagger)
   ======================================== */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.4s; }

.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; }

/* ========================================
   8. HOVER TRANSITIONS
   ======================================== */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.hover-lift-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

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

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

.hover-scale-sm:hover {
    transform: scale(1.02);
}

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

.hover-glow:hover {
    box-shadow: 0 0 15px rgba(212, 160, 23, 0.4);
}

.hover-brightness {
    transition: filter 0.2s ease;
}

.hover-brightness:hover {
    filter: brightness(1.1);
}

.hover-saturate {
    transition: filter 0.2s ease;
}

.hover-saturate:hover {
    filter: saturate(1.2);
}

/* ========================================
   9. FOCUS STATES
   ======================================== */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.4);
}

.focus-ring-blue:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 64, 133, 0.4);
}

/* ========================================
   10. TOUCH/CLICK FEEDBACK
   ======================================== */
.active-scale:active {
    transform: scale(0.97);
}

.active-lift:active {
    transform: translateY(1px);
}

/* ========================================
   11. TRANSITION UTILITIES
   ======================================== */
.transition-all {
    transition: all 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

.transition-opacity {
    transition: opacity 0.2s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-shadow {
    transition: box-shadow 0.2s ease;
}

/* ========================================
   12. SKELETON LOADING
   ======================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-800) 25%,
        var(--gray-700) 50%,
        var(--gray-800) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

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

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/9;
}

/* ========================================
   13. PROGRESS ANIMATIONS
   ======================================== */
.progress-bar {
    height: 8px;
    background: var(--gray-800);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ========================================
   14. RIPPLE EFFECT (for buttons)
   ======================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.ripple:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

/* ========================================
   15. PAGE TRANSITIONS
   ======================================== */
.page-enter {
    opacity: 0;
    transform: translateY(10px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(11) { animation-delay: 0.55s; }
.stagger-children > *:nth-child(12) { animation-delay: 0.6s; }

/* ========================================
   16. CARD HOVER EFFECTS
   ======================================== */
.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-hover-3d {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform-style: preserve-3d;
}

.card-hover-3d:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   17. LINK HOVER EFFECTS
   ======================================== */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

.link-underline-hover:hover {
    text-decoration: underline;
}

/* ========================================
   18. IMAGE HOVER ZOOM
   ======================================== */
.img-zoom-container {
    overflow: hidden;
    border-radius: var(--radius);
}

.img-zoom {
    transition: transform 0.4s ease;
}

.img-zoom-container:hover .img-zoom {
    transform: scale(1.08);
}

/* ========================================
   19. NOTIFICATION DOT PULSE
   ======================================== */
.notification-dot {
    position: relative;
}

.notification-dot::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

/* ========================================
   20. PARALLAX & SCROLL
   ======================================== */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ========================================
    21. ONLINE STATUS INDICATOR
    ======================================== */
.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.online-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse-online 2s ease infinite;
}

.online-dot.offline {
    background: #6b7280;
}

.online-dot.away {
    background: #f59e0b;
    animation: pulse 2s ease infinite;
}

@keyframes pulse-online {
    0%, 100% { 
        box-shadow: 0 0 4px #22c55e;
    }
    50% { 
        box-shadow: 0 0 10px #22c55e, 0 0 15px rgba(34, 197, 94, 0.5);
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.offline {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

/* ========================================
    22. TOAST NOTIFICATIONS
    ======================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 350px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInToast 0.3s ease;
    background: var(--card-bg);
    border-left: 4px solid var(--primary);
}

.toast.toast-success {
    border-left-color: #22c55e;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

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

.toast.toast-hide {
    animation: slideOutToast 0.3s ease forwards;
}

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

/* Search Highlight */
mark {
    background: rgba(234, 170, 0, 0.3);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* ========================================
    23. COUNTDOWN TIMER - Modern Style
    ======================================== */
.countdown-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.5rem 0;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: 0.625rem;
    background: var(--card-bg);
    border-radius: var(--radius, 8px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #EAAA00;
    font-family: var(--font-heading);
    line-height: 1;
}

.countdown-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.countdown-soon .countdown-value {
    color: #38BDF8;
    animation: pulse 1s ease infinite;
}

.countdown-ended {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
    24. PULL TO REFRESH
    ======================================== */
.pull-refresh-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.pull-refresh-container.visible {
    transform: translateY(0);
}

.pull-refresh-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pull-refresh-hint {
    color: white;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}
