/* 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); }


/* ====================================== */
/* VR Button Styles - زر الـ VR الجديد */
/* ====================================== */
.vr-link-wrap {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease-out;
    z-index: 5;
    cursor: pointer;
    text-decoration: none;
}

.vr-link-wrap .vr-icon {
    font-size: 70px;
    color: #00D9FF;
    animation: vrPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.8));
    transition: all 0.3s ease;
    z-index: 6;
}

.vr-link-wrap:hover .vr-icon {
    transform: scale(1.15);
    color: #00F5FF;
    filter: drop-shadow(0 0 25px rgba(0, 245, 255, 1));
}

/* Animation للـ VR Icon */
@keyframes vrPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.08); 
        opacity: 0.85;
    }
}

/* إخفاء الـ spans في زر الـ VR */
.vr-link-wrap span {
    display: none;
}

/* Badge صغير لكتابة "VR" أو "360°" */
.vr-link-wrap::after {
    content: "360°";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 80px);
    background: rgba(0, 217, 255, 0.2);
    border: 2px solid #00D9FF;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #00F5FF;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
    letter-spacing: 2px;
    opacity: 0;
    transition: all 0.3s ease;
}

.vr-link-wrap:hover::after {
    opacity: 1;
    transform: translate(-50%, 90px);
}


/* ====================================== */
/* Video Button Styles - زر الفيديو العادي */
/* ====================================== */
.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; 
    }
    
    /* 5B. تنسيق زر الـ VR على الموبايل */
    .vr-link-wrap .vr-icon {
        font-size: 50px;
    }
    
    .vr-link-wrap::after {
        font-size: 11px;
        padding: 5px 12px;
        transform: translate(-50%, 60px);
    }
    
    .vr-link-wrap:hover::after {
        transform: translate(-50%, 65px);
    }

    /* 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;
    }
    
    /* 4B. تنسيق زر الـ VR على الشاشات الصغيرة جداً */
    .vr-link-wrap .vr-icon {
        font-size: 45px;
    }
    
    .vr-link-wrap::after {
        font-size: 10px;
        padding: 4px 10px;
    }

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

/* ====================================== */
/* VR Button Professional Design */
/* ====================================== */
.vr-link-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease-out;
    z-index: 5;
    cursor: pointer;
    text-decoration: none;
}

.vr-button-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* الحلقات النابضة */
.vr-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #00D9FF;
    border-radius: 50%;
    animation: vrPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    opacity: 0;
}

.vr-pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.vr-pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes vrPulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* الزر الداخلي */
.vr-button-inner {
    position: relative;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #00D9FF 0%, #0099CC 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 30px rgba(0, 217, 255, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1;
}

.vr-link-wrap:hover .vr-button-inner {
    transform: scale(1.1);
    box-shadow: 
        0 0 50px rgba(0, 217, 255, 0.8),
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3);
}

/* أيقونة VR */
.vr-link-wrap .vr-icon {
    font-size: 45px;
    color: #fff;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    animation: vrIconFloat 3s ease-in-out infinite;
}

@keyframes vrIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.vr-link-wrap:hover .vr-icon {
    transform: scale(1.1) translateY(-2px);
}

/* Label تحت الزر */
.vr-label {
    margin-top: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #00F5FF;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.vr-link-wrap:hover .vr-label {
    opacity: 1;
    transform: translateY(0);
}

/* تأثير Glow عند الـ Hover */
.vr-button-inner::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00F5FF, #0099CC);
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.vr-link-wrap:hover .vr-button-inner::before {
    opacity: 0.8;
}

/* إخفاء الـ spans القديمة */
.vr-link-wrap span:not(.vr-label) {
    display: none;
}


/* =================================================== */
/* ====== MOBILE RESPONSSIVENESS ==================== */
/* =================================================== */
@media (max-width: 767px) {
    .vr-button-container {
        width: 90px;
        height: 90px;
    }
    
    .vr-button-inner {
        width: 70px;
        height: 70px;
    }
    
    .vr-link-wrap .vr-icon {
        font-size: 35px;
    }
    
    .vr-label {
        font-size: 11px;
        margin-top: 15px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .vr-button-container {
        width: 75px;
        height: 75px;
    }
    
    .vr-button-inner {
        width: 60px;
        height: 60px;
    }
    
    .vr-link-wrap .vr-icon {
        font-size: 28px;
    }
    
    .vr-label {
        font-size: 10px;
        margin-top: 12px;
    }
}

/* ====================================== */
/* Gallery Button Design */
/* ====================================== */
.gallery-link-wrap {
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease-out;
    z-index: 5;
    cursor: pointer;
    text-decoration: none;
}

.vr-link-wrap {
    left: 65% !important; /* نقلنا زر الـ VR لليمين */
}

.gallery-button-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #FF6B35;
    border-radius: 50%;
    animation: galleryPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    opacity: 0;
}

.gallery-pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

@keyframes galleryPulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.gallery-button-inner {
    position: relative;
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 30px rgba(255, 107, 53, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1;
}

.gallery-link-wrap:hover .gallery-button-inner {
    transform: scale(1.1);
    box-shadow: 
        0 0 50px rgba(255, 107, 53, 0.8),
        0 15px 40px rgba(0, 0, 0, 0.4);
}

.gallery-icon {
    font-size: 35px;
    color: #fff;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.gallery-link-wrap:hover .gallery-icon {
    transform: scale(1.1);
}

.gallery-label {
    margin-top: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #FF6B35;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-link-wrap:hover .gallery-label {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================== */
/* Gallery Modal Styles */
/* ====================================== */
.gallery-modal-content {
    animation: modalZoom 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-grid {
    scrollbar-width: thin;
    scrollbar-color: #FF6B35 rgba(255, 255, 255, 0.1);
}

.gallery-grid::-webkit-scrollbar {
    width: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 4px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: #FF6B35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Image Viewer */
.nav-arrow {
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 767px) {
    .gallery-link-wrap,
    .vr-link-wrap {
        left: 50% !important;
        top: 45% !important;
    }
    
    .vr-link-wrap {
        top: 55% !important;
    }
    
    .gallery-button-container {
        width: 75px;
        height: 75px;
    }
    
    .gallery-button-inner {
        width: 60px;
        height: 60px;
    }
    
    .gallery-icon {
        font-size: 28px;
    }
    
    .gallery-label {
        font-size: 10px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-height: calc(100vh - 180px);
    }
}
