/* ═══════════════════════════════════════════════════
   Opius — Sub-page shared styles
   Docs, Blog, Changelog, Community
   ═══════════════════════════════════════════════════ */

/* ── Page header ── */
.page-header{
  padding: 100px 0 40px;
}
.page-header h1{
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8e8e8;
  margin-bottom: 8px;
}
.page-header p{
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* ── Sub-page container: wider for docs/sidebar pages ── */
.page-container{
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Docs layout: sidebar + content ── */
.docs-layout{
  padding-bottom: 100px;
}

.docs-layout > .page-container{
  display: flex;
  gap: 48px;
}

.docs-sidebar{
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 76px;
  align-self: flex-start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.docs-sidebar::-webkit-scrollbar{
  width: 4px;
}
.docs-sidebar::-webkit-scrollbar-track{
  background: transparent;
}
.docs-sidebar::-webkit-scrollbar-thumb{
  background: #1a1a1a;
  border-radius: 2px;
}

.docs-sidebar-label{
  font-size: 11px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

.docs-nav{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav a{
  font-size: 13px;
  color: #666;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
  text-decoration: none;
}
.docs-nav a:hover{
  color: #e8e8e8;
  background: rgba(255,255,255,0.04);
}
.docs-nav a.active{
  color: #e8e8e8;
  background: rgba(255,255,255,0.06);
  font-weight: 500;
}

/* ── Docs content ── */
.docs-content{
  flex: 1;
  min-width: 0;
}

.docs-content section{
  margin-bottom: 48px;
}

.docs-content h2{
  font-size: 20px;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}

.docs-content h3{
  font-size: 16px;
  font-weight: 600;
  color: #e8e8e8;
  margin-bottom: 12px;
  margin-top: 32px;
}

.docs-content p{
  font-size: 14px;
  line-height: 1.8;
  color: #888;
  margin-bottom: 16px;
}

.docs-content ul{
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.docs-content ul li{
  font-size: 14px;
  line-height: 1.8;
  color: #888;
  margin-bottom: 4px;
}

.docs-content code{
  font-family: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 0.9em;
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
  color: #5a8ab5;
}

.docs-content pre{
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.docs-content pre code{
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
}

.docs-content .cmd-block{
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-family: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #5a8ab5;
}

.docs-content .cmd-block .prompt{
  color: #555;
  user-select: none;
}

/* ── Blog ── */
.blog-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
}

.blog-item{
  border-bottom: 1px solid #1a1a1a;
  padding: 28px 0;
  transition: opacity 150ms ease;
}
.blog-item:first-child{
  border-top: 1px solid #1a1a1a;
}
.blog-item:hover{
  opacity: 0.8;
}
.blog-item-time{
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}
.blog-item-title{
  font-size: 18px;
  font-weight: 600;
  color: #e8e8e8;
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog-item-excerpt{
  font-size: 14px;
  line-height: 1.7;
  color: #666;
}
.blog-empty{
  text-align: center;
  padding: 80px 0;
  color: #555;
}
.blog-empty p{
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}
.blog-empty .coming-soon{
  font-size: 12px;
  color: #444;
  font-style: italic;
}

/* ── Changelog ── */
.changelog-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
}

.changelog-version{
  border-bottom: 1px solid #1a1a1a;
  padding: 36px 0;
}
.changelog-version:first-child{
  border-top: 1px solid #1a1a1a;
}

.changelog-version h2{
  font-size: 18px;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 4px;
}
.changelog-version .version-date{
  font-size: 12px;
  color: #555;
  margin-bottom: 20px;
}

.changelog-category{
  margin-bottom: 16px;
}
.changelog-category:last-child{
  margin-bottom: 0;
}

.changelog-category h3{
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.changelog-category ul{
  list-style: none;
  padding: 0;
}

.changelog-category ul li{
  font-size: 14px;
  line-height: 1.7;
  color: #888;
  padding: 2px 0 2px 16px;
  position: relative;
}
.changelog-category ul li::before{
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 4px;
  height: 4px;
  background: #444;
  border-radius: 50%;
}

.changelog-category.added ul li{color:#5a8ab5}
.changelog-category.added ul li::before{background:#5a8ab5}
.changelog-category.fixed ul li{color:#e8a05a}
.changelog-category.fixed ul li::before{background:#e8a05a}
.changelog-category.improved ul li{color:#5ab57a}
.changelog-category.improved ul li::before{background:#5ab57a}

/* ── Community ── */
.community-page{
  padding-bottom: 100px;
}

.community-grid{
  display: flex;
  flex-direction: column;
  gap: 0;
}

.community-card{
  border-bottom: 1px solid #1a1a1a;
  padding: 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.community-card:first-child{
  border-top: 1px solid #1a1a1a;
}

.community-card-info h3{
  font-size: 15px;
  font-weight: 600;
  color: #e8e8e8;
  margin-bottom: 4px;
}
.community-card-info p{
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.community-card-link{
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #5a8ab5;
  padding: 6px 14px;
  border: 1px solid #2a3a5a;
  border-radius: 20px;
  transition: background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}
.community-card-link:hover{
  background: rgba(90,138,181,0.08);
  border-color: #5a8ab5;
}

/* ── Responsive ── */
@media(max-width:768px){
  .docs-layout > .page-container{
    flex-direction: column;
    gap: 24px;
  }
  .docs-sidebar{
    width: 100%;
    position: static;
    max-height: none;
  }
  .docs-nav{
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .docs-nav a{
    font-size: 12px;
    padding: 4px 10px;
  }
  .docs-sidebar-label{
    display: none;
  }
  .page-container{
    padding: 0 20px;
  }
}

@media(max-width:480px){
  .page-header{
    padding: 80px 0 28px;
  }
  .page-header h1{
    font-size: clamp(1.3rem, 5vw, 1.6rem);
  }
  .blog-item-title{
    font-size: 16px;
  }
}
