/* --- BASIS-STYLES --- */
:root {
    --primary-color: #1a469a;
    --accent-color: #27ae60; 
    --text-color: #333;
    --bg-color: #ffffff;
    --card-bg: #f9f9f9;
    --sidebar-bg: #ffffff;
    --border-color: #eee;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* --- LAYOUT --- */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 300px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    position: fixed;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.content {
    flex: 1;
    margin-left: 300px;
    padding: 3rem;
    background: #fff;
    min-height: 100vh;
}

#main-article {
    max-width: 850px;
    margin: 0 auto;
}

.ui-element {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 500; 
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.95em; 
    border: 1px solid #e2e8f0; 
}

code.code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 1em;
    font-style: italic;
    color: #c2410c; 
    padding: 0px 5px;
    word-break: break-all;
}

/* --- LOGO & NAV --- */
.logo-area {
    text-align: center;
}

.logo {
    max-width: 200px;
    height: auto;
}

.toc-h3 { 
    margin-left: 15px; 
    font-size: 0.9rem;
}

#toc-container h3, 
#related-container h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

#toc, 
#related-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc li, 
#related-posts li {
    margin-bottom: 0.3rem;
    line-height: 1.2;
    position: relative;
    padding-left: 15px;
}

#toc a, 
#related-posts a {
    text-decoration: none;
    color: #666;
    font-size: 0.88rem;
    transition: color 0.2s;
    display: block;
}

#toc a:hover, 
#toc a.active, 
#related-posts a:hover {
    color: var(--accent-color);
    font-weight: bold;
}

#related-posts li::before,
#toc li::before {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color); 
    font-size: 0.85rem;
    font-weight: bold;
}

#related-posts li::before {
    content: "↪"; 
}

#toc li::before {
    content: "›"; 
}

/* --- TYPOGRAFIE & CONTENT --- */
h1 { font-size: 2.5rem; color: var(--primary-color); margin-top: 0; }
h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 2.5rem; }
h3 { font-size: 1.3rem; margin-top: 1rem; }

p { margin-bottom: 1.5rem; }

a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.amazon-text-link {
    color: #333; 
    text-decoration: none;
    font-weight: 600; 
    border-bottom: 2px solid #ff9900; 
    transition: all 0.2s ease-in-out;
    padding-bottom: 1px;
}

.amazon-text-link:hover {
    color: #ff9900; 
    background-color: #fff8e1; 
    border-bottom: 2px solid #e68a00;
    text-decoration: none;
}

.info-text-link {
    color: #007bff;
    text-decoration: none;
    border-bottom: 2px solid #b3d7ff; 
    transition: all 0.2s ease-in-out;
    padding-bottom: 1px;
}

.info-text-link:hover {
    color: #0056b3; 
    background-color: #e7f3ff; 
    border-bottom: 2px solid #0056b3;
    text-decoration: none;
}

/* --- BOXEN (INFO, TIP, TRANSPARENZ) --- */
.info-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    position: relative;
    border-left: 5px solid;
}

.box-title {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.transparency-box {
    background-color: #f8f9fa;
    border-color: #bdc3c7;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.tip-box {
    background-color: #e8f6ef;
    border-color: #27ae60;
    font-size: 0.9rem;
}

.disclaimer-box {
    background-color: #fff5f5;
    border-color: #e74c3c;
    font-size: 0.9rem;
}

/* --- TABELLEN --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

th {
    background-color: #f2f2f2;
    color: var(--primary-color);
    font-weight: bold;
    text-align: left;
    padding: 12px;
    border: 1px solid #ddd;
}

td {
    padding: 12px;
    border: 1px solid #ddd;
}

tr:nth-child(even) { background-color: #fafafa; }

/* --- BILDER & RENDER-SECTION --- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.render-section {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.side-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin: 2rem 0;
    flex-wrap: wrap; 
}

.side-layout-text {
    flex: 1;
    min-width: 300px;
}

.side-layout-text p:first-child {
    margin-top: 0; 
}

.side-layout-img {
    flex: 0 0 350px; 
    max-width: 100%;
}

.side-layout-img-small {
    flex: 0 0 250px; 
    max-width: 100%;
}

.side-layout-img-mini {
    flex: 0 0 150px; 
    max-width: 100%;
}

.side-layout-img img,
.side-layout-img-small img,
.side-layout-img-mini img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; 
}

/* --- FOOTER --- */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

footer a { color: #7f8c8d; margin: 0 10px; }

/* --- SIDEBAR RUBRIK-MARKER --- */
.sidebar-category {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 30px 5px; 
}

.category-bar {
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, #1e3a5f, #33a1de);
    border-radius: 2px;
}

.category-label {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #1e3a5f; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1;
}

/* ===== Code Blocks ===== */
pre {
    background: #0f172a;           
    color: #e2e8f0;                
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

pre code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    background: transparent;
    color: inherit;
}

.code-line-highlight {
    background: #1a5372;
    margin: 0 -21px; 
    padding: 0 18px;
    border-left: 3px solid rgba(0, 120, 255, 0.8);
}

details {
    margin: 15px 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    background: #f9fafb;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    padding: 6px 0;
}

details summary:hover {
    color: #2563eb;
}

/* --- MOBIL-OPTIMIERUNG --- */
.menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1100;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px auto;
}

@media (max-width: 1024px) {
    .container {
        display: block;
        width: 100%;
        max-width: 100vw;
    }

    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 20px rgba(0,0,0,0.1);
    }
    
    .content {
        margin-left: 0;
        padding: 1.5rem;
        width: 100%;
        max-width: 100%; 
        box-sizing: border-box;
    }
    
    .menu-btn {
        display: block;
    }

    h1 { 
        font-size: 1.8rem; 
        word-wrap: break-word;
    }

    .side-layout {
        flex-direction: column;
        gap: 20px;
    }

    .side-layout-text {
        min-width: 100%;
    }

    .side-layout-img,
    .side-layout-img-small,
    .side-layout-img-mini {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    /* Robuster Fix für das Überlappen der Pfeile bei Menü und TOC auf Mobilgeräten */
    #toc li, 
    #related-posts li {
        padding-left: 30px !important;
    }
    
    #related-posts li::before, 
    #toc li::before {
        left: 0 !important;
    }
}

.home-header {
    padding: 60px 20px;
    text-align: center;
    width: 100%;
}

.logo-large {
    max-width: 90%;
    height: auto;
    width: 450px; 
    border: none;
    transition: transform 0.3s ease;
}

.logo-large:hover {
    transform: scale(1.02);
}

.index-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* =======================================================
   INDEX / HOMEPAGE 
   ======================================================= */

body.home-index {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

body.home-index header {
    padding: 40px 20px;
    text-align: center;
    width: 100%;
}

body.home-index .logo {
    max-width: 90%;
    width: 450px;
    height: auto;
    border: none;
}

body.home-index .content-container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
}

body.home-index .info-box {
    background-color: #e8f6ef;
    border-left: 5px solid var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    font-size: 0.95em;
    line-height: 1.5;
}

body.home-index .info-box strong {
    display: block;
    margin-bottom: 5px;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85em;
}

body.home-index h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 1.5em;
}

body.home-index .article-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

body.home-index .article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

body.home-index .coming-soon {
    opacity: 0.6;
    border: 2px dashed #ccc;
    background: transparent;
    cursor: default;
}

body.home-index .article-card img,
body.home-index .img-placeholder {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background: #ddd;
    flex-shrink: 0;
}

body.home-index .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    background: #eee;
}

body.home-index .article-info h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

body.home-index .article-info p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
    color: #666;
}

body.home-index footer {
    width: 100%;
    background: #f4f4f4;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 50px;
    border-top: 1px solid #eee;
}

body.home-index footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
}

/* Mobile nur Index */
@media (max-width: 600px) {
    body.home-index .article-card {
        flex-direction: column;
    }

    body.home-index .article-card img,
    body.home-index .img-placeholder {
        width: 100%;
        height: 180px;
    }

    body.home-index .logo {
        width: 300px;
    }
}