/* style.css — משותף ל-index.html ו-chat.html. פלטת הצבעים והפונט זהים
   ל-numera-new/public/css/*.css (--primary/--secondary/--success וכו') כדי
   שהעמודים הציבוריים האלה יראו כמו חלק מאותה משפחת מוצר. */

:root {
    --primary: #1A3C5E;
    --secondary: #2980B9;
    --bg: #F5F9FD;
    --surface: #ffffff;
    --text: #333333;
    --text-muted: #6a7a8a;
    --border: #e2eaf2;
    --success: #27ae60;
    --danger: #E74C3C;
    --shadow: 0 2px 12px rgba(26, 60, 94, 0.10);
    --shadow-lg: 0 8px 32px rgba(26, 60, 94, 0.16);
    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 16px;
    direction: rtl;
}

a { color: var(--secondary); }

.wordmark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.wordmark .logo-img {
    height: 34px;
    width: auto;
    display: block;
}

/* דף הנחיתה מציג את הלוגו יותר בולט מ-/chat (בר עליון פונקציונלי, נשאר קומפקטי) */
.topbar .logo-img {
    height: 66px;
}

/* honeypot — מוסתר ויזואלית, נשאר נגיש ל-bot שממלא כל שדה בטופס */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

button:disabled { opacity: 0.6; cursor: default; }

input, textarea {
    font-family: inherit;
    font-size: 16px;
}

/* ── Landing page ─────────────────────────────────────────────────────── */

.topbar {
    padding: 28px 32px;
}

.hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    line-height: 1.3;
    color: var(--primary);
    margin: 0 0 14px;
}

.hero .subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 0 36px;
}

.ask-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ask-box textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    padding: 14px 16px;
    font-size: 17px;
    background: transparent;
    color: var(--text);
    max-height: 140px;
}

.ask-box button {
    background: var(--secondary);
    color: #fff;
    border-radius: 12px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.continue-button {
    display: block;
    max-width: 320px;
    margin: 0 auto;
    background: var(--secondary);
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 700;
}

.ask-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin: 10px 0 0;
}

.link-button {
    display: block;
    margin: 8px auto 0;
    background: none;
    color: var(--secondary);
    font-size: 13px;
    text-decoration: underline;
    padding: 4px;
}

.link-button:hover { color: var(--primary); }

.email-gate {
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    text-align: right;
}

.email-gate p {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 15px;
}

.email-gate form {
    display: flex;
    gap: 8px;
}

.email-gate form[hidden] { display: none; }

.email-gate input[type="email"] {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
}

.email-gate input[type="email"]:focus {
    border-color: var(--secondary);
}

.email-gate button {
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
}

.email-status { margin-top: 10px; font-size: 14px; }
.email-status-error { color: var(--danger); }
.email-status-success { color: var(--success); }

/* מרקיזה: chips-row מכיל את 7 השאלות פעמיים ברצף, ונע ברקע ב-translateX
   ל--50% (=אורך העותק הראשון בדיוק) בלולאה אינסופית חלקה — עוצר ב-hover.
   ה-hover על ה-viewport (לא רק על צ'יפ בודד) כדי שריחוף בין הצ'יפים גם יעצור. */
.chips-viewport {
    overflow: hidden;
    padding: 24px 4px 4px;
}

.chips-row {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: chips-scroll 40s linear infinite;
}

.chips-viewport:hover .chips-row {
    animation-play-state: paused;
}

@keyframes chips-scroll {
    /* RTL: המצב הטבעי (בלי transform) של שורת flex גולשת כבר "גלוש שמאלה" —
       הפוך ממצב LTR הרגיל שגולש ימינה. לכן כאן מתחילים מ-+50% (הזזה ימינה,
       חושפת את ה-copy הראשון בצד ימין) ומסתיימים ב-0 (המצב הטבעי, שהוא-הוא
       בדיוק אותו רינדור של ה-copy השני עקב השכפול — לולאה חלקה). */
    from { transform: translateX(50%); }
    to { transform: translateX(0); }
}

.chip {
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.chip:hover {
    border-color: var(--secondary);
    background: #eef6fc;
}

.section {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.section h2 {
    color: var(--primary);
    font-size: 20px;
    margin: 0 0 10px;
}

.section p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.cta-section {
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    max-width: 640px;
    margin: 0 auto 60px;
    padding: 36px 24px;
    text-align: center;
}

.cta-section p {
    color: #dce8f2;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.cta-button {
    display: inline-block;
    background: var(--success);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
}

.site-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 24px 20px;
}

/* ── Chat page ────────────────────────────────────────────────────────── */

.chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

#chat-error {
    background: #fdecea;
    color: var(--danger);
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    line-height: 1.55;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.msg-user {
    align-self: flex-start;
    background: var(--secondary);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.msg-bot {
    align-self: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-right-radius: 4px;
}

.msg-error {
    align-self: flex-end;
    background: #fdecea;
    color: #c0392b;
}

.msg a { color: var(--secondary); font-weight: 600; }

.msg-thinking {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 16px;
}

.msg-thinking .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b7c1cc;
    animation: thinking-bounce 1.2s infinite ease-in-out;
}

.msg-thinking .dot:nth-child(2) { animation-delay: .2s; }
.msg-thinking .dot:nth-child(3) { animation-delay: .4s; }

@keyframes thinking-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: .5; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-row {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 14px 20px;
}

.chat-input-row form {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.chat-input-row form[hidden] { display: none; }

.chat-input-row textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    resize: none;
    max-height: 120px;
    outline: none;
}

.chat-input-row textarea:focus { border-color: var(--secondary); }

.chat-input-row button {
    background: var(--secondary);
    color: #fff;
    border-radius: 10px;
    padding: 0 22px;
    font-weight: 600;
}

.chat-page .site-footer {
    flex-shrink: 0;
    padding: 6px 20px;
    font-size: 11px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .msg { max-width: 90%; }
}
