/* DEVELOPMENT SECTION STYLES */
.section { position: relative; width: 100vw; height: 100vh; left: 50%; transform: translateX(-50%); background: #000; overflow: hidden; }
.section-title { position: absolute; width: auto; min-height: 100px; bottom: 60px; left: 47px; z-index: 25; text-align: left; }
.section-title-heading { 
    position: relative; 
    font-family: 'Racing Sans One', cursive; 
    font-size: 55px; 
    font-weight: 900; 
    letter-spacing: normal; 
    white-space: nowrap; 
    color: #fff; 
    line-height: 1; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    transition: opacity 0.4s ease, transform 0.4s ease; 
}
.dynamic-profile-btn { position: absolute; bottom: 10px; left: 0; padding: 10px 0; color: #fff; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 0.4s ease; }
.dynamic-profile-btn span { position: relative; }
.dynamic-profile-btn::after { content: ''; position: absolute; width: 100%; height: 2px; background: #fff; bottom: 0; left: 0; transform: scaleX(0); transform-origin: right; transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
.dynamic-profile-btn:hover::after { transform: scaleX(1); transform-origin: left; }
.projects-carousel-wrapper:hover ~ .section-title .section-title-heading, .section-title:hover .section-title-heading { opacity: 0; transform: translateY(10px); }
.projects-carousel-wrapper:hover ~ .section-title .dynamic-profile-btn, .section-title:hover .dynamic-profile-btn { opacity: 1; transform: translateY(0); pointer-events: all; }
.projects-carousel-wrapper { position: relative; width: 100%; height: 100%; margin: 0; padding: 0; }
.project-carousel-item { position: relative; width: 100%; height: 100vh; overflow: hidden; background: #111; }
.project-carousel-item .owl-lazy { width: 100%; height: 100vh; object-fit: cover; transition: opacity 0.5s ease; }
.project-carousel-item::before { 
    content: ""; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.35); 
    z-index: 1; 
}
.description { position: absolute; top: 30px; left: 0; width: 100%; padding: 40px; opacity: 1; transform: translateY(0); transition: all 0.5s ease-out; pointer-events: all; text-align: center; z-index: 10; background: transparent; }
.description h4 { font-family: 'Poppins', sans-serif; font-size: 18px; text-transform: uppercase; font-weight: 700; color: #fff; margin-bottom: 5px; line-height: 1.5; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); }
.description span { color: #fff; font-size: 14px; font-weight: 600; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); }
.link-wrap { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: block; background: transparent; opacity: 1; transition: all 0.3s ease-out; z-index: 5; cursor: pointer; }
.link-wrap span { position: absolute; width: 50px; height: 50px; top: 50%; left: 50%; margin: -25px 0 0 -25px; transition: all .3s; border-radius: 50%; background-color: #ff264a; }
.link-wrap span:nth-of-type(2) { transform: scale(0); background: #fff; }
.link-wrap:hover span:nth-of-type(2) { transform: scale(1); transition: all .3s .1s; }
.link-wrap::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; z-index: 1; }
.link-wrap:hover::before { border-color: transparent transparent transparent #111; }

.owl-progress-bar { width: 100%; height: 2px; background-color: rgba(255, 255, 255, 0.2); position: absolute; bottom: 0; left: 0; z-index: 30; pointer-events: none; }
.owl-progress-bar .bar { height: 100%; background-color: #fff; width: 0; }
@keyframes progressBar { from { width: 0; } to { width: 100%; } }

.animated { animation-duration: 0.8s; animation-fill-mode: both; }
@keyframes fadeOutUp { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; visibility: hidden; transform: translateY(-50%) scale(0.95); } }
.fadeOutUp { animation-name: fadeOutUp; }
@keyframes fadeInUp { from { opacity: 0; visibility: visible; transform: translateY(50%) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fadeInUp { animation-name: fadeInUp; }

/* Styling for MANUALLY Created Thumbnails */
.custom-thumbnails {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 25;
}
.custom-thumb-item {
    width: 100px;
    height: 60px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.custom-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transform: scale(1.1);
    transition: all 0.3s ease;
}
.custom-thumb-item.active img,
.custom-thumb-item:hover img {
    opacity: 1;
    transform: scale(1);
}
.custom-thumb-item.active {
    border-color: #fff;
}


/* =================================================== */
/* ====== MOBILE RESPONSSIVENESS (Max Width 767px) === */
/* =================================================== */
@media (max-width: 767px) {

    /* --- التعديل المطلوب: جعل القسم يملأ الشاشة --- */
    .section {
        /* للمتصفحات القديمة كخيار احتياطي */
        height: 100vh;
        /* الحل الحديث الذي يضمن أن القسم يملأ الشاشة بالضبط في الموبايل */
        height: 100dvh;
    }
    
    /* 1. تنسيق العنوان والوصف (الأعلى) */
    .description {
        top: 110px;
        left: 0;
        width: 100%;
        padding: 0 15px; 
        box-sizing: border-box; 
    }
    .description h4 {
        font-size: 15px; 
        margin-bottom: 2px;
    }
    .description span {
        font-size: 12px;
    }

    /* 2. تنسيق العنوان الرئيسي للقسم (في الأسفل) */
    .section-title {
        left: 15px; 
        bottom: 140px;
        min-height: auto; 
    }
    .section-title-heading {
        font-size: 38px; 
        line-height: 1.1;
        white-space: normal; 
    }

    /* 3. زر تحميل البروفايل (الذي يظهر عند التمرير) */
    .dynamic-profile-btn {
        font-size: 12px; 
        bottom: 0;
        padding: 5px 0;
    }

    /* 4. الـ Thumbnails (الصور المصغرة) */
    .custom-thumbnails {
        z-index: 50;
        bottom: 40px; 
        padding: 0 15px; 
        box-sizing: border-box;
        gap: 8px;
        left: 0;
        transform: none; 
        width: 100%;
        overflow-x: scroll; 
        -webkit-overflow-scrolling: touch; 
        justify-content: flex-start;
    }
    .custom-thumb-item {
        width: 70px; 
        height: 45px;
        flex-shrink: 0; 
    }
    
    /* 5. تنسيق أيقونة "Link Wrap" (زر التشغيل في المنتصف) */
    .link-wrap span {
        width: 40px; 
        height: 40px;
        margin: -20px 0 0 -20px; 
    }

    /* 6. تم الإضافة: تصميم أسهم التنقل (يمين ويسار) */
    .custom-nav-btn {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 38px;
        height: 38px;
        background-color: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        cursor: pointer;
        z-index: 20;
        transition: background-color 0.3s ease;
    }
    .custom-nav-btn:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }
    .custom-nav-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-top: 2px solid #fff;
        border-right: 2px solid #fff;
    }
    .prev-slide {
        left: 20px;
    }
    .prev-slide::after {
        transform: translate(-40%, -50%) rotate(-135deg);
    }
    .next-slide {
        right: 20px;
    }
    .next-slide::after {
        transform: translate(-60%, -50%) rotate(45deg);
    }
}

/* =================================================== */
/* ====== SMALL MOBILE (Max Width 480px) ============= */
/* =================================================== */
@media (max-width: 480px) {
    
    /* 1. العنوان والوصف (الأعلى) */
    .description {
        top: 100px;
        padding: 0 10px;
    }
    .description h4 { font-size: 13px; }
    .description span { font-size: 11px; }
    
    /* 2. العنوان الرئيسي للقسم (في الأسفل) */
    .section-title {
        left: 10px; 
        bottom: 120px;
    }
    .section-title-heading { font-size: 28px; }
    
    /* 3. زر تحميل البروفايل */
    .dynamic-profile-btn {
        font-size: 10px; 
        bottom: 5px;
    }
    
    /* 4. الـ Thumbnails */
    .custom-thumbnails {
        bottom: 30px;
        padding: 0 10px; 
    }
    .custom-thumb-item {
        width: 55px; 
        height: 35px;
    }

    /* 5. تعديل حجم وموقع الأسهم للشاشات الأصغر */
    .custom-nav-btn {
        width: 34px;
        height: 34px;
    }
    .prev-slide { left: 15px; }
    .next-slide { right: 15px; }
}