/* General container for the slider */
.av_kh_features_slider_wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align items to the top */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
   /* margin-top: 1rem;
    margin-bottom: 1rem; */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #fff;
    font-family: 'Cairo', "Roboto", Arial, sans-serif; /* Applied here for global component styling */
    overflow: hidden; /* Ensure content stays within bounds */
    direction: rtl; /* Overall RTL layout */
    text-align: right; /* Default text alignment for RTL */
    /* Removed: max-width, margin, border-radius as they were commented out or not strictly necessary here */
}

/* Content area: Image/Description and Features List */
.av_kh_features_slider_content {
    display: flex;
    flex-wrap: wrap; /* Allow content to wrap on smaller screens */
    width: 100%;
}

/* Image and description container */
.av_kh_feature_image_container {
    flex: 2; /* Takes 2 parts of the available space */
    min-width: 320px; /* Minimum width for image container */
    background-color: #f0f0f0; /* Background for placeholder */
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden; /* Ensure content stays within bounds, especially description */
    /* Removed: padding, min-height as they were commented out or might be adjusted by content */
}

/* New CSS for loading state overlay and spinner */
.av_kh_feature_image_container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 240, 240, 0.8); /* Semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Above the image */
}

.av_kh_feature_image_container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3f51b5; /* Spinner color */
    border-radius: 50%;
    animation: av_kh_spin 1s linear infinite;
    z-index: 11;
}

@keyframes av_kh_spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.av_kh_current_feature_image {
    width: 100%; /* Take full width of its container */
     /* max-height: 512px; Limit height */
    height: 512px; /* Fixed height for consistent image display */
    object-fit: cover; /* Ensures image fills the container, cropping as needed */
    object-position: center; /* Centers the image within the 'cover' area */
    display: block;
    transition: opacity 0.3s ease-in-out; /* Smooth fade for image */
    /* Removed: margin-bottom, border-radius as they were commented out */
}

/* Hide image during loading */
.av_kh_feature_image_container.loading .av_kh_current_feature_image {
    opacity: 0;
}

.av_kh_feature_description_box {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    width: 90%;
    box-sizing: border-box;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    transition: opacity 0.3s ease-in-out; /* Smooth fade for description */
    font-family: 'Cairo', "Roboto", Arial, sans-serif;
    /* Removed: max-height, background-color (from commented block) */

}

/* Hide description during loading */
.av_kh_feature_image_container.loading .av_kh_feature_description_box {
    opacity: 0;
}

.av_kh_current_feature_description {
    font-size: 1em;
    margin: 0;
}

/* Features list container */
.av_kh_features_list_container {
    flex: 1;
    min-width: 256px;
    /* background-color: #1465b6; */
    
    background-color: rgb(0, 86, 168);
    color: #fff;
    padding: 8px;
    box-sizing: border-box;
   
}

/* Title for features list */
/* Re-enabled and consolidated from previous versions */
.av_kh_features_title {
    font-size: 1.5em; /* حجم خط افتراضي أكبر للتميز */
    font-weight: bold;
    margin-top: 15px; /* هامش علوي لتباعد أفضل */
    margin-bottom: 25px; /* هامش سفلي أكبر للفصل عن القائمة */
    text-align: center; /* توسيط النص */
    display: flex; /* لتمكين التحكم في محاذاة الأيقونة والنص */
    justify-content: center; /* توسيط محتوى العنوان (الأيقونة والنص) */
   
    color: #ffd700; /* لون العنوان أصفر مميز */
    /* text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* تظليل خفيف للنص لتمييزه */
    padding-bottom: 10px; /* بادينج سفلي لخط تحته */
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* خط سفلي بسيط */
    white-space: nowrap; /* يمنع انقسام النص إلى أسطر متعددة */
    overflow: hidden; /* يخفي أي تجاوز إذا كان النص طويلاً جداً */
    text-overflow: ellipsis; /* يضيف نقاط إذا كان النص مخفياً بسبب overflow */
    direction: rtl; /* التأكد من أن العنوان نفسه يتبع RTL */
    
    
}

.av_kh_features_title .dashicons {
    margin-right: 0; /* لا يوجد هامش يمين */
    margin-left: 20px; /* هامش لليسار للفصل عن النص */
    font-size: 1.5em; /* حجم أكبر للأيقونة لتكون مميزة */
    line-height: 1;
    color: #ffd700; /* لون الأيقونة مطابق للعنوان */
    
   
}









@media (max-width: 768px) {
    .av_kh_features_title {
        font-size: 1.3em; /* حجم أصغر جداً للشاشات الصغيرة جداً */
        margin-top: 5px;
        margin-bottom: 10px;
    }
    .av_kh_features_title .dashicons {
        font-size: 1.3em;
        margin-left: 15px;
        
    }
}



/* Features list */
.av_kh_features_list {
    list-style: none;
    padding: 0; /* Remove default padding for list items */
    margin: 0;
    direction: rtl; /* Ensure list itself follows RTL */
    /* Removed: right:0; as it's not applicable here */
    
     justify-content: center;
}

/* Individual feature item */
.av_kh_feature_item {
 font-size: 1.2em;
 padding: 10px 0;
 cursor: pointer;
 border-bottom: 1px solid rgba(255, 255, 255, 0.2);
 display: flex;
 align-items: center; 
 /*justify-content: flex-end; /* التأكد من محاذاة النص لليمين */
 /*flex-direction: row-reverse; /* عكس ترتيب العناصر داخل العنصر */
 transition: color 0.3s ease, background-color 0.3s ease;
 text-align: right; /* التأكد من محاذاة النص لليمين */
 font-family: 'Cairo', "Roboto", Arial, sans-serif;
 position: relative; /* Needed for absolute positioning of progress bar */
 overflow: hidden; /* Hide overflow of progress bar */
}

.av_kh_feature_item .dashicons {
 margin-right: 0; /* إزالة الهامش الأيمن */
 margin-left: 10px; /* إضافة هامش لليسار للفصل بين الأيقونة والنص */
 font-size: 1.2em;
}



.av_kh_feature_item:last-child {
    border-bottom: none;
}


.av_kh_feature_item.active {
    color: #ffd700; /* Yellow for active item */
    /* font-weight: bold; */
 
}


.av_kh_feature_item.active .dashicons-star-filled {
  color: #ffc107;
  text-shadow: 0 0 5px #ffc107;
  animation: glow_star 1.8s infinite ease-in-out;
}

@keyframes glow_star {
  0%, 100% {
    text-shadow: 0 0 4px #ffc107, 0 0 8px #ffc107;
  }
  50% {
    text-shadow: 0 0 16px #ffea00, 0 0 24px #ffea00;
  }
}





.av_kh_feature_item:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.av_kh_feature_item .av_kh_progress_bar {
    position: absolute;
    bottom: 0;
    right: 0; /* Starts from right for RTL */
    height: 3px; /* Height of the progress bar */
    background-color: #ffd700; /* Yellow progress color */
    width: 0%; /* Initial width */
    transition: width 0s linear; /* No transition for starting */
    z-index: 1; /* Ensure it's above the border-bottom */
}

.av_kh_feature_item.active .av_kh_progress_bar.running {
    animation: av_kh_fill_progress var(--interval-time) linear forwards;
}

@keyframes av_kh_fill_progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Slider dots for navigation */
.av_kh_slider_dots {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
    direction: ltr; /* Keep dots LTR for consistent UI across languages */
}

.av_kh_dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.av_kh_dot.active {
    background-color: #ffd700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .av_kh_features_slider_content {
        flex-direction: column; /* Stack vertically on smaller screens */
    }

    .av_kh_feature_image_container,
    .av_kh_features_list_container {
        flex: none; /* Remove flex sizing */
        width: 100%; /* Take full width */
        min-width: unset; /* Remove min-width constraint */
    }

    .av_kh_features_list_container {
        order: -1; /* Move list above image on mobile for better flow */
    }

    /* Adjust description box for mobile */
    .av_kh_feature_description_box {
        position: relative; /* Remove absolute positioning on mobile */
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        border-radius: 0 0 5px 5px; /* Adjust border radius */
        color: #fff; /* Ensure text color remains white */
        /* Removed: margin-top, background-color (from commented block) */
    }

    .av_kh_current_feature_image {
        height: 220px; /* Smaller fixed height for mobile */
    }
}









