/* ===========================================================
   WIKI LAYOUT STYLESHEET – Optimized for better vertical space
   =========================================================== */

/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
  background: #f9fafb;
  line-height: 1.6;
}

/* ------------------------------
   HEADER + NAVIGATION
   ------------------------------ */
.wiki-header {
  background: #1e293b;
  color: #fff;
  width: 100%;
  border-bottom: 4px solid #0ea5e9;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10%;
  flex-wrap: wrap;
}

.nav-bar .brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}

.nav-bar nav a {
  color: #cbd5e1;
  margin-left: 18px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.nav-bar nav a:hover {
  color: #fff;
}

.nav-bar nav a.active {
  color: #38bdf8;
  font-weight: 600;
}

/* ------------------------------
   HERO SECTION (Reduced height)
   ------------------------------ */
.hero {
  background: linear-gradient(135deg, #e0e7ff, #f8fafc);
  padding: 35px 10% 25px; /* Reduced from 70px */
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px; /* Reduced spacing */
}

.hero p {
  font-size: 1rem;
  color: #475569;
  margin: 0;
}

/* ------------------------------
   MAIN CONTAINER (Reduced padding)
   ------------------------------ */
.wiki-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 10%; /* Reduced from 80px */
  background: #f9fafb;
  min-height: 60vh;
}

.wiki-center {
  width: 100%;
  max-width: 1200px;
}

.wiki-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 24px 32px;
}

.wiki-card h2 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: #1e293b;
}

.wiki-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.wiki-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  padding: 10px;
  transition: all 0.2s ease-in-out;
}

.wiki-list li:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.wiki-list a {
  text-decoration: none;
  color: #0369a1;
  font-weight: 600;
  display: block;
}

/* ------------------------------
   ARTICLE PAGE CONTENT
   ------------------------------ */
.wiki-content {
  background: #ffffff;
  padding: 25px 10%; /* Reduced top padding from 50px */
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wiki-content h2,
.wiki-content h3,
.wiki-content h4 {
  color: #1e293b;
  margin-top: 22px;
  margin-bottom: 10px;
}

.wiki-content p {
  margin-bottom: 14px;
  color: #334155;
}

.wiki-content code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.wiki-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 18px;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
}

/* ------------------------------
   FOOTER (Reduced spacing)
   ------------------------------ */
.site-footer {
  text-align: center;
  padding: 20px 0;
  color: #64748b;
  background: #f1f5f9;
  margin-top: 30px; /* Reduced from 50px */
  font-size: 0.9rem;
}

/* ------------------------------
   RESPONSIVE DESIGN
   ------------------------------ */
@media (max-width: 768px) {
  .nav-bar {
    padding: 10px 5%;
  }
  .hero {
    padding: 28px 5% 20px;
  }
  .wiki-main {
    padding: 30px 5%;
  }
  .wiki-content {
    padding: 20px 6%;
  }
}
