/* ================================================= */
/* =========== TEIL 1: BLOG ÜBERSICHT (Liste) ===== */
/* ================================================= */

.blog {
    padding: 10rem 4% 8rem;
    background: var(--bg-color);
}

/* Filter Leiste (Layout 2) */
.blog-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem; 
    flex-wrap: wrap; 
}

.filter-search {
    position: relative;
    flex-grow: 1; 
    min-width: 25rem; 
}

.filter-search input {
    width: 100%;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 1.2rem 1.5rem 1.2rem 4.5rem; 
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: .8rem;
    font-family: "Quicksand", sans-serif;
    transition: .3s ease;
}

.filter-search input:focus {
    background: var(--bg-color);
    border-color: var(--text-color);
    box-shadow: 0 0 10px rgba(51, 51, 51, 0.1);
}

.filter-search i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2rem;
    color: var(--bg-color);
    pointer-events: none; 
}

.filter-sort {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    padding: .8rem 1.5rem;
    border-radius: 2rem;
    background: #f0f0f0;
    transition: .3s ease;
}

.sort-btn:hover, .sort-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
}

.filter-categories {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; 
}

.filter-categories a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    padding: .8rem 1.8rem;
    border-radius: 2rem;
    background: #f0f0f0;
    transition: .3s ease;
}

.filter-categories a:hover, .filter-categories a.filter-active {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Blog Grid Container */
.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 3rem; 
    padding-top: 4rem; 
}

.blog-card {
    background: var(--bg-color);
    border-radius: .8rem; 
    box-shadow: 0 .4rem .8rem rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    transition: .3s ease;
    display: flex; /* Neu für besseres Layout */
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-.5rem); 
    box-shadow: 0 .6rem 1.2rem rgba(0, 0, 0, 0.15);
}

.blog-card .blog-image img {
    width: 100%;
    height: 25rem; 
    object-fit: cover; 
    display: block;
}

.blog-content {
    padding: 2rem 2.5rem 3rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 1.4rem;
    color: var(--bg-color); 
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.blog-content p {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-content .btn {
    /* Button Styles */
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18rem; 
    height: 4.5rem;
    background: transparent;
    border: .2rem solid var(--text-color);
    border-radius: .8rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-color);
    transition: .5s;
    align-self: flex-start; /* Links ausrichten */
}
.blog-content .btn:hover { color: var(--bg-color); background: var(--text-color); }


/* ================================================= */
/* =========== TEIL 2: BLOG DETAILSEITE  ========== */
/* ================================================= */

.blog-detail-wrapper {
    /* Container für die ganze Detailseite */
    max-width: 1200px;
    margin: 12rem auto 5rem; /* Abstand von oben (Header) */
    padding: 0 4%;
}

/* Das Grid Layout für Detailseite */
.blog-detail-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Links breit (Artikel), Rechts schmal (Sidebar) */
    gap: 6rem; /* Großer Abstand zwischen Inhalt und Sidebar */
    align-items: start; /* Wichtig für sticky */
}

/* --- Linke Spalte: Artikel --- */

.article-header {
    margin-bottom: 3rem;
}

.article-meta-top {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 1.4rem;
    color: var(--bg-color);
}

.category-badge {
    background: #ffffff;
    color: var(--text-color);
    padding: .4rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.article-header h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta div {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
}

.publish-date {
    font-size: 1.3rem;
    color: var(--bg-color);
}

.article-featured-image {
    width: 100%;
    height: 320px;                  /* Höhe des Cover-Banners */
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.1);
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;              /* macht es zum echten „Cover“-Look */
}

/* Abstand zwischen Absätzen */
p {
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Abstand oberhalb und unterhalb von H2-Überschriften */
h2 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* Typografie im Artikel */
.post-content {
    font-size: 1.8rem; /* Größere Schrift für bessere Lesbarkeit */
    color: #444;
    line-height: 1.6;       /* schönes Zeilenbild */
    margin-bottom: 1.2rem;  /* Abstand zwischen Absätzen */
}

.post-content p {
    margin-bottom: 2.5rem;
    color: var(--text-color);
    line-height: 1.5;
}

.lead-paragraph {
    font-size: 2.1rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 3rem;
}

.post-content h2 {
    font-size: 2.8rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.post-content h3 {
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.summary-list {
    font-weight: 700;           /* fett */
    list-style-type: disc;      /* normaler Punkt */
    padding-left: 1.5rem;       /* Einrückung */
    margin-bottom: 2rem;        /* Abstand nach unten */
}

.summary-list li {
    margin-bottom: 0.6rem;      /* Abstand zwischen Listenelementen */
    line-height: 1.5;           /* angenehme Zeilenhöhe */
}


.references {
  margin-top: 4rem;
  font-size: 1.5rem;
  color: #555;
}

.references h2 {
  text-transform: lowercase;
  margin-bottom: 1rem;
}

.references ol {
  padding-left: 1.2rem;
}

.references li {
  margin-bottom: 0.8rem;
}

.post-content blockquote {
    border-left: 5px solid var(--text-color);
    background: #f9f9f9;
    padding: 2rem 3rem;
    font-style: italic;
    font-size: 2rem;
    margin: 3rem 0;
    border-radius: 0 .8rem .8rem 0;
    color: #555;
}

.styled-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.styled-list li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
}

.styled-list li::before {
    content: '•';
    color: var(--text-color);
    font-weight: bold;
    font-size: 2rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.article-footer-nav {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.btn-back {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: .3s;
}
.btn-back:hover { transform: translateX(-5px); }


/* --- Rechte Spalte: Sticky Sidebar --- */

.sidebar-column {
    position: relative;
    height: 100%;
}

.sidebar-sticky-container {
    position: sticky;
    top: 10rem; /* Abstand vom oberen Rand beim Scrollen */
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.sidebar-widget {
    background: #ffffff;
    /* Optional: Umrandung oder Schatten */
    /* border: 1px solid #eee; */
}

.sidebar-widget h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
    color: var(--text-color);
}

/* SOCIAL SHARING BUTTONS (NEU) */
.share-widget {
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center; /* Mittig ausrichten */
    gap: 1.5rem; /* Abstand zwischen den Icons */
    margin-top: 1rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Kreisrund */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s;
    text-decoration: none;
    border: none; /* Wichtig für den Copy-Button */
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: translateY(-3px); /* Schwebe-Effekt */
    opacity: 0.9;
    color: white;
}

/* Markenfarben für die Buttons */
.share-btn.whatsapp { background-color: var(--text-color); } /* WhatsApp Grün */
.share-btn.linkedin { background-color: #0077B5; } /* LinkedIn Blau */
.share-btn.email { background-color: var(--text-color); } /* Grau */
.share-btn.copy-link { background-color: #000000; } /* Dunkelgrau */


.related-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    transition: .3s;
}

.related-card:hover {
    transform: translateX(5px);
}

.related-card img {
    width: 80px;
    height: 80px;
    border-radius: .8rem;
    object-fit: cover;
}

.related-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: .5rem;
}

.related-card span {
    font-size: 1.2rem;
    color: var(--bg-color);
}

/* TAG CLOUD (Schlagwortwolke) Styles */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag-cloud-item {
    font-size: 1.3rem;
    background: #ffffff;
    border: 1px solid #eee;
    color: var(--text-color);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-cloud-item:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Promo Widget */
.promo-widget {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
}

.promo-widget h3 { border: none; margin-bottom: 1rem; padding: 0; }
.promo-widget p { font-size: 1.4rem; margin-bottom: 2rem; }

.btn-full {
    width: 100%;
    padding: 1rem;
    background: var(--text-color);
    color: white;
    border-radius: .5rem;
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: .3s;
    display: block; /* WICHTIG FÜR LINKS */
    text-align: center;
    border: none;
}
.btn-full:hover { opacity: 0.9; color: white;}

/* ... dein bisheriger Code ... */

/* ========================================= */
/* ====== TOOLTIPS (Worterklärungen) ======= */
/* ========================================= */

/* ========================================= */
/* ====== TOOLTIPS (Mobile & Desktop) ====== */
/* ========================================= */

/* 1. Das Wort selbst im Text */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    font-weight: 500; /* Dünner (vorher 700) für besseren Lesefluss */
    color: var(--text-color);
    /* Durchgezogene Linie in Hauptfarbe */
    border-bottom: 2px solid var(--second-bg-color); 
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.tooltip:hover,
.tooltip:focus {
    color: var(--main-color);
    border-bottom-color: var(--main-color);
    background-color: rgba(0,0,0,0.03); 
    border-radius: 4px;
}

/* 2. Der Kasten (Die Definition) */
.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    
    /* Positionierung */
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95); 
    
    /* DESIGN: Weiß, Schwarz, Kantig */
    background-color: var(--second-bg-color); 
    color: #fff;
    text-align: left; 
    
    /* Mehr Platz (Padding) macht die Box größer/luftiger */
    padding: 1.2rem 1.5rem; 
    border: 2px solid #000; 
    border-radius: 8px;
    
    /* Typografie */
    font-family: "Quicksand", sans-serif;
    font-size: 1.4rem; /* Etwas größerer Text */
    font-weight: 500;
    line-height: 1.5;
    
    /* Größe: Weniger breit gestreckt, kompakter */
    white-space: normal;
    min-width: 150px; /* Kleiner, damit es bei wenig Text nicht so breit ist */
    max-width: 300px;
    width: max-content; 
    
    /* Harter Schatten */
    box-shadow: 4px 4px 0px #000; 
    
    /* Unsichtbar am Anfang */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    
    /* Animation */
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 12px; 
}

/* 3. Der kleine Pfeil unten */
.tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    
    border-bottom: 2px solid #000;
    border-right: 2px solid #000;
    
    transform: translateX(-50%) translateY(4px) rotate(45deg) scale(0);
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    margin-bottom: 7px; 
    z-index: 101; 
}

/* 4. Anzeigen bei Hover oder Tippen */
.tooltip:hover::after,
.tooltip:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.tooltip:hover::before,
.tooltip:focus::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(6px) rotate(45deg) scale(1);
}

/* --- Responsive Detailseite --- */

@media (max-width: 991px) {
    .blog-detail-layout {
        grid-template-columns: 1fr; /* Untereinander stapeln */
        gap: 4rem;
    }
    
    .article-header h1 { font-size: 3rem; }
    
    /* Auf Mobile ist Sticky oft nervig oder nimmt zu viel Platz weg, 
       man kann es hier optional ausschalten oder lassen */
    .sidebar-sticky-container {
        position: static; 
    }
}