/**
 * Vassiliou Clean Spark - Animations CSS
 *
 * @package VassiliouCleanSpark
 */

/* ==========================================================================
   Base Animation Properties
   ========================================================================== */

/* Animation Ready State */
.animate-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Card Animations
   ========================================================================== */

/* Service Card Hover */
.service-card,
.post-card,
.testimonial-card,
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover,
.post-card:hover,
.testimonial-card:hover,
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(230, 193, 100, 0.15);
}

/* Selected Card State */
.service-card.in-cart,
.booking-service-card.in-cart {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    box-shadow: 0 10px 25px rgba(230, 193, 100, 0.2);
}

/* ==========================================================================
   Button Animations
   ========================================================================== */

/* Gold Button Glow */
.btn-gold {
    transition: all 0.3s ease;
}

.btn-gold:hover {
    box-shadow: 0 8px 25px rgba(230, 193, 100, 0.4);
    transform: scale(1.02);
}

.btn-gold:active {
    transform: scale(0.98);
}

/* CTA Pulse Animation */
.cta-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(230, 193, 100, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(230, 193, 100, 0);
    }
}

/* ==========================================================================
   Booking Step Animations
   ========================================================================== */

/* Step Panel Transitions */
.booking-step {
    display: none;
    opacity: 0;
    transform: translateX(30px);
}

.booking-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.3s ease;
}

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

/* Progress Step Animation */
.progress-step .step-indicator {
    transition: all 0.3s ease;
}

.progress-step.active .step-indicator {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.1);
}

.progress-step.completed .step-indicator {
    background: var(--success);
    color: var(--white);
}

.progress-step.completed .step-indicator::after {
    content: '✓';
    position: absolute;
}

/* Progress Line Animation */
.progress-line {
    background: var(--gray-700);
    transition: background-color 0.3s ease;
}

.progress-step.completed + .progress-line {
    background: var(--gold);
}

/* ==========================================================================
   Calendar Animations
   ========================================================================== */

.calendar-day {
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.disabled) {
    background: var(--gold-light);
    border-color: var(--gold);
}

.calendar-day.selected {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.05);
}

/* Time Slot Animations */
.time-slot {
    transition: all 0.2s ease;
}

.time-slot:hover {
    border-color: var(--gold);
    background: var(--gold-light);
}

.time-slot.selected {
    background: var(--gold);
    color: var(--black);
}

/* ==========================================================================
   Cart Animations
   ========================================================================== */

.cart-summary {
    transition: all 0.3s ease;
}

.cart-summary.has-items {
    box-shadow: 0 8px 32px rgba(230, 193, 100, 0.3);
}

.cart-item {
    animation: fadeInUp 0.3s ease;
}

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

/* ==========================================================================
   FAQ Accordion Animations
   ========================================================================== */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* ==========================================================================
   Hero Animations
   ========================================================================== */

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Hero Wave Animation */
.hero-wave svg {
    animation: wave 3s ease-in-out infinite alternate;
}

@keyframes wave {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(5px);
    }
}

/* ==========================================================================
   Loading Animations
   ========================================================================== */

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(55, 65, 81, 0.6) 25%,
        rgba(75, 85, 99, 0.8) 50%,
        rgba(55, 65, 81, 0.6) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

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

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

/* ==========================================================================
   Toast Animations
   ========================================================================== */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: var(--spacing-4) var(--spacing-6);
    background: var(--gray-800);
    color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: var(--z-tooltip);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--error);
}

/* ==========================================================================
   Mobile Menu Animations
   ========================================================================== */

.mobile-menu {
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-toggle span {
    transition: all 0.3s ease;
}

/* ==========================================================================
   Dropdown Animations
   ========================================================================== */

.sub-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.sub-menu.open,
.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================================================
   Success Animation
   ========================================================================== */

.booking-success {
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-4);
    animation: bounce 0.5s ease 0.2s both;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================================================
   Stagger Animation Utility
   ========================================================================== */

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

/* ==========================================================================
   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;
    }

    .hero-wave svg {
        animation: none;
    }

    .cta-pulse {
        animation: none;
    }
}
