/* =========================================================================
   PPCT Welcome Screen - Style (Finalized)
   ========================================================================= */

/* --- הגדרות ה-Overlay של מסך הפתיחה --- */
#ppct-welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 99999;
    display: flex;
    background: rgba(0, 0, 0, 1);
    font-family: 'atlas', 'Open Sans Hebrew', sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
    --ppct-anim-speed: 0.8s; 
    visibility: visible;
    transition: background var(--ppct-anim-speed) ease, visibility 0s 0s;
}

#ppct-welcome-screen.curtain-open {
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: background var(--ppct-anim-speed) ease, visibility 0s var(--ppct-anim-speed);
}

/* --- טיפוגרפיה וקריאות --- */
#ppct-welcome-screen .content h2 {
    font-weight: 400;
    font-size: 3.4rem;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    order: 1;
}

#ppct-welcome-screen .item-label {
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: 15px;
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #fff !important; /* טקסט לבן לכל הפריטים */
    /* קו מתאר שחור עדין וצל קליל לקריאות מקסימלית על רקע בהיר וכהה */
    text-shadow:
        -1px -1px 0 rgba(0,0,0,0.6),
         1px -1px 0 rgba(0,0,0,0.6),
        -1px  1px 0 rgba(0,0,0,0.6),
         1px  1px 0 rgba(0,0,0,0.6),
         0 2px 4px rgba(0,0,0,0.4) !important;
}

/* הפתרון לקריאות ב-Active: טקסט לבן עם קו מתווה (Outline) שחור */
#ppct-welcome-screen .bubble-item.active .item-label {
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
         0px  2px 10px rgba(0,0,0,0.8) !important;
}

/* --- הגדרות צדדים (וילונות) --- */
#ppct-welcome-screen .side {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transition: transform var(--ppct-anim-speed) cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

#ppct-welcome-screen.curtain-open .side-shop { transform: translateX(100%); }
#ppct-welcome-screen.curtain-open .side-cutting { transform: translateX(-100%); }

#ppct-welcome-screen .side-cutting {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://papercut.co.il/wp-content/uploads/2021/08/hero.png') center/cover;
}

#ppct-welcome-screen .side-shop {
    background: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.3)), url('https://papercut.co.il/wp-content/uploads/2021/08/shop.png') center/cover;
}

/* --- קופסת הלוגו במרכז --- */
#ppct-welcome-screen .center-logo-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100000;
    width: 390px;
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.05);
    pointer-events: none;
    transition: transform var(--ppct-anim-speed) cubic-bezier(0.77, 0, 0.175, 1), opacity calc(var(--ppct-anim-speed) * 0.8) ease-in;
    will-change: transform, opacity;
    text-align: center;
    color: #fff;
}

#ppct-welcome-screen.curtain-open .center-logo-box {
    transform: translate(-50%, -200%);
    opacity: 0;
}

#ppct-welcome-screen .center-logo-box img,
#ppct-welcome-screen .center-logo-box svg { width: 100%; height: auto; display: block; }
#ppct-welcome-screen .center-logo-box h2 { margin: 0; font-size: 2rem; font-weight: 800; }

/* --- פריסה כללית --- */
#ppct-welcome-screen .content {
    text-align: center;
    color: white;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#ppct-welcome-screen .slider-wrapper {
    order: 2;
    position: relative;
    width: 100%;
    max-width: 580px;
    height: 280px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- כפתורים ראשיים --- */
#ppct-welcome-screen .cta-btn, 
#ppct-welcome-screen .upload_toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    margin: 0;
    border-radius: 12px !important;
    padding: 12px 40px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600 !important;
    font-size: 1.1rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease !important;
}

#ppct-welcome-screen .cta-btn:hover, 
#ppct-welcome-screen .upload_toggle:hover { 
    background: #fff !important; 
    color: #000 !important; 
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.35) !important;
}

#ppct-welcome-screen .upload_toggle svg { 
    height: 18px; width: auto; fill: currentColor; margin-right: 10px !important; transition: 0.3s; 
}

/* --- סליידרים וכרטיסיות --- */
#ppct-welcome-screen .slider-mask {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

#ppct-welcome-screen .slider-track,
#ppct-welcome-screen .bubble-item,
#ppct-welcome-screen .bubble {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

#ppct-welcome-screen .slider-track {
    display: flex;
    position: absolute;
    right: 0;
    top: 30px;
    height: auto;
    align-items: flex-start;
    gap: 35px;
    will-change: transform;
}

#ppct-welcome-screen .bubble-item {
    width: 140px !important;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
}

#ppct-welcome-screen .bubble {
    width: 140px !important;
    height: 140px !important;
    border-radius: 32px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    margin: 0 auto;
}

#ppct-welcome-screen .bubble img { 
    width: 100%; height: 100%; object-fit: cover; border-radius: 28px !important; transition: transform 0.6s ease;
}
#ppct-welcome-screen .bubble svg { width: 80% !important; height: 80% !important; }

/* מצב לא פעיל */
#ppct-welcome-screen .bubble-item.inactive { 
    opacity: 0.75 !important; 
    transform: scale(0.85) !important; 
}

/* הפילטר האפור יחול *רק* על העיגול עצמו (התמונה/אייקון), וכך הטקסט יישאר לבן ונקי! */
#ppct-welcome-screen .bubble-item.inactive .bubble {
    filter: grayscale(30%) !important; 
}

/* מצב פעיל במרכז */
#ppct-welcome-screen .bubble-item.active { 
    opacity: 1 !important; 
    transform: scale(1.12) !important; 
    filter: grayscale(0%) !important; 
    z-index: 2;
}

#ppct-welcome-screen .bubble-item.active .bubble {
    border-color: #fff !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255,255,255,0.15) !important;
}

#ppct-welcome-screen .bubble-item.active .bubble img { transform: scale(1.05) !important; }

/* הלבנת הרקע של ה-SVG במדור שירותים */
#ppct-welcome-screen .slider-wrapper[data-type="services"] .bubble { background: rgba(255, 255, 255, 0.9) !important; }
#ppct-welcome-screen .slider-wrapper[data-type="services"] .bubble-item.active .bubble { background: rgba(255, 255, 255, 0.95) !important; }

/* --- אנימציית ציור SVG --- */
#ppct-welcome-screen .bubble-item.active .bubble svg path,
#ppct-welcome-screen .bubble-item.active .bubble svg rect,
#ppct-welcome-screen .bubble-item.active .bubble svg polygon,
#ppct-welcome-screen .bubble-item.active .bubble svg circle,
#ppct-welcome-screen .bubble-item.active .bubble svg polyline,
#ppct-welcome-screen .bubble-item.active .bubble svg line {
    stroke-dasharray: 1;
    animation: ppctDrawSvg 2.5s ease-out forwards;
}

@keyframes ppctDrawSvg {
    0% { stroke-dashoffset: 1; }
    100% { stroke-dashoffset: 0; }
}

/* --- חצי ניווט --- */
#ppct-welcome-screen .nav-arrow {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    font-size: 1.4rem; font-weight: 300;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
#ppct-welcome-screen .nav-arrow:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.1); }
#ppct-welcome-screen .arrow-prev { right: -20px; }
#ppct-welcome-screen .arrow-next { left: -20px; }


/* --- מובייל: לוגו מוגדל + מלל נקי ללא צל --- */
@media (max-width: 768px) {
    #ppct-welcome-screen { flex-direction: column; display: block !important; } 
    
    /* הגדלת הלוגו ל-150px (מ-130px המקוריים) */
    #ppct-welcome-screen .center-logo-box { 
        width: 150px !important; 
        padding: 15px !important; 
        z-index: 100001 !important; 
        margin: 0 !important; 
        transform: translate(-50%, -50%) !important; 
    }

    #ppct-welcome-screen .side { position: absolute !important; left: 0 !important; right: 0 !important; overflow: hidden !important; display: block !important; width: 100% !important; }
    #ppct-welcome-screen .side-shop { top: 0 !important; }
    #ppct-welcome-screen .side-cutting { bottom: 0 !important; }
    #ppct-welcome-screen .content { position: absolute !important; top: 0; left: 0; right: 0; bottom: 0; display: block !important; margin: 0 !important; padding: 0 !important; }

    /* כותרות וכפתורים */
    #ppct-welcome-screen .content h2 { position: absolute !important; font-size: 1.4rem !important; margin: 0 !important; white-space: nowrap !important; line-height: 1 !important; z-index: 10; }
    #ppct-welcome-screen .cta-btn, #ppct-welcome-screen .upload_toggle { position: absolute !important; padding: 6px 14px !important; font-size: 0.85rem !important; margin: 0 !important; white-space: nowrap !important; z-index: 10; }
    #ppct-welcome-screen .side-shop h2 { top: 25px !important; right: 20px !important; }
    #ppct-welcome-screen .side-shop .cta-btn { top: 20px !important; left: 20px !important; }
    #ppct-welcome-screen .side-cutting h2 { bottom: 25px !important; right: 20px !important; }
    #ppct-welcome-screen .side-cutting .upload_toggle { bottom: 20px !important; left: 20px !important; }

    /* סליידר */
    #ppct-welcome-screen .slider-wrapper { position: absolute !important; left: 0 !important; right: 0 !important; width: 100% !important; height: 160px !important; min-height: 160px !important; margin: 0 !important; padding: 0 !important; z-index: 5; }
    #ppct-welcome-screen .slider-mask { position: absolute !important; top:0 !important; bottom:0 !important; left:0 !important; right:0 !important; overflow: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }
    #ppct-welcome-screen .slider-track { position: absolute !important; top: 38px !important; gap: 15px !important; }
    #ppct-welcome-screen .bubble-item { width: 100px !important; }
    #ppct-welcome-screen .bubble { width: 85px !important; height: 85px !important; border-radius: 20px !important; margin: 0 auto !important; }

    /* --- עדכון המלל מתחת לסלייד: לבן נקי ללא צל --- */
/* --- עדכון המלל מתחת לסלייד בנייד: לבן עם צל עדין (שומר על הגודל הקיים) --- */
    #ppct-welcome-screen .item-label { 
        font-size: 0.8rem !important; 
        margin-top: 10px !important; 
        white-space: nowrap !important; 
        color: #fff !important; 
        /* מחזירים את ההצללה העדינה גם לנייד כדי להבטיח קריאות */
        text-shadow:
            -1px -1px 0 rgba(0,0,0,0.6),
             1px -1px 0 rgba(0,0,0,0.6),
            -1px  1px 0 rgba(0,0,0,0.6),
             1px  1px 0 rgba(0,0,0,0.6),
             0 2px 4px rgba(0,0,0,0.4) !important;
    }
    
    
    /* גם עבור הפריט הפעיל נבטל את הצל המורכב */
    #ppct-welcome-screen .bubble-item.active .item-label {
     /*   text-shadow: none !important; */
    }

    /* חיצים */
    #ppct-welcome-screen .nav-arrow { position: absolute !important; top: 80px !important; margin-top: -16px !important; transform: none !important; width: 32px !important; height: 32px !important; background: rgba(0,0,0,0.5) !important; z-index: 100; }
    #ppct-welcome-screen .arrow-prev { right: 2px !important; } 
    #ppct-welcome-screen .arrow-next { left: 2px !important; }
}