/* =========================================================
   Navbar צף בסגנון קפסולת זכוכית (Glassmorphism)
   שלושה אלמנטים תמיד בשורה אחת: לוגו (שמאל) · "נדבר?" (מרכז אמיתי) · המבורגר (ימין).
   משתמש רק בצבעים, בפונט ובאפקטים שכבר קיימים באתר.
   ========================================================= */

:root {
  --nav-top: 12px;
  --nav-h: 58px;
  --nav-side: clamp(12px, 2.4vw, 40px);
  --nav-w: min(700px, calc(100vw - 2 * var(--nav-side)));
}
@media (max-width: 1023px) { :root { --nav-top: 10px; --nav-h: 56px; } }
@media (max-width: 899px)  { :root { --nav-top: 8px; --nav-h: 52px; --nav-side: 12px; } }
@media (max-width: 359px)  { :root { --nav-h: 48px; --nav-side: 10px; } }
@media (max-height: 520px) and (orientation: landscape) { :root { --nav-top: 6px; --nav-h: 44px; } }

/* ---------- הקפסולה הצפה ---------- */
.top {
  position: fixed; top: var(--nav-top); bottom: auto; left: 50%; right: auto; width: var(--nav-w); height: var(--nav-h);
  transform: translateX(-50%); z-index: 50;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; direction: ltr;
  padding: 0 clamp(14px, 1.8vw, 20px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(42, 25, 16, 0.50), rgba(19, 11, 7, 0.36));
  /* מסגרת כמעט שקופה, כמו השתקפות על זכוכית */
  border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(20px) saturate(1.45); backdrop-filter: blur(20px) saturate(1.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.36),
    0 2px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: background 0.45s, box-shadow 0.45s, border-color 0.45s, backdrop-filter 0.45s, -webkit-backdrop-filter 0.45s;
}
/* בגלילה: כהה וטשטוש חזקים מעט יותר, לקריאות מעל התוכן */
.top.is-solid {
  background: linear-gradient(135deg, rgba(36, 21, 13, 0.72), rgba(19, 11, 7, 0.60));
  -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.48),
    0 2px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
}
/* השתקפות עדינה על שפת הזכוכית (לבן בלבד, בלי כתום) */
.top::before {
  all: unset; content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04) 36%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, 0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.top::after { all: unset; content: none; }
.top > * { position: relative; z-index: 1; }

/* הניווט הרגיל נמצא בתוך תפריט ההמבורגר */
.top .nav { display: none; }

/* ---------- לוגו (שמאל) ---------- */
.top .logo { grid-column: 1; grid-row: 1; order: 0; justify-self: start; display: flex; align-items: center; }
.top .logo img { height: clamp(26px, calc(var(--nav-h) - 26px), 36px); width: auto; }

/* ---------- "נדבר?" (מרכז אמיתי של הקפסולה): כתום מלא ---------- */
.top .top-cta {
  grid-column: 2; grid-row: 1; order: 0; justify-self: center; direction: rtl;
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  height: clamp(38px, calc(var(--nav-h) - 14px), 46px); min-width: 120px; padding: 0 34px; border-radius: 999px; border: 0;
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem); font-weight: 800; letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
  color: #fff; text-shadow: 0 1px 6px rgba(120, 40, 10, 0.35);
  background: linear-gradient(120deg, var(--orange), var(--orange-2));
  box-shadow: 0 8px 24px rgba(255, 90, 31, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: box-shadow 0.35s, transform 0.35s var(--ease), filter 0.35s;
}
.top .top-cta span { display: block; white-space: nowrap; }
.top .top-cta:hover {
  color: #fff; transform: translateY(-1px); filter: brightness(1.07);
  background: linear-gradient(120deg, var(--orange), var(--orange-2));
  box-shadow: 0 12px 34px rgba(255, 90, 31, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
.top .top-cta:active { transform: translateY(0) scale(0.98); }

/* ---------- המבורגר (ימין) ---------- */
.top .menu-btn {
  display: grid; grid-column: 3; grid-row: 1; order: 0; justify-self: end; align-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 11px; border-radius: 50%;
  border: 0; transition: background 0.3s;
}
.top .menu-btn i { height: 2px; width: 100%; border-radius: 2px; background: var(--ink); }
.top .menu-btn i:nth-child(2) { width: 62%; margin-left: auto; margin-inline-start: auto; background: var(--orange-2); }
.top .menu-btn:hover { background: rgba(255, 255, 255, 0.08); }
.top .menu-btn:hover i:nth-child(2) { width: 100%; }
.menu-open .menu-btn i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- התפריט נפתח מתחת להמבורגר, בקצה הימני של הקפסולה ---------- */
.menu {
  left: auto; right: calc((100vw - var(--nav-w)) / 2); top: calc(var(--nav-top) + var(--nav-h) + 10px);
  max-height: calc(100svh - var(--nav-top) - var(--nav-h) - 24px); border-radius: 26px; transform-origin: top right;
}

/* ---------- מסכים צרים: אותם שלושה אלמנטים, בקטן ---------- */
@media (max-width: 430px) {
  .top { padding: 0 12px; gap: 6px; }
  .top .top-cta { min-width: 104px; padding: 0 26px; font-size: 1.05rem; }
  .top .menu-btn { width: 40px; height: 40px; padding: 0 10px; }
}
@media (max-width: 359px) {
  .top { padding: 0 9px; gap: 4px; }
  .top .top-cta { min-width: 92px; padding: 0 20px; font-size: 1rem; }
  .top .menu-btn { width: 38px; height: 38px; padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) { .top .top-cta:hover { transform: none; } }
