/* ========================================
   Svetosila Documentation - Unified Styles
   ======================================== */

:root {
    /* Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f4;
    --bg-code: #e0e0e0;
    --text-primary: #161616;
    --text-secondary: #525252;
    --text-muted: #8d8d8d;
    --border-color: #e0e0e0;
    --accent-primary: #2b2b2b;
    --accent-secondary: #1a1a1a;
    --accent-orange: #ff860e;
    --link-color: #ff860e;
    --link-hover: #e07500;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Logo Bar */
.logo-bar {
    background: var(--accent-primary);
    padding: 20px 0;
    margin-bottom: 0;
}

.logo-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-bar .logo {
    height: 50px;
    display: block;
}

.logo-bar a.github-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    transition: opacity 0.2s ease;
}

.logo-bar a.github-link:hover {
    opacity: 0.8;
}

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(360px, 1fr) minmax(260px, 320px);
    gap: 30px;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 0 20px;
}

/* Hero Log */
.hero-log {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-log h3 {
    margin: 0;
    font-size: 1.15em;
    font-weight: 500;
    color: var(--text-primary);
}

.log-entry {
    border-left: 3px solid #dcdcdc;
    padding-left: 14px;
    margin: 0;
}

.log-entry + .log-entry {
    margin-top: 14px;
}

.log-date {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 4px;
}

.log-text {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.45;
    color: var(--text-primary);
}

/* Hero Center */
.hero-center {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero-center img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
}

.hero-progress {
    width: 100%;
}

/* Hero Status Panel */
.hero-status-panel {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-block {
    padding: 15px;
    border-left: 3px solid var(--accent-primary);
    background: var(--bg-secondary);
    margin-bottom: 15px;
}

.status-block:last-child {
    margin-bottom: 0;
}

.status-block h3 {
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
}

.status-block ul {
    margin-left: 18px;
    margin-bottom: 0;
    padding: 0;
}

.status-block ul li {
    margin-bottom: 6px;
    line-height: 1.4;
    font-size: 0.8em;
}

.status-block ul li:last-child {
    margin-bottom: 0;
}

.status-block a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.status-block a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Section */
.section {
    padding: 40px;
    margin-bottom: 30px;
}

.section h2 {
    color: #8d8d8d;
    font-size: 1.54em;
    font-weight: 300;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #8d8d8d;
    text-decoration: none !important;
    cursor: default !important;
}

/* Document Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.doc-card {
    padding: 25px;
    text-decoration: none;
    color: inherit;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.doc-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.doc-card .title {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.doc-card .description {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.doc-card.featured {
    background: var(--accent-primary);
    color: white;
}

.doc-card.featured .title,
.doc-card.featured .description {
    color: white;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 60px 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-center {
        order: 1;
    }

    .hero-status-panel {
        order: 2;
    }

    .hero-log {
        order: 3;
    }
}

@media (max-width: 768px) {
    body {
        line-height: 1.3;
    }
    
    .section {
        padding: 0 !important;
    }
    
    .main-container {
        padding: 20px 20px 40px 20px !important;
    }
    
    .logo-bar-container {
        padding: 0 10px !important;
    }
    
    .hero-grid {
        padding: 20px 20px 0 20px;
    }
}

/* Project scheme on main page */
.project-scheme .mermaid {
    background: transparent;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.project-scheme .mermaid svg {
    max-width: 100% !important;
    height: auto !important;
}

/* ========================================
   Document Page Styles
   ======================================== */

/* Container for document pages (sidebar + content) */
.container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar (Table of Contents) */
.sidebar {
    position: sticky;
    top: 20px;
    background: var(--bg-secondary);
    padding: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.sidebar ul li a:hover {
    color: var(--accent-orange);
}

.sidebar ul li.active a {
    color: var(--accent-orange);
    font-weight: 500;
}

/* Content area */
.content {
    min-width: 0;
}

.content h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.content h2:first-child,
.content h3:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.content ul, .content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.content strong {
    font-weight: 600;
}

.content code {
    background: var(--bg-code);
    padding: 2px 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.content pre {
    background: var(--bg-secondary);
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.content pre code {
    background: none;
    padding: 0;
}

/* Page title on document pages */
.page-title-container h1 {
    color: var(--accent-primary);
    font-size: 2.25em;
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-primary);
    font-weight: normal;
}

/* Responsive for document pages */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }
}

