.auction-content/**
 * Auctions Slider Styles
 * 
 * Responsive slider for displaying upcoming auctions
 * Optimized for RTL (Arabic) websites
 * Designed to fit within any container width
 * 
 * @package AuctionSystem
 * @version 1.0.0
 */
:root {
    --accent: var(--red-primary); /* اللون الأساسي - استخدام النظام الموحد */
}
/* Ensure slider respects parent container width */
.auctions-slider-container * {
    box-sizing: border-box;
}

.auctions-slider-container {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto;
    direction: rtl;
    box-sizing: border-box;
    overflow: hidden; /* منع أي تجاوز للحدود */
    transform: translateZ(0); /* Create stacking context */
}

.auctions-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.auctions-slider {
    display: flex;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    box-sizing: border-box;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    perspective: 1000px;
}

.auctions-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    height: 300px; 
    box-sizing: border-box;
    transform: translateZ(0); /* GPU acceleration */
    will-change: transform;
    background-color: #F8F9FA;
}

.auction-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    will-change: transform;
}

.auction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.auction-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #f0f0f0; /* Placeholder background */
}

.auction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-width: 100%;
    display: block;
    will-change: transform;
    opacity: 1;
}

.auction-card:hover .auction-image img {
    transform: scale(1.05);
}

.auction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(231,76,60,0.8), rgba(192,57,43,0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auction-card:hover .auction-overlay {
    opacity: 1;
}

.auction-view-text {
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.auction-content {
    padding: 20px;
    background: #fff;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.auction-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0; /* تقليل المسافة من 12px إلى 6px */
    line-height: 1.3;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 46px; /* ارتفاع محدد لسطرين */
    word-wrap: break-word;
}

.auction-meta {
    flex-shrink: 0;
}

.auction-date,
.auction-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 4px; /* تقليل المسافة من 6px إلى 4px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auction-date svg,
.auction-location svg {
    flex-shrink: 0;
    opacity: 0.7;
    min-width: 16px;
}

.auction-date span,
.auction-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auction-date:last-child,
.auction-location:last-child {
    margin-bottom: 0;
}

/* Dots indicator */
.auctions-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.auctions-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auctions-slider-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.auctions-slider-dot:hover {
    background: #34495e;
    transform: scale(1.1);
}

/* No auctions message */
.auctions-no-content {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    border: 2px dashed #dee2e6;
}

.no-auctions-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.auctions-no-content h3 {
    color: #6c757d;
    margin: 0 0 8px 0;
    font-size: 20px;
}

.auctions-no-content p {
    color: #adb5bd;
    margin: 0;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .auctions-slide {
        height: 280px; /* ارتفاع أقل للشاشات الصغيرة */
        width: 100%;
    }
    
    .auction-image {
        height: 140px;
        width: 100%;
    }
    
    .auction-content {
        padding: 15px;
        width: 100%;
    }
    
    .auction-title {
        font-size: 16px;
        max-height: 40px; /* ارتفاع أقل للعنوان */
        line-height: 1.25;
    }
    
    .auctions-slider-dots {
        margin-top: 15px;
        width: 100%;
    }
    
    .auctions-slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .auctions-slide {
        height: 260px; /* ارتفاع أقل للهواتف */
        width: 100%;
    }
    
    .auction-image {
        height: 120px;
        width: 100%;
    }
    
    .auction-content {
        padding: 12px;
        height: 90px;
        width: 100%;
    }
    
    .auction-title {
        font-size: 15px;
        max-height: 36px;
        line-height: 1.2;
        margin-bottom: 4px; /* تقليل المسافة من 8px إلى 4px */
    }
    
    .auction-date,
    .auction-location {
        font-size: 13px;
        margin-bottom: 2px; /* تقليل المسافة من 4px إلى 2px */
    }
    
    .auction-date svg,
    .auction-location svg {
        width: 14px;
        height: 14px;
    }
    
    .auctions-slider-dots {
        width: 100%;
    }
}

/* Optimize for slow connections */
@media (prefers-reduced-motion: reduce) {
    .auctions-slider,
    .auction-image img,
    .auction-card {
        transition-duration: 0.01ms !important;
    }
}

/* Special styles for narrow containers (like 1/3 width columns) */
@media (max-width: 600px), (max-width: 1200px) and (min-width: 769px) {
    .auctions-slider-container {
        font-size: 14px; /* خط أصغر للمساحات الضيقة */
    }
    
    .auction-title {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .auction-date,
    .auction-location {
        font-size: 12px;
    }
    
    .auction-content {
        padding: 15px;
    }
}

/* Very narrow containers */
@container (max-width: 400px) {
    .auction-title {
        font-size: 14px;
        max-height: 32px;
    }
    
    .auction-content {
        padding: 12px;
    }
    
    .auction-date,
    .auction-location {
        font-size: 11px;
    }
}
