/* ==========================================================================
   QJob Ultimate Modern UI Overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. משתני עיצוב מודרניים (Design Tokens)
   -------------------------------------------------------------------------- */
.modern-ui {
    --bg-color: #f4f7fb;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary-color: #1b8af3;
    --primary-gradient: linear-gradient(135deg, #1b8af3 0%, #0056b3 100%);
    --accent-color: #ffc107;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --border-radius-lg: 24px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --focus-ring: 0 0 0 4px rgba(27, 138, 243, 0.2);
}

/* --------------------------------------------------------------------------
   2. הגדרות בסיס ודריסת העיצוב הישן
   -------------------------------------------------------------------------- */
body.modern-ui {
    background-color: var(--bg-color) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: var(--text-main) !important;
    overflow-x: hidden;
}

/* ביטול גבולות ישנים וצבעים מתנגשים */
.modern-ui .theme-style-1, .modern-ui a {
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* --------------------------------------------------------------------------
   3. אזור הבאנר וטופס החיפוש המרכזי (התיקון הגדול)
   -------------------------------------------------------------------------- */
.modern-ui .banner-outer {
    margin-bottom: 40px !important;
}

.modern-ui #banner.element {
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg) !important;
    box-shadow: var(--shadow-soft) !important;
    position: relative;
}

/* שכבת הכהיה על תמונת הרקע כדי שהטקסט יבלוט */
.modern-ui #banner.element::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
    z-index: 1;
}

.modern-ui .caption {
    z-index: 2 !important; /* מעל שכבת ההכהיה */
}

/* -- עיצוב הזכוכית המרחפת (Glassmorphism) -- */
.modern-ui .modern-search-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: var(--glass-border) !important;
    box-shadow: var(--shadow-glass) !important;
    border-radius: var(--border-radius-lg) !important;
    padding: 35px !important;
    margin: 0 auto !important;
    max-width: 1100px !important;
    transform: translateY(20px);
}

/* -- סידור הגריד של שדות החיפוש -- */
.modern-ui .modern-search-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
}

/* שורת הסלקטים (רשת גריד) */
.modern-ui .modern-search-grid .selectors-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
}

/* --------------------------------------------------------------------------
   4. שדות טקסט ובחירה (Inputs & Selects)
   -------------------------------------------------------------------------- */
.modern-ui .form-control,
.modern-ui .selector select,
.modern-ui input[type="text"] {
    width: 100% !important;
    height: 56px !important; /* שדות גבוהים ונוחים למגע */
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--border-radius-md) !important;
    padding: 0 20px !important;
    font-size: 16px !important;
    color: var(--text-main) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.3s ease !important;
    margin: 0 !important; /* ביטול שוליים מהעיצוב הישן */
}

/* עיצוב החץ של ה-Select */
.modern-ui .selector {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    border: none !important;
}

.modern-ui .selector select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 15px center !important; /* מותאם לעברית RTL */
    background-size: 20px !important;
    padding-left: 45px !important;
}

.modern-ui .form-control:focus,
.modern-ui .selector select:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: var(--focus-ring) !important;
    background-color: #ffffff !important;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. כפתורי "וואו" מרכזיים
   -------------------------------------------------------------------------- */
.modern-ui .btn-search-wow {
    width: 100% !important;
    height: 56px !important;
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: 0 8px 20px rgba(27, 138, 243, 0.3) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

/* אפקט מילוי שקוף בריחוף */
.modern-ui .btn-search-wow::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.modern-ui .btn-search-wow:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(27, 138, 243, 0.4) !important;
}

.modern-ui .btn-search-wow:hover::after {
    left: 200%;
}

/* --------------------------------------------------------------------------
   6. כרטיסיות המשרות (Job Cards) מתחת לחיפוש
   -------------------------------------------------------------------------- */
.modern-ui #content-area .box {
    background: var(--card-bg) !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: var(--border-radius-lg) !important;
    padding: 25px !important;
    margin-bottom: 25px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
}

.modern-ui #content-area .box:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: #cbd5e1 !important;
}

/* קו מודגש דק למעלה לכרטיסייה מרחפת */
.modern-ui #content-area .box::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0; height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-ui #content-area .box:hover::before {
    opacity: 1;
}

.modern-ui #content-area .box h3 a {
    color: var(--text-main) !important;
    font-weight: 700 !important;
    font-size: 20px !important;
}

.modern-ui #content-area .box h3 a:hover {
    color: var(--primary-color) !important;
}

.modern-ui #content-area .box .thumb img {
    border-radius: var(--border-radius-md) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
    border: 1px solid #f1f5f9;
}

/* --------------------------------------------------------------------------
   7. כפתורי צד מעוצבים (וואטסאפ, טלפון, ספאם)
   -------------------------------------------------------------------------- */
.modern-ui .btn-style-1.style-big,
.modern-ui button.btn-style-1.style-big {
    border-radius: var(--border-radius-md) !important;
    width: 60px !important;
    height: 60px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* ביטול אפקט הצהוב המכוער של התבנית הישנה */
.modern-ui .btn-style-1.style-big::before {
    display: none !important;
}

.modern-ui .btn-style-1.style-big:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 25px rgba(0,0,0,0.15) !important;
}

.modern-ui .btn-style-1.style-big img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   8. אנימציות כניסה חלקה
   -------------------------------------------------------------------------- */
@keyframes fadeInUpWow {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modern-ui .wow-enter {
    animation: fadeInUpWow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.modern-ui .delay-1 { animation-delay: 0.1s; }
.modern-ui .delay-2 { animation-delay: 0.25s; }
.modern-ui .delay-3 { animation-delay: 0.4s; }

/* --------------------------------------------------------------------------
   9. התאמה מושלמת למובייל (Responsive Design)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .modern-ui .modern-search-card {
        padding: 20px !important;
        border-radius: var(--border-radius-md) !important;
    }
    
    .modern-ui .modern-search-grid .selectors-row {
        grid-template-columns: 1fr !important; /* סלקט אחד בכל שורה בנייד */
    }
    
    .modern-ui .btn-search-wow {
        font-size: 16px !important;
        height: 50px !important;
    }
    
    .modern-ui #banner.element {
        height: 250px !important;
    }
    
    .modern-ui .caption h3 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }
	/* רק הבאנר שיש לו גם את הקלאס mobile-top ישתנה כאן */
    .modern-ui #banner.element.mobile-top {
        background-image: url(../images/Empty1.png) !important;
    }

    /* רק הבאנר שיש לו גם את הקלאס mobile-bottom ישתנה כאן */
    .modern-ui #banner.element.mobile-bottom {
        background-image: url(../images/Empty2.png) !important;
    }
}

/* ==========================================================================
   10. תיקון מושלם לרקעים ולבאנרים (התאמה אוטומטית של התמונה)
   ========================================================================== */

/* הופכים את המעטפת החיצונית לכלי קיבול חכם */
.modern-ui .banner-outer {
    position: relative !important;
    padding: 50px 0 50px 0 !important; /* מרווח אוויר מעל ומתחת לטופס */
    margin-bottom: 40px !important;
  /*  overflow: hidden !important; */ /* חותך שאריות תמונה אם יש */
    border-radius: 0 0 30px 30px !important; /* עיגול נקי של הפינות התחתונות */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* הבאנר השני (חיפוש מועמדים) יקבל עיגול גם למעלה כדי להפריד אותו יפה */
.modern-ui .banner-outer + .banner-outer {
    border-radius: 30px !important; 
   /* margin-top: 20px !important; */
 /*   max-width: 98%; */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* התמונה עצמה הופכת לשכבת רקע דינמית שתופסת 100% מהאזור */
.modern-ui #banner.element {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important; /* הופך לדינמי לפי גובה הטופס! */
    z-index: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* עצירת ה"ריחוף" של הטופס כך שהוא ידחוף את הרקע למטה ככל שהוא יגדל */
.modern-ui .caption {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 2 !important; /* מבטיח שהטופס יושב מעל תמונת הרקע */
}


/* ==========================================================================
   הגדרות מיכל (Container) - מובייל מול מחשב
   ========================================================================== */

/* הגדרה ברירת מחדל למובייל - 100% רוחב */
.modern-ui .container {
    width: 100% !important;
    padding-left: 15px !important; /* ריווח קל כדי שהתוכן לא ייגע בקצוות המסך */
    padding-right: 15px !important;
    margin: 0 auto !important; /* מירכוז האזור התוכן */
    box-sizing: border-box !important;
}

/* הגדרה למסכי מחשב (מעל 768 פיקסלים) - 50% רוחב היה 992 */
@media (min-width: 768px) {
    .modern-ui .container {
        width: 100% !important;
    }
}


/* ==========================================================================
   הגדרות עיצוב לטופס החיפוש בבאנר - התאמה למובייל ולמחשב
   ========================================================================== */

/* הגדרת ברירת מחדל (מובייל) - 100% רוחב */
.banner-outer .caption .holder form {
    float: none;
    width: 100% !important; /* שינינו ל-100% עבור מובייל */
    background: rgba(255, 255, 255, 0.15);
    -moz-background: rgba(255, 255, 255, 0.15);
    -webkit-background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 10px 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

/* מסכים גדולים יותר (טאבלטים ומחשבים - מעל 768 פיקסלים) - 50% רוחב */
@media (min-width: 768px) {
    .banner-outer .caption .holder form {
        width: 70% !important;
    }
}

/* ==========================================================================
   QJob Ultimate Job Cards (The Box) - 2026 Edition (Elegant Layout)
   ========================================================================== */

/* 1. רקע האתר - כחול עדין לשבירת הלבן ה"אנמי" */
body.modern-ui {
    background-color: #f0f4f9 !important; 
}

/* עיצוב הקופסה המרכזית */
.modern-ui #content-area .box.modern-job-box {
    display: block !important; 
    background: #ffffff !important;
    /* הוספתי גוון לבן עמוק שנותן קצת עניין ויוקרה */
    background-image: linear-gradient(135deg, #ffffff 0%, #fcfdfe 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 24px !important;
    
    /* רוחב 80% ומירכוז אוטומטי למסכי מחשב */
    width: 80% !important; 
    margin: 0 auto 24px auto !important; 
	float: right !important;
    
    /* צל כפול - נותן תחושת עומק וריחוף מעל הרקע הכחול */
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: visible !important; 
}

/* אפקט ריחוף (Hover) פרימיום לכרטיסייה - יותר מעניין ואינטראקטיבי */
.modern-ui #content-area .box.modern-job-box:hover {
    transform: translateY(-6px) !important;
    /* צל שהופך לכחלחל עדין בריחוף */
    box-shadow: 0 20px 40px rgba(27, 138, 243, 0.08), 0 4px 12px rgba(27, 138, 243, 0.04) !important;
    border-color: #bae6fd !important;
}

/* סידור התמונה משמאל והטקסט מימין בצורה מושלמת (מבטל את הרווח הסתמי) */
.modern-ui #content-area .box.modern-job-box .hold {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 24px !important;
    width: 100% !important;
}

.modern-ui #content-area .box.modern-job-box .text-col {
    order: 1 !important; /* הטקסט ראשון (צד ימין ב-RTL) */
    flex-grow: 1 !important;
    width: auto !important;
    overflow: visible !important;
}

.modern-ui #content-area .box.modern-job-box .thumb {
    order: 2 !important; /* התמונה שנייה (צד שמאל ב-RTL) */
    flex-shrink: 0 !important;
    float: none !important; /* מבטל את ה-float הישן שעשה בעיות */
    margin: 0 !important;
    transition: transform 0.3s ease !important;
}

/* הקפצה קטנה ללוגו בריחוף */
.modern-ui #content-area .box.modern-job-box:hover .thumb {
    transform: scale(1.03) !important;
}

/* קו מודגש בצד ימין (RTL) במקום למעלה - נותן תחושה של סטטוס יוקרתי */
.modern-ui #content-area .box.modern-job-box::before {
    content: '' !important;
    position: absolute !important;
    top: 20px; bottom: 20px; right: -2px;
    width: 4px !important;
    height: auto !important;
    background: var(--primary-gradient) !important;
    border-radius: 10px !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
}

.modern-ui #content-area .box.modern-job-box:hover::before {
    opacity: 1 !important;
    right: 0px !important;
}

/* אפקט אנימציה יוקרתי לכותרת המשרה */
.modern-ui #content-area .box.modern-job-box h3 a {
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 100% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s ease, color .3s ease !important;
}

.modern-ui #content-area .box.modern-job-box h3 a:hover {
    color: var(--primary-color) !important;
    background-size: 100% 2px;
}

/* עיצוב ואנימציות ריחוף לכפתורים בתחתית המשרה (Footer Actions) */
.modern-ui .job-actions-footer {
    clear: both !important; 
    margin-top: 15px !important;
}

.modern-ui .job-actions-footer .btn-style-1 {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.modern-ui .job-actions-footer .btn-style-1:hover {
    transform: translateY(-5px) scale(1.08) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12) !important;
}

.modern-ui .job-actions-footer .btn-style-1 img {
    transition: transform 0.3s ease !important;
}

.modern-ui .job-actions-footer .btn-style-1:hover img {
    transform: scale(1.15) !important;
}


/* ==========================================
   התאמות רספונסיביות - טאבלט ומובייל
   ========================================== */

/* שליטה נפרדת לטאבלט (מסכים עד 992 פיקסלים) */
@media (max-width: 992px) {
    .modern-ui #content-area .box.modern-job-box {
        width: 100% !important; /* מחזיר ל-100% רוחב כדי לנצל את המסך בטאבלט */
    }
}

/* התאמות נוספות למובייל (מסכים עד 768 פיקסלים) */
@media (max-width: 768px) {
    .modern-ui #content-area .box.modern-job-box {
        width: 100% !important;
        padding: 20px !important;
    }
    
    /* במובייל נשבור את השורה ונשים את התמונה מעל הטקסט באמצע */
    .modern-ui #content-area .box.modern-job-box .hold {
        flex-direction: column !important;
        align-items: center !important;
        text-align: right !important;
    }
    
    .modern-ui #content-area .box.modern-job-box .thumb {
        order: 1 !important; /* תמונה ראשונה במובייל */
        margin-bottom: 15px !important;
    }
    
    .modern-ui #content-area .box.modern-job-box .text-col {
        order: 2 !important; /* טקסט מתחת לתמונה */
    }
    
    .modern-ui #content-area .box.modern-job-box::before {
        top: -2px; left: 20px; right: 20px; bottom: auto;
        height: 4px !important; width: auto !important;
    }
    
    .modern-ui .job-actions-footer {
        justify-content: center !important;
    }
}