/* Grundlayout */
section#blog {
    padding-top: 50px !important;
}

#blog-app {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 100vh;
}

.blog-main {
    flex: 3 1 60%;
}

.blog-sidebar {
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-sidebar h3 {
    margin-top: 0;
}

/* Blogkarten */
.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    margin-bottom: 2rem;
}

.blog-card:hover {
    transform: scale(1.01);
}


.blog-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.blog-card-content {
    padding: 1rem;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

.blog-card-content h1,
.blog-card-content h2,
.blog-card-content h3 {
    font-size: 1rem;
}

.blog-card-content h1:first-letter,
.blog-card-content h2:first-letter,
.blog-card-content h3:first-letter {
    font-size: 1rem;
}

.blog-card-header {
    padding: 1rem 1rem 0.5rem 1rem;
    background-color: var(--color-light);
}

.blog-card-header h2 {
    margin: 0 0 0.3rem 0;
    font-size: 1.4rem;
    color: var(--color-primary);
}
.blog-card-header h2:first-letter {
    font-size: inherit;
}

.blog-card-header .subtitle {
    font-size: 0.9rem;
    color: #666;
}

.blog-card h1,
.blog-card h2,
.blog-card h3 {
    margin: 0;
    color: var(--color-primary);
    text-align: center;
}

.blog-card .subtitle {
    font-size: 0.9rem;
    color: #777;
    margin: 0.5rem 0;
}

/* Detailansicht */
.blog-detail {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.blog-detail h1,
.blog-detail h2,
.blog-detail h3 {
    margin: 0;
    color: var(--color-primary);
    text-align: center;
}
.blog-detail h1:first-letter,
.blog-detail h2:first-letter,
.blog-detail h3:first-letter {
    font-size: inherit;
}

.blog-detail .subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}

.blog-detail img {
    max-width: 100%;
    margin: 1rem 0;
}

.blog-detail .inhalt {
    line-height: 1.6;
}

/* Tag-Cloud */
.tag-cloud a {
    margin: 0.2rem;
    text-decoration: none;
    display: inline-block;
    color: #0056b3;
}

.tag-cloud a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.active {
    background: #0056b3;
    color: white;
    font-weight: bold;
    pointer-events: none;
}

.blog-empty {
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 6px;
    text-align: center;
    font-style: italic;
    color: #666;
}

.blog-back {
    margin: 2rem 0;
    text-align: center;
}

.blog-back a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.blog-back a:hover {
    background: #ddd;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}


.blog-card-link:hover {
    background-color: #fafafa;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

.blog-card-meta .datum {
    text-align: right;
    white-space: nowrap;
}

.blog-card-meta .kategorie {
    text-align: left;
    white-space: nowrap;
}

.blog-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #666;
    margin: 0.5rem 0;
}

.blog-detail-meta .kategorie {
    text-align: left;
    white-space: nowrap;
}

.blog-detail-meta .datum {
    text-align: right;
    white-space: nowrap;
}



.img-left {
    float: left;
    margin: 0 1em 1em 0;
    max-width: 40%;
}
.img-right {
    float: right;
    margin: 0 0 1em 1em;
    max-width: 40%;
}
.img-center {
    display: block;
    margin: 1em auto;
    max-width: 60%;
}


/* Basis-Tabellenlayout */
.inhalt table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tabellenzellen */
.inhalt table th,
.inhalt table td {
    border: 1px solid #ddd;
    padding: 0.6rem 0.9rem;
    text-align: left;
    vertical-align: top;
}

/* Kopfzeile optisch abheben */
.inhalt table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Zebrastreifen-Effekt für bessere Lesbarkeit */
.inhalt table tr:nth-child(even) td {
    background-color: #fafafa;
}

/* Optional: abgerundete Ränder (nur außen) */
.inhalt table tr:first-child th:first-child,
.inhalt table tr:first-child td:first-child {
    border-top-left-radius: 6px;
}
.inhalt table tr:first-child th:last-child,
.inhalt table tr:first-child td:last-child {
    border-top-right-radius: 6px;
}
.inhalt table tr:last-child td:first-child {
    border-bottom-left-radius: 6px;
}
.inhalt table tr:last-child td:last-child {
    border-bottom-right-radius: 6px;
}

.inhalt table thead th {
    background-color: #e0e0e0;
    font-weight: bold;
    text-align: left;
}

/* Responsive Design */
@media (max-width: 979px) {
    #blog-app {
        flex-direction: column;
        padding: 0;
    }

    .blog-sidebar {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    #blog-kategorien, #blog-tags {
        flex: 1 1 100%;
    }

    .blog-main {
        flex: 1 1 100%;
    }

    .inhalt table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
