/**
 * SmartSEO Professional Content Styles (v2.0)
 * Optimized for Reader Engagement & Mobile Responsiveness
 * =======================================================
 */

/* --- 1. Global Reset & Layout Safety --- */
/* Ensure all SmartSEO injected elements never break the theme layout */
.smartseo-generated-content {
    max-width: 100%;
    overflow: hidden; /* Prevent horizontal scroll leak */
    box-sizing: border-box;
    font-family: inherit; /* Inherit theme font */
}

/* Fallback for legacy posts not yet wrapped */
figure.smartseo-product-image,
.smartseo-comparison-table-wrapper,
.smartseo-toc {
    max-width: 100% !important;
    box-sizing: border-box;
}

figure.smartseo-product-image,
figure.smartseo-product-image a,
figure.smartseo-product-image img {
    width: 600px !important;
    max-width: 100% !important;
}

figure.smartseo-product-image {
    overflow: hidden;
    margin-left: auto !important;
    margin-right: auto !important;
}

figure.smartseo-product-image img {
    height: auto !important;
}

/* Universal Media Safety */
.smartseo-generated-content img,
.smartseo-generated-content iframe,
.smartseo-generated-content video,
figure.smartseo-product-image img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    margin: 0 auto;
}

/* --- 2. Typography & Readability --- */
.smartseo-generated-content h2 {
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    position: relative;
}

.smartseo-generated-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #375542; /* Brand Color */
}

.smartseo-generated-content h3 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

.smartseo-generated-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #444;
}

.smartseo-generated-content ul, 
.smartseo-generated-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.smartseo-generated-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- 3. Interactive Elements (Buttons & Links) --- */
.smartseo-cta-container {
    text-align: center;
    margin: 40px 0;
}

a.smartseo-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5253 100%);
    color: #fff !important;
    padding: 16px 50px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(238, 82, 83, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

a.smartseo-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(238, 82, 83, 0.4);
    color: #fff !important;
}

/* --- 4. Special Components --- */

/* ===== Table of Contents (TOC) ===== */
.smartseo-toc {
    width: 600px;
    max-width: 100% !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
    border: 1px solid #d7e5dc;
    border-radius: 18px;
    padding: 18px 20px;
    margin: 28px auto;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.smartseo-toc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #375542 0%, #4b6d58 100%);
}

.smartseo-toc h3 {
    margin: 6px 0 12px 0;
    padding: 0 2px 10px 2px;
    border-bottom: 1px dashed #d8e7de;
    font-size: 14px;
    font-weight: 800;
    color: #1f3d2f;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.smartseo-toc ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    counter-reset: smartseo-toc-counter;
}

.smartseo-toc li {
    margin: 0;
    padding: 0;
}

.smartseo-toc li.smartseo-toc-depth-2 {
    counter-increment: smartseo-toc-counter;
}

.smartseo-toc li.smartseo-toc-depth-2 a::before {
    content: counter(smartseo-toc-counter, decimal-leading-zero);
    min-width: 24px;
    color: #5d7467;
    font-size: 11px;
    font-weight: 800;
}

.smartseo-toc a {
    color: #2f3f36;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.smartseo-toc a:hover {
    color: #173225;
    background: #e9f4ee;
    transform: translateX(2px);
}

/* ===== Comparison Table ===== */
.smartseo-comparison-table-wrapper {
    width: 600px;
    max-width: 100% !important;
    margin: 36px auto;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #dbe7df;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    margin-left: auto;
    margin-right: auto;
}

.smartseo-comparison-table {
    display: block;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: #b8cfc1 #eef4f0;
}

.smartseo-comparison-table::-webkit-scrollbar {
    height: 8px;
}

.smartseo-comparison-table::-webkit-scrollbar-track {
    background: #eef4f0;
    border-radius: 999px;
}

.smartseo-comparison-table::-webkit-scrollbar-thumb {
    background: #b8cfc1;
    border-radius: 999px;
}

.smartseo-comparison-table h3 {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #2f4c3b 0%, #3a5a47 55%, #456a53 100%);
    margin: 0;
    padding: 14px 16px;
    letter-spacing: 0.03em;
    text-transform: none;
    line-height: 1.35;
}

.smartseo-comparison-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 620px;
    font-size: 13px;
    table-layout: auto;
}

.smartseo-comparison-table th,
.smartseo-comparison-table td {
    padding: 12px 13px;
    border-bottom: 1px solid #e9f0eb;
    text-align: left;
    vertical-align: middle;
    line-height: 1.5;
}

.smartseo-comparison-table th {
    background: #f1f7f3;
    color: #244233;
    font-weight: 750;
    white-space: nowrap;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #dde9e2;
}

/* Sticky First Column */
.smartseo-comparison-table td:first-child,
.smartseo-comparison-table th:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 2;
    font-weight: 700;
    color: #1f2937;
    border-right: 1px solid #e5ede8;
    min-width: 132px;
    box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.2);
}

.smartseo-comparison-table th:first-child {
    background: #e7f1eb;
    z-index: 3;
}

.smartseo-comparison-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.smartseo-comparison-table tbody tr:nth-child(even) td {
    background: #fbfdfc;
}

.smartseo-comparison-table tr:hover td {
    background-color: #f0f7f3;
}

.smartseo-comparison-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .smartseo-toc {
        padding: 14px 12px;
        margin: 22px 0;
    }

    .smartseo-toc a {
        font-size: 12px;
    }

    .smartseo-comparison-table-wrapper {
        margin: 24px 0;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    }

    .smartseo-comparison-table h3 {
        font-size: 14px;
        padding: 12px 12px;
    }

    .smartseo-comparison-table table {
        min-width: 560px;
    }

    .smartseo-comparison-table th,
    .smartseo-comparison-table td {
        padding: 10px 10px;
        font-size: 12px;
    }

    .smartseo-comparison-table td:first-child,
    .smartseo-comparison-table th:first-child {
        min-width: 118px;
    }
}

/* Verdict / Pros & Cons Box (Visual Template Feature) */
.smartseo-verdict-box {
    background: #fff;
    border: 2px solid #375542;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.smartseo-verdict-box::before {
    content: 'VERDICT';
    position: absolute;
    top: 0;
    right: 0;
    background: #375542;
    color: #fff;
    padding: 5px 20px;
    font-size: 12px;
    font-weight: bold;
    border-bottom-left-radius: 12px;
}

.smartseo-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

@media (max-width: 600px) {
    .smartseo-pros-cons-grid { grid-template-columns: 1fr; }
}

.smartseo-pros-box, .smartseo-cons-box {
    padding: 20px;
    border-radius: 8px;
}

.smartseo-pros-box { background: rgba(76, 175, 80, 0.1); border-left: 4px solid #4CAF50; }
.smartseo-cons-box { background: rgba(244, 67, 54, 0.1); border-left: 4px solid #F44336; }

.smartseo-pros-box h4 { color: #2E7D32; margin-top: 0; }
.smartseo-cons-box h4 { color: #C62828; margin-top: 0; }

/* Breadcrumbs */
.smartseo-breadcrumbs {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
}

.smartseo-breadcrumbs a {
    color: #375542;
    text-decoration: none;
}

.smartseo-breadcrumbs span {
    margin: 0 5px;
    color: #ccc;
}

/* Product Image Figures */
figure.smartseo-product-image {
    margin: 30px auto !important;
    text-align: center;
    display: block;
    max-width: 100% !important;
}

figure.smartseo-product-image figcaption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

/* --- 5. Table Helpers (Added for Dynamic Content) --- */
.smartseo-comparison-table th.smartseo-highlight-col {
    background: linear-gradient(180deg, #e5f2ea 0%, #dcece3 100%);
    color: #173225;
    border-bottom-color: #cedfd5;
    border-left: 1px solid #d3e3d9;
    border-right: 1px solid #d3e3d9;
    font-weight: 800;
}

.smartseo-comparison-table td.smartseo-highlight-col {
    background: #edf6f1;
    font-weight: 700;
    color: #173225;
    border-left: 1px solid #d9e7df;
    border-right: 1px solid #d9e7df;
}

.smartseo-table-btn {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2f4c3b 0%, #3e634d 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(55, 85, 66, 0.2);
}

.smartseo-table-btn:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
    color: white !important;
    box-shadow: 0 8px 16px rgba(55, 85, 66, 0.26);
}

.smartseo-table-btn.secondary {
    background: #ffffff;
    color: #2f4c3b !important;
    border: 1px solid #cfe0d6;
    box-shadow: none;
}

.smartseo-table-btn.secondary:hover {
    background: #f2f7f4;
    color: #1f3d2f !important;
}

.smartseo-rating-star {
    color: #f1c40f;
}

.smartseo-stock-status {
    color: #27ae60;
    font-weight: 600;
}

.smartseo-internal-link-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    padding: 20px;
    border-left: 5px solid #375542;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.smartseo-internal-link-box a {
    color: #375542;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #375542;
    transition: all 0.3s;
}

.smartseo-internal-link-box a:hover {
    color: #2c3e50;
    border-bottom-color: transparent;
}

/* --- 6. Related Posts (Grid System) --- */
.smartseo-related-posts {
    background: #fff;
    padding: 30px;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.smartseo-related-title {
    color: #375542;
    margin: 0 0 25px 0;
    font-size: 24px;
    border-bottom: 3px solid #375542;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.smartseo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.smartseo-related-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%; /* Equal height */
    display: flex;
    flex-direction: column;
}

.smartseo-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(55,85,66,0.15);
}

.smartseo-related-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.smartseo-related-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.smartseo-related-content {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.smartseo-related-card h3 {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smartseo-related-card p {
    margin: 0 0 15px 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smartseo-read-more {
    color: #375542;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

/* --- 7. TOC Indentation Helper --- */
.smartseo-toc li.smartseo-toc-depth-3 {
    margin-left: 18px;
}

.smartseo-toc li.smartseo-toc-depth-3 a {
    font-size: 13px;
    color: #5b6b61;
    font-weight: 500;
    padding-top: 7px;
    padding-bottom: 7px;
}

.smartseo-toc-icon {
    display: none;
}

/* --- 8. Meta Info - disabled per user request --- */
/* .smartseo-meta-info { ... } */

/* --- 9. Social Share Buttons --- */
.smartseo-social-share {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    margin: 40px 0;
    border-radius: 12px;
    border-left: 5px solid #375542;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 100%;
}

.smartseo-social-header {
    margin: 0 0 15px 0;
    color: #375542; 
    font-size: 18px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.smartseo-social-buttons {
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap;
}

.smartseo-share-btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: #fff !important;
    border: none;
    cursor: pointer;
}

.smartseo-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.smartseo-share-btn.twitter { background: #1DA1F2; }
.smartseo-share-btn.facebook { background: #1877F2; }
.smartseo-share-btn.linkedin { background: #0A66C2; }
.smartseo-share-btn.whatsapp { background: #25D366; }
.smartseo-share-btn.copy-btn { background: #64748b; }


/* CTA Variants */
.smartseo-cta-variant-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    color: #ffffff;
}
.smartseo-cta-variant-1 h3 { color: #ffffff !important; }
.smartseo-cta-variant-1 .smartseo-cta-button { 
    background: #ffffff !important; 
    color: #000000 !important; /* Pure Black for max contrast */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.smartseo-cta-variant-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 24px rgba(245, 87, 108, 0.25);
    color: #ffffff;
}
.smartseo-cta-variant-2 h3 { color: #ffffff !important; }
.smartseo-cta-variant-2 .smartseo-cta-button { 
    background: #ffffff !important; 
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.smartseo-cta-variant-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.25);
    color: #ffffff;
}
.smartseo-cta-variant-3 h3 { color: #ffffff !important; }
.smartseo-cta-variant-3 .smartseo-cta-button { 
    background: #ffffff !important; 
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Global CTA Structure fix */
.smartseo-cta {
    padding: 30px; 
    margin: 30px auto; /* Centered */
    border-radius: 16px; 
    text-align: center;
    max-width: 800px; /* Prevent over-stretch */
    width: 90%;
    box-sizing: border-box;
}

/* Ensure h3 inside CTA is visible */
.smartseo-cta h3 {
    font-size: 22px; 
    font-weight: 600;
    margin: 0 0 15px 0;
}

/* --- 10. Quality Badge --- */
.smartseo-quality-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
    margin: 25px 0;
    border-radius: 12px;
    border-left: 5px solid #3b82f6; /* Default Blue */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.smartseo-quality-badge[data-grade="S"] { border-left-color: #8b5cf6; }
.smartseo-quality-badge[data-grade="A"] { border-left-color: #10b981; }
.smartseo-quality-badge[data-grade="B"] { border-left-color: #3b82f6; }

.smartseo-badge-main {
    flex: 1;
    min-width: 200px;
}

.smartseo-badge-main h4 {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.smartseo-badge-score-box {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.smartseo-badge-total {
    font-size: 32px;
    font-weight: bold;
    color: #3b82f6;
}
.smartseo-badge-total span { font-size: 18px; color: #64748b; }

.smartseo-badge-grade {
    background: #3b82f6;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.smartseo-badge-details {
    flex: 2;
    min-width: 300px;
}

.smartseo-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.smartseo-badge-bar-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.smartseo-badge-bar-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.smartseo-badge-bar-fill {
    height: 100%;
    transition: width 0.5s;
    background: #3b82f6;
}

.smartseo-badge-bar-value {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-top: 4px;
}

/* --- 11. Internal Link Box --- */
.smartseo-link-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    padding: 20px;
    border-left: 5px solid #375542;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.smartseo-link-box p { margin: 0; }

.smartseo-link-box a {
    color: #375542;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #375542;
    transition: all 0.3s;
}

.smartseo-link-box a:hover {
    color: #2c3e50;
    border-bottom-color: transparent;
}

/* --- 12. Breadcrumbs (Refined) --- */
.smartseo-breadcrumb-nav {
    margin: 15px 0;
}

.smartseo-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px;
    color: #64748b;
}

.smartseo-breadcrumb-item {
    display: flex;
    align-items: center;
}

.smartseo-breadcrumb-link {
    color: #375542;
    text-decoration: none;
    transition: color 0.3s;
}
.smartseo-breadcrumb-link:hover { color: #4a6b56; }

.smartseo-breadcrumb-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.smartseo-breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
}

/* --- 13. UI Controls --- */
/* scroll-to-top button disabled per user request */
.smartseo-scroll-top {
    display: none !important;
}

.smartseo-scroll-btn {
    display: none !important;
}

/* --- FORCE OVERRIDE: keep SmartSEO blocks at 600px in article --- */
.entry-content .smartseo-toc,
.post-content .smartseo-toc,
article .smartseo-toc,
.entry-content .smartseo-comparison-table-wrapper,
.post-content .smartseo-comparison-table-wrapper,
article .smartseo-comparison-table-wrapper,
.entry-content .smartseo-spec-table-wrapper,
.post-content .smartseo-spec-table-wrapper,
article .smartseo-spec-table-wrapper {
    width: 600px !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --- FORCE OVERRIDE: comparison table visual + typography reset --- */
.entry-content .smartseo-comparison-table-wrapper,
.post-content .smartseo-comparison-table-wrapper,
article .smartseo-comparison-table-wrapper {
    border-radius: 16px !important;
    border: 1px solid #dbe7df !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%) !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
}

.entry-content .smartseo-comparison-table h3,
.post-content .smartseo-comparison-table h3,
article .smartseo-comparison-table h3 {
    margin: 0 !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2f4c3b 0%, #3a5a47 55%, #456a53 100%) !important;
}

.entry-content .smartseo-comparison-table table,
.post-content .smartseo-comparison-table table,
article .smartseo-comparison-table table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    min-width: 620px !important;
}

.entry-content .smartseo-comparison-table th,
.entry-content .smartseo-comparison-table td,
.post-content .smartseo-comparison-table th,
.post-content .smartseo-comparison-table td,
article .smartseo-comparison-table th,
article .smartseo-comparison-table td {
    padding: 12px 13px !important;
    border-bottom: 1px solid #e9f0eb !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
    text-align: left !important;
}

.entry-content .smartseo-comparison-table th,
.post-content .smartseo-comparison-table th,
article .smartseo-comparison-table th {
    background: #f1f7f3 !important;
    color: #244233 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    border-bottom: 1px solid #dde9e2 !important;
}

.entry-content .smartseo-comparison-table td:first-child,
.entry-content .smartseo-comparison-table th:first-child,
.post-content .smartseo-comparison-table td:first-child,
.post-content .smartseo-comparison-table th:first-child,
article .smartseo-comparison-table td:first-child,
article .smartseo-comparison-table th:first-child {
    position: sticky !important;
    left: 0 !important;
    background: #ffffff !important;
    z-index: 2 !important;
    min-width: 132px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    border-right: 1px solid #e5ede8 !important;
    box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.2) !important;
}

.entry-content .smartseo-comparison-table th:first-child,
.post-content .smartseo-comparison-table th:first-child,
article .smartseo-comparison-table th:first-child {
    background: #e7f1eb !important;
    z-index: 3 !important;
}

.entry-content .smartseo-comparison-table tr:nth-child(even) td,
.post-content .smartseo-comparison-table tr:nth-child(even) td,
article .smartseo-comparison-table tr:nth-child(even) td {
    background: #fbfdfc !important;
}

.entry-content .smartseo-comparison-table tr:hover td,
.post-content .smartseo-comparison-table tr:hover td,
article .smartseo-comparison-table tr:hover td {
    background: #f0f7f3 !important;
}

/* Prevent theme heading styles (e.g. giant h2) from polluting table cells */
.entry-content .smartseo-comparison-table td h1,
.entry-content .smartseo-comparison-table td h2,
.entry-content .smartseo-comparison-table td h3,
.entry-content .smartseo-comparison-table td h4,
.entry-content .smartseo-comparison-table td h5,
.entry-content .smartseo-comparison-table td h6,
.post-content .smartseo-comparison-table td h1,
.post-content .smartseo-comparison-table td h2,
.post-content .smartseo-comparison-table td h3,
.post-content .smartseo-comparison-table td h4,
.post-content .smartseo-comparison-table td h5,
.post-content .smartseo-comparison-table td h6,
article .smartseo-comparison-table td h1,
article .smartseo-comparison-table td h2,
article .smartseo-comparison-table td h3,
article .smartseo-comparison-table td h4,
article .smartseo-comparison-table td h5,
article .smartseo-comparison-table td h6 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    color: inherit !important;
    border: none !important;
}

.smartseo-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #375542 0%, #4a6b56 50%, #5d8a6f 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==============================================
   AI-Generated Spec Table (bare tables from AI)
   ============================================== */
.smartseo-spec-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 24px 0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

/* Some historical posts ended up with nested spec wrappers. Collapse inner wrapper
   so only the outer container controls width/overflow. */
.smartseo-spec-table-wrapper .smartseo-spec-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.smartseo-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 320px;
}
.smartseo-spec-table th,
.smartseo-spec-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
}
.smartseo-spec-table th {
    background: #f1f5f2;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    width: 38%;
}
.smartseo-spec-table tbody tr:nth-child(even) td {
    background: #f8faf9;
}
.smartseo-spec-table tbody tr:hover td {
    background: #eef4f0;
}
.smartseo-table-caption {
    font-size: 13px;
    color: #64748b;
    margin-top: -16px;
    margin-bottom: 20px;
    font-style: italic;
}

/* ==============================================
   Template: Problem Solver
   ============================================== */
.smartseo-problem-box {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    color: #742a2a;
}
.smartseo-solution-box {
    background: #f0fff4;
    border-left: 4px solid #38a169;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    color: #22543d;
}
ul.smartseo-benefit-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}
ul.smartseo-benefit-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.7;
}
ul.smartseo-benefit-list li:last-child { border-bottom: none; }

/* ==============================================
   Template: User Guide — Step boxes & callouts
   ============================================== */
.smartseo-step-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
}
.smartseo-step-number {
    background: #375542;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.8;
}
.smartseo-step-content { flex: 1; }
.smartseo-callout {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}
.smartseo-callout-tip {
    background: #fffbeb;
    border-left: 4px solid #d97706;
    color: #78350f;
}
.smartseo-callout-warn {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}

/* ==============================================
   Template: Buying Decision — Audience grid
   ============================================== */
.smartseo-audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.smartseo-audience-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
}
.smartseo-audience-card strong { display: block; margin-bottom: 4px; color: #375542; }

/* Mobile safety for new components */
@media (max-width: 600px) {
    .smartseo-step-box { flex-direction: column; gap: 10px; }
    .smartseo-audience-grid { grid-template-columns: 1fr; }
    .smartseo-spec-table th { width: auto; white-space: normal; }
}

/* ==============================================
   Premium Review Surface Overrides
   ============================================== */
.smartseo-review-surface {
    --smartseo-surface-max: 680px;
    --smartseo-mobile-gutter: 20px;
    --smartseo-paper: #fcfaf6;
    --smartseo-paper-soft: #f5f1ea;
    --smartseo-border-soft: #ded5c8;
    --smartseo-border-strong: #ccbda8;
    --smartseo-ink-strong: #1d2c25;
    --smartseo-ink-muted: #5f6b63;
    --smartseo-accent: #375542;
    --smartseo-accent-warm: #b88954;
    color: var(--smartseo-ink-strong);
}

.smartseo-review-surface > * {
    box-sizing: border-box;
}

.smartseo-review-surface > :where(
    nav.smartseo-breadcrumb-nav,
    p,
    h2,
    h3,
    h4,
    ul,
    ol,
    dl,
    blockquote,
    .smartseo-audience-grid,
    .smartseo-link-box,
    .smartseo-toc,
    .smartseo-comparison-table-wrapper,
    .smartseo-spec-table-wrapper,
    .smartseo-cta,
    .smartseo-verdict-box,
    .smartseo-pros-cons-grid,
    figure.smartseo-product-image
) {
    width: min(100%, var(--smartseo-surface-max));
    margin-left: auto !important;
    margin-right: auto !important;
}

.smartseo-review-surface p,
.smartseo-review-surface li,
.smartseo-review-surface dd {
    color: #34413b;
}

.smartseo-review-surface h2 {
    color: var(--smartseo-ink-strong);
    border-bottom-color: #e9e0d5;
    letter-spacing: -0.02em;
}

.smartseo-review-surface h2::after {
    width: 72px;
    background: linear-gradient(90deg, var(--smartseo-accent) 0%, var(--smartseo-accent-warm) 100%);
}

.smartseo-review-surface h3 {
    color: #273830;
    letter-spacing: -0.01em;
}

.smartseo-review-surface .smartseo-breadcrumb-nav {
    padding: 14px 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f6f2ea 100%);
    border: 1px solid var(--smartseo-border-soft);
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(22, 32, 26, 0.06);
}

.smartseo-review-surface .smartseo-audience-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f5ef 100%);
    border: 1px solid var(--smartseo-border-soft);
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(23, 35, 29, 0.05);
}

.smartseo-review-surface .smartseo-audience-card strong {
    color: #284035;
}

.smartseo-review-surface .smartseo-audience-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 26px auto;
}

.smartseo-review-surface .smartseo-audience-grid > * {
    min-width: 0;
}

.smartseo-review-surface .smartseo-audience-grid .smartseo-audience-card,
.smartseo-review-surface .smartseo-audience-grid .smartseo-verdict-box {
    width: 100%;
    margin: 0;
}

.smartseo-review-surface .smartseo-audience-card {
    padding: 20px 24px;
}

.smartseo-review-surface .smartseo-audience-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.smartseo-review-surface .smartseo-verdict-box p:first-child {
    margin-top: 0;
}

.smartseo-review-surface .smartseo-link-box {
    position: relative;
    padding: 18px 22px 18px 58px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f3ec 100%);
    border: 1px solid var(--smartseo-border-soft);
    border-left: 0;
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(22, 32, 26, 0.06);
}

.smartseo-review-surface .smartseo-link-box::before {
    content: "Curated";
    position: absolute;
    top: 18px;
    left: 18px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--smartseo-accent);
}

.smartseo-review-surface figure.smartseo-product-image {
    padding: 16px;
    background: linear-gradient(160deg, #ffffff 0%, #f4efe7 100%);
    border: 1px solid var(--smartseo-border-soft);
    border-radius: 26px;
    box-shadow: 0 20px 36px rgba(23, 35, 29, 0.08);
}

.smartseo-review-surface figure.smartseo-product-image:nth-of-type(even) {
    background: linear-gradient(160deg, #ffffff 0%, #f2f6f1 100%);
}

.smartseo-review-surface figure.smartseo-product-image a {
    display: block;
}

.smartseo-review-surface figure.smartseo-product-image img {
    width: 100% !important;
    border-radius: 18px;
    background: var(--smartseo-paper);
    box-shadow: 0 18px 38px rgba(20, 30, 25, 0.12);
}

.smartseo-review-surface figure.smartseo-product-image figcaption {
    margin-top: 14px;
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6a746d;
}

.smartseo-review-surface .smartseo-toc,
.smartseo-review-surface .smartseo-comparison-table-wrapper,
.smartseo-review-surface .smartseo-spec-table-wrapper {
    border-radius: 22px;
    box-shadow: 0 20px 36px rgba(23, 35, 29, 0.08);
}

.smartseo-review-surface .smartseo-verdict-box {
    background: linear-gradient(145deg, #fffdfa 0%, #f4efe6 100%);
    border: 1px solid var(--smartseo-border-soft);
    border-radius: 24px;
    box-shadow: 0 20px 36px rgba(23, 35, 29, 0.08);
}

.smartseo-review-surface .smartseo-verdict-box::before {
    content: "Editor Verdict";
    background: linear-gradient(90deg, var(--smartseo-accent) 0%, var(--smartseo-accent-warm) 100%);
    letter-spacing: 0.14em;
}

.smartseo-review-surface .smartseo-pros-box,
.smartseo-review-surface .smartseo-cons-box {
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.smartseo-review-surface .smartseo-pros-cons-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 22px 0 0;
}

.smartseo-review-surface .smartseo-cta,
.smartseo-review-surface .smartseo-cta-variant-1,
.smartseo-review-surface .smartseo-cta-variant-2,
.smartseo-review-surface .smartseo-cta-variant-3 {
    width: min(100%, 720px);
    padding: 30px 32px;
    background: linear-gradient(135deg, #2f4539 0%, #516a59 58%, #b88954 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 22px 42px rgba(23, 35, 29, 0.18);
    color: #ffffff;
}

.smartseo-review-surface .smartseo-cta h3,
.smartseo-review-surface .smartseo-cta-variant-1 h3,
.smartseo-review-surface .smartseo-cta-variant-2 h3,
.smartseo-review-surface .smartseo-cta-variant-3 h3 {
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.smartseo-review-surface .smartseo-cta-button,
.smartseo-review-surface .smartseo-cta-variant-1 .smartseo-cta-button,
.smartseo-review-surface .smartseo-cta-variant-2 .smartseo-cta-button,
.smartseo-review-surface .smartseo-cta-variant-3 .smartseo-cta-button {
    background: #ffffff !important;
    color: #1d2c25 !important;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.smartseo-review-surface .smartseo-cta-button:hover {
    color: #1d2c25 !important;
}

.smartseo-review-style-1 .smartseo-link-box::before {
    content: "Curated";
}

.smartseo-review-style-2 {
    --smartseo-paper: #fbf8f3;
    --smartseo-paper-soft: #f3eee5;
    --smartseo-border-soft: #ddd4c8;
    --smartseo-border-strong: #ccbba4;
    --smartseo-ink-strong: #1e2d36;
    --smartseo-ink-muted: #667078;
    --smartseo-accent: #32475a;
    --smartseo-accent-warm: #b67b48;
}

.smartseo-review-style-2 .smartseo-breadcrumb-nav {
    background: linear-gradient(135deg, #ffffff 0%, #f4efe6 100%);
    border-radius: 14px;
}

.smartseo-review-style-2 .smartseo-audience-card,
.smartseo-review-style-2 .smartseo-link-box,
.smartseo-review-style-2 .smartseo-toc,
.smartseo-review-style-2 .smartseo-verdict-box,
.smartseo-review-style-2 .smartseo-comparison-table-wrapper,
.smartseo-review-style-2 .smartseo-spec-table-wrapper,
.smartseo-review-style-2 figure.smartseo-product-image {
    border-radius: 16px;
}

.smartseo-review-style-2 .smartseo-audience-card,
.smartseo-review-style-2 .smartseo-link-box {
    background: linear-gradient(140deg, #ffffff 0%, #f3eee7 100%);
}

.smartseo-review-style-2 .smartseo-link-box::before {
    content: "Editorial Note";
    color: #32475a;
}

.smartseo-review-style-2 .smartseo-toc h3 {
    color: #32475a;
    letter-spacing: 0.18em;
}

.smartseo-review-style-2 .smartseo-verdict-box::before {
    content: "Design Brief";
}

.smartseo-review-style-2 .smartseo-cta,
.smartseo-review-style-2 .smartseo-cta-variant-1,
.smartseo-review-style-2 .smartseo-cta-variant-2,
.smartseo-review-style-2 .smartseo-cta-variant-3 {
    background: linear-gradient(135deg, #263648 0%, #41586a 58%, #b67b48 100%);
}

.smartseo-review-style-2 .smartseo-comparison-table h3 {
    background: linear-gradient(135deg, #263648 0%, #41586a 100%);
}

.smartseo-review-style-3 {
    --smartseo-paper: #faf7f1;
    --smartseo-paper-soft: #f3ede4;
    --smartseo-border-soft: #d9cfbe;
    --smartseo-border-strong: #c7b49b;
    --smartseo-ink-strong: #23322b;
    --smartseo-ink-muted: #667067;
    --smartseo-accent: #4e6254;
    --smartseo-accent-warm: #ad7349;
}

.smartseo-review-style-3 .smartseo-breadcrumb-nav {
    background: linear-gradient(135deg, #fefcf9 0%, #f2ece4 100%);
    border-radius: 24px;
}

.smartseo-review-style-3 .smartseo-audience-card,
.smartseo-review-style-3 .smartseo-link-box,
.smartseo-review-style-3 .smartseo-toc,
.smartseo-review-style-3 .smartseo-verdict-box,
.smartseo-review-style-3 .smartseo-comparison-table-wrapper,
.smartseo-review-style-3 .smartseo-spec-table-wrapper,
.smartseo-review-style-3 figure.smartseo-product-image {
    border-radius: 28px;
}

.smartseo-review-style-3 .smartseo-audience-card {
    background: linear-gradient(180deg, #fffdfa 0%, #f3eee5 100%);
}

.smartseo-review-style-3 .smartseo-link-box {
    padding-left: 28px;
    background: linear-gradient(145deg, #fffefa 0%, #f2eee5 100%);
}

.smartseo-review-style-3 .smartseo-link-box::before {
    content: "Curator Note";
    position: static;
    display: block;
    margin-bottom: 12px;
    color: #4e6254;
}

.smartseo-review-style-3 figure.smartseo-product-image {
    background: linear-gradient(160deg, #ffffff 0%, #eef2ea 100%);
}

.smartseo-review-style-3 .smartseo-verdict-box::before {
    content: "Studio Verdict";
}

.smartseo-review-style-3 .smartseo-cta,
.smartseo-review-style-3 .smartseo-cta-variant-1,
.smartseo-review-style-3 .smartseo-cta-variant-2,
.smartseo-review-style-3 .smartseo-cta-variant-3 {
    border-radius: 28px;
    background: linear-gradient(135deg, #44584d 0%, #687563 58%, #ad7349 100%);
}

.smartseo-review-style-3 .smartseo-comparison-table h3 {
    background: linear-gradient(135deg, #44584d 0%, #607261 100%);
}

@media (max-width: 768px) {
    .smartseo-review-surface > :where(
        nav.smartseo-breadcrumb-nav,
        p,
        h2,
        h3,
        h4,
        ul,
        ol,
        dl,
        blockquote,
        .smartseo-audience-grid,
        .smartseo-link-box,
        .smartseo-toc,
        .smartseo-comparison-table-wrapper,
        .smartseo-spec-table-wrapper,
        .smartseo-cta,
        .smartseo-verdict-box,
        .smartseo-pros-cons-grid,
        figure.smartseo-product-image
    ) {
        width: calc(100% - (var(--smartseo-mobile-gutter) * 2)) !important;
    }

    .smartseo-review-surface .smartseo-breadcrumb-nav,
    .smartseo-review-surface .smartseo-link-box,
    .smartseo-review-surface .smartseo-verdict-box,
    .smartseo-review-surface figure.smartseo-product-image,
    .smartseo-review-surface .smartseo-cta {
        padding-left: 18px;
        padding-right: 18px;
    }

    .smartseo-review-surface .smartseo-toc {
        padding: 18px;
        margin: 24px auto;
    }

    .smartseo-review-surface .smartseo-cta,
    .smartseo-review-surface .smartseo-cta-variant-1,
    .smartseo-review-surface .smartseo-cta-variant-2,
    .smartseo-review-surface .smartseo-cta-variant-3 {
        padding: 24px 20px;
    }

    .smartseo-review-surface .smartseo-link-box {
        padding-left: 18px;
    }

    .smartseo-review-surface .smartseo-link-box::before {
        position: static;
        display: block;
        margin-bottom: 10px;
    }

    .smartseo-review-surface .smartseo-pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
