/* ==================================================
   ZENTRALES STYLESHEET – ARTIKELSEITEN (UPGRADE)
   Stil beibehalten, Design modernisiert
   ================================================== */

/* ========== Reset & Variablen ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --topbar-height: 32px;
    --sidebar-width: 300px;

    --primary-color: #005ea8;
    --primary-hover: #004a86;

    --bg-light: #f4f6f8;
    --bg-box: #ffffff;
    --bg-soft: #fafbfc;

    --text-main: #1c1c1c;
    --text-muted: #666;

    --radius: 8px;
    --shadow-soft: 0 4px 18px rgba(0,0,0,0.06);
    --shadow-strong: 0 8px 30px rgba(0,0,0,0.08);
}

/* ========== Base Typography ========== */
html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background: var(--bg-soft);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    padding-top: var(--topbar-height);
    line-height: 1.65;
}

/* ========== Top-Bar ========== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 16px;
    z-index: 1100;
}

.top-bar a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.top-bar a:hover {
    color: var(--primary-hover);
}

/* Burger */
.burger {
    font-size: 26px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
    margin-bottom: 5px;
}

.burger:hover {
    transform: scale(1.2);
}

/* ========== Sidebar ========== */
#sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: #ffffff;
    box-shadow: var(--shadow-strong);
    transition: left 0.3s ease;
    z-index: 1000;
}

#sidebar.open {
    left: 0;
}

.sidebar-content {
    padding: 28px 24px;
    overflow-y: auto;
}

.sidebar-content h2 {
    font-size: 17px;
    margin-bottom: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

.sidebar-links li {
    margin-bottom: 12px;
}

.sidebar-links a {
    text-decoration: none;
    font-size: 15px;
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: var(--radius);
    display: block;
    transition: background 0.2s ease;
}

.sidebar-links a:hover {
    background: var(--bg-light);
}

/* ========== Overlay ========== */
#sidebar-overlay {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--topbar-height));
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 900;
}

#sidebar-overlay.active {
    display: block;
}

/* ========== Layout ========== */
.container {
    width: 55%;
    max-width: 1080px;
    margin: 50px auto 80px auto;
    background: #ffffff;
    padding: 50px 60px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

/* ========== Artikelkopf ========== */
.article-header {
    text-align: center;
    margin-bottom: 50px;
}

.article-header h1 {
    color: var(--primary-color);
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== Inhaltsstruktur ========== */
.article-section {
    margin-bottom: 50px;
}

.article-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    padding-left: 14px;
}

.article-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    height: 70%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.article-section p {
    margin-bottom: 16px;
    font-size: 16px;
}

/* ========== Infobox ========== */
.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 18px 20px;
    margin: 30px 0;
    border-radius: var(--radius);
    font-size: 15px;
}

/* ========== Pflegetabelle ========== */
.care-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    border-radius: var(--radius);
    overflow: hidden;
}

.care-table th,
.care-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.care-table th {
    width: 30%;
    font-weight: 600;
    background: var(--bg-light);
}

/* Hover-Effekt */
.care-table tr:hover {
    background: #f9fbfd;
}

/* ========== Querverweise ========== */
.references {
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.references ul {
    padding-left: 20px;
}

.references a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.references a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* ========== Darkmode Toggle Switch ========== */
.darkmode-toggle {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked + .slider {
    background-color: #4da3ff;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ========== Mobile ========== */
@media (max-width: 1024px) {
    .container {
        width: 90%;
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 94%;
        padding: 30px 20px;
    }

    .burger {
        font-size: 21px;
        margin-bottom: 2px;
    }

    .article-header h1 {
        font-size: 26px;
    }

    .article-section h2 {
        font-size: 19px;
    }
}
