/**
 * Knowledge Hub Single Templates - Modern Member Area V2 Design
 * Unified styling for Article, Video, Podcast, Audio templates
 * 
 * Design System:
 * - Purple Primary: #7c3aed
 * - Purple Dark: #6d28d9
 * - Green Accent: #10b981
 * - Responsive Grid Layout
 * - No !important overrides
 */

/* ============================================================================
   GLOBAL LAYOUT
   ============================================================================ */
.kb-single-wrapper {
    background: #f9fafb;
    min-height: 100vh;
    padding-bottom: 80px;
}

.kb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.kb-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Two Column Layout */
.kb-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.kb-main-content {
    min-width: 0; /* Fix flex overflow */
}

.kb-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .kb-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .kb-sidebar {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* ============================================================================
   BREADCRUMB NAVIGATION
   ============================================================================ */
.kb-breadcrumb {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

.kb-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #7c3aed;
    margin: 0;
    flex-wrap: wrap;
}

.kb-breadcrumb-nav a {
    color: #7c3aed;
    text-decoration: none;
    transition: color 0.2s;
}

.kb-breadcrumb-nav a:hover {
    color: #6d28d9;
}

.kb-breadcrumb-sep {
    color: #d1d5db;
    margin: 0 4px;
}

.kb-breadcrumb-current {
    color: #6b7280;
}

.kb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7c3aed;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    transition: gap 0.2s;
}

.kb-back-link:hover {
    gap: 8px;
}

/* ============================================================================
   HEADER SECTION
   ============================================================================ */
.kb-header {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Badges */
.kb-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.kb-badge.difficulty-beginner {
    background: linear-gradient(135deg, #10b981, #059669);
}

.kb-badge.difficulty-intermediate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.kb-badge.difficulty-advanced {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.kb-badge.category-badge {
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
}

/* Title */
.kb-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

/* Excerpt */
.kb-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Meta Info */
.kb-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.kb-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.kb-meta-icon {
    font-size: 16px;
}

/* Social Actions */
.kb-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-social-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.kb-social-btn.bookmarked {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: #7c3aed;
    color: white;
}

.kb-social-btn.bookmarked:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
}

/* ============================================================================
   FEATURED IMAGE
   ============================================================================ */
.kb-featured-image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.kb-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-featured-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

/* ============================================================================
   VIDEO/AUDIO/PODCAST PLAYER
   ============================================================================ */
.kb-video-player,
.kb-audio-player,
.kb-podcast-player {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: #000;
}

.kb-video-player iframe,
.kb-video-player video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.kb-audio-player audio,
.kb-podcast-player audio {
    width: 100%;
    display: block;
    background: white;
    border-radius: 16px;
}

.kb-audio-player,
.kb-podcast-player {
    background: white;
    padding: 24px;
}

/* ============================================================================
   CONTENT AREA
   ============================================================================ */
.kb-content-card {
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
}

.kb-content {
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
}

.kb-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 48px 0 20px 0;
    letter-spacing: -0.01em;
}

.kb-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin: 36px 0 16px 0;
}

.kb-content p {
    margin-bottom: 20px;
}

.kb-content ul,
.kb-content ol {
    margin: 20px 0;
    padding-left: 28px;
}

.kb-content li {
    margin-bottom: 12px;
}

.kb-content a {
    color: #7c3aed;
    text-decoration: underline;
}

.kb-content a:hover {
    color: #6d28d9;
}

.kb-content blockquote {
    border-left: 4px solid #7c3aed;
    padding: 16px 24px;
    margin: 28px 0;
    background: #f9fafb;
    border-radius: 8px;
    font-style: italic;
}

.kb-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
}

.kb-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.kb-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ============================================================================
   MEDIA PLAYERS (Video, Audio, Podcast)
   ============================================================================ */
.kb-player-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.kb-video-player,
.kb-audio-player,
.kb-podcast-player {
    position: relative;
    width: 100%;
}

.kb-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.kb-video-embed iframe,
.kb-video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.kb-audio-player,
.kb-podcast-player {
    padding: 32px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.kb-audio-player audio,
.kb-podcast-player audio {
    width: 100%;
    outline: none;
}

.kb-player-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1f2937, #374151);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

/* Player Info */
.kb-player-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.kb-player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.kb-player-stat {
    text-align: center;
}

.kb-player-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    display: block;
    margin-bottom: 4px;
}

.kb-player-stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.kb-player-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-player-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.kb-player-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.kb-player-action-btn.secondary {
    background: white;
    color: #7c3aed;
    border: 2px solid #7c3aed;
}

.kb-player-action-btn.secondary:hover {
    background: #f9fafb;
}

/* ============================================================================
   EXPANDABLE SECTIONS (Transcript, Chapters, Show Notes)
   ============================================================================ */
.kb-expandable {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.kb-expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.kb-expandable-header:hover {
    background: #f9fafb;
}

.kb-expandable-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.kb-expandable-toggle {
    background: #f3f4f6;
    border: none;
    color: #374151;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-expandable-toggle:hover {
    background: #e5e7eb;
}

.kb-expandable-content {
    padding: 0 24px 24px 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    display: none;
}

.kb-expandable-content.show {
    display: block;
}

/* Chapters List */
.kb-chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-chapter-item {
    border-bottom: 1px solid #e5e7eb;
}

.kb-chapter-item:last-child {
    border-bottom: none;
}

.kb-chapter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    text-decoration: none;
    color: #374151;
    transition: color 0.2s;
}

.kb-chapter-link:hover {
    color: #7c3aed;
}

.kb-chapter-title {
    font-weight: 500;
}

.kb-chapter-time {
    font-size: 14px;
    color: #6b7280;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* ============================================================================
   SIDEBAR COMPONENTS
   ============================================================================ */
.kb-sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.kb-sidebar-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
}

/* Author Card (Sidebar) */
.kb-author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
    margin-bottom: 28px;
}

.kb-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    border: 4px solid #f3f4f6;
}

.kb-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-author-initials {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.kb-author-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
}

.kb-author-title {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.kb-author-bio {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.kb-author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7c3aed;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: gap 0.2s;
}

.kb-author-link:hover {
    gap: 8px;
}

/* Related Content */
.kb-related-grid {
    display: grid;
    gap: 20px;
}

.kb-related-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.kb-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.kb-related-img {
    aspect-ratio: 16/9;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.kb-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-related-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kb-related-content {
    padding: 16px;
}

.kb-related-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.kb-related-badge {
    background: #7c3aed;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.kb-related-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
}

.kb-related-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */
.kb-cta {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    padding: 80px 40px;
    text-align: center;
    color: white;
    border-radius: 24px;
    margin: 60px 0 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

.kb-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.kb-cta::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.kb-cta-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.kb-cta-desc {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.kb-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.kb-cta-btn {
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kb-cta-primary {
    background: white;
    color: #7c3aed;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.kb-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.kb-cta-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.kb-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-3px);
}

/* ============================================================================
   RELATED ARTICLES SECTION
   ============================================================================ */
.kb-related-section {
    margin: 64px 0 48px;
    padding: 40px 0;
    border-top: 1px solid #e5e7eb;
}

.kb-related-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 32px 0;
    text-align: center;
}

.kb-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.kb-related-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kb-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
}

/* ============================================================================
   MORE RELATED CONTENT SECTION (Weitere Empfehlungen)
   ============================================================================ */
.kb-more-related-section {
    margin: 48px 0;
    padding: 40px 0 0;
    border-top: 1px solid #e5e7eb;
}

.kb-more-related-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 28px 0;
    text-align: center;
}

.kb-more-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.kb-more-related-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kb-more-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.12);
    border-color: #7c3aed;
}

.kb-more-related-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16/9;
}

.kb-more-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kb-more-related-card:hover .kb-more-related-thumbnail img {
    transform: scale(1.05);
}

.kb-more-related-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kb-more-related-content {
    padding: 16px;
}

.kb-more-related-category {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.kb-more-related-card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.kb-more-related-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kb-more-related-card-title a:hover {
    color: #7c3aed;
}

.kb-more-related-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.kb-more-related-meta svg {
    flex-shrink: 0;
}

/* Responsive Adjustments für Weitere Empfehlungen */
@media (max-width: 1200px) {
    .kb-more-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .kb-more-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .kb-more-related-card-title {
        font-size: 14px;
    }
    
    .kb-more-related-content {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .kb-more-related-grid {
        grid-template-columns: 1fr;
    }
    
    .kb-more-related-section {
        margin: 32px 0;
        padding: 32px 0 0;
    }
}

.kb-related-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.kb-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kb-related-card:hover .kb-related-thumbnail img {
    transform: scale(1.05);
}

.kb-related-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(124, 58, 237, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.kb-related-content {
    padding: 20px;
}

.kb-related-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.kb-related-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kb-related-card-title a:hover {
    color: #7c3aed;
}

.kb-related-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
}

.kb-related-meta svg {
    flex-shrink: 0;
}

/* ============================================================================
   TOAST NOTIFICATION
   ============================================================================ */
.kb-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #111827;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.kb-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.kb-toast.success {
    background: #10b981;
}

.kb-toast.error {
    background: #ef4444;
}

/* ============================================================================
   TABLE OF CONTENTS (TOC) - FLOATING BUTTONS & PANEL
   ============================================================================ */

/* Floating Action Buttons (rechts am Rand) */
.kb-floating-buttons {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kb-floating-buttons.visible {
    opacity: 1;
    pointer-events: all;
}

.kb-action-btn {
    background: #7c3aed !important;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    width: 60px;
}

.kb-action-btn:hover {
    background: #6d28d9 !important;
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5);
}

.kb-action-btn svg,
.kb-action-btn .dashicons {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.kb-action-btn .dashicons {
    font-size: 20px;
}

.kb-btn-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.kb-action-btn.bookmark-btn.bookmarked {
    background: #fbbf24;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.kb-action-btn.bookmark-btn.bookmarked:hover {
    background: #f59e0b;
    box-shadow: 0 6px 30px rgba(251, 191, 36, 0.5);
}

/* TOC Slide-in Panel */
.kb-toc-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.kb-toc-panel.open {
    transform: translateX(0);
}

.kb-toc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-toc-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.kb-toc-panel-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.kb-toc-panel-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.kb-toc-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* Overlay */
.kb-toc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kb-toc-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ============================================================================
   SHARE MODAL
   ============================================================================ */
.kb-share-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.kb-share-modal.open {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.kb-share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-share-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.kb-share-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.kb-share-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.kb-share-modal-body {
    padding: 28px;
}

.kb-share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.kb-share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-share-option:hover {
    background: white;
    border-color: #7c3aed;
    color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.kb-share-option svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.kb-share-option span {
    flex: 1;
}

.kb-share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kb-share-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.kb-toc-loading {
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
    padding: 20px 0;
}

.kb-toc-empty {
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
    padding: 20px 0;
}

.kb-toc-list {
    /* Container für TOC Items */
}

.kb-toc-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-toc-item {
    margin-bottom: 4px;
}

.kb-toc-item.toc-h3 {
    margin-left: 20px;
}

.kb-toc-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.6;
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.kb-toc-link:hover {
    background: #f9fafb;
    color: #7c3aed;
    border-left-color: #7c3aed;
    transform: translateX(4px);
}

.kb-toc-link.active {
    background: #f3f4f6;
    color: #7c3aed;
    border-left-color: #7c3aed;
    font-weight: 600;
}

.kb-toc-item.toc-h2 .kb-toc-link {
    font-weight: 600;
    color: #374151;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .kb-container,
    .kb-container-narrow {
        padding: 0 16px;
    }
    
    .kb-title {
        font-size: 28px;
    }
    
    .kb-excerpt {
        font-size: 16px;
    }
    
    .kb-content-card {
        padding: 24px;
    }
    
    .kb-content {
        font-size: 16px;
    }
    
    .kb-content h2 {
        font-size: 22px;
    }
    
    .kb-sidebar-card {
        padding: 20px;
    }
    
    .kb-cta {
        padding: 40px 20px;
    }
    
    .kb-cta-title {
        font-size: 24px;
    }
    
    .kb-cta-desc {
        font-size: 16px;
    }
    
    .kb-floating-container {
        padding: 10px 16px;
    }
    
    .kb-reading-progress-text {
        font-size: 13px;
    }
    
    .kb-floating-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Floating TOC Button auf Mobile */
    .kb-toc-floating-btn {
        right: 16px;
        padding: 12px;
    }
    
    .kb-toc-floating-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .kb-toc-btn-label {
        font-size: 10px;
    }
    
    /* TOC Panel auf Mobile */
    .kb-toc-panel {
        width: 100%;
        max-width: 90%;
    }
    
    .kb-toc-panel-header {
        padding: 24px 20px 16px;
    }
    
    .kb-toc-panel-header h3 {
        font-size: 18px;
    }
    
    .kb-toc-panel-content {
        padding: 16px 20px;
    }
    
    .kb-toc-link {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Scroll to Top Button - Purple Theme */
.scroll-to-top {
    background: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.scroll-to-top:hover {
    background: #6d28d9 !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* ============================================================================
   FONT SIZE CONTROL
   ============================================================================ */
.kb-font-control {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.kb-font-control h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-font-buttons {
    display: flex;
    gap: 6px;
}

.kb-font-btn {
    flex: 1;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-font-btn:hover {
    background: white;
    border-color: #7c3aed;
    color: #7c3aed;
}

.kb-font-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

/* Font Size Classes */
.kb-content.kb-font-small {
    font-size: 15px;
}

.kb-content.kb-font-small h2 {
    font-size: 22px;
}

.kb-content.kb-font-small h3 {
    font-size: 18px;
}

.kb-content.kb-font-medium {
    font-size: 17px;
}

.kb-content.kb-font-medium h2 {
    font-size: 24px;
}

.kb-content.kb-font-medium h3 {
    font-size: 20px;
}

.kb-content.kb-font-large {
    font-size: 19px;
}

.kb-content.kb-font-large h2 {
    font-size: 28px;
}

.kb-content.kb-font-large h3 {
    font-size: 22px;
}

/* ============================================================================
   PREV/NEXT NAVIGATION
   ============================================================================ */
.kb-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 48px 0;
    padding: 32px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.kb-nav-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.kb-nav-link:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.kb-nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.kb-nav-prev {
    text-align: left;
}

.kb-nav-next {
    text-align: right;
}

.kb-nav-next .kb-nav-label {
    justify-content: flex-end;
}

.kb-nav-placeholder {
    /* Empty space when no prev/next exists */
}

/* ============================================================================
   LINKEDIN FOLLOW WIDGET
   ============================================================================ */
.kb-social-follow {
    margin-top: 24px;
}

.kb-linkedin-follow {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #0077B5 0%, #005582 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.2);
}

.kb-linkedin-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 181, 0.3);
}

.kb-linkedin-follow > svg {
    flex-shrink: 0;
}

.kb-follow-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-follow-label {
    font-size: 12px;
    opacity: 0.9;
}

.kb-follow-name {
    font-size: 16px;
    font-weight: 700;
}

.kb-follow-arrow {
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.kb-linkedin-follow:hover .kb-follow-arrow {
    transform: translateX(4px);
}
