/* ====================================
   Skeleton Loader Styles - Modern Design
   Ultra Modern Loading Animations
   ==================================== */

/* Base Skeleton Container - Modern Bars Design */
.skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        rgba(196, 38, 54, 0.08) 0%,
        rgba(196, 38, 54, 0.08) 45%,
        rgba(40, 102, 143, 0.15) 50%,
        rgba(40, 102, 143, 0.15) 55%,
        rgba(196, 38, 54, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-wave 2s ease-in-out infinite;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(196, 38, 54, 0.05);
}

/* Skeleton Wave Animation */
@keyframes skeleton-wave {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Alternative Pulse Animation */
.skeleton-pulse {
    animation: skeleton-pulse-animation 1.5s ease-in-out infinite;
}

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

/* Skeleton Shimmer Effect (Alternative Style) */
.skeleton-shimmer {
    position: relative;
    background: rgba(196, 38, 54, 0.1);
    background-image: linear-gradient(
        to right,
        rgba(196, 38, 54, 0.1) 0%,
        rgba(40, 102, 143, 0.15) 20%,
        rgba(196, 38, 54, 0.1) 40%,
        rgba(196, 38, 54, 0.1) 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: skeleton-shimmer-animation 1.2s ease-in-out infinite;
}

@keyframes skeleton-shimmer-animation {
    0% {
        background-position: -800px 0;
    }
    100% {
        background-position: 800px 0;
    }
}

/* Skeleton Gradient Fade */
.skeleton-gradient {
    background: linear-gradient(
        135deg,
        rgba(196, 38, 54, 0.15) 0%,
        rgba(40, 102, 143, 0.15) 25%,
        rgba(196, 38, 54, 0.15) 50%,
        rgba(40, 102, 143, 0.15) 75%,
        rgba(196, 38, 54, 0.15) 100%
    );
    background-size: 400% 400%;
    animation: skeleton-gradient-animation 2s ease infinite;
}

@keyframes skeleton-gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Skeleton Variants - Sizes */
.skeleton-text {
    width: 100%;
    height: 16px;
    margin: 8px 0;
}

.skeleton-text-sm {
    width: 60%;
    height: 12px;
    margin: 6px 0;
}

.skeleton-text-lg {
    width: 100%;
    height: 20px;
    margin: 10px 0;
}

.skeleton-title {
    width: 80%;
    height: 32px;
    margin: 16px 0;
}

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

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

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

.skeleton-button {
    width: 120px;
    height: 40px;
    border-radius: 6px;
}

.skeleton-card {
    width: 100%;
    height: 200px;
    border-radius: 12px;
}

.skeleton-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-rounded {
    border-radius: 12px;
}

/* Skeleton Content Layouts */
.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.skeleton-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Product Card Skeleton */
.skeleton-product-card {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.skeleton-product-image {
    width: 100%;
    height: 250px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.skeleton-product-title {
    width: 90%;
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-product-price {
    width: 40%;
    height: 20px;
    margin-bottom: 8px;
}

.skeleton-product-description {
    width: 100%;
    height: 14px;
    margin-bottom: 6px;
}

/* Blog/Post Skeleton */
.skeleton-post {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
}

.skeleton-post-image {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.skeleton-post-title {
    width: 85%;
    height: 28px;
    margin-bottom: 12px;
}

.skeleton-post-meta {
    width: 50%;
    height: 14px;
    margin-bottom: 12px;
}

.skeleton-post-excerpt {
    width: 100%;
    height: 14px;
    margin-bottom: 8px;
}

/* Service Card Skeleton */
.skeleton-service-card {
    text-align: center;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
}

.skeleton-service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
}

.skeleton-service-title {
    width: 70%;
    height: 22px;
    margin: 0 auto 12px;
}

.skeleton-service-text {
    width: 90%;
    height: 14px;
    margin: 0 auto 6px;
}

/* Gallery Skeleton */
.skeleton-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skeleton-gallery-item {
    width: 100%;
    height: 220px;
    border-radius: 12px;
}

/* List Item Skeleton */
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-list-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-list-content {
    flex: 1;
}

.skeleton-list-title {
    width: 70%;
    height: 18px;
    margin-bottom: 8px;
}

.skeleton-list-text {
    width: 50%;
    height: 14px;
}

/* Testimonial Skeleton */
.skeleton-testimonial {
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
}

.skeleton-testimonial-avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
}

.skeleton-testimonial-name {
    width: 50%;
    height: 18px;
    margin: 0 auto 8px;
}

.skeleton-testimonial-role {
    width: 40%;
    height: 14px;
    margin: 0 auto 16px;
}

.skeleton-testimonial-text {
    width: 100%;
    height: 14px;
    margin: 0 auto 6px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(
            90deg,
            rgba(196, 38, 54, 0.25) 0%,
            rgba(196, 38, 54, 0.25) 40%,
            rgba(40, 102, 143, 0.3) 50%,
            rgba(196, 38, 54, 0.25) 60%,
            rgba(196, 38, 54, 0.25) 100%
        );
    }

    .skeleton-shimmer {
        background: rgba(196, 38, 54, 0.2);
        background-image: linear-gradient(
            to right,
            rgba(196, 38, 54, 0.2) 0%,
            rgba(40, 102, 143, 0.25) 20%,
            rgba(196, 38, 54, 0.2) 40%,
            rgba(196, 38, 54, 0.2) 100%
        );
    }

    .skeleton-gradient {
        background: linear-gradient(
            135deg,
            rgba(196, 38, 54, 0.25) 0%,
            rgba(40, 102, 143, 0.25) 25%,
            rgba(196, 38, 54, 0.25) 50%,
            rgba(40, 102, 143, 0.25) 75%,
            rgba(196, 38, 54, 0.25) 100%
        );
    }
}

/* RTL Support */
[dir="rtl"] .skeleton-shimmer {
    animation: skeleton-shimmer-rtl-animation 1.2s ease-in-out infinite;
}

@keyframes skeleton-shimmer-rtl-animation {
    0% {
        background-position: 800px 0;
    }
    100% {
        background-position: -800px 0;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .skeleton-pulse,
    .skeleton-shimmer,
    .skeleton-gradient {
        animation: none;
    }
    
    .skeleton {
        background: rgba(196, 38, 54, 0.15);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .skeleton-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .skeleton-product-image,
    .skeleton-post-image {
        height: 180px;
    }
}

/* Loading Container with Multiple Elements */
.skeleton-wrapper {
    padding: 20px;
}

.skeleton-header {
    margin-bottom: 24px;
}

.skeleton-body {
    margin-bottom: 20px;
}

.skeleton-footer {
    margin-top: 24px;
}

/* Custom Shapes */
.skeleton-badge {
    display: inline-block;
    width: 60px;
    height: 24px;
    border-radius: 12px;
}

.skeleton-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.skeleton-chip {
    display: inline-block;
    width: 80px;
    height: 28px;
    border-radius: 14px;
    margin: 4px;
}

/* Utility Classes */
.skeleton-inline {
    display: inline-block;
}

.skeleton-block {
    display: block;
}

.skeleton-full-width {
    width: 100%;
}

.skeleton-half-width {
    width: 50%;
}

.skeleton-quarter-width {
    width: 25%;
}

/* Spacing Utilities */
.skeleton-mb-1 {
    margin-bottom: 8px;
}

.skeleton-mb-2 {
    margin-bottom: 16px;
}

.skeleton-mb-3 {
    margin-bottom: 24px;
}

.skeleton-mt-1 {
    margin-top: 8px;
}

.skeleton-mt-2 {
    margin-top: 16px;
}

.skeleton-mt-3 {
    margin-top: 24px;
}
