/* NBS FAQ v1.1 */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');

:root {
  --nbs-navy:      #1E3A5F;
  --nbs-navy-dark: #142B47;
  --nbs-navy-mid:  #2D5282;
  --nbs-gold:      #C8A951;
  --nbs-gold-lt:   #E8C875;
  --nbs-bg:        #F0F2F6;
  --nbs-white:     #FFFFFF;
  --nbs-text:      #1A202C;
  --nbs-muted:     #718096;
  --nbs-border:    #E2E8F0;
  --nbs-sidebar-w: 240px;
}

.nbs-faq-wrap * {
  font-family: 'Heebo', sans-serif;
  box-sizing: border-box;
}

/* Reset WordPress/Elementor theme button styles */
.nbs-faq-wrap button,
.nbs-faq-wrap button:hover,
.nbs-faq-wrap button:focus,
.nbs-faq-wrap button:active {
  background-color: transparent;
  border-color: transparent;
  color: inherit;
  box-shadow: none;
  text-shadow: none;
  outline: none;
  border-radius: 0;
}

.nbs-faq-wrap {
  direction: rtl;
  background: var(--nbs-bg);
  padding: 1.5rem 0;
}

/* ══════════════════════════════════════════
   TWO-COLUMN LAYOUT
══════════════════════════════════════════ */

.nbs-layout {
  display: grid;
  grid-template-columns: var(--nbs-sidebar-w) 1fr;
  gap: 1.75rem;
  align-items: start;
  direction: ltr; /* layout left-to-right so sidebar = column 1 = LEFT */
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */

.nbs-sidebar {
  direction: rtl;
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border-radius: 16px;
  background: var(--nbs-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden; /* clip for rounded corners */
}

/* Brand header */
.nbs-sidebar-header {
  background: var(--nbs-navy);
  color: var(--nbs-white);
  padding: 1.4rem 1.25rem 1.2rem;
  text-align: center;
}

.nbs-sidebar-logo {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.nbs-sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nbs-white);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.nbs-sidebar-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

/* Search */
.nbs-search-wrap {
  position: relative;
  padding: 0.9rem 1rem 0;
}

.nbs-search-wrap input {
  width: 100%;
  border: 1.5px solid var(--nbs-border);
  border-radius: 8px;
  padding: 0.55rem 2.1rem 0.55rem 1.8rem;
  font-size: 0.875rem;
  font-family: 'Heebo', sans-serif;
  direction: rtl;
  color: var(--nbs-text);
  transition: border-color 0.2s;
}

.nbs-search-wrap input:focus {
  outline: none;
  border-color: var(--nbs-navy);
}

.nbs-search-icon {
  position: absolute;
  top: 50%;
  right: 1.6rem;
  transform: translateY(-30%);
  font-size: 0.85rem;
  pointer-events: none;
  color: var(--nbs-muted);
}

#nbs-clear-search {
  position: absolute;
  top: 50%;
  left: 1.6rem;
  transform: translateY(-30%);
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--nbs-muted);
  cursor: pointer;
  padding: 0;
}
#nbs-clear-search:hover { color: var(--nbs-text); }

/* Category nav */
.nbs-cat-nav {
  padding: 0.75rem 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nbs-cat-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
  font-size: 0.9rem;
  color: #4A5568;
  transition: all 0.15s;
  text-align: right;
  direction: rtl;
}

.nbs-cat-link:hover {
  background: #EBF0F8 !important;
  color: var(--nbs-navy) !important;
}

.nbs-cat-link.active {
  background: var(--nbs-navy);
  color: var(--nbs-white);
  font-weight: 600;
}

.nbs-cat-link-icon { font-size: 1rem; flex-shrink: 0; }

.nbs-cat-link-name { flex: 1; }

.nbs-cat-count {
  font-size: 0.72rem;
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 500;
  flex-shrink: 0;
}

.nbs-cat-link.active .nbs-cat-count {
  background: rgba(255,255,255,0.2);
}

/* Print button */
.nbs-print-btn {
  display: block;
  width: calc(100% - 1.5rem);
  margin: 0.75rem 0.75rem 0.9rem;
  padding: 0.5rem;
  border: 1.5px solid var(--nbs-border);
  border-radius: 8px;
  background: none;
  font-size: 0.85rem;
  font-family: 'Heebo', sans-serif;
  color: var(--nbs-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.nbs-print-btn:hover {
  border-color: var(--nbs-navy) !important;
  color: var(--nbs-navy) !important;
  background: #EBF0F8 !important;
}

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */

.nbs-main {
  direction: rtl;
  min-width: 0;
}

/* No results */
.nbs-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--nbs-muted);
  background: var(--nbs-white);
  border-radius: 16px;
}
.nbs-no-results-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

/* Category section */
.nbs-cat-section { margin-bottom: 1.75rem; }

.nbs-cat-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nbs-navy);
  margin: 0 0 0.65rem;
}

.nbs-cat-icon { font-size: 1.3rem; }

/* Questions card */
.nbs-questions-wrap {
  background: var(--nbs-white);
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* FAQ item */
.nbs-item {
  border-right: 3px solid transparent;
  transition: border-color 0.2s;
}

.nbs-item:not(:last-child) {
  border-bottom: 1px solid var(--nbs-border);
}

.nbs-item.open {
  border-right-color: var(--nbs-gold);
}

/* Question button */
.nbs-question {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: right;
  padding: 0.95rem 1.15rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Heebo', sans-serif;
}

.nbs-question:hover { background: #F0F4FA !important; color: inherit !important; }

.nbs-q-text {
  flex: 1;
  font-size: 0.975rem;
  font-weight: 500;
  color: #2D3748;
  line-height: 1.5;
  text-align: right;
}

.nbs-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #A0AEC0;
  transition: transform 0.3s ease;
}

.nbs-item.open .nbs-chevron { transform: rotate(180deg); }

.nbs-pin-badge {
  display: inline-block;
  background: var(--nbs-gold);
  color: var(--nbs-navy-dark);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Answer panel */
.nbs-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.nbs-item.open .nbs-answer { max-height: 4000px; }

.nbs-answer-content {
  padding: 0 1.15rem 1rem 1.15rem;
  border-right: 3px solid var(--nbs-gold);
  margin: 0 1.15rem 1rem;
  color: #4A5568;
  font-size: 0.925rem;
  line-height: 1.8;
  direction: rtl;
}

.nbs-answer-content p             { margin-bottom: 0.55rem; }
.nbs-answer-content p:last-child  { margin-bottom: 0; }
.nbs-answer-content ul,
.nbs-answer-content ol            { padding-right: 1.4rem; margin: 0.4rem 0; }
.nbs-answer-content ul            { list-style: disc; }
.nbs-answer-content ol            { list-style: decimal; }
.nbs-answer-content li            { margin-bottom: 0.2rem; }
.nbs-answer-content strong        { font-weight: 600; color: var(--nbs-navy); }
.nbs-answer-content a             { color: var(--nbs-navy); text-decoration: underline; }

/* Meta bar */
.nbs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 1.15rem 0.9rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--nbs-border);
  font-size: 0.78rem;
  color: var(--nbs-muted);
}

.nbs-helpful {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nbs-helpful-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 1px solid var(--nbs-border);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: 'Heebo', sans-serif;
  color: var(--nbs-muted);
  transition: all 0.15s;
}

.nbs-helpful-btn:hover:not(.nbs-voted) {
  border-color: var(--nbs-navy) !important;
  color: var(--nbs-navy) !important;
  background: #EBF0F8 !important;
}

.nbs-helpful-btn.nbs-voted { opacity: 0.45; cursor: default; }

.nbs-meta-end {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nbs-link-btn {
  background: none;
  border: none;
  color: var(--nbs-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  font-family: 'Heebo', sans-serif;
  transition: color 0.15s;
}
.nbs-link-btn:hover { color: var(--nbs-navy); }

/* ══════════════════════════════════════════
   CONTACT BLOCK
══════════════════════════════════════════ */

.nbs-contact-block {
  margin-top: 2rem;
  border-radius: 14px;
  padding: 1.75rem;
  text-align: center;
  background: linear-gradient(135deg, var(--nbs-navy) 0%, var(--nbs-navy-mid) 100%);
}

.nbs-contact-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nbs-white);
  margin: 0 0 0.35rem;
}

.nbs-contact-sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 1.1rem;
}

.nbs-contact-btn {
  display: inline-block;
  background: var(--nbs-gold);
  color: var(--nbs-navy-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.6rem;
  border-radius: 9px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nbs-contact-btn:hover { opacity: 0.88; color: var(--nbs-navy-dark); }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */

.nbs-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1.5rem);
  background: var(--nbs-navy);
  color: var(--nbs-white);
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-family: 'Heebo', sans-serif;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.28s;
  white-space: nowrap;
}
.nbs-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   RESPONSIVE — tablet
══════════════════════════════════════════ */

@media (max-width: 820px) {
  :root { --nbs-sidebar-w: 200px; }
}

@media (max-width: 640px) {
  .nbs-layout {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  .nbs-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .nbs-cat-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }

  .nbs-cat-link {
    width: auto;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    border: 1.5px solid var(--nbs-border);
  }

  .nbs-cat-link.active { border-color: var(--nbs-navy); }

  .nbs-cat-count { display: none; }

  .nbs-print-btn { margin: 0.5rem 0.75rem 0.75rem; }

  .nbs-sidebar-header { padding: 1rem; }
  .nbs-sidebar-logo { display: none; }
}

/* ══════════════════════════════════════════
   PRINT
══════════════════════════════════════════ */

@media print {
  .nbs-sidebar,
  .nbs-search-wrap,
  .nbs-helpful,
  .nbs-link-btn,
  .nbs-contact-block,
  .nbs-toast { display: none !important; }

  .nbs-layout { grid-template-columns: 1fr; }

  .nbs-item.open .nbs-answer,
  .nbs-answer { max-height: none !important; }

  .nbs-item { page-break-inside: avoid; border: none !important; }
  .nbs-questions-wrap { box-shadow: none; border: 1px solid #ddd; }
}
