/* ================================================================
   NT Digital — Hamburger Menu + Side Panel + Lead Form Modal
   assets/nt-hamb.css
================================================================ */

/* Hide the float badge when hamburger is present */
body:has(#nt-hamb-btn) #nt-float {
  display: none !important;
}

/* ── Hamburger Button ── */
#nt-hamb-btn {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 99985;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

#nt-hamb-btn:hover {
  background: rgba(30, 30, 42, 0.95);
  transform: scale(1.06);
}

#nt-hamb-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

#nt-hamb-btn .nt-hb-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.26s ease, opacity 0.2s ease;
}

/* Animate to X when open */
#nt-hamb-btn[aria-expanded="true"] .nt-hb-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#nt-hamb-btn[aria-expanded="true"] .nt-hb-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#nt-hamb-btn[aria-expanded="true"] .nt-hb-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Backdrop ── */
#nt-hamb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99986;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#nt-hamb-backdrop.nt-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Side Panel ── */
#nt-hamb-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 99987;
  width: min(340px, 88vw);
  background: #17171b;
  color: #f0f0f4;
  display: flex;
  flex-direction: column;
  direction: rtl;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0.3s;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: system-ui, "Heebo", "Segoe UI", sans-serif;
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.45);
}

#nt-hamb-panel.nt-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Panel Header ── */
.nt-hamb-header {
  display: block;
  padding: 52px 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
  position: relative;
  background: transparent;
}

.nt-hamb-header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Visible top-bar strip that contains the X button */
.nt-hamb-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.nt-hamb-logo-circle {
  width: 130px;
  height: auto;
  border-radius: 10px;
  background: transparent;
  display: block;
  object-fit: contain;
  margin: 0 auto 14px;
  overflow: visible;
  box-shadow: none;
  border: none;
}

/* validation error message */
.nt-field-err {
  display: block;
  color: #ef4444;
  font-size: 0.78rem;
  margin-top: 4px;
  text-align: right;
  direction: rtl;
}

.nt-hamb-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f0f4;
  margin-bottom: 3px;
}

.nt-hamb-subtitle {
  font-size: 0.8rem;
  color: rgba(240, 240, 244, 0.5);
}

/* When menu is open: hide floating ☰ — only the in-panel X closes */
#nt-hamb-btn[aria-expanded="true"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
}

/* X — fixed to physical left edge of viewport (RTL panel slides from right) */
.nt-hamb-close-btn {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px));
  left: max(10px, env(safe-area-inset-left, 0px));
  z-index: 99988;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  clip: auto;
  overflow: visible;
  white-space: normal;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nt-hamb-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.nt-hamb-close-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* ── Panel List ── */
.nt-hamb-list {
  list-style: none;
  padding: 10px 0;
  margin: 0;
  flex: 1;
}

.nt-hamb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  font-size: 0.94rem;
  font-weight: 500;
  color: #e8e8f0;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
  font-family: inherit;
  text-align: right;
}

.nt-hamb-item:hover,
.nt-hamb-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  outline: none;
}

.nt-hamb-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(240, 240, 244, 0.8);
}

.nt-hamb-item-text {
  flex: 1;
}

.nt-hamb-item-chevron {
  margin-right: auto;
  margin-left: 0;
  opacity: 0.35;
  display: flex;
  align-items: center;
}

/* Separator */
.nt-hamb-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin: 6px 14px;
  list-style: none;
}

/* CTA item */
.nt-hamb-item.nt-hamb-cta .nt-hamb-item-icon {
  background: transparent;
  color: #fff;
  padding: 0;
  overflow: visible;
}

/* ── Panel Footer ── */
.nt-hamb-footer {
  padding: 14px 20px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.nt-hamb-footer-brand {
  font-size: 0.7rem;
  color: rgba(240, 240, 244, 0.3);
}

/* ── Lead Form Modal ── */
#nt-lead-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
  direction: rtl;
}

#nt-lead-modal[hidden] {
  display: none !important;
}

.nt-lead-box {
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 30px 24px 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  font-family: system-ui, "Heebo", sans-serif;
  color: #f0f0f4;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.nt-lead-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  color: #f0f0f4;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.nt-lead-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nt-lead-box h2 {
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}

.nt-lead-box p {
  font-size: 0.87rem;
  color: rgba(240, 240, 244, 0.6);
  margin: 0 0 20px;
}

#nt-lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#nt-lead-form input,
#nt-lead-form textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  color: #f0f0f4;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
  text-align: right;
  direction: rtl;
}

#nt-lead-form input::placeholder,
#nt-lead-form textarea::placeholder {
  color: rgba(240, 240, 244, 0.38);
}

#nt-lead-form input:focus,
#nt-lead-form textarea:focus {
  border-color: rgba(168, 85, 247, 0.7);
}

#nt-lead-form textarea {
  resize: none;
  min-height: 80px;
}

.nt-lead-submit {
  background: linear-gradient(135deg, #6c3fc7, #a855f7);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s ease, transform 0.12s ease;
  text-align: center;
}

.nt-lead-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nt-lead-submit:active {
  transform: translateY(0);
}

/* Success state */
.nt-lead-success {
  text-align: center;
  padding: 20px 0;
}

.nt-lead-success-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.nt-lead-success h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.nt-lead-success p {
  font-size: 0.87rem;
  color: rgba(240, 240, 244, 0.6);
  margin-bottom: 0;
}

/* ── Share Toast ── */
#nt-share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99995;
  background: #2a2a36;
  color: #f0f0f4;
  font-size: 0.85rem;
  font-family: system-ui, "Heebo", sans-serif;
  padding: 10px 22px;
  border-radius: 100px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  pointer-events: none;
  direction: rtl;
}

#nt-share-toast.nt-show {
  opacity: 1;
}

/* Demo pages (#main-nav): reserve space for fixed ☰ at ALL widths (not only ≤900px) */
body:has(#nt-hamb-btn) #main-nav {
  padding-right: calc(58px + env(safe-area-inset-right, 0px)) !important;
}

@media (max-width: 900px) {
  body:has(#nt-hamb-btn) #main-nav .nav-links,
  body:has(#nt-hamb-btn) #main-nav .nav-cta {
    display: none !important;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  #nt-hamb-panel,
  #nt-hamb-backdrop,
  #nt-hamb-btn .nt-hb-line {
    transition: none;
  }
}
