/*
Theme Name:  DS Werk v3
Theme URI:   https://dswerk.de
Description: DS Werk Theme Version 3.0 — Clean/Technical, List+Sidebar Homepage, Serif Articles
Author:      DS Werk
Version:     3.0.0
Text Domain: dswerk
*/

/* ============================================================
   0. CSS VARIABLES
   ============================================================ */
:root {
    --blue:          #2563eb;
    --blue-dark:     #1d4ed8;
    --blue-bg:       #eff6ff;
    --blue-border:   #bfdbfe;
    --text:          #374151;
    --heading:       #111827;
    --muted:         #9ca3af;
    --border:        #e5e7eb;
    --bg:            #ffffff;
    --bg-light:      #f9fafb;
    --bg-alt:        #f3f4f6;
    --tool-bg:       #fef9c3;
    --tool-border:   #fde68a;
    --tool-text:     #b45309;
    --green-bg:      #f0fdf4;
    --green-border:  #bbf7d0;
    --green:         #16a34a;
    --red-bg:        #fee2e2;
    --red-border:    #fca5a5;
    --red:           #ef4444;
    --yellow-bg:     #fef3c7;
    --yellow-border: #f59e0b;
    --footer-bg:     #1e293b;
    --footer-text:   #e2e8f0;
    --footer-muted:  #94a3b8;
    --footer-border: #334155;

    --font-ui:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body:     Georgia, 'Times New Roman', Times, serif;

    --radius:        4px;
    --radius-md:     8px;
    --shadow:        0 1px 3px rgba(0,0,0,.08);
    --shadow-md:     0 4px 12px rgba(0,0,0,.10);

    --content-max:   1200px;
    --article-max:   720px;
    --sidebar-w:     300px;
    --header-h:      60px;
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    color: var(--heading);
    line-height: 1.3;
    font-weight: 700;
}

ul, ol { list-style: none; }

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   2. HEADER
   ============================================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
}

.header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}
.site-branding:hover { text-decoration: none; }

.site-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.site-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -.3px;
}
.site-name .werk { color: var(--blue); }

.main-navigation { flex: 1; min-width: 0; }
.main-navigation ul {
    display: flex;
    gap: 2px;
    list-style: none;
}
.main-navigation ul li a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius);
    display: block;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_ancestor > a {
    background: var(--blue-bg);
    color: var(--blue);
}

.header-search { flex-shrink: 0; }
.header-search .search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
}
.header-search .search-field {
    border: none;
    background: transparent;
    padding: 7px 12px;
    font-size: 13px;
    width: 180px;
    color: var(--heading);
    outline: none;
    font-family: var(--font-ui);
}
.header-search .search-field:focus { background: var(--bg); }
.header-search .search-submit {
    border: none;
    background: transparent;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
    transition: color .15s;
}
.header-search .search-submit:hover { color: var(--blue); }

/* Nav-Suchformular: nur im mobilen Dropdown sichtbar */
.nav-search-form { display: none; }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    color: var(--heading);
    margin-left: auto;
}

/* ============================================================
   3. HOMEPAGE — List + Sidebar
   ============================================================ */
.home-layout {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 56px;
    align-items: start;
}

.article-list { min-width: 0; }

.article-list-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.article-list-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 5px;
}
.article-list-item:last-child { border-bottom: none; }

.article-list-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--blue);
    font-weight: 500;
}
.article-list-meta .dot {
    color: var(--border);
    font-size: 10px;
}
.article-list-meta .reading-time,
.article-list-meta .article-date {
    color: var(--muted);
    font-weight: 400;
}

.article-list-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.35;
}
.article-list-title a {
    color: inherit;
    text-decoration: none;
}
.article-list-title a:hover { color: var(--blue); }

.article-list-excerpt {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

/* FEATURED ARTICLE (Sticky Post) */
.featured-article {
    margin-bottom: 28px;
    padding: 20px;
    background: var(--blue-bg);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-md);
    display: grid;
    gap: 8px;
}
.featured-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--blue);
}
.featured-article .article-list-meta {
    font-size: 12px;
}
.featured-article .article-list-title {
    font-size: 21px;
    line-height: 1.3;
}
.featured-article .article-list-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

/* ============================================================
   4. HOMEPAGE SIDEBAR
   ============================================================ */
.home-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.sidebar-block-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.sidebar-cats { display: flex; flex-direction: column; gap: 6px; }

.sidebar-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
}
.sidebar-cat:hover { opacity: .8; text-decoration: none; }
.sidebar-cat.cat-mb    { background: var(--blue-bg);   color: var(--blue-dark); }
.sidebar-cat.cat-ki    { background: var(--green-bg);  color: var(--green); }
.sidebar-cat.cat-tools { background: var(--tool-bg);   color: var(--tool-text); }
.sidebar-cat.cat-news  { background: #fdf4ff;          color: #9333ea; }
.sidebar-cat-count { display: none; }

/* Beliebte Artikel */
.sidebar-popular-list { list-style: none; padding: 0; margin: 0; }
.sidebar-popular-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.sidebar-popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-popular-num { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 16px; margin-top: 2px; }
.sidebar-popular-title { font-size: 13px; font-weight: 600; color: var(--heading); line-height: 1.45; text-decoration: none; }
.sidebar-popular-title:hover { color: var(--blue); text-decoration: none; }

.sidebar-tool {
    display: block;
    padding: 10px 12px;
    background: var(--tool-bg);
    border: 1px solid var(--tool-border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: opacity .15s;
    margin-bottom: 6px;
}
.sidebar-tool:last-child { margin-bottom: 0; }
.sidebar-tool:hover { opacity: .85; text-decoration: none; }
.sidebar-tool-name { font-size: 13px; font-weight: 700; color: var(--heading); margin-bottom: 2px; }
.sidebar-tool-desc { font-size: 12px; color: var(--tool-text); }

.sidebar-about-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 10px;
}
.sidebar-about-link { font-size: 13px; font-weight: 600; color: var(--blue); }

/* ============================================================
   5. CATEGORY PAGES
   ============================================================ */
.category-hero {
    background: var(--blue-bg);
    border-bottom: 1px solid var(--blue-border);
    padding: 32px 24px;
}
.category-hero-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}
.category-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--blue-dark);
    margin-bottom: 6px;
}
.category-hero .cat-description {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
    max-width: 600px;
}
.category-hero .cat-meta {
    font-size: 12px;
    color: var(--muted);
}

.subcategory-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.subcategory-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    transition: background .15s, color .15s, border-color .15s;
}
.subcategory-pill:hover,
.subcategory-pill.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    text-decoration: none;
}

.category-layout {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 56px;
    align-items: start;
}

/* ============================================================
   6. SINGLE ARTICLE
   ============================================================ */

/* Zwei-Spalten-Layout für Artikel + Sidebar */
.single-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 40px;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 48px 24px 64px;
    align-items: start;
}
.single-main { min-width: 0; }

.single-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inhaltsverzeichnis */
#toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#toc-list li a {
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    line-height: 1.45;
    display: block;
    padding: 2px 0;
}
#toc-list li a:hover { color: var(--blue); }
#toc-list .toc-h3 { padding-left: 12px; }
#toc-list .toc-h3 a { color: var(--muted); font-size: 12px; }

/* AdSense Placeholder */
.ad-slot-placeholder {
    background: var(--bg-alt);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-family: var(--font-ui);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tools in Sidebar */
.sidebar-tool-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-tool-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--tool-text);
    text-decoration: none;
    display: block;
}
.sidebar-tool-links a:hover { color: var(--blue); }

/* "Alle Tools →" Link unter der Tool-Liste */
.sidebar-tools-all {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.sidebar-tools-all:hover { text-decoration: underline; }

/* Newsletter in Sidebar */
.sidebar-newsletter-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Fallback: alte article-outer/inner für page.php */
.article-outer {
    padding: 48px 24px 64px;
}
.article-inner {
    max-width: var(--article-max);
    margin: 0 auto;
}

.article-breadcrumbs {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
}
.article-breadcrumbs a { color: var(--muted); }
.article-breadcrumbs a:hover { color: var(--blue); }

.entry-category-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 12px;
    text-decoration: none;
}
.entry-category-label:hover { color: var(--blue-dark); text-decoration: none; }

.entry-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--heading);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.entry-meta .meta-item { display: flex; align-items: center; gap: 4px; }

.entry-thumbnail-hero {
    margin-bottom: 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.entry-thumbnail-hero img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    object-position: center top;
}

/* SERIF BODY */
.entry-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
}

.entry-content p { margin-bottom: 1.4em; }

.entry-content h2 {
    font-family: var(--font-ui);
    font-size: 24px;
    font-weight: 700;
    color: var(--heading);
    margin: 2em 0 .75em;
    padding-top: 1em;
    border-top: 2px solid var(--border);
}
.entry-content h3 {
    font-family: var(--font-ui);
    font-size: 20px;
    font-weight: 700;
    color: var(--heading);
    margin: 1.6em 0 .6em;
}
.entry-content h4 {
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 700;
    color: var(--heading);
    margin: 1.3em 0 .4em;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.4em 1.6em;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .5em; line-height: 1.7; }

.entry-content strong { font-weight: 700; color: var(--heading); }
.entry-content em { font-style: italic; }
.entry-content a { color: var(--blue); }
.entry-content a:hover { color: var(--blue-dark); }

.entry-content blockquote {
    border-left: 4px solid var(--blue);
    margin: 1.5em 0;
    padding: 12px 20px;
    background: var(--blue-bg);
    font-style: italic;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.entry-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--heading);
}
.entry-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5em 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
}
.entry-content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-family: var(--font-ui);
    font-size: 15px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.entry-content th {
    background: var(--blue);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}
.entry-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:nth-child(even) td { background: var(--bg-light); }

/* SVG / figures */
.entry-content svg,
.entry-content figure { margin: 1.5em auto; max-width: 100%; }
.entry-content figure figcaption {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

/* Content Boxes */
.entry-content .highlight-box {
    background: var(--yellow-bg);
    border-left: 4px solid var(--yellow-border);
    padding: 16px 20px;
    margin: 1.8em 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
}

.entry-content .error-box {
    background: var(--red-bg);
    border-left: 4px solid var(--red);
    padding: 16px 20px;
    margin: 1.8em 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
}

.entry-content .example-box {
    background: var(--green-bg);
    border: 2px solid var(--green-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 1.8em 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
}

/* Tags */
.entry-tags {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--muted);
}
.entry-tags a {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-alt);
    border-radius: 20px;
    color: var(--text);
    font-size: 12px;
    margin: 2px;
    text-decoration: none;
}
.entry-tags a:hover { background: var(--blue-bg); color: var(--blue); }

/* Post navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-family: var(--font-ui);
}
.post-navigation a {
    font-size: 14px;
    color: var(--text);
    display: block;
    padding: 12px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color .15s, color .15s;
    line-height: 1.4;
}
.post-navigation a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.nav-next { text-align: right; }

/* ============================================================
   7. RELATED POSTS
   ============================================================ */
.related-posts {
    max-width: var(--article-max);
    margin: 48px auto 0;
    padding-top: 40px;
    border-top: 2px solid var(--border);
}
.related-posts h2 {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.related-post {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow .2s;
}
.related-post:hover { box-shadow: var(--shadow-md); }
.related-post-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.related-post-body { padding: 12px; }
.related-post-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: .5px;
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
}
.related-post-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}
.related-post-title a { color: var(--heading); text-decoration: none; }
.related-post-title a:hover { color: var(--blue); }
.related-post-date { font-size: 11px; color: var(--muted); }

/* ============================================================
   8a. COMMENTS
   ============================================================ */
.comments-wrapper {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border);
}

/* ============================================================
   8. FOOTER
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 80px;
}

.footer-top {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 48px 24px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand-link {
    font-size: 18px;
    font-weight: 800;
    color: var(--footer-text);
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: none;
}
.footer-brand-link .werk { color: #38bdf8; }
.footer-brand-link:hover { text-decoration: none; opacity: .85; }

.footer-brand p {
    font-size: 13px;
    color: var(--footer-muted);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--footer-muted);
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
    font-size: 13px;
    color: var(--footer-muted);
    text-decoration: none;
    transition: color .15s;
}
.footer-col ul li a:hover { color: var(--footer-text); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid var(--footer-border);
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--footer-muted);
}

/* ============================================================
   9. MISC PAGES
   ============================================================ */
/* Search results */
.search-results-page {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 56px;
}
.search-results-header { margin-bottom: 24px; }
.search-results-header h1 { font-size: 22px; margin-bottom: 6px; }
.search-results-header p { font-size: 14px; color: var(--muted); }

/* 404 */
.error-404-page {
    max-width: 600px;
    margin: 80px auto;
    padding: 0 24px;
    text-align: center;
}
.error-404-num {
    font-size: 80px;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    display: block;
    margin-bottom: 16px;
}
.error-404-page h2 { font-size: 24px; margin-bottom: 12px; }
.error-404-page p { font-size: 15px; color: var(--muted); margin-bottom: 24px; }

.btn-primary {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }

/* Pagination */
.dswerk-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.dswerk-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.dswerk-pagination .page-numbers:hover,
.dswerk-pagination .page-numbers.current {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.dswerk-pagination .page-numbers.dots { border: none; }

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--blue);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 200;
    box-shadow: var(--shadow-md);
}
.scroll-to-top.visible { opacity: 1; pointer-events: auto; }

/* Breadcrumbs (Rank Math) */
.breadcrumbs,
.rank-math-breadcrumb {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 24px;
}
.breadcrumbs a,
.rank-math-breadcrumb a { color: var(--muted); }
.breadcrumbs a:hover,
.rank-math-breadcrumb a:hover { color: var(--blue); }
.rank-math-breadcrumb p { margin: 0; }

/* ============================================================
   10. RESPONSIVE
   ============================================================ */

/* --- TABLET + MOBILE: Hamburger ab 900px --- */
@media (max-width: 900px) {

    /* Nav verstecken, Toggle zeigen */
    .main-navigation { display: none; }
    .menu-toggle { display: flex; align-items: center; gap: 6px; }

    /* Header-Suchfeld verstecken — Suche ist im Dropdown */
    .header-search { display: none; }

    /* Aufgeklapptes Menü */
    .main-navigation.is-open {
        display: block;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 2px solid var(--border);
        padding: 16px 20px 20px;
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .main-navigation.is-open ul {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 14px;
    }
    .main-navigation.is-open ul li a {
        font-size: 15px;
        padding: 10px 12px;
    }

    /* Suchformular im Dropdown-Menü */
    .main-navigation.is-open .nav-search-form {
        display: flex;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        background: var(--bg-light);
    }
    .main-navigation.is-open .nav-search-form .search-field {
        border: none;
        background: transparent;
        padding: 9px 14px;
        font-size: 14px;
        flex: 1;
        outline: none;
        font-family: var(--font-ui);
        color: var(--heading);
    }
    .main-navigation.is-open .nav-search-form .search-submit {
        border: none;
        background: var(--blue);
        color: #fff;
        padding: 9px 14px;
        cursor: pointer;
        font-size: 14px;
        transition: background .15s;
    }
    .main-navigation.is-open .nav-search-form .search-submit:hover {
        background: var(--blue-dark);
    }

    /* Content-Layouts: Sidebar unter Artikel */
    .home-layout,
    .category-layout,
    .search-results-page,
    .single-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .home-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .related-posts-grid { grid-template-columns: 1fr 1fr; }
}

/* --- MOBILE: Feinschliff ab 600px --- */
@media (max-width: 600px) {
    :root { --header-h: 54px; }

    body { overflow-x: hidden; }

    .home-layout,
    .category-layout,
    .search-results-page,
    .single-layout { padding: 24px 16px; gap: 28px; }
    .article-outer { padding: 28px 16px 48px; }

    .entry-title { font-size: 24px; }
    .entry-content { font-size: 17px; }

    .footer-top { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 16px; }

    .home-sidebar { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .post-navigation { grid-template-columns: 1fr; }

    .category-hero { padding: 20px 16px; }
    .category-hero h1 { font-size: 22px; }

    /* Artikel-Liste kompakter */
    .article-list-title { font-size: 16px; }
    .article-list-item { padding: 14px 0; }

    /* Header kompakter */
    .header-inner { padding: 0 16px; gap: 10px; }
    .site-name { font-size: 16px; }
}
