@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');

/* ======================================= */
/* 1. סגנונות כלליים ורקע (Quiz Wrapper) */
/* ======================================= */

/* איפוס בסיסי ושימוש בפונט Heebo */
.quiz-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.quiz-wrapper {
    font-family: 'Heebo', sans-serif;
    /* רקע גרדיאנט מונפש */
    background: linear-gradient(-45deg, rgb(227, 218, 204), rgb(227, 190, 123), rgb(22, 21, 43), rgb(227, 218, 204));
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    direction: rtl; /* תמיכה בכיוון מימין לשמאל */
    text-align: right;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* צורות מרחפות ברקע */
.quiz-wrapper .floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.quiz-wrapper .shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: float 6s ease-in-out infinite;
}

.quiz-wrapper .shape:nth-child(1) { top: 10%; left: 20%; width: 80px; height: 80px; animation-delay: 0s; }
.quiz-wrapper .shape:nth-child(2) { top: 70%; left: 80%; width: 120px; height: 120px; animation-delay: 2s; }
.quiz-wrapper .shape:nth-child(3) { top: 40%; left: 10%; width: 60px; height: 60px; animation-delay: 4s; }

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

/* קונטיינר מרכזי של השאלון */
.quiz-wrapper .container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255,255,255,0.95);
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.quiz-wrapper .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, rgb(227, 190, 123), rgb(22, 21, 43), rgb(227, 190, 123));
}

/* כותרת השאלון */
.quiz-wrapper .header {
    background: linear-gradient(135deg, rgb(22, 21, 43) 0%, rgba(22, 21, 43, 0.9) 100%);
    color: rgb(227, 218, 204);
    padding: 40px;
    text-align: center;
    position: relative;
}

/* חץ תחתון בכותרת */
.quiz-wrapper .header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid rgb(22, 21, 43);
}

.quiz-wrapper .header h1 {
    font-size: 2.2em;
    margin: 0 0 10px 0;
    font-weight: 300;
}

.quiz-wrapper .header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* סרגל התקדמות */
.quiz-wrapper .progress {
    height: 8px;
    background: rgba(227, 218, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.quiz-wrapper .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgb(227, 190, 123), rgb(22, 21, 43));
    width: 0%;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

/* אנימציה בפס ההתקדמות */
.quiz-wrapper .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(45deg, rgba(255,255,255,.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.2) 75%, transparent 75%, transparent);
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

.quiz-wrapper .content {
    padding: 50px 40px;
}

/* מסך פתיחה */
.quiz-wrapper .welcome {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-wrapper .welcome h2 {
    color: rgb(22, 21, 43);
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 600;
}

.quiz-wrapper .welcome p {
    color: rgba(22, 21, 43, 0.7);
    font-size: 1.2em;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* סטטיסטיקות במסך הפתיחה */
.quiz-wrapper .stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.quiz-wrapper .stat {
    text-align: center;
}

.quiz-wrapper .stat-number {
    font-size: 2em;
    font-weight: bold;
    color: rgb(227, 190, 123);
    display: block;
}

.quiz-wrapper .stat-text {
    font-size: 0.9em;
    color: rgba(22, 21, 43, 0.7);
    margin-top: 5px;
}

/* כפתור התחלה */
.quiz-wrapper .start-btn {
    background: linear-gradient(135deg, rgb(227, 190, 123) 0%, rgb(22, 21, 43) 100%);
    color: rgb(227, 218, 204);
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(227, 190, 123, 0.4);
    position: relative;
    overflow: hidden;
}

.quiz-wrapper .start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(227, 190, 123, 0.5);
}

/* מכל שאלות */
.quiz-wrapper .question-container {
    display: none;
    animation: slideIn 0.6s ease-out;
    text-align: center;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.quiz-wrapper .question {
    margin-bottom: 40px;
}

.quiz-wrapper .question-number {
    background: linear-gradient(135deg, rgb(227, 190, 123), rgb(22, 21, 43));
    color: rgb(227, 218, 204);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(227, 190, 123, 0.4);
}

.quiz-wrapper .question-text {
    color: rgb(22, 21, 43);
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.4;
}

/* תשובות */
.quiz-wrapper .answers {
    margin: 40px 0;
    text-align: right;
}

.quiz-wrapper .answer {
    background: rgb(227, 218, 204);
    border: 3px solid rgba(227, 190, 123, 0.3);
    border-radius: 20px;
    padding: 20px 25px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    font-size: 1.1em;
    font-weight: 500;
    color: rgb(22, 21, 43);
}

.quiz-wrapper .answer:hover {
    border-color: rgb(227, 190, 123);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(227, 190, 123, 0.3);
}

.quiz-wrapper .answer.selected {
    border-color: rgb(227, 190, 123);
    background: linear-gradient(135deg, rgba(227, 190, 123, 0.2), rgba(227, 218, 204, 0.8));
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(227, 190, 123, 0.4);
}

.quiz-wrapper .answer span {
    position: relative;
    z-index: 2;
}

/* ניווט (קודם/הבא) */
.quiz-wrapper .navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.quiz-wrapper .btn {
    background: linear-gradient(135deg, rgb(227, 190, 123), rgb(22, 21, 43));
    color: rgb(227, 218, 204);
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(227, 190, 123, 0.4);
}

.quiz-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(227, 190, 123, 0.5);
}

.quiz-wrapper .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quiz-wrapper .btn-secondary {
    background: linear-gradient(135deg, rgba(22, 21, 43, 0.7), rgba(22, 21, 43, 0.9));
}

/* תוצאות */
.quiz-wrapper .results {
    display: none;
    text-align: center;
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.quiz-wrapper .result-card {
    background: linear-gradient(135deg, rgba(227, 218, 204, 0.3), rgba(227, 190, 123, 0.1));
    border: 2px solid rgba(227, 190, 123, 0.5);
    border-radius: 25px;
    padding: 40px;
    margin: 30px 0;
}

.quiz-wrapper .result-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.quiz-wrapper .result-title {
    color: rgb(22, 21, 43);
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.quiz-wrapper .result-subtitle {
    /* גרדיאנט על הטקסט */
    background: linear-gradient(135deg, rgb(227, 190, 123), rgb(22, 21, 43));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.3em;
    margin-bottom: 25px;
    font-weight: 600;
}

.quiz-wrapper .result-description {
    color: rgba(22, 21, 43, 0.8);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.quiz-wrapper .recommendation {
    background: rgb(227, 218, 204);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(22, 21, 43, 0.1);
    border-right: 5px solid rgb(227, 190, 123); /* התאמה ל-RTL */
    text-align: right;
}

.quiz-wrapper .recommendation h4 {
    color: rgb(22, 21, 43);
    margin-bottom: 15px;
    font-size: 1.3em;
}

---
/* ======================================= */
/* 2. עיצוב כפתור השליחה המותאם אישית (#customSubmitBtn) ודריסות גלובליות */
/* ======================================= */

/* דריסה חזקה של כללי ברירת מחדל גלובליים על כפתורי השליחה והניווט */
/* זהו התיקון העיקרי למסגרת הוורודה והצבע הלא רצוי */
.quiz-wrapper button, 
.quiz-wrapper input[type="submit"],
.quiz-wrapper input[type="button"] {
    color: inherit !important; 
    border: none !important; /* !!! מבטל את 1px solid #c36 !!! */
    background-color: transparent !important; 
}


.quiz-wrapper .contact {
    /* נבטיח שהבלוק המכיל ממורכז וצבע הרקע נשאר שלם */
    background: linear-gradient(135deg, rgb(22, 21, 43), rgba(22, 21, 43, 0.9));
    color: rgb(227, 218, 204);
    padding: 35px;
    border-radius: 20px;
    margin: 30px 0;
    
    /* *** מרכוז התוכן בתוך הבלוק *** */
    display: flex;
    flex-direction: column;
    align-items: center;  /* מרכז אופקית את כל התוכן */
    text-align: center;  
}

.quiz-wrapper .contact h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: right;  /* נחזיר את הטקסט לימין כדי שיראה טבעי ב-RTL */
    width: 100%;
}

/* הכללים המעוצבים לכפתור המותאם אישית: ממורכז, גדול, בולט */
.quiz-wrapper .restart-btn,
#customSubmitBtn { 
    /* 1. עיצוב גודל וצורה */
    background: linear-gradient(135deg, rgb(227, 190, 123) 0%, rgb(22, 21, 43) 100%) !important; /* גרדיאנט בולט */
    color: rgb(227, 218, 204) !important;
    padding: 22px 65px !important; /* הגדלה משמעותית */
    font-size: 1.5em !important; /* גופן גדול יותר */
    font-weight: 700 !important;
    border-radius: 50px !important;
    
    /* 2. מיקום וצלילה (מרכוז) */
    margin: 30px auto 0 auto !important; /* *** מרכוז אופקי *** */
    width: auto !important; 
    display: inline-block !important; 
    
    /* 3. אפקטים: הסרת מסגרות והבלטה */
    border: none !important; /* *** הסרת מסגרת ברירת מחדל (ודאי שהיא בוטלה) *** */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 15px 35px rgba(227, 190, 123, 0.6); /* צל בולט */
}

#customSubmitBtn:hover {
    transform: translateY(-5px); /* הרמה בולטת יותר */
    box-shadow: 0 20px 45px rgba(227, 190, 123, 0.8);
}


/* התאמה למובייל */
@media (max-width: 768px) {
    .quiz-wrapper .container {
        margin: 10px;
    }
    .quiz-wrapper .content {
        padding: 30px 25px;
    }
    .quiz-wrapper .stats {
        gap: 20px;
    }
    /* התאמת גודל כפתור במובייל */
    #customSubmitBtn,
    .quiz-wrapper .restart-btn {
        padding: 18px 40px !important;
        font-size: 1.3em !important;
    }
}

---
/* ======================================= */
/* 3. תיקונים עבור טופס Gravity Forms (טופס מס' 28) */
/* ======================================= */

/* שינוי שדות הקלט (שימוש ישיר ב-gform_wrapper) */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper .ginput_container_text input,
.gform_wrapper .ginput_container_email input,
.gform_wrapper .ginput_container_phone input {
    /* הגדלת גובה שדות ופינות עגולות */
    padding: 18px 15px !important;
    font-size: 1.1em !important;
    border-radius: 10px !important;
    border: 1px solid rgba(22, 21, 43, 0.2) !important;
    transition: all 0.3s;
}

/* 1. מרכוז כפתור השליחה: מכוון ל-gform_footer */
.gform_wrapper .gform-footer, 
.gform_wrapper .gform_footer {
    text-align: center !important; /* *** מרכוז הכפתור *** */
    padding-top: 25px !important; 
    width: 100% !important;
    margin: 0 auto !important;
    border-top: none !important; 
}

/* 2. ו-3. עיצוב כפתור השליחה הכללי של GF: צבע ושוליים עגולים */
.gform_wrapper .gform-button,
.gform_wrapper input[type="submit"],
.gform_wrapper .gform_footer .gform-button--white {
    
    /* איפוס רקע וצבע רקע (לדריסת גרדיאנטים ומשתני GF) */
    background: none !important; 
    background-color: rgb(32, 32, 51) !important; /* *** צבע רקע רצוי: כהה *** */
    
    color: rgb(227, 218, 204) !important;
    
    /* שוליים עגולים וגודל */
    padding: 18px 45px !important;
    font-size: 1.2em !important;
    font-weight: 600 !important;
    border-radius: 50px !important; /* *** שוליים עגולים *** */
    
    /* ניטרול כללים דורסים */
    border: none !important;
    width: auto !important; /* מונע רוחב 100% ומאפשר מרכוז */
    display: inline-block !important; 
    
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(32, 32, 51, 0.4);
}

.gform_wrapper input[type="submit"]:hover,
.gform_wrapper .gform-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(32, 32, 51, 0.5);
}

/* דריסת כפתור השליחה הספציפי לטופס 28 (למקסימום ודאות) */
#gform_wrapper_28 #gform_submit_button_28 { /* <--- ספציפיות מקסימלית */
    background: none !important; 
    background-color: rgb(32, 32, 51) !important; 
    color: rgb(227, 218, 204) !important;
    border-radius: 50px !important;
    border: none !important;
    width: auto !important; 
    padding: 18px 45px !important;
    display: inline-block !important;
}

/* דריסת ה-Hover הספציפי לטופס 28 */
#gform_wrapper_28 #gform_submit_button_28:hover {
     background-color: rgb(227, 190, 123) !important; /* צבע בהובר */
     color: rgb(22, 21, 43) !important; /* טקסט כהה על רקע בהיר */
}