/* WikiDHBB — Wikipedia-inspired theme */

:root {
    --bg: #f6f6f6;
    --content-bg: #ffffff;
    --sidebar-bg: #f0f0f0;
    --header-bg: #1a3a5c;
    --header-text: #ffffff;
    --link: #0645ad;
    --link-visited: #0b0080;
    --border: #a2a9b1;
    --text: #202122;
    --text-muted: #54595d;
    --badge-bio: #d5fdd5;
    --badge-bio-text: #1a5e1a;
    --badge-tema: #dde5ff;
    --badge-tema-text: #1a3a7a;
    --accent: #2a6496;
    --font: "Linux Libertine", "Georgia", "Times", serif;
    --font-sans: -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }

/* Header */
.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 48px;
}
.site-logo { color: #fff; font-size: 1.3rem; text-decoration: none; }
.site-logo:visited { color: #fff; }
.site-subtitle { color: rgba(255,255,255,0.75); font-size: 0.85rem; }
.header-search { margin-left: auto; display: flex; gap: 4px; }
.header-search input {
    padding: 4px 10px; border: none; border-radius: 3px;
    font-size: 13px; width: 220px;
}
.header-search button {
    padding: 4px 12px; border: none; border-radius: 3px;
    background: #3a7ec5; color: #fff; cursor: pointer; font-size: 13px;
}
.header-search button:hover { background: #4a8ed5; }

/* Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 1rem;
    font-size: 13px;
}
.sidebar-section { margin-bottom: 1.2rem; }
.sidebar-section h3 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 4px; }
.sidebar a { color: var(--link); font-size: 13px; }
.alpha-nav { display: flex; flex-wrap: wrap; gap: 3px; }
.alpha-nav a {
    display: inline-block; width: 22px; height: 22px; line-height: 22px;
    text-align: center; background: #fff; border: 1px solid var(--border);
    border-radius: 2px; font-size: 11px; color: var(--link);
}
.alpha-nav a:hover { background: var(--badge-tema); text-decoration: none; }

/* Content */
.content {
    flex: 1;
    background: var(--content-bg);
    padding: 1.5rem 2rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}

/* Entry page */
.entry-title {
    font-family: var(--font);
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
    margin-top: 0;
}
.entry-infobox {
    float: right;
    width: 280px;
    margin: 0 0 1rem 1.5rem;
    border: 1px solid var(--border);
    background: #f8f9fa;
    font-size: 13px;
    border-collapse: collapse;
}
.entry-infobox table { width: 100%; border-collapse: collapse; }
.entry-infobox th, .entry-infobox td {
    padding: 6px 10px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
    text-align: left;
}
.entry-infobox th {
    background: #eaecf0;
    font-weight: 600;
    width: 90px;
    white-space: nowrap;
}
.cargos-list { list-style: none; padding: 0; margin: 0; }
.cargos-list li { margin-bottom: 2px; }
.entry-body { font-size: 15px; line-height: 1.7; }
.entry-body p { margin: 0.8em 0; }
.entry-body h2 {
    font-family: var(--font);
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.2rem;
    margin-top: 1.5em;
}
.entry-body em { font-style: italic; }
.entry-body a { border-bottom: 1px dotted var(--link); }
.entry-body a:hover { border-bottom-style: solid; }

/* Badges */
.badge {
    display: inline-block; padding: 1px 8px; border-radius: 3px;
    font-size: 12px; font-weight: 600;
}
.badge-bio { background: var(--badge-bio); color: var(--badge-bio-text); }
.badge-tema { background: var(--badge-tema); color: var(--badge-tema-text); }

/* Home page */
.home h1 {
    font-family: var(--font);
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}
.home-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-top: 0; }
.home-desc { max-width: 700px; }
.stats-box {
    display: flex; gap: 2rem; margin: 1.5rem 0;
    padding: 1rem 1.5rem; background: #f8f9fa; border: 1px solid var(--border);
    border-radius: 4px;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }
.alpha-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 1rem 0; }
.alpha-card {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    background: #fff; border: 1px solid var(--border); border-radius: 4px;
    font-size: 1.2rem; font-weight: 600; color: var(--link);
}
.alpha-card:hover { background: var(--badge-tema); text-decoration: none; }
.home-search { margin-top: 2rem; }
.search-input-large {
    width: 100%; max-width: 500px; padding: 10px 14px; font-size: 15px;
    border: 2px solid var(--border); border-radius: 4px;
}
.search-input-large:focus { outline: none; border-color: var(--accent); }
.btn {
    padding: 10px 20px; background: var(--accent); color: #fff; border: none;
    border-radius: 4px; font-size: 15px; cursor: pointer;
}
.btn:hover { background: #1a5480; }

/* Alpha page */
.alpha-nav-top { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 1rem; }
.alpha-nav-top a {
    display: inline-block; padding: 4px 10px; background: #f8f9fa;
    border: 1px solid var(--border); border-radius: 3px; font-size: 13px;
}
.alpha-nav-top a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.alpha-nav-top a:hover { background: #e0e0e0; text-decoration: none; }
.entry-count { color: var(--text-muted); font-size: 13px; }

/* Entry list */
.entry-list-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.entry-link { font-weight: 500; }
.entry-cargos { font-size: 12px; color: var(--text-muted); }

/* Search page */
.search-page { max-width: 600px; }
.search-status { color: var(--text-muted); font-size: 13px; }

/* Footer */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.site-footer a { color: var(--text-muted); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { padding: 1rem; }
    .entry-infobox { float: none; width: 100%; margin: 0 0 1rem 0; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 0.5rem 0; }
    .site-subtitle { display: none; }
    .header-search { width: 100%; }
    .header-search input { flex: 1; }
    .stats-box { flex-direction: column; gap: 1rem; }
}
