/**
 * SEO Article Styles
 * Unified styles for all SEO landing pages (marketing-automation-agentur, agentur-prozesse, etc.)
 *
 * Structure:
 * 1. Reading Progress Bar
 * 2. Dark Hero Header
 * 3. Article Layout (Grid + Sidebar)
 * 4. Table of Contents (Desktop + Mobile)
 * 5. Content Typography
 * 6. Definition Box (Featured Snippet)
 * 7. Editorial Badge
 * 8. Key Takeaways Box
 * 9. Stats Highlight
 * 10. Comparison Tables
 * 11. Callout/Quote Box
 * 12. Tip/Warning Box
 * 13. Process Steps
 * 14. Inline CTA
 * 15. Lead Magnet CTA
 * 16. Author Box
 * 17. Social Share Buttons
 * 18. Related Articles
 * 19. Responsive Styles
 */

/* ==========================================================================
   1. Reading Progress
   ========================================================================== */

/* Hide the old top bar */
.reading-progress {
    display: none;
}

/* Desktop: Progress bar under TOC */
.toc-progress {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.toc-progress-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.toc-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.1s ease-out;
}

/* Mobile: Circular progress around TOC button */
.mobile-toc-btn {
    --progress-deg: 0deg;
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: conic-gradient(
        var(--primary-color) var(--progress-deg),
        var(--border-color) var(--progress-deg) 360deg
    );
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    padding: 4px;
}

.mobile-toc-btn-inner {
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toc-btn i {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.mobile-toc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   2. Dark Hero Header
   ========================================================================== */

.post-header {
    background: linear-gradient(135deg, var(--text-dark) 0%, #1a1b1a 100%);
    position: relative;
}

.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.post-header .container {
    position: relative;
    z-index: 1;
}

.post-header .post-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.post-header .post-breadcrumb a:hover {
    color: var(--primary-color);
}

.post-header .breadcrumb-separator,
.post-header .post-breadcrumb > span:last-child {
    color: rgba(255, 255, 255, 0.5);
}

.post-header .post-title {
    color: var(--bg-white);
}

.post-header .post-meta {
    justify-content: flex-start;
    margin-top: 1.5rem;
}

.post-header .post-author span {
    color: var(--primary-color);
    font-weight: 600;
}

.post-header .post-date,
.post-header .post-reading-time {
    color: rgba(255, 255, 255, 0.8);
}

.post-header .post-meta-separator {
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   3. Article Layout
   ========================================================================== */

.seo-article {
    padding: 60px 0;
}

.seo-article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
}

.seo-article-main {
    min-width: 0;
}

.seo-article-sidebar {
    position: relative;
}

/* ==========================================================================
   4. Table of Contents
   ========================================================================== */

/* Desktop TOC */
.seo-toc {
    position: sticky;
    top: 100px;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.seo-toc h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.seo-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-toc li {
    margin-bottom: 12px;
}

.seo-toc a {
    font-size: 0.875rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    line-height: 1.4;
}

.seo-toc a:hover {
    color: var(--primary-color);
}

/* Mobile TOC Overlay */
.mobile-toc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-toc-overlay.active {
    opacity: 1;
}

/* Mobile TOC Panel */
.mobile-toc-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-toc-panel.active {
    transform: translateY(0);
}

.mobile-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-toc-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.mobile-toc-close {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-toc-close:hover {
    background: var(--border-color);
}

.mobile-toc-close i {
    font-size: 1rem;
    color: var(--text-dark);
}

.mobile-toc-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-toc-panel li {
    margin-bottom: 8px;
}

.mobile-toc-panel a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-toc-panel a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ==========================================================================
   5. Content Typography
   ========================================================================== */

.seo-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 3rem 0 1.25rem;
    color: var(--text-dark);
    scroll-margin-top: 100px;
}

.seo-content h2:first-of-type {
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
    scroll-margin-top: 100px;
}

.seo-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.seo-content ul,
.seo-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.seo-content li {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Link Styling */
.seo-content a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.seo-content a:hover {
    color: var(--text-dark);
}

/* Note styling */
.note-small {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: -0.5rem;
}

/* ==========================================================================
   6. Definition Box (Featured Snippet)
   ========================================================================== */

.definition-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 2rem;
}

.definition-box dt {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.definition-box dt i {
    color: var(--primary-dark);
}

.definition-box dd {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
}

/* ==========================================================================
   7. Editorial Badge
   ========================================================================== */

.editorial-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 2rem;
}

.editorial-badge .badge-icon {
    color: #059669;
    font-size: 1.25rem;
}

.editorial-badge .badge-label {
    font-weight: 600;
    color: #059669;
    font-size: 0.875rem;
}

.editorial-badge .badge-detail {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: block;
}

/* Legacy editorial review style (for backwards compatibility) */
.editorial-review {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.editorial-review i {
    color: #059669;
    font-size: 1.125rem;
}

.editorial-review strong {
    color: var(--text-dark);
}

/* Content Separator */
.content-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

/* ==========================================================================
   8. Key Takeaways Box
   ========================================================================== */

.key-takeaways {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 2.5rem;
}

.key-takeaways-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.key-takeaways-header i {
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.key-takeaways-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.key-takeaways ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.key-takeaways li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.key-takeaways li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ==========================================================================
   9. Stats Highlight
   ========================================================================== */

.stats-highlight {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 2.5rem 0;
}

.stat-highlight-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-highlight-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-highlight-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ==========================================================================
   10. Comparison Tables
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
}

.table-wrapper .comparison-table {
    margin: 0;
    min-width: 500px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--bg-dark);
    color: var(--text-white);
    font-weight: 600;
}

.comparison-table th:first-child {
    border-radius: 8px 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 8px 0 0;
}

.comparison-table tr:hover td {
    background: var(--bg-light);
}

.comparison-table .tool-name,
.comparison-table .process-name {
    font-weight: 600;
    color: var(--text-dark);
}

.comparison-table tbody th {
    background: transparent;
    color: var(--text-dark);
}

/* ==========================================================================
   11. Callout/Quote Box
   ========================================================================== */

.callout-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 24px 28px;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}

.callout-box p {
    font-size: 1.125rem;
    font-style: italic;
    margin: 0;
    color: var(--text-dark);
}

.callout-box .callout-source {
    margin-top: 12px;
    font-size: 0.875rem;
    font-style: normal;
    color: var(--text-light);
}

/* ==========================================================================
   12. Tip/Warning Box
   ========================================================================== */

.tip-box {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 2rem 0;
}

.tip-box.warning {
    background: #FEF3F2;
    border: 1px solid #FECACA;
}

.tip-box.tip {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
}

.tip-box i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-box.warning i {
    color: #DC2626;
}

.tip-box.tip i {
    color: #059669;
}

.tip-box-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.tip-box-content p {
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   13. Process Steps
   ========================================================================== */

.process-steps {
    counter-reset: step;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.process-step {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.process-step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.process-step h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.process-step p {
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   14. Inline CTA
   ========================================================================== */

.inline-cta {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1b1a 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 3rem 0;
    text-align: center;
}

.inline-cta h3 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.inline-cta p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.inline-cta .btn {
    background-color: var(--primary-color);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.inline-cta .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   16. Author Box
   ========================================================================== */

.author-box {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: var(--bg-light);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 3rem 0 0 0;
    align-items: center;
}

.author-box-avatar {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    overflow: hidden;
}

.author-box-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-box-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.author-box-content p {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.author-box-content a {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.author-box-content a:hover {
    color: var(--primary-dark);
}

/* ==========================================================================
   17. Social Share Buttons
   ========================================================================== */

.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2rem 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.social-share-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
}

.social-share-buttons {
    display: flex;
    gap: 8px;
}

.social-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-share-btn:hover {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.social-share-btn.linkedin:hover,
.social-share-btn.twitter:hover,
.social-share-btn.email:hover {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: white;
}

/* Remove external link indicator from social buttons */
.social-share-btn::after {
    display: none !important;
}

/* ==========================================================================
   18. Related Articles
   ========================================================================== */

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-article-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-article-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Remove external link indicator from related articles */
.related-article-card::after {
    display: none !important;
}

.related-article-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.related-article-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.4;
}

.related-article-content span {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.related-article-arrow {
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-left: auto;
    align-self: center;
}

.related-article-card:hover .related-article-arrow {
    color: var(--text-dark);
    transform: translateX(4px);
}

/* ==========================================================================
   19. Responsive Styles
   ========================================================================== */

@media (max-width: 968px) {
    .seo-article-layout {
        grid-template-columns: 1fr;
    }

    .seo-article-sidebar {
        display: none;
    }

    .mobile-toc-btn {
        display: flex;
    }

    .mobile-toc-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-toc-overlay.active {
        pointer-events: auto;
    }

    .stats-highlight {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 0.875rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-box-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .lead-magnet {
        flex-direction: column;
        text-align: center;
    }

    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .seo-content h2 {
        font-size: 1.5rem;
    }

    .seo-content h3 {
        font-size: 1.25rem;
    }

    .key-takeaways {
        padding: 20px 24px;
    }

    .definition-box {
        padding: 20px 24px;
    }
}
