/* ============================================================
   RENTAL SECTION — Final CSS
   Layout: Text Left (Aligned with Logo) | Image Right
============================================================ */

/* 1) SECTION BASE */
#rental-section {
    position: relative;
    width: 100vw;
}

#rental-section .rental-section.section {
    position: relative;
    width: 100vw;
    height: 100vh;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 2) BACKGROUND */
#rental-section .rental-bg-layer {
    position: absolute;
    inset: 0;
    background-image: var(--rental-bg);
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 0;
}

#rental-section .rental-bg-overlay {
    position: absolute;
    inset: 0;
    /* السر هنا: تم تفتيح اللون الأسود بشكل كبير لتظهر الصورة بألوانها الطبيعية */
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.40) 0%,    /* كانت 0.80 */
        rgba(0, 0, 0, 0.15) 50%,   /* كانت 0.60 */
        rgba(0, 0, 0, 0.35) 100%   /* كانت 0.75 */
    );
    z-index: 1;
    pointer-events: none;
}

/* 3) SECTION TITLE (تمت المحاذاة مع اللوجو والنص) */
#rental-section .section-title.rental-title {
    position: absolute !important;
    bottom: 60px !important;
    left: 6vw !important; /* 6vw تعادل مسافة اللوجو تقريباً */
    z-index: 25;
    min-height: auto;
}

#rental-section .section-title-heading {
    font-family: 'Racing Sans One', cursive !important;
    font-size: 55px !important;
    font-weight: 900 !important;
    color: #fff !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

#rental-section .projects-carousel-wrapper:hover ~ .section-title .section-title-heading,
#rental-section .section-title:hover .section-title-heading {
    opacity: 1 !important;
    transform: none !important;
}

/* 4) CAROUSEL WRAPPER */
#rental-section .rental-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#rental-section #rental-carousel {
    width: 100%;
}

/* 5) CAROUSEL ITEM — دفع العناصر للأطراف */
#rental-section .rental-carousel-item {
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; /* بدأنا من اليسار */
    overflow: visible !important;
    background: transparent;
    padding: 0 6vw; /* محاذاة يمين ويسار متناسقة مع اللوجو */
    gap: 0;
}

#rental-section .rental-carousel-item::before {
    display: none !important;
}

/* 6) يسار: النص (السر هنا في margin-right: auto) */
#rental-section .rental-item-content {
    flex: 1 1 0;
    min-width: 0;
    max-width: 450px; /* كبرنا المساحة للنص شوية عشان يرتاح */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 0;
    margin-right: auto !important; /* هذا السطر يطرد الصورة أقصى اليمين */
}

#rental-section .rental-item-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#rental-section .rental-item-tag::before {
    content: '';
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

#rental-section .rental-item-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 36px !important; /* كبرنا العنوان شوية ليتناسب مع المساحة */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #fff !important;
    line-height: 1.15 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
    margin: 0 0 18px !important;
}

#rental-section .rental-item-divider {
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    margin-bottom: 18px;
}

#rental-section .rental-item-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85); /* فتحنا لون النص ده كمان عشان يبقى أوضح */
    line-height: 1.7;
    margin: 0;
    max-width: 350px;
}

/* 7) الأسهم (تم تقليل المارجن لأن المسافة أصبحت تلقائية) */
#rental-section .rental-carousel-item > .custom-nav-btn {
    margin: 0 15px !important; /* مسافة قريبة وأنيقة من الصورة */

    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.3s ease !important;
}

#rental-section .rental-carousel-item > .custom-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(1.1) !important;
}

#rental-section .rental-carousel-item > .custom-nav-btn::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 9px !important;
    height: 9px !important;
    border-top: 2px solid #fff !important;
    border-right: 2px solid #fff !important;
}

#rental-section .rental-carousel-item > .rental-prev::after {
    transform: translate(-25%, -50%) rotate(-135deg) !important;
}

#rental-section .rental-carousel-item > .rental-next::after {
    transform: translate(-75%, -50%) rotate(45deg) !important;
}

/* 8) يمين: الصورة */
#rental-section .rental-item-image {
    position: relative;
    flex: 0 0 40%;      
    max-width: 500px;   
    height: 48vh;       
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55), /* خففنا ظل الصورة كمان عشان يتماشى مع التفتيح */
        0 0 0 1px rgba(255, 255, 255, 0.07);
    border-radius: 4px;
}

#rental-section .rental-item-image img.owl-lazy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
}

#rental-section .rental-carousel-item:hover .rental-item-image img.owl-lazy {
    transform: scale(1.04);
}

#rental-section .rental-item-image::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255,255,255,0.5) 30%,
        rgba(255,255,255,0.5) 70%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

#rental-section .rental-item-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.35));
    z-index: 2;
    pointer-events: none;
}

/* 9) PROGRESS BAR */
#rental-section .owl-progress-bar {
    height: 2px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    bottom: 0 !important;
    z-index: 30;
}

#rental-section .owl-progress-bar .bar {
    background-color: #fff !important;
    border-radius: 0 !important;
    height: 100% !important;
}

/* 10) إخفاء عناصر قديمة */
#rental-section .description         { display: none !important; }
#rental-section .vr-link-wrap        { display: none !important; }
#rental-section .link-wrap           { display: none !important; }
#rental-section .gallery-link-wrap   { display: none !important; }
#rental-section .custom-thumbnails   { display: none !important; }
#rental-section .dynamic-profile-btn { display: none !important; }

/* 11) Tablet */
@media (max-width: 1024px) {
    #rental-section .rental-item-image {
        flex: 0 0 45%;
        max-width: 400px;
        height: 40vh;
    }

    #rental-section .rental-item-content {
        max-width: 350px;
    }

    #rental-section .rental-carousel-item > .custom-nav-btn {
        margin: 0 10px !important; 
    }

    #rental-section .rental-item-title {
        font-size: 26px !important;
    }

    #rental-section .section-title-heading {
        font-size: 42px !important;
    }
}

/* 12) Mobile */
@media (max-width: 767px) {
    #rental-section .rental-carousel-item {
        flex-direction: column !important;
        padding: 100px 24px 80px !important;
        gap: 20px !important;
        justify-content: center !important;
    }

    #rental-section .rental-item-content {
        margin-right: 0 !important; /* إلغاء خاصية الدفع في الموبايل ليرجع في النص */
        max-width: 100% !important;
        padding-right: 0 !important;
        text-align: center;
        align-items: center;
    }

    #rental-section .rental-carousel-item > .custom-nav-btn {
        display: none !important;
    }

    #rental-section .rental-item-tag {
        justify-content: center;
    }

    #rental-section .rental-item-image {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 45vw !important;
        min-height: 200px;
    }

    #rental-section .rental-item-divider {
        margin: 0 auto 18px !important;
    }

    #rental-section .section-title-heading {
        font-size: 28px !important;
        white-space: normal !important;
    }

    #rental-section .section-title.rental-title {
        bottom: 20px !important;
        left: 15px !important;
    }
}

@media (max-width: 480px) {
    #rental-section .rental-carousel-item {
        padding: 90px 16px 70px !important;
    }

    #rental-section .rental-item-title {
        font-size: 17px !important;
    }
}

/* إخفاء النصوص ووضعها لأسفل قليلاً في السلايدات غير النشطة */
#rental-section .owl-item .rental-item-content {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* بمجرد أن يصبح السلايد نشطاً، تظهر النصوص بنعومة */
#rental-section .owl-item.active .rental-item-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s; /* تأخير بسيط حتى ينتهي السلايدر من الحركة */
}