/* ============================================
   FitJob.ru — Legal Pages (Terms / Privacy / Cookies)
   ============================================ */

/* ── Hero ── */
.legal-hero {
  padding: 100px 0 40px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
}
.legal-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.legal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 12px;
}
.legal-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.legal-hero-sub {
  font-size: 0.86rem;
  color: var(--text-2);
}
.legal-hero-meta {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-2);
  flex-shrink: 0;
}
.legal-hero-meta strong {
  display: block;
  font-size: 0.83rem;
  color: var(--text);
  margin-bottom: 2px;
}

/* ── Layout ── */
.legal-page {
  background: var(--bg-2);
  padding: 40px 0 72px;
}
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Sidebar TOC ── */
.legal-toc {
  position: sticky;
  top: 88px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.legal-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 12px;
}
.legal-toc-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1.35;
}
.legal-toc-link:hover { background: var(--bg-2); color: var(--text); }
.legal-toc-link.active { background: var(--bg-2); color: var(--accent); font-weight: 600; }
.legal-toc-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Document card ── */
.legal-doc {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 40px 48px;
}

/* ── Sections ── */
.legal-section {
  padding: 32px 0;
  border-bottom: 1.5px solid var(--border);
  scroll-margin-top: 96px;
}
.legal-section:first-child { padding-top: 0; }
.legal-section:last-child { border-bottom: none; padding-bottom: 0; }

.legal-section-num {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}
.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.3;
}
.legal-section p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0 0 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol {
  margin: 12px 0 12px 20px;
  padding: 0;
}
.legal-section li {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-section a { color: var(--accent); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }

/* ── Highlight box ── */
.legal-box {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-box.accent {
  background: #fff5f5;
  border-color: #fecaca;
}
.legal-box.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.legal-box p { margin: 0; }

/* ── Company details ── */
.legal-company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-top: 12px;
}
.legal-company-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-company-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.legal-company-val {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Cookie table ── */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.84rem;
}
.legal-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  padding: 8px 12px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-2);
}
.legal-table th:first-child { border-radius: 8px 0 0 0; }
.legal-table th:last-child { border-radius: 0 8px 0 0; }
.legal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.5;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { font-weight: 600; color: var(--text); font-family: monospace; font-size: 0.8rem; }

/* ── Cookie toggle banner ── */
.cookie-banner-demo {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner-demo p {
  flex: 1;
  min-width: 240px;
  margin: 0;
  font-size: 0.84rem !important;
}
.cookie-banner-demo-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-accept-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}
.cookie-decline-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-2);
}

/* ── Doc switch tabs ── */
.legal-doc-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.legal-doc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.legal-doc-tab:hover { border-color: var(--text-2); color: var(--text); }
.legal-doc-tab.active { border-color: var(--accent); color: var(--accent); background: #fff5f5; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 14px; }
  .legal-toc-title { width: 100%; margin-bottom: 4px; }
  .legal-toc-divider { display: none; }
  .legal-toc-link { padding: 5px 10px; border: 1.5px solid var(--border); border-radius: 20px; }
  .legal-doc { padding: 24px 20px; }
  .legal-company-grid { grid-template-columns: 1fr; }
  .legal-hero-inner { flex-direction: column; align-items: flex-start; }
  .legal-hero-meta { text-align: left; }
}
