/* ==========================================================================
   Modern Magazine & Blog Stylesheet - AdSense & Core Web Vitals Optimized
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #06b6d4;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1200px;
    --content-width: 820px;
}

@media (prefers-color-scheme: dark) {
    :root.dark-theme {
        --bg-page: #0f172a;
        --bg-card: #1e293b;
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --text-light: #64748b;
        --border-color: #334155;
        --border-subtle: #1e293b;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--border-subtle);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-btn, .theme-btn, .mobile-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-btn:hover, .theme-btn:hover, .mobile-toggle:hover {
    background-color: var(--border-subtle);
    border-color: var(--text-muted);
}

.mobile-toggle {
    display: none;
}

/* AdSense Slot Placements */
.adsense-slot {
    margin: 2rem auto;
    padding: 1.25rem;
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.adsense-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.adsense-placeholder {
    background: repeating-linear-gradient(45deg, var(--bg-page), var(--bg-page) 10px, var(--border-subtle) 10px, var(--border-subtle) 20px);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Main Layout */
.main-wrapper {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
}

.layout-single {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Hero Section */
.hero-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-card) 60%, var(--border-subtle) 100%);
}

.hero-badge {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero-title a {
    text-decoration: none;
    color: inherit;
}

.hero-title a:hover {
    color: var(--primary);
}

.hero-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Article Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.post-card-category {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

/* Single Article Styles */
.article-header {
    margin-bottom: 2rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.article-title {
    font-size: 2.35rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.article-lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.article-meta-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.author-avatar-sm {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Article Content Body */
.article-body {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-main);
}

.article-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
    border-left: 4px solid var(--primary);
    padding-left: 0.85rem;
}

.article-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin: 1.25rem 0 1.75rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.6rem;
}

/* Highlight Callout Boxes */
.highlight-box {
    background-color: var(--border-subtle);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    margin: 2rem 0;
}

.highlight-box-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.tip-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #16a34a;
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    margin: 2rem 0;
    color: #14532d;
}

.tip-box .tip-title {
    font-weight: 800;
    color: #16a34a;
    margin-bottom: 0.4rem;
}

/* Custom Comparison Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
    background-color: var(--bg-card);
}

.comparison-table th {
    background-color: var(--border-subtle);
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
}

.comparison-table td {
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.badge-yes {
    color: #16a34a;
    font-weight: 700;
}

.badge-no {
    color: #dc2626;
    font-weight: 700;
}

/* Inhaltsverzeichnis (TOC) */
.toc-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin-bottom: 0.45rem;
}

.toc-link {
    text-decoration: none;
    color: var(--primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.toc-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* FAQ Accordion */
.faq-section {
    margin: 3rem 0;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.85rem;
    background-color: var(--bg-card);
    overflow: hidden;
}

.faq-question {
    padding: 1.1rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-answer {
    padding: 0 1.35rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

/* Author Box */
.author-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.author-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.author-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-bio {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Social Share Bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
}

.btn-whatsapp { background-color: #25d366; }
.btn-facebook { background-color: #1877f2; }
.btn-twitter { background-color: #000000; }
.btn-linkedin { background-color: #0a66c2; }
.btn-copy { background-color: var(--text-muted); }

/* Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-subtle);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.category-list {
    list-style: none;
}

.category-list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list-item:last-child {
    border-bottom: none;
}

.category-list-item a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.category-list-item a:hover {
    color: var(--primary);
}

.newsletter-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.newsletter-box .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-box .widget-title::after {
    background-color: var(--accent);
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    margin: 1rem 0 0.75rem;
    font-size: 0.95rem;
}

.newsletter-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s;
}

.newsletter-btn:hover {
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 1.5rem 2rem;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* DSGVO Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 440px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: none;
}

.cookie-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.cookie-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-cookie-accept {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-cookie-reject {
    background-color: var(--border-subtle);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .article-title {
        font-size: 1.85rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
