/* ============================================================
   Namirial Peru — Documentation
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #222;
  background: #fff;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: #111;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo-link {
  display: flex;
  align-items: center;
}

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

.back-home {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.back-home:hover { color: #ccc; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 240px;
  background:
    linear-gradient(rgba(10,20,35,0.55), rgba(10,20,35,0.55)),
    url('../img/hero-bg.jpg') center center / cover no-repeat;
  background-color: #1a2a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: #00d4b4;
}

.hero-content h1 {
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

/* ── Two-column layout ────────────────────────────────────── */
.page-body {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 80px;
  gap: 60px;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  flex: 0 0 260px;
  width: 260px;
}

.sidebar-inner {
  position: sticky;
  top: 76px; /* header (56px) + 20px gap */
}

.sidebar-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  color: #222;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
  line-height: 1.3;
}

.sidebar-btn:hover {
  border-color: #555;
  background: #f7f7f7;
}

.sidebar-btn.active {
  border-color: #111;
  background: #f0f0f0;
  font-weight: 700;
}

.arrow {
  font-size: 16px;
  color: #888;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
}

/* ── Sections ─────────────────────────────────────────────── */
section {
  margin-bottom: 64px;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 32px;
}

/* ── Document groups ──────────────────────────────────────── */
.doc-group {
  margin-bottom: 32px;
  border-top: 1px solid #ddd;
  padding-top: 16px;
}

.doc-group h3 {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.doc-group--historical h3 { color: #999; }
.doc-group--historical .doc-item { opacity: 0.65; }

/* ── Document rows ────────────────────────────────────────── */
.doc-item {
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid #eee;
}
.doc-item:last-child { border-bottom: none; }

.doc-name {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.4;
}

.doc-item--url code {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11.5px;
  color: #555;
  margin-top: 2px;
}

/* Download link */
.doc-link {
  display: inline-block;
  font-size: 13px;
  color: #333;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s;
}
.doc-link:hover {
  color: #000;
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .page-body {
    flex-direction: column;
    padding: 32px 20px 60px;
    gap: 32px;
  }

  .sidebar {
    width: 100%;
    flex: none;
  }

  .sidebar-inner {
    position: static;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .hero-content h1 { font-size: 2rem; }
  .site-header { padding: 0 20px; }
}

@media (max-width: 480px) {
  .sidebar-btn { flex: 1 1 100%; }
}
