/* ===== BLOG STYLES ===== */

/* Globale Blog-Container und Buttons */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Content Section für Blog */
.content-section {
    margin-bottom: 0px;
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.content-section h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2rem;
    font-family: 'Calibri', sans-serif;
    margin-bottom: 30px;
    color: #333;
}

/* Blog Header - Unterscheidet sich vom Fachbereich-Header */
.blog-header {
    background: linear-gradient(135deg, #388b65 0%, #8ebea0 100%);
    color: white;
    padding: 120px 80px 20px 80px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M10 10h80v80H10z" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.3;
}

.blog-header .container {
    position: relative;
    z-index: 1;
}

.blog-header h1 {
    font-size: 3rem;
    font-family: 'Calibri', sans-serif;
    margin-bottom: 0px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.blog-header h2 {
    font-size: 2.6rem;
    font-family: 'Calibri', sans-serif;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    text-align: left;
}

.blog-header p {
    font-size: 1.2rem;
    font-family: 'Calibri', sans-serif;
    margin-bottom: 0;
    opacity: 0.95;
    max-width: 800px;
    text-align: left;
}

/* Blog Grid Section */
.blog-grid-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Blog Compact Cards */
.blog-compact-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-compact-card:not(.planning):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.blog-compact-card.planning {
    background: #f8f9fa;
    opacity: 0.7;
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-compact-card h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0;
    font-family: Calibri, sans-serif;
    line-height: 1.4;
}

.blog-compact-card.planning h3 {
    color: #6c757d;
}

.blog-compact-card .excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.blog-compact-card.planning .excerpt {
    color: #999;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.published {
    background: #d4edda;
    color: #155724;
}

.status-badge.planning {
    background: #fff3cd;
    color: #856404;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-disabled {
    background-color: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background-color: #6c757d;
    transform: none;
}

/* Blog Post Metadata */
.category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.date-badge {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== BLOG LAYOUT WITH SIDEBAR ===== */
.blog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e9ecef;
}

.blog-sidebar h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-family: Calibri, sans-serif;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.blog-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar nav li {
    margin: 8px 0;
}

.blog-sidebar nav a {
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.blog-sidebar nav a:hover,
.blog-sidebar nav a.active {
    background: white;
    color: #667eea;
    padding-left: 15px;
}

.blog-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 0; /* Verhindert Overflow bei langen Code-Blöcken */
}

.blog-teaser-icon {
    display: block;
    height: 100px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 10px;
    margin-right: auto;
    filter: drop-shadow(5px 5px 6px rgba(9, 58, 43, 0.65));
}

.blog-teaser-symbol {
    float:left;    
    height: 100px;
    width: auto;
    max-width: 100%;
    margin: 10px;
    margin-right: 50px;
    filter: drop-shadow(5px 5px 6px rgba(9, 58, 43, 0.65));
}

/* ===== TABLE OF CONTENTS ===== */
.table-of-contents {
    padding: 15px 15px 5px 15px;
    border-radius: 12px;
    background: #fafafa;
}

.table-of-contents h2 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.0 !important;
    font-size: 1.0rem;
    color: #000000 !important;
    font-weight: 600 !important;

}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents > ul > li {
    margin: 0px 0;
}

.table-of-contents ul ul {
    margin-left: 5px;
    margin-top: 6px;
}

.table-of-contents ul ul li {
    margin: 5px 0;
}

.table-of-contents a {
    color: #4f8f29;
    text-decoration: none;
    display: block;
    padding: 3px 0px;
    margin: 0px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.table-of-contents a:hover {
    background: rgba(217, 255, 217, 0.89);
    color:#418619 !important;
    padding-left: 12px;
}

.table-of-contents ul ul a {
    font-size: 0.9rem;
    opacity: 0.95;
}

/* ===== BLOG CONTENT WRAPPER ===== */
.content-wrapper {
    line-height: 1.8;
}

.content-wrapper h2 {
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-family: Calibri, sans-serif;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.content-wrapper h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-wrapper h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-family: Calibri, sans-serif;
}

.content-wrapper p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05rem;
    text-align: justify;
}

.content-wrapper ul {
    margin: 15px 0;
    padding-left: 25px;
}

.content-wrapper li {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.content-wrapper strong {
    color: #2c3e50;
    font-weight: 600;
}

.content-wrapper code {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.content-wrapper pre {
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.content-wrapper pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 0.95em;
    line-height: 1.6;
}

.content-wrapper .note {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.content-wrapper .note strong {
    color: #1976d2;
}

/* ===== SOURCES SECTION ===== */
.sources-section {
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    padding: 25px 30px;
    margin-top: 40px;
    border-radius: 0 0 12px 12px;
}

.sources-section h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-family: Calibri, sans-serif;
    font-size: 1.5rem;
}

.sources-section ul {
    list-style: none;
    padding-left: 0;
}

.sources-section li {
    margin: 10px 0;
    color: #555;
    word-break: break-word;
    padding-left: 25px;
    position: relative;
}

.sources-section li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.sources-section a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sources-section a:hover {
    color: rgb(122, 163, 131);
    text-decoration: underline;
}

/* ===== BLOG FOOTER NAVIGATION ===== */
.blog-footer-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 2px solid #dee2e6;
}

.related-posts {
    flex: 1;
}

.related-posts h3 {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 10px 0;
    font-family: Calibri, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.related-posts a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.related-posts a:hover {
    color: #667eea;
}

.related-posts a::after {
    content: "→";
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.related-posts a:hover::after {
    transform: translateX(5px);
}

.back-to-top {
    flex-shrink: 0;
}

.back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.back-to-top a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.back-to-top a::before {
    content: "↑";
    font-size: 1.2rem;
    font-weight: bold;
}

/* ===== RESPONSIVE BLOG LAYOUT ===== */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 220px 1fr;
        gap: 30px;
    }
    
    .blog-content {
        padding: 30px;
    }
    
    .blog-sidebar {
        top: 90px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }
    
    .blog-header h2 {
        font-size: 1.6rem;
    }


    .blog-header p {
        font-size: 1.1rem;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
    
    .blog-content {
        padding: 25px;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .blog-footer-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .related-posts a {
        justify-content: center;
    }
    
    .back-to-top {
        width: 100%;
    }
    
    .back-to-top a {
        justify-content: center;
        width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .blog-header {
        padding: 60px 0;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .content-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .content-wrapper h3 {
        font-size: 1.2rem;
    }
    
    .content-wrapper pre {
        padding: 15px;
        font-size: 0.85rem;
    }
    
    .table-of-contents {
        padding: 15px;
    }

    .content-section {
        padding: 15px;
    }
}
