:root {
    --primary-blue: #1f1a17;
    --soft-blue: #eef1f6;
    --accent-red: #da251d;
    --sidebar-bg: #1f1a17;
    --sidebar-hover: #34302a;
    --bg-gray: #eef1f6;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-gray);
    color: #26241f;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header {
    background-color: #ffffff;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--accent-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.header-logos { display: flex; align-items: center; gap: 20px; }
.header-logos a { display: block; }
header img.logo-soft { width: 120px; height: auto; display: block; }
.header-title { font-weight: bold; color: var(--primary-blue); font-size: 1.1em; }

.main-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
}

nav {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    padding-top: 20px;
    flex-shrink: 0;
    overflow-y: auto;
}

.menu-item {
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    display: block;
    text-decoration: none;
    color: white;
    font-size: 0.95em;
}

.menu-item:hover { background-color: var(--sidebar-hover); }
.menu-item.active {
    background-color: var(--sidebar-hover);
    border-left: 4px solid var(--accent-red);
    font-weight: bold;
}

.sub-menu {
    margin-bottom: 10px;
    display: none;
    background-color: #17130f;
}

.sub-menu.visible { display: block; }

.sub-item {
    padding: 6px 25px 6px 45px;
    font-size: 0.85em;
    color: #b8b2a9;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.sub-item:hover { color: white; background-color: var(--sidebar-hover); }

article {
    flex: 1;
    padding: 25px 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.content-section {
    display: none;
    max-width: 950px;
    margin: 0 auto;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.content-section.active { display: block; }

h1 { color: var(--primary-blue); margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; font-size: 1.6em; }
h2 { 
    color: var(--primary-blue); 
    font-size: 1.2em; 
    background: var(--soft-blue);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    scroll-margin-top: 20px;
    margin-top: 20px;
}

h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--primary-blue);
    margin-right: 10px;
    border-radius: 2px;
}

.subtitle { font-weight: bold; color: #5c6472; display: block; margin-top: -8px; margin-bottom: 10px; font-style: italic; font-size: 0.9em; }

.section-subheading {
    color: var(--primary-blue); 
    border-left: 4px solid var(--accent-red); 
    padding-left: 10px; 
    margin-top: 25px;
}

.tech-box {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 0.9em;
}

.tech-tag {
    font-family: monospace;
    background-color: #eee;
    padding: 2px 4px;
    color: var(--accent-red);
    font-weight: bold;
}

.tech-id-blue {
    color: var(--primary-blue);
    font-family: monospace;
    font-weight: bold;
    display: block;
    margin: 4px 0;
}

.tech-formula {
    font-style: italic;
    color: #455a64;
    margin: 5px 0;
}

.quick-nav {
    display: flex;
    gap: 20px;
    margin: 20px 0 30px 0;
}

.nav-card {
    flex: 1;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid var(--accent-red);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.nav-card h3 { margin-top: 0; color: var(--primary-blue); font-size: 1em; }
.nav-card p { margin-bottom: 0; font-size: 0.85em; color: #666; }

.image-container {
    text-align: center;
    margin: 15px 0 30px 0;
    padding: 10px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

.image-container img { max-width: 100%; height: auto; border: 1px solid #ccc; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.important-notice {
    background-color: #fffde7;
    border: 2px solid #fdd835;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #333;
}
.important-notice h3 { margin-top: 0; margin-bottom: 8px; color: #000; font-size: 1.1em; }

.news-card { border-bottom: 1px solid #eee; padding: 10px 0; line-height: 1.3; }
.date { color: #5c6472; font-size: 0.85em; }

.alert-box { background-color: #fff3e0; border: 1px solid #ffe0b2; padding: 8px 12px; margin: 10px 0; border-radius: 8px; color: #e65100; font-size: 0.9em; }
.alert-success { background-color: #e8f5e9; border-color: #c8e6c9; color: #2e7d32; }
.alert-success a { color: #1b5e20; font-weight: bold; }

.code-block {
    background-color: #f5f5f5; 
    padding: 15px; 
    border-left: 5px solid #ccc; 
    font-family: monospace; 
    margin: 15px 0;
}
.highlight-code { background-color: #fff176; padding: 2px; }

.compact-text {
    line-height: 1.35;
    font-size: 0.92em;
    letter-spacing: -0.1px;
}

/* Mobilní responzivita */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow: visible;
    }
    .main-wrapper {
        flex-direction: column;
        min-height: 0;
    }
    nav {
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
        overflow-y: visible;
    }
    article {
        padding: 15px;
        overflow-y: visible;
    }
    .quick-nav {
        flex-direction: column;
        gap: 10px;
    }
}