/* =========================================
   Swiper Cinematic Custom Styles
   ========================================= */

/* الحاوية الأساسية - محمي من البوتستراب */
.swiper.mySwiper {
    width: 100% !important;
    height: 600px !important;
}

.swiper-slide {
    position: relative !important;
    overflow: hidden;
    display: block !important; 
}

/* حركة الصورة الخلفية الثابتة (Zoom in) */
.slide-bg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.5;
    transform: scale(1);
    transition: transform 7s ease-out, opacity 1.5s ease;
    position: absolute !important; /* إجبار الصورة تكون خلفية */
    top: 0;
    left: 0;
    z-index: 1;
}

.swiper-slide-active .slide-bg {
    transform: scale(1.15);
    opacity: 0.9;
}

/* حاوية النصوص - تم تعديلها لتكون بالمنتصف تماماً */
.slide-content {
    position: absolute !important; 
    top: 50% !important; /* توسيط عمودي */
    transform: translateY(-50%) !important; /* ضبط التوسيط الدقيق */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    z-index: 10;
    perspective: 1000px;
    width: 100%;
    padding: 0 5%;
}

/* دعم الاتجاهين (يمين ويسار) ديناميكياً */
html[dir="rtl"] .slide-content { right: 0; text-align: right; }
html[dir="ltr"] .slide-content { left: 0; text-align: left; }

/* تأثيرات دخول النصوص بالـ CSS */
.anim-layer { 
    opacity: 0; 
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* حركات مخصصة عشان الدخول يكون سينمائي ومنطقي حسب اللغة */
html[dir="rtl"] .anim-layer { transform: translate3d(80px, 0, -150px) rotateY(-25deg); }
html[dir="ltr"] .anim-layer { transform: translate3d(-80px, 0, -150px) rotateY(25deg); }

.swiper-slide-active .anim-layer { 
    opacity: 1; 
    transform: translate3d(0, 0, 0) rotateY(0deg) !important; 
}

/* ترتيب تأخير الدخول */
.swiper-slide-active .anim-layer:nth-child(1) { transition-delay: 0.3s; }
.swiper-slide-active .anim-layer:nth-child(2) { transition-delay: 0.5s; }
.swiper-slide-active .anim-layer:nth-child(3) { transition-delay: 0.7s; }
.swiper-slide-active .anim-layer:nth-child(4) { transition-delay: 0.9s; }

/* تنسيق النصوص */
.text-layer { 
    background-color: rgba(255, 255, 255, 0.95); 
    color: #003760; 
    padding: 10px 25px; 
    border-radius: 12px; 
    margin: 0; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.4); 
    backdrop-filter: blur(10px); 
    width: fit-content;
}

html[dir="rtl"] .title-small { font-size: 22px; font-weight: 400; border-right: 4px solid #ffcc00; border-left: none; }
html[dir="ltr"] .title-small { font-size: 22px; font-weight: 400; border-left: 4px solid #ffcc00; border-right: none; }

.title-large { font-size: 40px; font-weight: 700; }

/* =========================================
   تصميم الزر الجديد (مستوحى من السلايدر القديم)
   ========================================= */
.btn-custom { 
    background-color: #ffcc00; 
    color: #003760; 
    padding: 15px 35px; 
    border-radius: 30px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 18px; 
    margin-top: 15px; 
    box-shadow: 0 10px 20px rgba(255, 204, 0, 0.3); 
    display: inline-block;
    
    /* الخصائص المسؤولة عن احتواء الإفكت */
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all .6s ease 0s;
    border: none;
}

/* الدائرة المخفية اللي بتعطي تأثير التعبئة (Liquid Fill) */
.btn-custom::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    bottom: 110%; /* تبدأ مخفية بالأعلى */
    left: 50%;
    background-color: #ffffff; /* اللون اللي بيعبي الزر */
    transform: translateX(-50%);
    border-radius: 50%;
    z-index: -1;
    transition: bottom 800ms ease;
}

.btn-custom:hover { 
    color: #003760;
    transform: scale(1.05); /* لمسة فخامة إضافية */
}

/* حركة التعبئة عند وضع الماوس (Hover) */
.btn-custom:hover::after {
    bottom: -40%; /* تنزل الدائرة لتغطي كامل الزر */
}

/* أزرار التنقل السفلية */
.swiper-button-next, .swiper-button-prev { color: #ffcc00 !important; transition: transform 0.3s; }
.swiper-pagination-bullet-active { background: #ffcc00 !important; }