:root {
  --bg-main: #0b0b0f;
  --bg-content: #0f0f14;
  --bg-sidebar: #14141c;
  --bg-topbar: #0d0d12;

  --text-main: #ffffff;
  --text-muted: #a9a9b8;

  --accent: #7a4cff;
  --border: #232332;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

/* ================= TOP BAR ================= */

.topbar {
  height: 56px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
}

.logo {
  height: 26px;
  width: auto;
  display: block;
}

.product-title {
  line-height: 1;
  position: relative;
  top: 7px;
  font-size: 17px;
  color: var(--text-muted);
}

.topbar-right button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.topbar-right button:hover {
  color: var(--accent);
}

/* ================= LAYOUT ================= */

.layout {
  display: flex;
  height: calc(100vh - 56px);
}

/* ================= SIDEBAR ================= */

.sidebar {
  width: 300px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  overflow-y: auto;
}

.sidebar h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 4px;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
}

.sidebar a:hover {
  background: rgba(122, 76, 255, 0.08);
  color: var(--text-main);
}

.sidebar a.active {
  background: rgba(122, 76, 255, 0.15);
  color: var(--accent);
  font-weight: 500;
}

/* ===== Sidebar menu ===== */

.sidebar .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .menu > li {
  margin-bottom: 6px;
}

/* Integration toggle */
.submenu-toggle {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
}

.submenu-toggle:hover {
  background: rgba(122, 76, 255, 0.08);
  color: #fff;
}

/* Arrow */
.submenu-toggle .arrow {
  transition: transform 0.25s ease;
}

.has-submenu.open .arrow {
  transform: rotate(90deg);
}

/* ===== Submenu ===== */

.submenu {
  list-style: none;
  margin: 0;
  padding: 0;               /* חשוב – מאפסים */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.has-submenu.open .submenu {
  max-height: 200px;
}

/* ⭐ ההזחה האמיתית – כאן הקסם */
.submenu li a {
  padding: 8px 12px 8px 36px; /* ← הזחה ברורה ימינה */
  font-size: 0.9em;
  opacity: 0.85;
}

.submenu li a:hover {
  opacity: 1;
  color: #fff;
}

/* Active states */
.sidebar a.active,
.has-submenu.open > .submenu-toggle {
  color: #ffffff;
  font-weight: 500;
}

/* ================= CONTENT ================= */

.content {
  flex: 1;
  background: linear-gradient(180deg, #0f0f14 0%, #0b0b0f 100%);
  padding: 36px 48px;
  overflow-y: auto;
}

.content-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================= ACCORDION ================= */

.accordion-section {
  border-bottom: 1px solid var(--border);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 18px;
  text-align: left;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 600;
}

.accordion-header::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.2s ease;
}

.accordion-section.open .accordion-header::before {
  transform: rotate(90deg);
}

.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.accordion-header:hover {
  color: var(--accent);
}

/* ================= SEARCH ================= */

#manualSearch {
  background: #0c0c12;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  outline: none;
  width: 180px;
}

#manualSearch::placeholder {
  color: var(--text-muted);
}

#manualSearch:focus {
  border-color: var(--accent);
}

.manual-highlight {
  background: rgba(122, 76, 255, 0.35);
  color: #fff;
}

/* ================= ACCORDION ACTIVE COLOR ================= */

/* Open (clicked) accordion header */
.accordion-section.open .accordion-header {
  color: #e16d07;
}

/* Keep active color even on hover */
.accordion-section.open .accordion-header:hover {
  color: #e16d07;
  background-color: rgba(225, 109, 7, 0.08);
}

/* Optional: arrow color match */
.accordion-section.open .accordion-header::before {
  color: #e16d07;
}

/* ================= DOCUMENT CONTENT (INTRO / OVERVIEW) ================= */

.doc-content {
  max-width: 900px;
}

/* Title emphasis */
.doc-content h1 {
  font-size: 32px;
  margin-bottom: 24px;
}

/* Paragraph rhythm */
.doc-content p {
  font-size: 15.5px;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--text-muted);
}

/* ================= GLOBAL DOCUMENT TEXT COLOR ================= */

/* Main document text */
.content p,
.content li,
.content td,
.content th {
  color: var(--text-muted);
}

/* Keep headings bright */
.content h1,
.content h2,
.content h3,
.content h4 {
  color: var(--text-main);
}

/* ================= FORCE CONTENT TEXT COLOR ================= */

/* Paragraphs */
.page p,
.page li,
.page td,
.page th {
  color: var(--text-muted) !important;
}

/* Accordion inner content */
.accordion-content p,
.accordion-content li,
.accordion-content td,
.accordion-content th {
  color: var(--text-muted) !important;
}

/* ================= ACCORDION COLOR STATES ================= */

/* Default */
.accordion-header {
  color: var(--text-main);
}

/* Hover (before click) */
.accordion-header:hover {
  color: var(--accent); /* סגול */
}

/* Active / Open (after click) */
.accordion-section.open .accordion-header {
  color: #e16d07; /* כתום */
}

/* Arrow color sync */
.accordion-section.open .accordion-header::before {
  color: #e16d07;
}

/* ================= FEATURES PAGE ================= */

.features {
  max-width: 1100px;
}

.feature-block {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.feature-block:last-child {
  border-bottom: none;
}

.feature-block h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-block p {
  font-size: 15px;
  line-height: 1.2;
  color: var(--text-muted);
  max-width: 900px;
}

/* ================= SPECIFICATIONS ================= */

.specifications {
  max-width: 1100px;
}

.spec-section {
  margin-bottom: 48px;
}

.spec-list {
  margin-left: 22px;
}

.spec-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Two-column layout */
.spec-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 24px;
}

.spec-column h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .spec-columns {
    grid-template-columns: 1fr;
  }
}

/* ---- SEARCH --- */
.search-results {
  position: absolute;
  top: 56px;
  right: 24px;
  width: 360px;
  background: #0c0c12;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: none;
  z-index: 999;
}

.search-results a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.search-results a:hover {
  background: rgba(122,76,255,0.12);
  color: #ffffff;
}
.search-highlight {
  background: #e16d07;
  color: #ffffff;
  padding: 0 2px;
  border-radius: 2px;
}

