/* Partners Loading Indicator & Image Optimization */

/* Loading Indicator */
.partners-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 193, 169, 0.95);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.partners-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Loading States */
.About__img {
    position: relative;
    overflow: hidden;
}

.About__img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(239, 193, 169, 0.1) 0%, 
        rgba(239, 193, 169, 0.3) 50%, 
        rgba(239, 193, 169, 0.1) 100%);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.About__img img {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.About__img img.loaded {
    opacity: 1;
}

.About__img img.loaded + ::before {
    display: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Error State */
.About__img.error::after {
    content: '⚠️ خطأ في تحميل الصورة';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    z-index: 3;
}

/* Success Animation */
.About__container.swiper-initialized {
    animation: partnersSlideIn 0.6s ease-out;
}

@keyframes partnersSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Hover Enhancement */
.About__card {
    position: relative;
    overflow: hidden;
}

.About__card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(239, 193, 169, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.About__card:hover::after {
    left: 100%;
}

/* RTL Adjustments */
.rtl .partners-loading {
    direction: rtl;
}

.rtl .About__card::after {
    left: 100%;
}

.rtl .About__card:hover::after {
    left: -100%;
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    .partners-loading {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .partners-loading::before {
        width: 16px;
        height: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .partners-loading::before,
    .About__img::before,
    .About__card::after {
        animation: none;
    }
    
    .About__container.swiper-initialized {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .partners-loading {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .About__img.error::after {
        background: #000;
        color: #fff;
        border: 1px solid #fff;
    }
}