/* css/project.css */

/* --- Branding Section --- */
.branding-section { 
    background: var(--bg-secondary); /* متغير */
    padding: 60px 20px; text-align: center; 
    border-bottom: 1px solid var(--border-color); 
}

.project-logo-img { 
    max-width: 180px; height: auto; margin-bottom: 25px; 
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05)); 
    transition: transform 0.3s;
}
.project-logo-img:hover { transform: scale(1.05); }

.branding-section h1 { 
    font-size: 2.5rem; font-weight: 900; color: var(--text-primary); margin-bottom: 10px;
}
.branding-section p { 
    color: var(--brand-orange); font-weight: 900; font-size: 1.2rem;
}

/* --- Project Body & Description --- */
.project-body { 
    max-width: 1200px; margin: 50px auto; padding: 0 20px; 
}

.description-box { 
    max-width: 900px; margin: 0 auto 60px; padding: 40px; 
    border-right: 6px solid var(--brand-orange); 
    background: var(--bg-card); /* متغير */
    box-shadow: 0 4px 15px var(--shadow-color); 
    border-radius: 12px; 
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.description-box p { 
    color: var(--text-secondary); font-size: 1.1rem; line-height: 1.8; 
}

/* --- Gallery Grid --- */
.gallery-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; 
}

.gallery-item { 
    border-radius: 15px; overflow: hidden; 
    background: var(--bg-secondary); cursor: pointer; 
    aspect-ratio: 1/1; /* مربع */
    position: relative; box-shadow: 0 5px 15px var(--shadow-color);
}

.gallery-item img { 
    width: 100%; height: 100%; object-fit: cover; 
    opacity: 0; transition: all 0.6s ease; 
}
.gallery-item img.loaded { opacity: 1; }
.gallery-item:hover img { transform: scale(1.08); }

/* --- Slider (Viewer) --- */
#talalViewer { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.98); 
    z-index: 10000; display: none; justify-content: center; align-items: center; 
    backdrop-filter: blur(5px); 
}
#viewerImg { 
    max-width: 90%; max-height: 85vh; border-radius: 8px; 
    object-fit: contain; box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.nav-arrow { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    width: 60px; height: 60px; background: var(--brand-orange); 
    color: #fff; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; cursor: pointer; 
    font-size: 24px; border: 2px solid #fff; z-index: 10006; transition: 0.3s;
}
.nav-arrow:hover { background: #fff; color: var(--brand-orange); }
.prev-arr { right: 30px; } 
.next-arr { left: 30px; }

.close-viewer { 
    position: absolute; top: 30px; right: 40px; color: #fff; 
    font-size: 50px; cursor: pointer; z-index: 10007; transition: 0.3s;
}
.close-viewer:hover { color: var(--brand-orange); transform: rotate(90deg); }

#imgCounter {
    position: absolute; bottom: 30px; color: #fff; 
    font-weight: 900; font-size: 1.2rem; background: rgba(255,255,255,0.1);
    padding: 5px 20px; border-radius: 50px;
}

/* --- Floating WhatsApp Button (Specific to Page) --- */
@keyframes pulse-btn { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.03); } }
@keyframes shake-icon { 0%, 100% { transform: rotate(0deg); } 20%, 60% { transform: rotate(-15deg); } 40%, 80% { transform: rotate(15deg); } }

.btn-wa-floating {
    display: none; position: fixed; bottom: 25px; left: 50%; 
    width: 85%; max-width: 350px; transform: translateX(-50%); 
    text-align: center; padding: 16px; font-size: 1.1rem; font-weight: 900;
    background-color: var(--brand-orange); color: white !important; 
    border-radius: 50px; text-decoration: none; z-index: 9995; 
    animation: pulse-btn 2s infinite; box-shadow: 0 10px 25px rgba(245, 124, 0, 0.4);
    align-items: center; justify-content: center; gap: 12px;
}
.btn-wa-floating i { animation: shake-icon 0.6s infinite ease-in-out; font-size: 24px; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .btn-wa-floating { display: flex; } /* إظهار الزر العائم في الموبايل */
    .branding-section h1 { font-size: 2rem; }
}
@media (max-width: 768px) {
    .nav-arrow { width: 45px; height: 45px; font-size: 18px; }
    .prev-arr { right: 10px; } .next-arr { left: 10px; }
    .branding-section { padding: 40px 20px; }
    .description-box { padding: 25px; }
}