/* ============================================================
   Beita portal — shared shell (Wave 8A).
   Reusable DesktopNav + DesktopFooter for every public surface.
   ============================================================ */

/* ── DesktopNav ────────────────────────────────────────────── */
.bn-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
}
.bn-topbar-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bn-brand-block {
  display: flex;
  align-items: center;
  gap: 28px;
}
.bn-brand {
  font-family: var(--font-display, system-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--gray-900);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.bn-brand-dot { color: var(--blue-600); }
.bn-nav {
  display: flex;
  gap: 2px;
  align-items: center;
}
.bn-nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-family: inherit;
  white-space: nowrap;
}
.bn-nav-link:hover { background: var(--gray-50); color: var(--gray-900); }
.bn-nav-link.active {
  background: var(--gray-50);
  color: var(--gray-900);
  font-weight: 700;
}
.bn-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.bn-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  font-family: inherit;
  text-decoration: none;
}
.bn-account-pill:hover { background: var(--gray-50); }
.bn-cta {
  padding: 9px 20px;
  background: var(--blue-600);
  color: var(--white);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  white-space: nowrap;
}
.bn-cta:hover { background: var(--blue-700); }

/* Mobile menu */
.bn-mobile-toggle { display: none; }
@media (max-width: 768px) {
  .bn-topbar-inner { padding: 0 16px; }
  .bn-brand-block { gap: 12px; }
  .bn-nav { display: none; }
  .bn-account-pill { display: none; }
  .bn-cta { display: none; }
  .bn-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: var(--gray-700);
    cursor: pointer;
  }
}
.bn-mobile-drawer {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--white);
  z-index: 9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.bn-mobile-drawer a {
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.bn-mobile-drawer a:hover { background: var(--gray-50); }
.bn-mobile-drawer a.cta {
  background: var(--blue-600);
  color: var(--white);
  margin-top: 12px;
  text-align: center;
}

/* ── DesktopFooter ─────────────────────────────────────────── */
.bn-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  margin-top: 80px;
  padding: 48px 32px 32px;
}
.bn-footer-inner {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 1024px) {
  .bn-footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .bn-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .bn-footer { padding: 32px 20px 24px; margin-top: 40px; }
  .bn-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .bn-footer-brand { grid-column: 1 / -1; }
}
.bn-footer-brand p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 320px;
}
.bn-footer-col-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.bn-footer-col a {
  font-size: 13px;
  color: var(--gray-500);
  padding: 5px 0;
  text-decoration: none;
  display: block;
  cursor: pointer;
}
.bn-footer-col a:hover { color: var(--gray-700); }
.bn-footer-baseline {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 12px;
}
.bn-footer-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bn-footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Page shell utility ───────────────────────────────────── */
.bn-page {
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px;
}
@media (max-width: 768px) {
  .bn-page { padding: 24px 16px; }
}

/* ── Sidebar layout (account, recurring page) ─────────────── */
.bn-with-sidebar {
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .bn-with-sidebar { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
}
.bn-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bn-sidebar-link {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: start;
}
.bn-sidebar-link:hover { background: var(--gray-50); color: var(--gray-900); }
.bn-sidebar-link.active {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
}
@media (max-width: 900px) {
  .bn-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 4px;
  }
  .bn-sidebar-link { white-space: nowrap; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
  .bn-sidebar-link.active { background: transparent; color: var(--gray-900); border-bottom: 2px solid var(--gray-900); border-radius: 0; }
}

/* ── A11y utilities ─────────────────────────────────────────────── */

/* Visible-on-focus skip link. Pages opt in by including:
   <a class="bn-skip" href="#main">דלג לתוכן</a> as first <body> child
   and giving their main wrapper id="main". */
.bn-skip {
  position: absolute;
  top: -40px;
  inset-inline-start: 12px;
  background: var(--blue-700, #1d4ed8);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  z-index: 1000;
  transition: top 120ms ease;
}
.bn-skip:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

/* Project-wide consistent focus ring on interactive elements. The default
   browser outline is intentionally KEPT for keyboard users; we just
   harmonize the offset + radius so it doesn't clip pill buttons. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Screen-reader-only — content for AT, hidden visually. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
