/**
 * SEO Features Styling
 * Styles for author bios, TOC, trust signals, etc.
 * NOTE: Only applies to frontend, not wp-admin
 */

/* Prevent these styles from affecting WordPress admin */
body:not(.wp-admin) .author-box-wrap,
body:not(.wp-admin) .author-box,
body:not(.wp-admin) .author-box-info {
    /* Styles will only apply on frontend */
}

/* ===================================================================
   AUTHOR BIO BOX (E-E-A-T)
   =================================================================== */

/* Override standard author box to ensure left alignment - FRONTEND ONLY */
body:not(.wp-admin) .author-box-wrap {
    text-align: left !important;
}

body:not(.wp-admin) .author-box {
    display: flex !important;
    gap: 20px !important;
    align-items: flex-start !important;
}

body:not(.wp-admin) .author-box-info {
    flex: 1;
    text-align: left !important;
}

.author-bio-box {
    background: #f8f9fa;
    border-left: 4px solid var(--color-primary);
    padding: 30px;
    margin: 40px 0;
    border-radius: 8px;
    display: block; /* Changed from flex to block for vertical stacking */
}

.author-bio-avatar {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
}

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

.author-bio-content {
    overflow: hidden; /* Clearfix for floated avatar */
}

.author-bio-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.author-bio-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.author-bio-name a {
    color: var(--color-heading);
    text-decoration: none;
}

.author-bio-name a:hover {
    color: var(--color-primary);
}

.author-credentials {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.author-expertise {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-bio-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Ensure author box description doesn't get overridden by category styles */
/* Super specific selectors to override category-description */
/* Note: .author-page .author-description removed - it needs white text on dark background */
.author-box-wrap .author-box-description,
.author-box-wrap .author-box-description *,
.author-box .author-box-description,
.author-box .author-box-description *,
.author-box .author-box-description p,
.author-bio-box .author-bio-text,
.author-box-info .author-box-description,
/* Force override even if category-description class is applied */
.author-box-wrap .category-description,
.author-box .category-description,
.author-box-info .category-description,
/* .author-page .category-description removed - needs white text on dark background */
body .author-box-wrap .category-description,
body .author-box .category-description,
/* Even more specific - target inside single post author boxes */
article .author-box-wrap .author-box-description,
article .author-box .author-box-description,
article .author-box-wrap .category-description,
article .author-box .category-description,
.td-post-content + .author-box-wrap .author-box-description,
.td-post-content + .author-box-wrap .category-description,
.post .author-box-wrap .author-box-description,
.post .author-box-wrap .category-description {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #555 !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-align: left !important;
    background: transparent !important;
}

.author-bio-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed from space-between to flex-start for left alignment */
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    flex-wrap: wrap;
}

.author-articles-count {
    font-size: 14px;
    color: #666;
}

.author-social-links {
    display: flex;
    gap: 10px;
}

.author-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.author-social-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.author-more-posts {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1c3f60;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

.author-more-posts:hover {
    color: #0d8abc;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .author-bio-box {
        padding: 20px;
    }

    .author-bio-avatar {
        float: none; /* Remove float on mobile */
        margin-right: 0;
        margin-bottom: 20px;
        text-align: center;
    }

    .author-bio-avatar img {
        margin: 0 auto;
    }

    .author-bio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .author-bio-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================================================================
   TABLE OF CONTENTS
   =================================================================== */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--color-primary);
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.toc-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-heading);
}

.toc-list {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
    margin: 0;
}

.toc-item {
    counter-increment: toc-counter;
    margin-bottom: 10px;
}

.toc-item::before {
    content: counter(toc-counter) ". ";
    font-weight: 700;
    color: var(--color-primary);
    margin-right: 8px;
}

.toc-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.toc-item-sub {
    margin-left: 25px;
    margin-bottom: 8px;
    list-style: none;
}

.toc-item-sub a {
    color: #555;
    font-size: 14px;
}

/* ===================================================================
   TRUST SIGNALS & E-E-A-T
   =================================================================== */
.reviewed-badge,
.editorial-standards,
.last-updated,
.last-reviewed {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
    color: #2e7d32;
}

.reviewed-badge i,
.editorial-standards i,
.last-updated i,
.last-reviewed i {
    color: #4caf50;
}

.editorial-standards {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

.editorial-standards i {
    color: #2196f3;
}

.editorial-standards a {
    color: #1c3f60;
    text-decoration: underline;
    font-weight: 600;
}

.editorial-standards a:hover {
    color: #0d8abc;
}

.last-updated,
.last-reviewed {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
}

/* Hide the orange last-updated box since we already show "(Last updated)" in post meta */
.last-updated {
    display: none;
}

.last-updated i,
.last-reviewed i {
    color: #ff9800;
}

/* ===================================================================
   DISCLAIMERS (YMYL)
   =================================================================== */
.ymyl-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ff9800;
    padding: 20px;
    margin: 30px 0;
    border-radius: 6px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.ymyl-disclaimer i {
    color: #ff9800;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===================================================================
   SOURCES & CITATIONS
   =================================================================== */
.article-sources {
    background: #f8f9fa;
    border-top: 3px solid var(--color-primary);
    padding: 25px;
    margin: 40px 0;
    border-radius: 8px;
}

.article-sources h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--color-heading);
}

.sources-list {
    counter-reset: sources-counter;
    padding-left: 0;
}

.sources-list li {
    counter-increment: sources-counter;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.sources-list li::before {
    content: "[" counter(sources-counter) "]";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--color-primary);
}

.sources-list a {
    color: var(--color-primary);
    text-decoration: underline;
}

.sources-list a:hover {
    text-decoration: none;
}

.source-author {
    color: #666;
    font-size: 14px;
}

/* ===================================================================
   TRUST SIGNALS (FOOTER/SIDEBAR)
   =================================================================== */
.trust-signals {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 30px 0;
}

.trust-signal {
    text-align: center;
    flex: 1;
}

.trust-signal i {
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
}

.trust-signal span {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

@media (max-width: 767px) {
    .trust-signals {
        flex-wrap: wrap;
    }

    .trust-signal {
        flex: 0 0 calc(50% - 10px);
    }
}

/* ===================================================================
   TRANSPARENCY NOTICES
   =================================================================== */
.transparency-notice,
.about-links {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f1f5f9;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
    color: #475569;
}

.transparency-notice i {
    color: var(--color-primary);
}

.transparency-notice a,
.about-links a {
    color: var(--color-primary);
    text-decoration: underline;
}

.transparency-notice a:hover,
.about-links a:hover {
    text-decoration: none;
}

.about-links {
    justify-content: center;
}

.about-links .separator {
    color: #cbd5e1;
}

/* ===================================================================
   VERIFICATION BADGES
   =================================================================== */
.verification-badges {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 20px 0;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.badge i {
    color: #4caf50;
}

.badge.ssl-secure i {
    color: #4caf50;
}

.badge.privacy i {
    color: #2196f3;
}

/* ===================================================================
   FEATURED IN (PUBLICATIONS)
   =================================================================== */
.featured-in {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    margin: 40px 0;
}

.featured-in h4 {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.featured-logos img {
    height: 30px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.featured-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ===================================================================
   INTERNAL LINKS
   =================================================================== */
.internal-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(13, 138, 188, 0.3);
    transition: all 0.3s ease;
}

.internal-link:hover {
    text-decoration-color: var(--color-primary);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 767px) {
    .table-of-contents {
        padding: 20px;
    }

    .article-sources {
        padding: 20px;
    }

    .author-bio-box {
        padding: 20px;
    }

    .ymyl-disclaimer {
        padding: 15px;
        font-size: 13px;
    }

    .verification-badges {
        flex-wrap: wrap;
    }

    .featured-logos {
        gap: 20px;
    }
}
