/*!
Theme Name:        iTheme Modern
Theme URI:         https://www.media-addicted.de/
Description:       Modernisierte, responsive Variante des klassischen iTheme von N.Design Studio (Nick La). HTML5, fluide Typografie via clamp(), CSS Grid, moderne WordPress-APIs. Speziell für media-addicted.de überarbeitet.
Version:           1.2.0
Requires at least: 6.0
Requires PHP:      7.4
Author:            Nick La (Original); modernisiert für media-addicted.de
Author URI:        http://www.ndesign-studio.com/
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       itheme-modern
Tags:              blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
    /* Farben (Charakter erhalten – Original-Blau-Palette) */
    --c-blue:        #44a1d0;
    --c-blue-dark:   #2e91c6;
    --c-blue-deep:   #1f6e9b;
    --c-blue-soft:   #e8f4fa;
    --c-bg-from:     #6cc4e6;
    --c-bg-to:       #2e91c6;
    --c-text:        #1f2937;
    --c-text-soft:   #6b7280;
    --c-text-muted:  #9ca3af;
    --c-surface:     #ffffff;
    --c-surface-alt: #f7f9fb;
    --c-border:      #e5e7eb;
    --c-border-strong:#cbd5e1;
    --c-tag-bg:      #eef4f8;

    /* Layout (User-Specs) */
    --content-min: 500px;
    --content-max: 1200px;
    --sidebar-min: 200px;
    --sidebar-max: 280px;
    --gap: clamp(16px, 2vw, 36px);
    --pad-x: clamp(16px, 3vw, 36px);
    --pad-y: clamp(20px, 2.5vw, 40px);

    /* Typografie (fluid, Calibri-ähnlich via Source Sans 3) */
    --font-sans: "Source Sans 3", "Calibri", "Segoe UI", system-ui, -apple-system, sans-serif;
    --fs-base:  clamp(1rem, 0.92rem + 0.35vw, 1.1875rem);
    --fs-small: clamp(0.875rem, 0.83rem + 0.2vw, 1rem);
    --fs-h1:    clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
    --fs-h2:    clamp(1.35rem, 1.1rem + 1.1vw, 2.1rem);
    --fs-h3:    clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem);
    --lh-body:  1.65;
    --lh-tight: 1.25;

    /* Effekte */
    --radius:    10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(15, 50, 80, 0.06);
    --shadow-md: 0 6px 24px -8px rgba(15, 50, 80, 0.18), 0 2px 6px rgba(15,50,80,0.05);
    --transition: 160ms cubic-bezier(.4,.2,.2,1);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--c-text);
    background:
        linear-gradient(180deg, var(--c-bg-from) 0%, var(--c-bg-to) 480px, #4a99c2 100%) fixed;
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; border: 0; }

/* Mobile-Overflow-Schutz: alle eingebetteten Medien dürfen nie breiter sein
   als ihr Container (verhindert iframe/Embed-Sprenger auf schmalen Viewports). */
iframe, embed, object, video {
    max-width: 100%;
}

/* Lange Wörter und URLs sollen brechen statt rauslaufen. */
body, p, li, h1, h2, h3, h4, h5, h6, .post-title, .post-meta {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

a { color: var(--c-blue-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus-visible { color: var(--c-blue-deep); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
blockquote {
    border-left: 4px solid var(--c-blue);
    margin: 1em 0;
    padding: 0.75em 1em;
    background: var(--c-blue-soft);
    font-style: italic;
}

/* Accessibility helper */
.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px);
    -webkit-clip-path: inset(50%); clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}

.skip-link {
    position: absolute; left: -9999px; top: 8px;
    background: #000; color: #fff; padding: 8px 16px;
    text-decoration: none; z-index: 1000;
}
.skip-link:focus { left: 8px; }

/* =========================================================
   3. WRAPPER & HEADER
   ========================================================= */
.site { min-height: 100vh; }

/* Globale Sicherung gegen horizontalen Overflow auf Mobilgeräten:
   verhindert, dass eingebettete Inhalte (Iframes, Tabellen, lange URLs)
   den Viewport sprengen und Text rechts abschneiden. */
html, body {
    overflow-x: clip;
    max-width: 100%;
}

#wrapper {
    max-width: 1400px;
    margin: 0 auto;
    container-type: inline-size;
    overflow-x: clip;       /* harte Mobile-Begrenzung für Embeds */
}

.site-header {
    padding: clamp(28px, 4vw, 60px) var(--pad-x) clamp(20px, 3vw, 40px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

/* Custom Logo (the_custom_logo) */
.site-logo-wrap img {
    max-height: clamp(40px, 7vw, 70px);
    width: auto;
}

/* Fallback-Logo (Wortmarke), wenn kein Custom-Logo gesetzt */
.site-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}
.site-logo .mark {
    width: 44px; height: 44px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,.18), inset 0 0 0 4px var(--c-bg-to);
    flex-shrink: 0;
}
.site-logo .name {
    font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.site-tagline {
    grid-column: 1 / -1;
    color: rgba(255,255,255,.85);
    font-size: var(--fs-small);
    margin: -8px 0 0;
}

/* Search */
.search-form, #searchform {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.95);
    border-radius: 999px;
    padding: 4px 4px 4px 18px;
    width: clamp(180px, 22vw, 280px);
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
    transition: var(--transition);
}
.search-form:focus-within, #searchform:focus-within {
    background: #fff;
    box-shadow: 0 4px 22px rgba(0,0,0,.18), 0 0 0 3px rgba(255,255,255,.3);
}
.search-form input[type="search"], #searchform #s {
    border: none; outline: none; background: transparent;
    flex: 1; min-width: 0;
    font-family: inherit;
    font-size: var(--fs-small);
    color: var(--c-text);
    padding: 8px 4px;
}
.search-form button, #searchform #searchsubmit {
    appearance: none; border: none; cursor: pointer;
    background: var(--c-blue); color: #fff;
    width: 34px; height: 34px;
    border-radius: 999px;
    display: grid; place-items: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 0;
}
.search-form button::before, #searchform #searchsubmit::before {
    content: "🔍";
    font-size: 14px;
}
.search-form button:hover, #searchform #searchsubmit:hover { background: var(--c-blue-dark); }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    appearance: none;
    background: rgba(255,255,255,.95);
    border: none;
    width: 40px; height: 40px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--c-blue-dark);
    align-items: center;
    justify-content: center;
}

/* =========================================================
   4. LAYOUT (CONTENT-CARD)
   ========================================================= */
.layout {
    background: var(--c-surface);
    margin: 0 var(--pad-x) clamp(20px, 3vw, 40px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Hauptnavigation */
.main-nav {
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f8 100%);
    border-bottom: 1px solid var(--c-border);
    padding: 0 clamp(16px, 2vw, 28px);
}
.main-nav ul, .main-nav .menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0; padding: 0;
    gap: 2px;
}
.main-nav li { list-style: none; }
.main-nav a {
    display: block;
    padding: 14px 18px;
    color: var(--c-text);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-small);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    margin-bottom: -1px;
}
.main-nav a:hover { color: var(--c-blue-dark); background: rgba(68,161,208,.06); }
.main-nav .current_page_item > a,
.main-nav .current-menu-item > a,
.main-nav a.current {
    color: var(--c-blue-dark);
    border-bottom-color: var(--c-blue);
}

/* Grid: Content + Sidebar */
.grid {
    display: grid;
    grid-template-columns:
        minmax(0, var(--content-max))
        minmax(var(--sidebar-min), var(--sidebar-max));
    gap: var(--gap);
    padding: var(--pad-y) var(--pad-x);
    align-items: start;
}

/* =========================================================
   5. POSTS
   ========================================================= */
.post {
    padding-bottom: clamp(40px, 4.5vw, 64px);
    margin-bottom: clamp(40px, 4.5vw, 64px);
    border-bottom: 2px solid var(--c-border-strong);
}
.post:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}
/* Clearfix: damit Tags/Related/Trennlinie nach floatendem Icon-Bild sauber unter dem Block weitergehen */
.post::after {
    content: '';
    display: table;
    clear: both;
}

.post-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 14px;
}

.post-date {
    width: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-feature-settings: "tnum";
    border: 1px solid var(--c-border);
    background: var(--c-surface-alt);
    box-shadow: var(--shadow-sm);
    text-align: center;
    flex-shrink: 0;
}
.post-date .y {
    background: var(--c-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 0;
    letter-spacing: .04em;
}
.post-date .d {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.1;
    padding-top: 6px;
}
.post-date .m {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--c-text-soft);
    padding-bottom: 6px;
    letter-spacing: .05em;
}

.post-title-wrap { min-width: 0; }
.post-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    line-height: var(--lh-tight);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.post-title a { color: var(--c-text); text-decoration: none; transition: color var(--transition); }
.post-title a:hover { color: var(--c-blue-dark); }

.post-meta {
    font-size: var(--fs-small);
    color: var(--c-text-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.post-meta a { color: var(--c-text-soft); text-decoration: none; }
.post-meta a:hover { color: var(--c-blue-dark); }
.post-meta .cat::before { content: "📂 "; opacity: .6; }
.post-meta .cmt::before { content: "💬 "; opacity: .6; }

.post-body p { margin: 0 0 1em; }

/* Featured Image – Cover-Modus (großes Bild oben) */
.post-thumb {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 0 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
    display: block;
}
.post-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Featured Image – Icon-Modus (kleines Bild, Text fließt darum) */
.post-thumb-icon {
    float: left;
    margin: 4px 18px 8px 0;
    max-width: 200px;
    line-height: 0;
}
.post-thumb-icon img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}
.post-thumb-icon a { display: block; line-height: 0; }

/* Post-Tags (unter Beiträgen) */
.post-tags {
    margin-top: 14px;
    font-size: var(--fs-small);
    color: var(--c-text-soft);
    clear: both;
}
.post-tags a {
    background: var(--c-tag-bg);
    color: var(--c-text);
    padding: 2px 9px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 4px;
    display: inline-block;
    line-height: 1.6;
}
.post-tags a:hover { background: var(--c-blue); color: #fff; }

/* Share-Menü zwischen Beitrag und Tags */
.post-share {
    position: relative;
    display: inline-block;
    margin: 22px 0 14px;
    clear: both;
}
.share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1f2937;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 9px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: var(--fs-small);
    font-weight: 600;
    transition: var(--transition);
    line-height: 1;
}
.share-toggle:hover, .share-toggle:focus-visible {
    background: #000;
    outline: none;
}
.share-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }

.share-menu {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) translateX(-8px);
    display: flex;
    gap: 4px;
    margin: 0 !important;
    padding: 5px 8px !important;
    list-style: none !important;
    background: #1f2937;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    white-space: nowrap;
    z-index: 5;
}
.post-share:hover .share-menu,
.post-share:focus-within .share-menu,
.post-share.is-open .share-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}
.share-menu li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}
.share-menu a, .share-menu button {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    display: grid;
    place-items: center;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none !important;
    padding: 0;
    font: inherit;
}
.share-menu a:hover, .share-menu button:hover, .share-menu button:focus-visible {
    background: var(--c-blue);
    transform: scale(1.08);
    outline: none;
}
.share-menu svg { width: 16px; height: 16px; }
.share-copied {
    position: absolute;
    bottom: -26px; left: 0;
    background: var(--c-blue);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 200ms;
}
.share-copied.is-visible { opacity: 1; }

/* Mobile: Menü unter den Button (nicht daneben) */
@media (max-width: 720px) {
    .share-menu {
        left: 0;
        top: calc(100% + 8px);
        transform: translateY(-8px);
    }
    .post-share:hover .share-menu,
    .post-share:focus-within .share-menu,
    .post-share.is-open .share-menu {
        transform: translateY(0);
    }
}

/* Read-more / Buttons */
.read-more, .more-link {
    display: inline-block;
    margin-top: 12px;
    background: var(--c-blue);
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--fs-small);
    transition: var(--transition);
}
.read-more:hover, .more-link:hover {
    background: var(--c-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Related Posts (YARPP) */
.related, .tag_area {
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-top: 20px;
}
.related h3, .tag_area h3 {
    margin: 0 0 8px;
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--c-text);
}
.related ul, .related ol,
.related_posts, .related_posts ul, .related_posts ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.related li, .related_posts li {
    list-style: none !important;
    background: none !important;     /* falls Original-Theme oder Plugin Bullet-GIFs setzt */
    padding-left: 0 !important;
    margin-left: 0 !important;
    line-height: 1.35;
    font-weight: 400;
}
.related a, .related_posts a {
    font-weight: 400 !important;
    color: var(--c-blue-dark);
    text-decoration: none;
    font-size: var(--fs-small);
}
.related a:hover, .related_posts a:hover { text-decoration: underline; }

/* Pagination (Pagebar2 + native) */
.pagebar, .navigation, .nav-links, .page-nav, .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
    clear: both;
    background: none !important;
    height: auto !important;
}
.pagebar a, .pagebar span,
.nav-links a, .nav-links span,
.pagination a, .pagination span,
.page-numbers {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-small);
    color: var(--c-text-soft) !important;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    display: inline-block;
}
.pagebar a:hover, .pagination a:hover, .page-numbers:hover {
    background: var(--c-blue-soft);
    color: var(--c-blue-dark) !important;
}
.pagebar .current, .pagination .current,
.page-numbers.current {
    background: var(--c-blue) !important;
    color: #fff !important;
    border-color: var(--c-blue) !important;
}

/* Post-Navigation (vorheriger / nächster Beitrag) */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: var(--fs-small);
    gap: 12px;
    flex-wrap: wrap;
}
.post-nav a {
    color: var(--c-text-soft);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.post-nav a:hover { background: var(--c-blue-soft); color: var(--c-blue-dark); }

/* =========================================================
   6. SIDEBAR
   ========================================================= */
.sidebar {
    display: grid;
    gap: 18px;
    font-size: var(--fs-small);
    min-width: 0;
}

.widget {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.widget h3, .widget .widget-title, .widget h2 {
    margin: 0;
    padding: 10px 14px;
    background: linear-gradient(180deg, #fafbfc, #eef2f6);
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-soft);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.widget h3::after, .widget .widget-title::after, .widget h2::after {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #5fb85f;
    box-shadow: 0 0 0 2px rgba(95,184,95,.15);
}
.widget ul { margin: 0; padding: 8px 0; list-style: none; }
.widget li { padding: 0; }
.widget li a {
    display: block;
    padding: 6px 14px;
    color: var(--c-text);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.widget li a:hover {
    background: var(--c-blue-soft);
    color: var(--c-blue-dark);
    border-left-color: var(--c-blue);
}
.widget select, .widget input { width: 100%; max-width: 100%; }

/* Tag Cloud (WP-Standard + Theme-spezifisch) */
.tagcloud, .widget_tag_cloud .tagcloud {
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    line-height: 1.6;
}
.tagcloud a, .widget_tag_cloud .tagcloud a {
    display: inline-block;
    background: var(--c-tag-bg);
    color: var(--c-text) !important;
    padding: 2px 9px;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    border: none !important;
    line-height: 1.5;
}
.tagcloud a:hover, .widget_tag_cloud .tagcloud a:hover {
    background: var(--c-blue) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* WordPress liefert font-size inline (8pt – 22pt). Wir spreizen das stärker via attribute selectors. */
.tagcloud a[style*="8pt"]  { font-size: 0.7rem  !important; font-weight: 300; opacity: .55; }
.tagcloud a[style*="10pt"] { font-size: 0.78rem !important; font-weight: 400; opacity: .7; }
.tagcloud a[style*="12pt"] { font-size: 0.85rem !important; font-weight: 400; opacity: .8; }
.tagcloud a[style*="14pt"] { font-size: 1rem    !important; font-weight: 600; }
.tagcloud a[style*="16pt"] { font-size: 1.15rem !important; font-weight: 700; }
.tagcloud a[style*="18pt"] { font-size: 1.3rem  !important; font-weight: 700; }
.tagcloud a[style*="20pt"] { font-size: 1.45rem !important; font-weight: 800; }
.tagcloud a[style*="22pt"] { font-size: 1.6rem  !important; font-weight: 800; line-height: 1.15; padding: 4px 12px; }

/* =========================================================
   7. COMMENTS
   ========================================================= */
.comments-area, #comments {
    margin-top: 28px;
    padding: 20px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
}
.comments-title, h3#comments, h3#respond {
    margin: 0 0 14px;
    font-size: var(--fs-h3);
    font-weight: 700;
    background: none;
    padding: 0;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.comment-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    line-height: 1.5;
}
.comment-list .bypostauthor {
    background: var(--c-blue-soft);
    border-color: var(--c-blue);
}
.comment-list cite { font-weight: 700; font-style: normal; color: var(--c-blue-deep); }
.comment-list cite a { color: var(--c-blue-deep); text-decoration: none; }
.comment-list small, .comment-meta { font-size: 0.85em; color: var(--c-text-soft); display: block; margin-bottom: 6px; }

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    font-family: inherit;
    font-size: var(--fs-base);
    width: 100%;
    max-width: 420px;
    padding: 8px 10px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: #fff;
}
#commentform textarea, .comment-form textarea { max-width: 100%; min-height: 140px; }
#commentform input:focus, #commentform textarea:focus,
.comment-form input:focus, .comment-form textarea:focus {
    border-color: var(--c-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(68,161,208,.15);
}
#commentform input[type="submit"], .comment-form input[type="submit"], .submit {
    background: var(--c-blue);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
#commentform input[type="submit"]:hover, .submit:hover { background: var(--c-blue-dark); }

/* =========================================================
   8. FOOTER
   ========================================================= */
.site-footer, #footer {
    padding: 22px var(--pad-x) 30px;
    color: rgba(255,255,255,.85);
    font-size: var(--fs-small);
    text-align: center;
    background: none !important;
    height: auto !important;
    clear: both;
}
.site-footer a, #footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================================================
   9. PAGE-SPECIFIC HELPERS
   ========================================================= */
/* WP-Standard Alignments */
.aligncenter { display: block; margin: 1em auto; max-width: 100%; }
.alignleft   { float: left;  margin: 0 1.5em 1em 0; max-width: 50%; }
.alignright  { float: right; margin: 0 0 1em 1.5em; max-width: 50%; }
.wp-caption  { max-width: 100%; }
.wp-caption .wp-caption-text { font-size: var(--fs-small); color: var(--c-text-soft); padding: 8px 0; text-align: center; }

/* Sticky Post */
.sticky { position: relative; }
.sticky::before {
    content: "📌 Angepinnt";
    display: inline-block;
    background: var(--c-blue);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

/* MimeTypes Link Icons (vom Plugin „MimeTypes Link Icons" / oder Originalsystem) – Pfade behalten */
a.liexternal  { padding-right: 14px; background: url("images/link-icons/link-icon_external_01b.gif") no-repeat right; }
a.liwikipedia { padding-right: 14px; background: url("images/link-icons/link-icon_wikipedia.gif") no-repeat right; }
a.liimdb      { padding-right: 18px; background: url("images/link-icons/link-icon_imdb_01.png") no-repeat right; }
a.liftp       { padding-right: 14px; background: url("images/link-icons/link-icon_ftp_01.png") no-repeat right; }
a.limailto    { padding-right: 18px; background: url("images/link-icons/link-icon_mail_01.png") no-repeat right; }
a.lipdf       { padding-right: 14px; background: url("images/link-icons/link-icon_pdf_01.png") no-repeat right; }
a.lizip       { padding-right: 14px; background: url("images/link-icons/link-icon_zip_01.png") no-repeat right; }

/* =========================================================
   10. RESPONSIVE  (Media Queries auf Viewport-Breite)
   ========================================================= */

/* Voll-View (≥ 1300 px): Sidebar geringfügig großzügiger */
@media (min-width: 1300px) {
    .grid {
        grid-template-columns:
            minmax(0, var(--content-max))
            minmax(240px, 340px);
    }
}

/* Tablet (≤ 1023 px): Sidebar deutlich schmaler – Content dominiert */
@media (max-width: 1023px) {
    .grid {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 200px);
    }
    /* Content-Item darf seinen Inhalt notfalls horizontal beschneiden lassen,
       damit es nie breiter als seine Grid-Spalte wird */
    #content, .site-main {
        min-width: 0;
        max-width: 100%;
    }
}

/* Phablet & kleines Tablet (≤ 720 px): einspaltig, Burger-Menü */
@media (max-width: 720px) {
    .grid {
        /* minmax(0, 1fr) statt 1fr: Spalte darf unter Inhaltsbreite schrumpfen
           (sonst sprengen YouTube-Iframes oder lange URLs den Viewport). */
        grid-template-columns: minmax(0, 1fr);
    }
    .menu-toggle { display: flex; }
    .main-nav .menu, .main-nav ul {
        display: none;
        flex-direction: column;
    }
    .main-nav.open .menu, .main-nav.open ul {
        display: flex;
        padding: 8px 0;
    }
    .main-nav.open a {
        padding: 10px 14px;
        border-bottom: none;
    }
    .post-meta { gap: 10px; font-size: 0.85rem; }
}

/* Mobile (≤ 480 px): Sidebar komplett ausblenden, Header kompakter */
@media (max-width: 480px) {
    .sidebar { display: none; }
    .site-header {
        grid-template-columns: 1fr auto;
        gap: 14px;
        padding-top: 24px;
    }
    .site-logo .name { font-size: 1.5rem; }
    .site-logo .mark { width: 34px; height: 34px; }
    .search-form, #searchform {
        width: auto;
        flex: 1;
        min-width: 0;
        max-width: 220px;
    }
    .post-header {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }
    .post-date { width: 50px; }
    .post-date .d { font-size: 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   11. PRINT (ehemals print.css, jetzt integriert)
   ========================================================= */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }
    .sidebar, .main-nav, .menu-toggle, .search-form, #searchform,
    .post-nav, .pagebar, .pagination, .related, .comments-area,
    .read-more, .more-link, .site-footer { display: none !important; }
    #wrapper { max-width: none; margin: 0; }
    .layout { box-shadow: none; border: none; margin: 0; }
    .grid { display: block; padding: 0; }
    a { color: #000 !important; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 80%; color: #555; }
    .post { page-break-inside: avoid; border-bottom: 1px solid #ccc; }
}
