/*
 * MeraSEO — Blog Post Formatting Styles
 * Applies to all single blog post pages only.
 * Loaded by meraseo-seo-optimizer plugin.
 */

/* ── Container width for comfortable reading ─────────────────────────────── */
.single-post .elementor-widget-text-editor .elementor-widget-container {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    line-height: 1.85;
    color: #2c2c2c;
}

/* ── H2 — Main section headings ─────────────────────────────────────────── */
.single-post .elementor-widget-text-editor h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 700;
    color: #1a3c1a;
    margin-top: 2.75rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #c8e6c9;
    line-height: 1.3;
}

/* First H2 — less top margin since it follows the intro */
.single-post .elementor-widget-text-editor h2:first-of-type {
    margin-top: 1.75rem;
}

/* ── H3 — Subsection headings ───────────────────────────────────────────── */
.single-post .elementor-widget-text-editor h3 {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 600;
    color: #2e7d32;
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

/* ── H4 — Minor headings ────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #424242;
    margin-top: 1.25rem;
    margin-bottom: 0.45rem;
}

/* ── Paragraphs ─────────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor p {
    margin-bottom: 1.1rem;
    line-height: 1.85;
    color: #2c2c2c;
}

/* Intro paragraph — slightly larger and darker for emphasis */
.single-post .elementor-widget-text-editor > .elementor-widget-container > p:first-child,
.single-post .elementor-widget-text-editor .elementor-widget-container p:first-of-type {
    font-size: 1.06rem;
    color: #1a1a2e;
    line-height: 1.9;
}

/* ── Bold text ──────────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor strong,
.single-post .elementor-widget-text-editor b {
    color: #1a3c1a;
    font-weight: 700;
}

/* ── Unordered lists ────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor ul {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0 1.4rem;
}

.single-post .elementor-widget-text-editor ul li {
    position: relative;
    padding-left: 1.65rem;
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #2c2c2c;
}

.single-post .elementor-widget-text-editor ul li::before {
    content: "›";
    position: absolute;
    left: 0.1rem;
    top: 0;
    color: #2e7d32;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.75;
}

/* ── Ordered lists ──────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor ol {
    padding-left: 1.6rem;
    margin: 0.75rem 0 1.4rem;
}

.single-post .elementor-widget-text-editor ol li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #2c2c2c;
    padding-left: 0.3rem;
}

/* ── Fix <li><p> leftover (in case any remain after PHP cleanup) ─────────── */
.single-post .elementor-widget-text-editor li > p {
    margin-bottom: 0;
    display: inline;
}

/* ── Hide any remaining HR tags ─────────────────────────────────────────── */
.single-post .elementor-widget-text-editor hr {
    display: none;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 2rem;
    font-size: 0.92rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.single-post .elementor-widget-text-editor table th {
    background: #2e7d32;
    color: #fff;
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.single-post .elementor-widget-text-editor table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
    line-height: 1.6;
}

.single-post .elementor-widget-text-editor table tr:nth-child(even) td {
    background: #f9f9f9;
}

.single-post .elementor-widget-text-editor table tr:hover td {
    background: #f1f8e9;
}

/* ── Blockquotes ─────────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor blockquote {
    border-left: 4px solid #2e7d32;
    padding: 1rem 1.25rem 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f9fbe7;
    border-radius: 0 6px 6px 0;
    color: #3a3a3a;
    font-style: italic;
}

/* ── Inline code ─────────────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor code {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 0.1em 0.4em;
    font-size: 0.88em;
    color: #c62828;
    font-family: 'Courier New', Courier, monospace;
}

/* ── Images in content ───────────────────────────────────────────────────── */
.single-post .elementor-widget-text-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

/* ── Hide Claude.ai layout wrappers (belt-and-suspenders) ───────────────── */
/* These divs do nothing in WordPress but take up space / cause layout issues */
.single-post .elementor-widget-text-editor .flex.flex-col {
    display: block !important;
}
.single-post .elementor-widget-text-editor .min-h-8 {
    min-height: 0 !important;
}
.single-post .elementor-widget-text-editor [class*="text-message"] {
    display: block !important;
    min-height: 0 !important;
}

/* ── Spacing between the main content and related posts CTA ─────────────── */
.single-post .meraseo-related-posts {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e8f5e9;
}

/* ── Mobile responsiveness ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .single-post .elementor-widget-text-editor .elementor-widget-container {
        font-size: 15px;
        line-height: 1.8;
    }

    .single-post .elementor-widget-text-editor h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
    }

    .single-post .elementor-widget-text-editor h3 {
        font-size: 1.05rem;
    }

    .single-post .elementor-widget-text-editor table {
        font-size: 0.82rem;
    }

    .single-post .elementor-widget-text-editor table th,
    .single-post .elementor-widget-text-editor table td {
        padding: 0.5rem 0.6rem;
    }
}
