/* Miftah Nos Engagements Widget Styles */

.miftah-ne-wrapper {
    position: relative;
    width: 100%;
}

.miftah-ne-wrapper .swiper {
    width: 100%;
    position: relative;
    /* Prevent cutting off shadow/animations */
    padding: 20px 0;
}

/* Allow pagination to go outside the slider container if selected */
.miftah-ne-wrapper.miftah-ne-pagination-outside {
    padding-bottom: 50px;
}

.miftah-ne-wrapper.miftah-ne-pagination-outside .swiper-pagination {
    bottom: 0px;
}

/* Slide Content Container */
.miftah-ne-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    /* text-align is controlled by elementor */
    margin: 0 auto;
}

/* Icon */
.miftah-ne-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.miftah-ne-icon img,
.miftah-ne-icon svg {
    /* width is controlled by elementor */
    display: block;
    max-width: 100%;
}

/* Icon Hover Animations */
.miftah-ne-content:hover .miftah-ne-icon.hover-anim-scale {
    transform: scale(1.1);
}

.miftah-ne-content:hover .miftah-ne-icon.hover-anim-float {
    transform: translateY(-10px);
}

/* Title */
.miftah-ne-title {
    margin-top: 0;
    line-height: 1.2;
    /* Default color #006362 */
}

/* Description */
.miftah-ne-desc {
    margin-top: 0;
    line-height: 1.6;
    /* Default color #5c5c5c */
}

/* Navigation Arrows Overrides */
.miftah-ne-wrapper .swiper-button-next,
.miftah-ne-wrapper .swiper-button-prev {
    /* Colors and sizes are controlled by Elementor */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    /* Ensure they appear correctly */
    margin-top: -20px;
}

.miftah-ne-wrapper .swiper-button-next:hover,
.miftah-ne-wrapper .swiper-button-prev:hover {
    opacity: 0.8;
}

.miftah-ne-wrapper .swiper-button-next::after,
.miftah-ne-wrapper .swiper-button-prev::after {
    font-weight: bold;
}

/* Pagination Overrides */
.miftah-ne-wrapper .swiper-pagination-bullet {
    transition: all 0.3s ease;
}

/* Responsive specific adjustments */
@media (max-width: 768px) {
    /* Add padding to the swiper container to keep content away from the arrows */
    .miftah-ne-wrapper .swiper {
        padding-left: 50px;
        padding-right: 50px;
    }

    .miftah-ne-wrapper .swiper-button-prev,
    .miftah-ne-wrapper .swiper-button-next {
        display: flex !important; /* Force display on mobile */
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
        width: 36px !important;  /* Responsive arrow size */
        height: 36px !important; /* Responsive arrow size */
    }

    .miftah-ne-wrapper .swiper-button-prev {
        left: 8px !important;
    }

    .miftah-ne-wrapper .swiper-button-next {
        right: 8px !important;
    }

    .miftah-ne-wrapper .swiper-button-prev::after,
    .miftah-ne-wrapper .swiper-button-next::after {
        font-size: 14px !important; /* Slightly smaller icon on mobile */
    }

    /* Make slide title and description adapt beautifully on mobile */
    .miftah-ne-title {
        font-size: 22px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }

    .miftah-ne-desc {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .miftah-ne-icon {
        margin-bottom: 15px !important;
    }
}

/* RTL Specific Overrides for proper arrow positioning */
[dir="rtl"] .miftah-ne-wrapper .swiper-button-prev {
    right: 20px !important;
    left: auto !important;
}

[dir="rtl"] .miftah-ne-wrapper .swiper-button-next {
    left: 20px !important;
    right: auto !important;
}

@media (max-width: 768px) {
    [dir="rtl"] .miftah-ne-wrapper .swiper-button-prev {
        right: 8px !important;
        left: auto !important;
    }

    [dir="rtl"] .miftah-ne-wrapper .swiper-button-next {
        left: 8px !important;
        right: auto !important;
    }
}
