/* ═══════════════════════════════════════════════════════════════
 * Wiki Plugin — Public Pages Stylesheet
 * ═══════════════════════════════════════════════════════════════ */

.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.wp-card { display: block; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.5rem; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; }
.wp-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
.wp-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.wp-card-body h2 { margin: 0 0 0.4rem; font-size: 1.2rem; color: #1f2937; }
.wp-card-body p { margin: 0 0 0.6rem; color: #6b7280; font-size: 0.9rem; }
.wp-badge { display: inline-block; background: #dbeafe; color: #1d4ed8; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.wp-count { color: #9ca3af; font-size: 0.8rem; }
.wp-desc { color: #6b7280; font-size: 1.05rem; margin-bottom: 1.5rem; }
.wp-empty { color: #9ca3af; font-style: italic; }
.wp-error { color: #dc3545; }
.wp-sep { color: #d1d5db; margin: 0 0.3rem; }

/* Layout: Sidebar + Content */
.wp-layout { display: flex; gap: 2rem; min-height: 60vh; }
.wp-sidebar { width: 260px; flex-shrink: 0; }
.wp-main { flex: 1; min-width: 0; }
@media (max-width: 768px) { .wp-layout { flex-direction: column; } .wp-sidebar { width: 100%; } }

/* Sidebar Nav */
.wp-tree-nav { position: sticky; top: 1rem; }
.wp-tree-title { font-weight: 700; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e5e7eb; }
.wp-tree-title a { color: #1f2937; text-decoration: none; }
.wp-nav-item { display: block; padding: 0.35rem 0.5rem; color: #374151; text-decoration: none; border-radius: 4px; font-size: 0.9rem; }
.wp-nav-item:hover { background: #f3f4f6; color: #3b82f6; }
.wp-nav-item.active { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.wp-nav-arrow { font-size: 0.65rem; color: #9ca3af; }
.wp-nav-children { padding-left: 1rem; }

/* Page List */
.wp-page-list h2 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; color: #374151; }
.wp-page-item { display: block; padding: 0.5rem 0.75rem; color: #3b82f6; text-decoration: none; border-bottom: 1px solid #f3f4f6; font-size: 0.95rem; }
.wp-page-item:hover { background: #f9fafb; }

/* Article */
.wp-article { line-height: 1.8; }
.wp-article h1 { font-size: 1.8rem; margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e5e7eb; }
.wp-article h2 { font-size: 1.4rem; margin: 1.5rem 0 0.8rem; }
.wp-article h3 { font-size: 1.2rem; margin: 1.2rem 0 0.6rem; }
.wp-article p { margin: 0.8rem 0; }
.wp-article code { background: #f3f4f6; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.9em; }
.wp-article pre { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 1rem 0; }
.wp-article pre code { background: none; padding: 0; color: inherit; }
.wp-article table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.wp-article th, .wp-article td { border: 1px solid #d1d5db; padding: 0.5rem 0.75rem; text-align: left; }
.wp-article th { background: #f9fafb; font-weight: 600; }
.wp-article blockquote { border-left: 4px solid #3b82f6; padding: 0.5rem 1rem; margin: 1rem 0; background: #eff6ff; }
.wp-article img { max-width: 100%; border-radius: 6px; }
.wp-article a { color: #3b82f6; }
.wp-article ul, .wp-article ol { padding-left: 1.5rem; }
.wp-article hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }
.wp-meta { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; font-size: 0.85rem; color: #9ca3af; }

/* Breadcrumb */
.wp-breadcrumb { font-size: 0.85rem; color: #6b7280; margin-bottom: 1.5rem; }
.wp-breadcrumb a { color: #3b82f6; text-decoration: none; }
.wp-breadcrumb a:hover { text-decoration: underline; }

@media print { .wp-sidebar { display: none; } }
