/* Custom Post Slider Styles - v1.3 Aspect Ratio Method */
.cps-slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 20px auto;
    overflow: hidden;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.cps-slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.cps-slide {
    min-width: 100%;
    box-sizing: border-box;
    display: none;
    text-align: center;
    padding-bottom: 20px;
}

.cps-slide.active {
    display: block;
}

.cps-slide-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding: 0 20px;
    color: #333;
    text-align: center;
}

.cps-slide-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.cps-slide-title a:hover {
    color: #3f51b5;
}

/* === MODIFIED SECTION START === */
/*
  This new method uses padding-top to create a container that always
  maintains a 2:1 aspect ratio (height is 50% of the width),
  matching the 900x450px image size.
*/
.cps-slide-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 50%; /* Aspect Ratio 2:1 (450 / 900 = 50%) */
    overflow: hidden;
    background-color: #e0e0e0; /* لون للخلفية أثناء تحميل الصورة */
}

.cps-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* This ensures the image covers the area without distortion */
}
/* === MODIFIED SECTION END === */

.cps-pagination {
    text-align: center;
    margin-top: 25px;
    padding-bottom: 15px;
}

.cps-page-num {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin: 0 6px;
    background-color: #e0e0e0;
    color: #555;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

.cps-page-num:hover,
.cps-page-num.active {
    background-color: #3f51b5;
    color: #fff;
    border-color: #3f51b5;
    transform: scale(1.1);
}

.cps-nav-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    /* We adjust the top position based on the new aspect ratio container */
    transform: translateY(-100%);
    width: 40px;
    height: 40px;
    line-height: 40px;
    color: #fff;
    font-weight: bold;
    font-size: 22px;
    background-color: rgba(0, 0, 0, 0.6);
    transition: background-color 0.3s;
    user-select: none;
    border-radius: 50%;
    text-align: center;
    z-index: 10;
}

.cps-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.cps-prev {
    right: 15px;
    left: auto;
}

.cps-next {
    left: 15px;
    right: auto;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .cps-slide-title {
        font-size: 16px;
    }
    .cps-nav-arrow {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 18px;
    }
    .cps-page-num {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cps-slide-title {
        font-size: 14px;
    }
    .cps-nav-arrow {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 16px;
    }
}