/* איה — מדריכת האתר של יעד מדיה */
.mascot-btn {
  position: absolute;
  inset-inline-start: -34px;
  bottom: -26px;
  width: 132px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}
.mascot-btn .mascot { position: static; display: block; width: 100%; height: auto; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 12px 14px rgba(47,47,122,.18)); }

.mascot-btn:focus-visible { outline: 3px solid #8b6cf0; outline-offset: 6px; border-radius: 18px; }
.mascot-btn .pulse {
  position: absolute; inset-block-start: 6px; inset-inline-start: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.55);
  animation: guidePulse 2.4s infinite;
}
@keyframes guidePulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* כפתור צף */
.guide-fab {
  position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 990;
  display: none; align-items: center; gap: 8px;
  background: #8b6cf0; color: #fff; border: 0; border-radius: 999px;
  padding: 11px 16px; font: 700 14px/1 inherit; cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(139,108,240,.65);
}
.guide-fab:hover { background: #7a58e8; }

/* פאנל */
.guide {
  position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 995;
  width: 372px; max-width: calc(100vw - 32px);
  max-height: min(600px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(47,47,122,.12);
  box-shadow: 0 30px 70px -20px rgba(25,25,55,.45);
  opacity: 0; transform: translateY(18px) scale(.97); pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  direction: rtl;
}
.guide.is-open { opacity: 1; transform: none; pointer-events: auto; }
.guide-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  background: linear-gradient(135deg, #8b6cf0, #6d4ee0); color: #fff;
}
.guide-head .ava {
  width: 38px; height: 38px; border-radius: 50%; background: #fff4d6;
  display: grid; place-items: center; font-size: 20px; flex: none;
}
.guide-head b { display: block; font-size: 15px; }
.guide-head span { display: block; font-size: 11.5px; opacity: .85; }
.guide-head .st { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: .9; }
.guide-head .st i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.guide-x { margin-inline-start: 8px; background: rgba(255,255,255,.16); border: 0; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.guide-x:hover { background: rgba(255,255,255,.3); }

.guide-body { padding: 14px; overflow-y: auto; flex: 1; background: #fbfaff; scroll-behavior: smooth; }
.msg { display: flex; gap: 8px; margin-block-end: 10px; align-items: flex-end; }
.msg .bub {
  max-width: 84%; padding: 10px 13px; border-radius: 16px 16px 16px 6px;
  background: #fff; border: 1px solid rgba(47,47,122,.1); font-size: 14px; line-height: 1.55;
  color: #23233f; box-shadow: 0 4px 12px -8px rgba(25,25,55,.3);
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bub { background: #8b6cf0; color: #fff; border-color: transparent; border-radius: 16px 16px 6px 16px; }
.msg .bub a { color: #6d4ee0; font-weight: 700; text-decoration: underline; }
.msg.me .bub a { color: #fff; }
.bub ul { margin: 6px 0 0; padding-inline-start: 18px; }
.bub li { margin-block-end: 4px; }
.bub .mini-cta {
  display: inline-block; margin-block-start: 9px; background: #8b6cf0; color: #fff;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none;
}
.bub .mini-cta:hover { background: #6d4ee0; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b7a8ee; animation: tdots 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdots { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: #fbfaff; }
.guide-chips button {
  border: 1px solid rgba(139,108,240,.35); background: #fff; color: #4b3aa8;
  border-radius: 999px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.guide-chips button:hover { background: #f1ecff; }

.guide-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-block-start: 1px solid rgba(47,47,122,.08); background: #fff; }
.guide-form input {
  flex: 1; border: 1px solid rgba(47,47,122,.16); border-radius: 999px;
  padding: 11px 15px; font-size: 14px; font-family: inherit; outline: none; background: #fbfaff;
}
.guide-form input:focus { border-color: #8b6cf0; background: #fff; }
.guide-form button { border: 0; background: #8b6cf0; color: #fff; border-radius: 999px; padding: 0 18px; font: 700 14px inherit; cursor: pointer; }
.guide-form button:hover { background: #6d4ee0; }

/* משוב לבוחן הקטן */
.quiz-opts button.is-ok { background: #e7f8ee; border-color: #22c55e; color: #12804a; }
.quiz-opts button.is-bad { background: #fdecec; border-color: #ef4444; color: #b91c1c; }
.quiz-feedback { margin-block-start: 14px; padding: 13px 15px; border-radius: 14px; background: #f7f4ff; border: 1px solid rgba(139,108,240,.25); }
.quiz-feedback .fb-title { font-weight: 800; margin-block-end: 6px; }
.quiz-feedback .fb-solution { font-size: 14px; line-height: 1.7; color: #3a3a55; direction: ltr; text-align: right; }
.quiz-feedback .retry { margin-block-start: 10px; border: 0; background: #8b6cf0; color: #fff; border-radius: 999px; padding: 8px 14px; font: 700 13px inherit; cursor: pointer; }

@media (max-width: 560px) {
  .guide { inset-inline: 12px; inset-block-end: 12px; width: auto; max-height: 82vh; }
  .mascot-btn { width: 104px; bottom: -18px; inset-inline-start: -8px; }
  .guide-fab { display: flex; }
}


/* ---------- תיקונים: כפתור התפריט במובייל וקישור הכניסה ---------- */
.nav a[href="/tirgul/"] {
  background: #d8f7ec; color: #083c2e; font-weight: 800; border-radius: 999px; padding: 8px 14px;
}
.nav a[href="/tirgul/"]:hover { background: #25c095; color: #062b21; }

@media (max-width: 820px) {
  .nav { display: flex; }
  .nav:not(.open) { visibility: hidden; pointer-events: none; }
  .nav.open { visibility: visible; pointer-events: auto; }
  .nav a[href="/tirgul/"] { padding: 14px 12px; border-radius: 12px; }
}

.guide-voice {
  display: inline-block; margin-top: 10px; background: #fff; border: 1px solid var(--line);
  color: var(--navy); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .8rem;
  font-weight: 700; cursor: pointer;
}
.guide-voice:hover { border-color: var(--violet); color: var(--violet); }
