/* ============================================================
   RJS CPA - LEAD ULTIMATE CSS (FINAL VERSION)
   Mobile First | High Conversion | Premium Animations
   ============================================================ */

:root {
    /* --- Color Palette --- */
    --blue-deep: #0F2C59;    /* כחול עמוק יוקרתי */
    --blue-trust: #0055ff;   /* כחול אמין (לינקים/פוקוס) */
    --blue-soft: #eef4fc;    /* רקע בהיר לאייקונים */
    
    --orange-cta: #ff6b00;   /* כתום הנעה לפעולה */
    --orange-hover: #e65e00; /* כתום כהה יותר בלחיצה */
    
    --green-badge: #28a745;  /* ירוק לבאדג' */
    --green-glow: #20c997;   /* ירוק זוהר לגרדיאנט */

    --white: #ffffff;
    --gray-text: #5a6b7c;
    --bg-body: #f0f4f8;

    /* --- Messages Colors --- */
    --msg-success-bg: #d1e7dd;
    --msg-success-text: #0f5132;
    --msg-error-bg: #f8d7da;
    --msg-error-text: #842029;
    
    /* --- Typography & Spacing --- */
    --font-main: 'Assistant', sans-serif;
    --font-head: 'Rubik', sans-serif;
    --radius: 16px;
}

/* --- Global Reset --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
    height: 100%;
}

body {
    margin: 0; 
    padding: 0;
    font-family: var(--font-main);
    background: var(--bg-body);
    color: var(--blue-deep);
    direction: rtl;
    min-height: 100vh;      /* מבטיח גובה מלא */
    display: flex;
    flex-direction: column; /* מסדר את הרכיבים אחד מתחת לשני */
    overflow-x: hidden;     /* מונע גלילה לצדדים */
}

/* --- Background Decoration (הרקע הכחול למעלה) --- */
.bg-decoration {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 320px;
    background: linear-gradient(135deg, var(--blue-deep) 0%, #163a6b 100%);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    z-index: -1;
    box-shadow: 0 10px 30px rgba(15, 44, 89, 0.15);
}

/* --- Header --- */
.compact-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky; 
    top: 0; 
    z-index: 100;
}

.container { max-width: 500px; margin: 0 auto; padding: 0 20px; }
.header-row { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 42px; height: auto; }
.brand-info { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--blue-deep); }
.brand-verify { font-size: 0.75rem; color: var(--green-badge); display: flex; align-items: center; gap: 3px; font-weight: 600; }

/* --- עדכון לשפות (שמות מלאים) --- */
.lang-mini { 
    display: flex; 
    gap: 3px; /* הקטנתי רווח כדי שייכנס הכל */
    flex-wrap: wrap; /* מאפשר גלישה אם המסך ממש קטן */
    justify-content: flex-end;
    max-width: 65%; /* משאיר מקום ללוגו */
}

.lang-mini a { 
    text-decoration: none; 
    color: var(--gray-text); 
    font-size: 0.65rem; /* פונט טיפה יותר קטן */
    font-weight: 700; 
    padding: 4px 6px; 
    border-radius: 6px; 
    background: #eef2f6;
    white-space: nowrap; /* מונע שבירת מילה */
    transition: 0.2s;
}

.lang-mini a:hover { 
    background: var(--blue-deep); 
    color: var(--white); 
}

/* התאמה למסכים ממש קטנים (כמו Galaxy Fold) */
@media (max-width: 360px) {
    .lang-mini a { padding: 3px 4px; font-size: 0.6rem; }
}

/* --- Main Content Area --- */
.content-wrapper { 
    flex: 1; /* דוחף את הפוטר למטה */
    padding: 25px 0 140px 0; /* Safe Area ענק למטה למניעת חיתוך במובייל */
    width: 100%;
}

.hero-text { text-align: center; margin-bottom: 25px; }
.hero-text h1 { 
    font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; 
    margin: 0 0 8px; color: var(--white); line-height: 1.2; 
    text-shadow: 0 3px 6px rgba(0,0,0,0.2);
}
.hero-sub { font-size: 1.3rem; font-weight: 700; color: #ffcc00; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* --- Conversion Card (הלב של הדף) --- */
.conversion-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 35px 25px;
    box-shadow: 0 20px 50px rgba(15, 44, 89, 0.2);
    position: relative;
    margin-bottom: 35px;
    border-top: 5px solid var(--orange-cta);
}

/* --- PREMIUM BADGE ANIMATION --- */
.card-ribbon {
    position: absolute;
    top: -16px;
    left: 50%;
    /* Transform מנוהל באנימציה למטה */
    background: linear-gradient(135deg, var(--green-badge), var(--green-glow));
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    white-space: nowrap;
    overflow: hidden; /* הכרחי לאפקט הברק */
    z-index: 2;
}

/* הברק שעובר על הבאדג' */
.card-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
}

/* חיבור האנימציות */
.pulse-animation {
    animation: heartbeat-glow 2.5s infinite ease-in-out;
}
.pulse-animation::after {
    animation: shine-sweep 3s infinite cubic-bezier(0.4, 0.0, 0.2, 1);
    animation-delay: 0.5s;
}

/* הגדרת Keyframes */
@keyframes heartbeat-glow {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4); }
    15% { transform: translateX(-50%) scale(1.1); box-shadow: 0 10px 30px rgba(40, 167, 69, 0.7); } /* דופק ראשון */
    30% { transform: translateX(-50%) scale(1); box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4); }
    45% { transform: translateX(-50%) scale(1.05); box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6); } /* דופק שני קטן */
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4); }
}

@keyframes shine-sweep {
    0% { left: -150%; opacity: 0; }
    20% { opacity: 1; }
    50% { left: 150%; opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

.form-title { 
    text-align: center; font-size: 1.3rem; margin-bottom: 25px; 
    color: var(--blue-deep); font-weight: 800; margin-top: 10px;
}

/* --- Inputs --- */
.input-area { margin-bottom: 20px; }
.input-area label { 
    display: block; margin-bottom: 8px; font-size: 0.95rem; font-weight: 600; color: var(--gray-text); 
}
.phone-input-wrapper { position: relative; }
.phone-input-wrapper input {
    width: 100%; height: 60px; padding: 0 15px 0 45px; 
    border: 2px solid #eef2f6; border-radius: 12px;
    font-size: 1.4rem; color: var(--blue-deep); font-weight: 600; letter-spacing: 1px;
    background: #fcfcfd; transition: 0.3s;
}

/* טיפול בכיווניות שפה לאייקונים */
html[dir="rtl"] .phone-input-wrapper input { padding: 0 50px 0 20px; }
html[dir="ltr"] .phone-input-wrapper input { padding: 0 20px 0 50px; }
html[dir="rtl"] .phone-input-wrapper .icon { right: 20px; left: auto; }
html[dir="ltr"] .phone-input-wrapper .icon { left: 20px; right: auto; }

.phone-input-wrapper input:focus { 
    border-color: var(--blue-trust); background: #fff; outline: none; 
    box-shadow: 0 0 0 4px rgba(0, 85, 255, 0.1);
}
.phone-input-wrapper .icon {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #b0bdcc; font-size: 1.3rem; pointer-events: none; transition: 0.3s;
}
.phone-input-wrapper input:focus + .icon { color: var(--blue-trust); }

/* --- CTA Button --- */
.cta-btn {
    width: 100%; height: 60px;
    background: linear-gradient(135deg, var(--orange-cta), var(--orange-hover));
    color: white; border: none; border-radius: 50px;
    font-size: 1.3rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    cursor: pointer; box-shadow: 0 8px 25px rgba(255, 107, 0, 0.35);
    transition: all 0.2s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 107, 0, 0.45); }
.cta-btn:active { transform: scale(0.97); }

/* --- Inline Message Box (הודעות שגיאה/הצלחה) --- */
.inline-msg-box {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: all 0.4s ease; margin-top: 0;
    border-radius: 12px; text-align: center;
}
.inline-msg-box.show {
    max-height: 100px; opacity: 1; margin-top: 18px; padding: 14px;
}
.inline-msg-box.success { background: var(--msg-success-bg); color: var(--msg-success-text); border: 1px solid #badbcc; }
.inline-msg-box.error { background: var(--msg-error-bg); color: var(--msg-error-text); border: 1px solid #f5c2c7; }

.msg-content { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 0.95rem; }

.disclaimer { font-size: 0.8rem; color: #9aa5b1; text-align: center; margin-top: 15px; }

/* --- Trust Grid (Icons) --- */
.trust-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 15px; 
    margin-bottom: 20px;
    padding: 0 5px;
}

.trust-item { 
    text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.icon-bg {
    width: 48px; height: 48px; background: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--blue-deep); font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.trust-item span { font-size: 0.8rem; font-weight: 700; color: var(--gray-text); line-height: 1.15; }

/* --- Loader Overlay --- */
.inline-loader {
    position: absolute; inset: 0; background: rgba(255,255,255,0.96);
    border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 10; gap: 15px; color: var(--blue-trust); font-weight: 700; font-size: 1.1rem;
}
.spinner-dots {
    width: 45px; height: 45px; border: 4px solid #e3f2fd; 
    border-top-color: var(--blue-trust); border-radius: 50%; 
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-minimal { 
    text-align: center; opacity: 0.6; font-size: 0.8rem; margin-top: 10px;
}

/* --- Desktop Enhancements --- */
@media (min-width: 768px) {
    .container { max-width: 600px; }
    .bg-decoration { height: 380px; }
    .conversion-card { padding: 45px 35px; }
    .hero-text h1 { font-size: 2.8rem; }
    .content-wrapper { padding-bottom: 50px; } /* בדסקטופ פחות קריטי הריווח הענק */
}
/* --- הוסף את זה ל CSS הקיים (בתוך אזור ה-HEADER) --- */

/* הקישור העוטף את הלוגו */
.brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s;
    cursor: pointer;
}
.brand-link:hover {
    opacity: 0.8;
}

/* עיצוב השורה הקטנה החדשה */
.visit-site {
    font-size: 0.75rem;
    color: var(--blue-trust); /* צבע כחול אמין */
    font-weight: 700;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tiny-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

/* אפקט קטן כשעוברים על הלוגו */
.brand-link:hover .tiny-arrow {
    transform: translateX(-3px); /* זז קצת שמאלה בעברית */
}
html[dir="ltr"] .brand-link:hover .tiny-arrow {
    transform: translateX(3px); /* זז קצת ימינה באנגלית */
}