/* Skeleton Loader Styles */

/* Base skeleton styles */
.skeleton-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton-loader-dark {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Slide in right animation for location */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-in;
}

/* Fade in once (for slider caption) */
@keyframes fadeInOnce {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-once {
    animation: fadeInOnce 0.6s ease-out;
}

/* Skeleton specific components */
.skeleton-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

/* Skeleton button */
.skeleton-button {
    width: 100px;
    height: 38px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* Skeleton image placeholder */
.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Content reveal animations */
.reveal-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.reveal-content.show {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for multiple items */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animate {
    animation: staggerFadeIn 0.4s ease-out forwards;
}

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility classes for skeleton states */
.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.is-loaded {
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Skeleton for specific elements */
#slider-skeleton {
    position: relative;
    overflow: hidden;
}

#skeleton-service-title {
    display: inline-block;
}

#like-share-skeleton {
    display: flex;
    gap: 0.5rem;
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Prevent layout shift during skeleton removal */
.skeleton-wrapper {
    min-height: 50px;
}

/* Responsive skeleton adjustments */
@media (max-width: 768px) {
    .skeleton-image {
        height: 150px;
    }
    
    .skeleton-text {
        height: 10px;
    }
}

/* Loading state for containers */
.container-loading {
    position: relative;
    min-height: 200px;
}

.container-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Pulse animation for interactive elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-animation {
    animation: pulse 1.5s ease-in-out infinite;
}
