/* ============================================
   Altralo Legal Pages — Shared Stylesheet
   Dark Glass-Morphism Design
   ============================================ */

:root {
  --bg: #000000;
  --bg-surface: #0D0D0D;
  --bg-card: rgba(26, 26, 26, 0.85);
  --bg-input: #1A1A1A;
  --accent: #1b80ee;
  --accent-dim: rgba(0, 152, 212, 0.12);
  --accent-border: rgba(4, 0, 212, 0.25);
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --header-height: 64px;
  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────── */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 24px;
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo-mark {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: linear-gradient(135deg, #104885, #1b80ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.header-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.header-logo-text span {
  color: var(--text-secondary);
  font-weight: 400;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.header-title {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #104885, #1b80ee);
  color: #000;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

.btn-accent:hover { opacity: 0.9; }

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Layout ─────────────────────────────────────── */

.page-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-height);
}

/* ── Sidebar ─────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 24px 16px 40px;
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 8px;
  margin-bottom: 8px;
}

.sidebar-nav { list-style: none; margin-bottom: 24px; }

.sidebar-nav li a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.sidebar-nav li a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.sidebar-nav li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.sidebar-all-docs {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.sidebar-all-docs a {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-all-docs a:hover { color: var(--accent); }
.sidebar-all-docs a.current { color: var(--accent); font-weight: 600; }

/* ── Main Content ────────────────────────────────── */

.content {
  flex: 1;
  max-width: 820px;
  padding: 40px 48px 80px;
  min-width: 0;
}

/* ── Document Header ─────────────────────────────── */

.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.doc-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.doc-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-meta span { display: flex; align-items: center; gap: 4px; }

.doc-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--accent-border), transparent);
  margin-bottom: 40px;
}

/* ── Intro Card ──────────────────────────────────── */

.intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.intro-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #1b80ee);
}

.intro-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Sections ────────────────────────────────────── */

.doc-section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.section-number {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  line-height: 26px;
  margin-right: 10px;
  flex-shrink: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.3px;
}

.section-body { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }
.section-body p { margin-bottom: 14px; }
.section-body p:last-child { margin-bottom: 0; }

.section-body strong { color: var(--text); font-weight: 600; }

.section-body a { color: var(--accent); text-decoration: none; }
.section-body a:hover { text-decoration: underline; }

/* ── Lists ───────────────────────────────────────── */

.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.policy-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.policy-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

.policy-list.numbered { counter-reset: list; }
.policy-list.numbered li::before {
  content: counter(list);
  counter-increment: list;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Info Boxes ──────────────────────────────────── */

.info-box {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-box-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-box.green {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: rgba(0,212,106,0.85);
}

.info-box.yellow {
  background: rgba(255,184,0,0.08);
  border-color: rgba(255,184,0,0.2);
  color: rgba(255,184,0,0.85);
}

.info-box.red {
  background: rgba(244,67,54,0.08);
  border-color: rgba(244,67,54,0.2);
  color: rgba(244,67,54,0.85);
}

.info-box.blue {
  background: rgba(100,149,237,0.08);
  border-color: rgba(100,149,237,0.2);
  color: rgba(100,149,237,0.85);
}

/* ── Tables ──────────────────────────────────────── */

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

.policy-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}

.policy-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: top;
}

.policy-table tr:last-child td { border-bottom: none; }
.policy-table td strong { color: var(--text); }

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
  backdrop-filter: blur(12px);
}

/* ── Contact Card ────────────────────────────────── */

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 48px;
  backdrop-filter: blur(20px);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.contact-card a { color: var(--accent); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────── */

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand { max-width: 280px; }
.footer-brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand-logo-mark {
  width: 80px; height: 80px;
  border-radius: 10px;
  background: linear-gradient(135deg, #104885, #1b80ee);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.footer-brand-name { font-size: 15px; font-weight: 700; }
.footer-brand p { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; }

.footer-links-group h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.footer-links-group a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.15s;
}

.footer-links-group a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Index Page Grid ─────────────────────────────── */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(20px);
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.doc-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.doc-card h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.doc-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.doc-card-arrow {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 16px;
  color: var(--text-tertiary);
  transition: color 0.2s, transform 0.2s;
}

.doc-card:hover .doc-card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ── Scroll to top ───────────────────────────────── */

.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26,26,26,0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all 0.2s;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { color: var(--accent); border-color: var(--accent-border); }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 900px) {
  .sidebar { display: none; }
  .sidebar.open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 280px;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(20px);
    z-index: 90;
    border-right: 1px solid var(--border);
  }
  .menu-toggle { display: flex; }
  .content { padding: 28px 20px 60px; }
  .site-footer { padding: 32px 20px; }
}

@media (max-width: 600px) {
  .doc-title { font-size: 26px; }
  .header-title { display: none; }
  .header-actions .btn-ghost { display: none; }
  .doc-meta { flex-direction: column; gap: 4px; }
}
