/* style.css - Portfolio Page Glassmorphism Styles */

.portfolio-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(11, 74, 153, 0.12);
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s var(--easing);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.filter-btn:hover {
    background: rgba(11, 74, 153, 0.05);
    border-color: rgba(11, 74, 153, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(11, 74, 153, 0.2);
}

.portfolio-grid-page {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px; /* Increased gap for better premium grid feel */
    transition: all 0.5s ease;
    margin-bottom: 50px;
}

.project-card-wrapper {
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100%;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s var(--easing), transform 0.4s var(--easing), box-shadow 0.4s var(--easing), border-color 0.4s var(--easing);
    position: relative;
}

.project-card-wrapper.hide {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.project-img-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 20px;
    position: relative;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s var(--easing), transform 0.6s var(--easing);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.project-card-wrapper:hover .slide.active {
    transform: scale(1.05);
}

/* Glass styled Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 74, 153, 0.15);
    color: var(--primary);
    display: none; /* Controlled by JS based on slide count */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s var(--easing);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.project-card-wrapper:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 74, 153, 0.4);
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(11, 74, 153, 0.15);
}

.prev-arrow {
    left: 15px;
}

.next-arrow {
    right: 15px;
}

/* Glass styled Dots Indicators */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Controlled by JS based on slide count */
    gap: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: opacity 0.3s var(--easing);
}

.project-card-wrapper:hover .slider-dots {
    opacity: 1;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(11, 74, 153, 0.25);
    cursor: pointer;
    transition: all 0.3s var(--easing);
}

.dot.active {
    background: var(--primary);
    width: 18px;
    border-radius: 4px;
}

.project-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 8px 8px 8px;
}

.project-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Glass styled Live Preview Button */
.live-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 74, 153, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s var(--easing);
    margin-top: auto;
    align-self: flex-start;
}

.live-preview-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(11, 74, 153, 0.25);
    transform: translateY(-2px);
}

.live-preview-btn i {
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .portfolio-grid-page {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .portfolio-filters {
        gap: 10px;
        margin-bottom: 35px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .portfolio-grid-page {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .project-card-wrapper {
        padding: 12px;
    }
    
    .project-img-container {
        margin-bottom: 15px;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
}

/* Featured Badge Style */
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 74, 153, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 74, 153, 0.12);
    padding: 6px 14px;
    border-radius: 30px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 15px;
    align-self: flex-start;
    transition: all 0.3s var(--easing);
}

.featured-badge:hover {
    background: rgba(11, 74, 153, 0.12);
    border-color: rgba(11, 74, 153, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 74, 153, 0.08);
}

.featured-badge i {
    font-size: 0.95rem;
    color: var(--primary);
}

/* شبكة كروت المشاريع */
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 40px; }

/* الكارت الأساسي وتأثيرات الحركة */
.port-card { 
    background: rgba(255, 255, 255, 0.7); 
    border: var(--glass-border); 
    border-radius: 20px; 
    overflow: hidden; 
    transition: all 0.4s ease; /* سرعة الاختفاء */
    cursor: pointer; 
    opacity: 1;
    transform: translateY(0) scale(1);
}

.port-card:hover { transform: translateY(-10px); box-shadow: var(--glass-shadow); }

/* كلاس الاختفاء (الكارت بينزل لتحت ويختفي) */
.port-card.hide {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    pointer-events: none;
}

/* أنيميشن الظهور الجديد (حركة الريفرش) */
@keyframes smoothRefresh {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* كلاس الظهور */
.port-card.show {
    animation: smoothRefresh 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* غلاف الصورة والتأثيرات الزجاجية */
.port-img-wrap { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.port-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--easing); }
.port-card:hover .port-img-wrap img { transform: scale(1.05); }

/* الطبقة اللي بتظهر لما تقف بالماوس */
.port-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 74, 153, 0.4); opacity: 0; transition: all 0.4s var(--easing); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; }
.port-card:hover .port-overlay { opacity: 1; }

/* أيقونة عدد الصور */
.img-count { position: absolute; bottom: 15px; right: 15px; background: rgba(0, 0, 0, 0.5); color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 5px; backdrop-filter: blur(5px); }

/* نصوص الكارت */
.port-info { padding: 25px; text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.5); }
.port-info h3 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 5px; }
.port-info p { font-size: 0.95rem; color: var(--text-secondary); }

.new-project-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    background: var(--primary); 
    color: #fff !important; 
    padding: 14px 30px; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 1.1rem; 
    transition: all 0.3s var(--easing); 
    box-shadow: 0 10px 20px rgba(11, 74, 153, 0.2); 
    border: 2px solid var(--primary);
}

.new-project-btn:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(11, 74, 153, 0.3); 
    background: transparent; 
    color: var(--primary) !important; 
}

.swipe-stack-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.swipe-stack {
    position: relative;
    width: 100%;
    height: 530px;
    perspective: 1000px;
}

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(11, 74, 153, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s var(--easing), opacity 0.4s var(--easing);
    cursor: grab;
    overflow: hidden;
    user-select: none;
    touch-action: none; /* مهم جداً عشان الموبايل ميعملش سكرول وإنت بتسحب */
    display: flex;
    align-items: flex-end;
    background-color: var(--primary); /* لون خلفية مؤقت لو الصورة محملتش */
}

.swipe-card:active {
    cursor: grabbing;
}

/* التدرج اللوني اللي تحت الكلام في الكارت */
.swipe-card .card-overlay {
    width: 100%;
    padding: 25px 20px;
    background: linear-gradient(to top, rgba(10, 17, 40, 0.85), transparent);
    color: #fff;
}

.swipe-card .card-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.swipe-card .card-overlay p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.swipe-hint {
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}


/* ========================================= */
/* MOBILE ADJUSTMENTS (شاشة الموبايل الشاملة)*/
/* ========================================= */
@media (max-width: 900px) {
    
    /* 1. الحاويات الأساسية: مسافة 25 بكسل يمين وشمال */
    .container { width: 100% !important; padding: 0 25px !important; box-sizing: border-box !important; }
    
    /* 2. قسم الهيرو (الصورة فوق والكلام تحت) */
    .hero { padding-top: 150px !important; min-height: auto; overflow: hidden; }
    .hero-split { flex-direction: column-reverse !important; align-items: flex-start; gap: 20px; width: 100% !important; }

    /* 3. النصوص والشارة */
    .hero-text { width: 100%; align-self: flex-start; padding: 0 !important; text-align: left; box-sizing: border-box; }
    .hero-top-badge { margin: 0 0 25px 0 !important; left: 0 !important; transform: none !important; display: inline-flex; }
    .hero-text h1 { font-size: 2.2rem !important; text-align: left; line-height: 1.3; margin-bottom: 20px; word-wrap: break-word; }
    .hero-tagline { text-align: left; margin: 0 0 35px 0 !important; font-size: 1.1rem; line-height: 1.6; }

    /* 4. الأزرار */
    .hero-buttons { flex-direction: column; gap: 15px; width: 100%; margin-bottom: 40px; }
    .cta-btn, .secondary-btn { width: 100%; justify-content: center; text-align: center; padding: 16px; font-size: 1.05rem; box-sizing: border-box; }
    .secondary-btn { border: 1px solid rgba(11, 74, 153, 0.3); border-radius: 50px; }

    /* 5. الإحصائيات */
    .hero-stats { display: flex !important; flex-direction: column !important; gap: 25px !important; width: 100% !important; padding-top: 30px; border-top: 1px solid rgba(11, 74, 153, 0.1); box-sizing: border-box; }
    .stat-item { width: 100%; display: flex; align-items: center; }

    /* 6. الصورة الشخصية */
    .hero-image-wrapper { width: 100%; display: flex; justify-content: center; margin-bottom: 20px; }
    .transparent-img { 
        max-height: 50vh !important; 
        width: auto !important; 
        max-width: 100% !important; 
        margin: 0 auto -1px auto !important; 
        object-fit: contain;
        object-position: bottom center !important; 
    }

    /* 7. البورتفوليو وباقي الأقسام في الموبايل */
    .portfolio-header { padding: 120px 0 40px; }
    .portfolio-header h1 { font-size: 2.5rem !important; }
    .filter-buttons { gap: 10px; margin-bottom: 30px; }
    .filter-btn { padding: 8px 18px; font-size: 0.9rem; }
    .port-grid { grid-template-columns: 1fr; gap: 25px; }

    h2.minimal-title { font-size: 1.8rem !important; margin-bottom: 30px; }
    .section-p { padding: 60px 0 !important; }
    
    .contact-form { padding: 0 !important; }
    .contact-form div { flex-direction: column !important; gap: 15px !important; }
    .contact-form input, .contact-form textarea { width: 100% !important; box-sizing: border-box !important; }
    
    .about-split, .portfolio-grid, .why-us-grid { grid-template-columns: 1fr; gap: 40px; }
    .project-card:nth-child(even) { margin-top: 0; }
    .brands-flex { gap: 20px; }
    .footer-contact { flex-direction: column; align-items: center; gap: 15px; }

    /* 8. إخفاء الماوس والقائمة المنسدلة */
    .cursor-dot, .cursor-outline, .bg-orb { display: none !important; }
    * { cursor: auto !important; }
    .menu-toggle { display: block !important; margin-left: auto; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); flex-direction: column; align-items: center; padding: 30px 0; gap: 25px; box-shadow: 0 15px 30px rgba(11, 74, 153, 0.1); border-bottom: 1px solid rgba(11, 74, 153, 0.1); }
    .nav-links.active { display: flex !important; }
}