/* ============================================
   LOADING STATES & SKELETON LOADERS
   Moderne UX-Verbesserungen für bessere Wahrnehmung
   ============================================ */

/* Skeleton Loader Base */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-light {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Image Skeleton Loader */
.skeleton-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(
        90deg,
        rgba(18, 38, 32, 0.3) 25%,
        rgba(214, 173, 96, 0.2) 50%,
        rgba(18, 38, 32, 0.3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(214, 173, 96, 0.3);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Text Skeleton */
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

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

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

/* Card Skeleton */
.skeleton-card {
    background: rgba(18, 38, 32, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(214, 173, 96, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Button Skeleton */
.skeleton-button {
    width: 150px;
    height: 45px;
    background: linear-gradient(
        90deg,
        rgba(214, 173, 96, 0.3) 25%,
        rgba(214, 173, 96, 0.5) 50%,
        rgba(214, 173, 96, 0.3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0;
    border: 1px solid rgba(214, 173, 96, 0.3);
}

/* Loading Spinner - Elegant */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(214, 173, 96, 0.2);
    border-top-color: #D6AD60;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 38, 32, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .loading-text {
    color: #D6AD60;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1.5rem;
}

/* Image Fade-In on Load */
.fade-in-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.fade-in-image.loaded {
    opacity: 1;
}

/* Lazy Load Placeholder */
.lazy-placeholder {
    background: linear-gradient(
        135deg,
        rgba(18, 38, 32, 0.4) 0%,
        rgba(214, 173, 96, 0.1) 50%,
        rgba(18, 38, 32, 0.4) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Progress Bar */
.progress-bar-custom {
    width: 100%;
    height: 3px;
    background: rgba(214, 173, 96, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.progress-bar-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        #D6AD60,
        transparent
    );
    animation: progressSlide 1.5s infinite;
}

@keyframes progressSlide {
    to {
        left: 100%;
    }
}

/* Dots Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #D6AD60;
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Content Placeholder */
.content-placeholder {
    padding: 2rem;
}

.content-placeholder .skeleton-text {
    margin-bottom: 1rem;
}

/* Gallery Skeleton */
.gallery-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.gallery-skeleton .skeleton-image {
    height: 300px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .skeleton-image {
        height: 250px;
    }
    
    .gallery-skeleton .skeleton-image {
        height: 200px;
    }
    
    .loading-overlay .loading-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .skeleton-image {
        height: 200px;
    }
    
    .skeleton-card {
        padding: 1rem;
    }
}
