/* ===================================================================
 * saoze.com AI Design Suite - Frontend Article Styles
 * Styles for AI-generated article content on the public site
 * Scoped under .entry-content and .post-content for safety
 * =================================================================== */

/* ---------- CSS Variables ---------- */
.entry-content,
.post-content,
.saoze-article-content {
    --saoze-fe-primary: #667eea;
    --saoze-fe-secondary: #764ba2;
    --saoze-fe-text: #1a1a2e;
    --saoze-fe-text-light: #6c757d;
    --saoze-fe-border: #e0e0e0;
    --saoze-fe-bg: #f8f9fa;
    --saoze-fe-quote-bg: #f5f7ff;
    --saoze-fe-radius: 8px;
    --saoze-fe-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ---------- Reading Time Badge ---------- */
.entry-content .saoze-reading-time,
.post-content .saoze-reading-time,
.saoze-article-content .saoze-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--saoze-fe-bg);
    color: var(--saoze-fe-text-light);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 0 0 20px 0;
    border: 1px solid var(--saoze-fe-border);
}

.entry-content .saoze-reading-time::before,
.post-content .saoze-reading-time::before,
.saoze-article-content .saoze-reading-time::before {
    content: "\23F1";
    font-size: 14px;
}

/* ---------- Intro Paragraph ---------- */
.entry-content .saoze-intro,
.post-content .saoze-intro,
.saoze-article-content .saoze-intro {
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--saoze-fe-text);
    font-weight: 500;
    margin-bottom: 1.5em;
}

/* ---------- Drop Cap ---------- */
.entry-content .saoze-dropcap::first-letter,
.post-content .saoze-dropcap::first-letter,
.saoze-article-content .saoze-dropcap::first-letter {
    font-size: 3.2em;
    font-weight: 700;
    float: left;
    line-height: 0.8;
    margin: 0.08em 0.12em 0 0;
    background: var(--saoze-fe-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--saoze-fe-primary);
}

/* ---------- Section Divider ---------- */
.entry-content .saoze-divider,
.post-content .saoze-divider,
.saoze-article-content .saoze-divider {
    text-align: center;
    margin: 2em 0;
    border: none;
    font-size: 1.5em;
    color: var(--saoze-fe-primary);
    line-height: 1;
    clear: both;
}

.entry-content .saoze-divider::before,
.post-content .saoze-divider::before,
.saoze-article-content .saoze-divider::before {
    content: "\2726 \00A0\00A0\00A0 \2726 \00A0\00A0\00A0 \2726";
    letter-spacing: 2px;
    background: var(--saoze-fe-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.entry-content .saoze-divider.saoze-divider-star::before,
.post-content .saoze-divider.saoze-divider-star::before,
.saoze-article-content .saoze-divider.saoze-divider-star::before {
    content: "\2605 \00A0\00A0\00A0 \2605 \00A0\00A0\00A0 \2605";
}

.entry-content .saoze-divider.saoze-divider-asterisk::before,
.post-content .saoze-divider.saoze-divider-asterisk::before,
.saoze-article-content .saoze-divider.saoze-divider-asterisk::before {
    content: "\2731 \00A0\00A0\00A0 \2731 \00A0\00A0\00A0 \2731";
}

/* ---------- Blockquote ---------- */
.entry-content .saoze-quote,
.post-content .saoze-quote,
.saoze-article-content .saoze-quote,
.entry-content blockquote.saoze-quote,
.post-content blockquote.saoze-quote,
.saoze-article-content blockquote.saoze-quote {
    background: var(--saoze-fe-quote-bg);
    border-left: 4px solid var(--saoze-fe-primary);
    border-radius: 0 var(--saoze-fe-radius) var(--saoze-fe-radius) 0;
    padding: 16px 24px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--saoze-fe-text);
    font-size: 1.05em;
    line-height: 1.7;
}

.entry-content .saoze-quote p,
.post-content .saoze-quote p,
.saoze-article-content .saoze-quote p {
    margin: 0;
}

.entry-content .saoze-quote p + p,
.post-content .saoze-quote p + p,
.saoze-article-content .saoze-quote p + p {
    margin-top: 10px;
}

.entry-content .saoze-quote cite,
.post-content .saoze-quote cite,
.saoze-article-content .saoze-quote cite {
    display: block;
    margin-top: 10px;
    font-size: 0.85em;
    font-style: normal;
    color: var(--saoze-fe-text-light);
    font-weight: 600;
}

.entry-content .saoze-quote cite::before,
.post-content .saoze-quote cite::before,
.saoze-article-content .saoze-quote cite::before {
    content: "\2014\00A0";
}

/* ---------- Responsive Table Wrapper ---------- */
.entry-content .saoze-table-wrap,
.post-content .saoze-table-wrap,
.saoze-article-content .saoze-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
    border: 1px solid var(--saoze-fe-border);
    border-radius: var(--saoze-fe-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.entry-content .saoze-table-wrap table,
.post-content .saoze-table-wrap table,
.saoze-article-content .saoze-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.entry-content .saoze-table-wrap th,
.post-content .saoze-table-wrap th,
.saoze-article-content .saoze-table-wrap th {
    background: var(--saoze-fe-bg);
    padding: 10px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9em;
    color: var(--saoze-fe-text);
    border-bottom: 2px solid var(--saoze-fe-border);
    white-space: nowrap;
}

.entry-content .saoze-table-wrap td,
.post-content .saoze-table-wrap td,
.saoze-article-content .saoze-table-wrap td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--saoze-fe-border);
    font-size: 0.95em;
    color: var(--saoze-fe-text);
}

.entry-content .saoze-table-wrap tr:nth-child(even),
.post-content .saoze-table-wrap tr:nth-child(even),
.saoze-article-content .saoze-table-wrap tr:nth-child(even) {
    background: rgba(240, 242, 245, 0.5);
}

.entry-content .saoze-table-wrap tr:last-child td,
.post-content .saoze-table-wrap tr:last-child td,
.saoze-article-content .saoze-table-wrap tr:last-child td {
    border-bottom: none;
}

.entry-content .saoze-table-wrap tr:hover,
.post-content .saoze-table-wrap tr:hover,
.saoze-article-content .saoze-table-wrap tr:hover {
    background: rgba(102, 126, 234, 0.04);
}

/* ---------- Article Headings ---------- */

/* H2 - Bottom border accent */
.entry-content h2,
.post-content h2,
.saoze-article-content h2 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--saoze-fe-text);
    margin: 1.8em 0 0.8em;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--saoze-fe-primary);
    line-height: 1.3;
}

/* H3 - Left border accent */
.entry-content h3,
.post-content h3,
.saoze-article-content h3 {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--saoze-fe-text);
    margin: 1.5em 0 0.6em;
    padding-left: 12px;
    border-left: 4px solid var(--saoze-fe-primary);
    line-height: 1.3;
}

/* H4 - subtle accent */
.entry-content h4,
.post-content h4,
.saoze-article-content h4 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--saoze-fe-text);
    margin: 1.2em 0 0.5em;
    padding-left: 12px;
    border-left: 3px solid var(--saoze-fe-border);
    line-height: 1.3;
}

/* ---------- Article Paragraphs ---------- */
.entry-content p,
.post-content p,
.saoze-article-content p {
    line-height: 1.8;
    margin: 0 0 1.2em;
    color: var(--saoze-fe-text);
    font-size: 1em;
}

/* ---------- Article Images ---------- */
.entry-content img,
.post-content img,
.saoze-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--saoze-fe-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 1.5em auto;
    display: block;
}

.entry-content figure img,
.post-content figure img,
.saoze-article-content figure img {
    margin: 0;
}

.entry-content figure,
.post-content figure,
.saoze-article-content figure {
    margin: 1.5em 0;
}

.entry-content figcaption,
.post-content figcaption,
.saoze-article-content figcaption {
    text-align: center;
    font-size: 0.85em;
    color: var(--saoze-fe-text-light);
    margin-top: 8px;
    font-style: italic;
}

/* Images inside links - no shadow */
.entry-content a img,
.post-content a img,
.saoze-article-content a img {
    box-shadow: none;
}

/* ---------- Article Links ---------- */
.entry-content a,
.post-content a,
.saoze-article-content a {
    color: var(--saoze-fe-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.entry-content a:hover,
.post-content a:hover,
.saoze-article-content a:hover {
    color: var(--saoze-fe-secondary);
    text-decoration: underline;
}

/* ---------- Article Lists ---------- */
.entry-content ul,
.post-content ul,
.saoze-article-content ul {
    margin: 0 0 1.2em 0;
    padding-left: 1.8em;
    line-height: 1.8;
}

.entry-content ol,
.post-content ol,
.saoze-article-content ol {
    margin: 0 0 1.2em 0;
    padding-left: 1.8em;
    line-height: 1.8;
}

.entry-content ul li,
.post-content ul li,
.saoze-article-content ul li {
    margin-bottom: 0.5em;
    color: var(--saoze-fe-text);
}

.entry-content ol li,
.post-content ol li,
.saoze-article-content ol li {
    margin-bottom: 0.5em;
    color: var(--saoze-fe-text);
}

/* Custom bullet style for ul */
.entry-content ul li::marker,
.post-content ul li::marker,
.saoze-article-content ul li::marker {
    color: var(--saoze-fe-primary);
}

.entry-content ol li::marker,
.post-content ol li::marker,
.saoze-article-content ol li::marker {
    color: var(--saoze-fe-primary);
    font-weight: 700;
}

/* ---------- Strong & Em ---------- */
.entry-content strong,
.post-content strong,
.saoze-article-content strong {
    color: var(--saoze-fe-text);
    font-weight: 700;
}

.entry-content em,
.post-content em,
.saoze-article-content em {
    color: var(--saoze-fe-text);
}

/* ---------- Inline Code ---------- */
.entry-content code,
.post-content code,
.saoze-article-content code {
    background: var(--saoze-fe-bg);
    color: var(--saoze-fe-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: "Courier New", Courier, monospace;
}

/* ---------- Pre / Code Blocks ---------- */
.entry-content pre,
.post-content pre,
.saoze-article-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 16px 20px;
    border-radius: var(--saoze-fe-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
    font-size: 0.9em;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.entry-content pre code,
.post-content pre code,
.saoze-article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* ---------- Horizontal Rule ---------- */
.entry-content hr,
.post-content hr,
.saoze-article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--saoze-fe-primary), transparent);
    margin: 2em 0;
    opacity: 0.5;
}

/* ---------- Article First Paragraph (auto intro if no .saoze-intro) ---------- */
.entry-content > p:first-of-type,
.post-content > p:first-of-type,
.saoze-article-content > p:first-of-type {
    font-size: 1.05em;
}

/* ---------- Mobile Responsive ---------- */
@media screen and (max-width: 768px) {
    .entry-content .saoze-intro,
    .post-content .saoze-intro,
    .saoze-article-content .saoze-intro {
        font-size: 1.1em;
    }

    .entry-content h2,
    .post-content h2,
    .saoze-article-content h2 {
        font-size: 1.35em;
    }

    .entry-content h3,
    .post-content h3,
    .saoze-article-content h3 {
        font-size: 1.15em;
    }

    .entry-content .saoze-quote,
    .post-content .saoze-quote,
    .saoze-article-content .saoze-quote {
        padding: 12px 16px;
        font-size: 1em;
    }

    .entry-content img,
    .post-content img,
    .saoze-article-content img {
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .entry-content .saoze-table-wrap,
    .post-content .saoze-table-wrap,
    .saoze-article-content .saoze-table-wrap {
        font-size: 0.9em;
    }

    .entry-content .saoze-table-wrap th,
    .post-content .saoze-table-wrap th,
    .saoze-article-content .saoze-table-wrap th {
        padding: 8px 12px;
    }

    .entry-content .saoze-table-wrap td,
    .post-content .saoze-table-wrap td,
    .saoze-article-content .saoze-table-wrap td {
        padding: 6px 12px;
    }
}

@media screen and (max-width: 480px) {
    .entry-content,
    .post-content,
    .saoze-article-content {
        font-size: 0.95em;
    }

    .entry-content .saoze-reading-time,
    .post-content .saoze-reading-time,
    .saoze-article-content .saoze-reading-time {
        font-size: 12px;
        padding: 3px 12px;
    }

    .entry-content .saoze-dropcap::first-letter,
    .post-content .saoze-dropcap::first-letter,
    .saoze-article-content .saoze-dropcap::first-letter {
        font-size: 2.8em;
    }

    .entry-content ul,
    .post-content ul,
    .saoze-article-content ul,
    .entry-content ol,
    .post-content ol,
    .saoze-article-content ol {
        padding-left: 1.4em;
    }

    .entry-content .saoze-divider::before,
    .post-content .saoze-divider::before,
    .saoze-article-content .saoze-divider::before {
        font-size: 1.2em;
    }
}

/* ===================================================================
 * v4.2 - Discussion Topic Section
 * =================================================================== */
.entry-content .saoze-discussion,
.post-content .saoze-discussion,
.saoze-article-content .saoze-discussion {
    margin: 2.5em 0 1.5em;
    padding: 1.5em 1.8em;
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    border-left: 4px solid var(--saoze-fe-primary, #667eea);
    border-radius: 0 var(--saoze-fe-radius, 8px) var(--saoze-fe-radius, 8px) 0;
    position: relative;
}

.entry-content .saoze-discussion::before,
.post-content .saoze-discussion::before,
.saoze-article-content .saoze-discussion::before {
    content: "\1F4AC";
    position: absolute;
    top: -0.6em;
    left: 1.2em;
    font-size: 1.5em;
    background: #fff;
    padding: 0 0.3em;
    line-height: 1;
}

.entry-content .saoze-discussion h2,
.post-content .saoze-discussion h2,
.saoze-article-content .saoze-discussion h2 {
    margin-top: 0.3em;
    color: var(--saoze-fe-primary, #667eea);
    font-size: 1.3em;
    font-weight: 700;
}

.entry-content .saoze-discussion p,
.post-content .saoze-discussion p,
.saoze-article-content .saoze-discussion p {
    margin-bottom: 0;
    color: var(--saoze-fe-text, #1a1a2e);
    line-height: 1.8;
    font-size: 1em;
}

/* ===================================================================
 * v4.2 - Disclaimer Section
 * =================================================================== */
.entry-content .saoze-disclaimer,
.post-content .saoze-disclaimer,
.saoze-article-content .saoze-disclaimer {
    margin: 1.5em 0 2em;
    padding: 0.8em 1.2em;
    background: #fff8e1;
    border: 1px dashed #ffc107;
    border-radius: var(--saoze-fe-radius, 8px);
    font-size: 0.85em;
    color: #7c6f00;
    line-height: 1.6;
}

.entry-content .saoze-disclaimer p,
.post-content .saoze-disclaimer p,
.saoze-article-content .saoze-disclaimer p {
    margin: 0;
}

.entry-content .saoze-disclaimer strong,
.post-content .saoze-disclaimer strong,
.saoze-article-content .saoze-disclaimer strong {
    color: #f57f17;
}

/* Mobile responsive for discussion and disclaimer */
@media (max-width: 768px) {
    .entry-content .saoze-discussion,
    .post-content .saoze-discussion,
    .saoze-article-content .saoze-discussion {
        padding: 1.2em 1em;
        margin: 2em 0 1em;
    }

    .entry-content .saoze-discussion::before,
    .post-content .saoze-discussion::before,
    .saoze-article-content .saoze-discussion::before {
        font-size: 1.2em;
    }

    .entry-content .saoze-disclaimer,
    .post-content .saoze-disclaimer,
    .saoze-article-content .saoze-disclaimer {
        padding: 0.6em 0.8em;
        font-size: 0.8em;
    }
}