/* calculators/shared/help.css
   Stil comun pentru paginile de ajutor ale calculatoarelor ADG (același limbaj
   vizual ca aplicațiile: antet gradient #667eea -> #764ba2, carduri albe).
   Folosit de: properties/help.php, bolt/help.php, beam/help.php,
   combined_stress/help.php. Pagina de ajutor FEA are propriul stil (css/fea.css). */

:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --ink: #2c3244;
  --muted: #6b7280;
  --line: #e3e7f1;
  --bg: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  --panel: #ffffff;
  --tint: #f4f6fd;
  --radius: 8px;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body.help-page {
  margin: 0;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: var(--bg);
  min-height: 100vh;
  font-size: 14px;
}

/* ---------------- antet ---------------- */
.help-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-bar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.help-bar .brand img { height: 30px; width: auto; display: block; }

.help-bar .brand .sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.help-bar .home-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, transform .15s ease;
}

.help-bar .home-link + .home-link { margin-left: 0; }

.help-bar .home-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------------- structura ---------------- */
.help-wrap {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}

.help-toc {
  position: sticky;
  top: 74px;
  flex: 0 0 240px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.help-toc h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.help-toc ol { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.75; }
.help-toc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.help-toc a:hover { color: var(--secondary); border-bottom-color: var(--secondary); }

.help-doc {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.help-doc h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; color: var(--ink); }

.help-doc h2 {
  margin: 30px 0 10px;
  padding-bottom: 6px;
  font-size: 17px;
  color: var(--secondary);
  border-bottom: 1px solid var(--line);
}

.help-doc h3 { margin: 18px 0 6px; font-size: 14px; color: var(--ink); }
.help-doc p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.7; color: #3b4250; }
.help-lead { font-size: 14px; color: var(--muted); }

.help-doc ul, .help-doc ol {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #3b4250;
}

.help-steps li, .help-list li { margin-bottom: 6px; }

.help-doc code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef0f7;
  color: #3d4a63;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12.5px;
}

.help-doc kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
}

.help-doc a { color: var(--secondary); }

.help-table { width: 100%; margin: 8px 0 16px; border-collapse: collapse; font-size: 13px; }

.help-table th, .help-table td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.help-table th { background: #eef0f7; color: var(--muted); font-weight: 600; font-size: 12px; }
.help-table tbody tr:nth-child(even) td { background: #fafbfe; }
.help-table code { background: #fff; }

.help-note {
  margin: 12px 0 16px;
  padding: 11px 14px;
  border-left: 3px solid var(--primary);
  background: var(--tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  line-height: 1.65;
  color: #3b4250;
}

.help-note.warn { border-left-color: #dc3545; background: #fdf3f4; }

.help-formula {
  margin: 10px 0 14px;
  padding: 12px 14px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13px;
  color: #33405c;
  overflow-x: auto;
}

.help-foot {
  margin: 28px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .help-wrap { flex-direction: column; padding: 18px 14px 40px; }
  .help-toc { position: static; flex: 1 1 auto; width: 100%; order: -1; }
  .help-doc { padding: 20px 18px; }
  .help-bar .home-link { margin-left: 0; }
}

@media print {
  .help-bar, .help-toc { display: none; }
  body.help-page { background: #fff; }
  .help-wrap { display: block; padding: 0; max-width: none; }
  .help-doc { border: 0; box-shadow: none; padding: 0; }
  .help-doc h2 { page-break-after: avoid; }
  .help-table, .help-formula, .help-note { page-break-inside: avoid; }
}
