/* ==========================================================
   SHAREMARKETGYAN
   ARTICLE / LEARNING LESSON PAGE
   Clean • Compact • Book-Like Reading Experience
========================================================== */


/* ==========================================================
   ARTICLE PAGE
========================================================== */

#article-page {
    background: #ffffff;
    color: #334155;
}


/* ==========================================================
   BREADCRUMB
========================================================== */

#article-page .breadcrumb-section {
    padding: 14px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

#article-page .breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    font-size: 0.82rem;
    color: #64748b;
}

#article-page .breadcrumb a {
    color: #475569;
    text-decoration: none;
}

#article-page .breadcrumb a:hover {
    color: #2563eb;
}


/* ==========================================================
   ARTICLE HEADER
========================================================== */

#article-page .article-header {
    padding: 38px 0 28px;
    background: #ffffff;
}

#article-page .article-header .container {
    max-width: 900px;
}

#article-page .lesson-top {
    margin-bottom: 12px;
}

#article-page .category-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 11px;

    border-radius: 999px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 0.75rem;
    font-weight: 700;
}

#article-page #article-title {
    margin: 0 0 12px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

#article-page #article-description {
    max-width: 760px;

    margin: 0;

    color: #64748b;

    font-size: 1.02rem;
    line-height: 1.65;
}


/* ==========================================================
   ARTICLE META
========================================================== */

#article-page .lesson-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px 22px;

    margin-top: 18px;

    color: #64748b;

    font-size: 0.82rem;
}

#article-page .lesson-meta > div {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* ==========================================================
   FEATURED IMAGE
   Intentionally hidden for learning lessons.

   The lesson should start reading quickly instead of
   forcing visitors through a huge banner image.
========================================================== */

#article-page .article-featured-image {
    display: none;
}


/* ==========================================================
   SUMMARY / WHAT YOU'LL LEARN
========================================================== */

#article-page .lesson-summary {
    padding: 8px 0 18px;
}

#article-page .lesson-summary .container {
    max-width: 900px;
}

#article-page .summary-box {
    padding: 20px 24px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;

    border-radius: 10px;

    box-shadow: none;
}

#article-page .summary-box h2 {
    margin: 0 0 12px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: 1.15rem;
    line-height: 1.35;
}

#article-page .summary-box ul {
    display: grid;

    gap: 7px;

    margin: 0;
    padding: 0;
}

#article-page .summary-box li {
    position: relative;

    list-style: none;

    padding-left: 22px;

    color: #475569;

    font-size: 0.92rem;
    line-height: 1.55;
}

#article-page .summary-box li::before {
    content: "✓";

    position: absolute;
    left: 0;
    top: 0;

    color: #16a34a;

    font-weight: 700;
}


/* ==========================================================
   TABLE OF CONTENTS
========================================================== */

#article-page .lesson-toc {
    padding: 0 0 20px;
}

#article-page .lesson-toc .container {
    max-width: 900px;
}

#article-page .toc-box {
    padding: 18px 22px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    box-shadow: none;
}

#article-page .toc-box h2 {
    margin: 0 0 10px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: 1.05rem;
}

#article-page .toc-box ol {
    margin: 0;
    padding-left: 20px;
}

#article-page .toc-box li {
    margin-bottom: 5px;

    color: #475569;

    font-size: 0.9rem;
    line-height: 1.5;
}

#article-page .toc-box li:last-child {
    margin-bottom: 0;
}

#article-page .toc-box a {
    color: #334155;
    text-decoration: none;
}

#article-page .toc-box a:hover {
    color: #2563eb;
}


/* ==========================================================
   MAIN LESSON CONTENT
========================================================== */

#article-page .lesson-content {
    padding: 8px 0 25px;

    background: #ffffff;
}

#article-page .lesson-content .container {
    max-width: 900px;
}


/* ==========================================================
   READING COLUMN
========================================================== */

#article-page .lesson-article {
    max-width: 820px;

    margin: 0 auto;

    color: #334155;

    font-family: "Inter", sans-serif;
}


/* ==========================================================
   HEADINGS
========================================================== */

#article-page .lesson-article h2 {
    margin: 30px 0 10px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;

    font-size: 1.45rem;
    line-height: 1.35;

    letter-spacing: -0.015em;
}

#article-page .lesson-article h2:first-child {
    margin-top: 0;
}

#article-page .lesson-article h3 {
    margin: 22px 0 8px;

    color: #1e293b;

    font-family: "Poppins", sans-serif;

    font-size: 1.12rem;
    line-height: 1.4;
}
#article-page .lesson-article img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    margin: 20px auto;
}
#article-page .article-content-image {
    width: 100%;
    margin: 24px 0 30px;
    text-align: center;
}

#article-page .article-content-image img {
    width: 100%;
    max-width: 820px;
    max-height: none;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
}

/* ==========================================================
   PARAGRAPHS
========================================================== */

#article-page .lesson-article p {
    margin: 0 0 12px;

    color: #475569;

    font-size: 1rem;

    line-height: 1.72;
}

#article-page .lesson-article p:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   ARTICLE SECTIONS
   Keep sections close so the lesson reads continuously.
========================================================== */

#article-page .lesson-article section {
    margin: 0 0 26px;
}

#article-page .lesson-article section:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   LISTS
========================================================== */

#article-page .lesson-article ul,
#article-page .lesson-article ol {
    margin: 10px 0 16px;

    padding-left: 24px;

    color: #475569;
}

#article-page .lesson-article li {
    margin-bottom: 6px;

    line-height: 1.65;
}

#article-page .lesson-article li:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   ARTICLE IMAGES
   If an image exists inside article content,
   keep it controlled instead of full-screen.
========================================================== */

#article-page .lesson-article img {
    display: block;

    width: auto;
    max-width: 100%;
    max-height: 420px;

    margin: 20px auto;

    object-fit: contain;

    border-radius: 10px;

    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}


/* ==========================================================
   TABLES
========================================================== */

#article-page .lesson-article table {
    width: 100%;

    margin: 18px 0 22px;

    border-collapse: collapse;

    overflow: hidden;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    font-size: 0.9rem;
}

#article-page .lesson-article th,
#article-page .lesson-article td {
    padding: 10px 12px;

    border-bottom: 1px solid #e2e8f0;

    text-align: left;

    line-height: 1.5;
}

#article-page .lesson-article th {
    background: #f8fafc;

    color: #0f172a;

    font-weight: 700;
}

#article-page .lesson-article tr:last-child td {
    border-bottom: 0;
}


/* ==========================================================
   INFO / WARNING / SUCCESS BOXES
========================================================== */

#article-page .info-box,
#article-page .warning-box,
#article-page .success-box {
    margin: 18px 0;

    padding: 16px 18px;

    border-radius: 9px;

    font-size: 0.94rem;
    line-height: 1.65;
}

#article-page .info-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
}

#article-page .warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

#article-page .success-box {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
}


/* ==========================================================
   KEY TAKEAWAYS
========================================================== */

#article-page .key-takeaways {
    padding: 5px 0 28px;
}

#article-page .key-takeaways .container {
    max-width: 900px;
}


/* ==========================================================
   LESSON NAVIGATION
========================================================== */

#article-page .lesson-navigation {
    padding: 28px 0 35px;

    background: #f8fafc;

    border-top: 1px solid #e5e7eb;
}

#article-page .lesson-nav-wrapper {
    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 14px;
}

#article-page .lesson-nav-card {
    display: flex;

    flex-direction: column;

    justify-content: center;

    min-height: 88px;

    padding: 16px 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 10px;

    color: inherit;

    text-decoration: none;

    transition: 0.2s ease;
}

#article-page .lesson-nav-card:hover {
    border-color: #cbd5e1;

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

#article-page .lesson-nav-next {
    text-align: right;
}

#article-page .lesson-nav-label {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 6px;

    color: #64748b;

    font-size: 0.72rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}

#article-page .lesson-nav-next .lesson-nav-label {
    justify-content: flex-end;
}

#article-page .lesson-nav-card strong {
    color: #0f172a;

    font-family: "Poppins", sans-serif;

    font-size: 0.92rem;

    line-height: 1.4;
}

#article-page .lesson-nav-center {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 15px;

    border-radius: 999px;

    background: #0f172a;

    color: #ffffff;

    text-decoration: none;

    font-size: 0.78rem;

    font-weight: 700;

    white-space: nowrap;
}

#article-page .lesson-nav-card.disabled {
    opacity: 0.45;

    pointer-events: none;
}


/* ==========================================================
   AUTHOR
========================================================== */

#article-page .author-box {
    padding: 30px 0 40px;

    background: #ffffff;
}

#article-page .author-card {
    max-width: 900px;

    margin: 0 auto;

    padding: 18px 20px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 10px;
}

#article-page .author-card h3 {
    margin: 0 0 5px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;

    font-size: 1rem;
}

#article-page .author-card p {
    margin: 0;

    color: #64748b;

    font-size: 0.86rem;

    line-height: 1.55;
}


/* ==========================================================
   REMOVE EMPTY SHARE SPACE
========================================================== */

#article-page .share-article {
    display: none;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 768px) {

    #article-page .article-header {
        padding: 28px 0 22px;
    }

    #article-page #article-title {
        font-size: 1.85rem;
    }

    #article-page #article-description {
        font-size: 0.95rem;
    }

    #article-page .lesson-meta {
        gap: 7px 15px;
    }

    #article-page .lesson-summary,
    #article-page .lesson-toc,
    #article-page .lesson-content {
        padding-left: 0;
        padding-right: 0;
    }

    #article-page .summary-box,
    #article-page .toc-box {
        padding: 16px 18px;
    }

    #article-page .lesson-article p {
        font-size: 0.96rem;
        line-height: 1.68;
    }

    #article-page .lesson-article h2 {
        margin-top: 25px;
        font-size: 1.3rem;
    }

    #article-page .lesson-nav-wrapper {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    #article-page .lesson-nav-center {
        order: -1;

        justify-self: center;
    }

    #article-page .lesson-nav-next {
        text-align: left;
    }

    #article-page .lesson-nav-next .lesson-nav-label {
        justify-content: flex-start;
    }
}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 480px) {

    #article-page #article-title {
        font-size: 1.6rem;
    }

    #article-page .lesson-meta {
        font-size: 0.76rem;
    }

    #article-page .lesson-article p {
        font-size: 0.94rem;
        line-height: 1.65;
    }

    #article-page .lesson-article h2 {
        font-size: 1.22rem;
    }

    #article-page .lesson-article h3 {
        font-size: 1.05rem;
    }

    #article-page .lesson-nav-card {
        min-height: 78px;

        padding: 14px 16px;
    }
}

/* Remove vertical padding around the actual reading area */

#article-page .lesson-content {
    padding-top: 0 !important;
    padding-bottom: 20px !important;
}

#article-page .lesson-content .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================================
   READING PROGRESS BAR
========================================================== */

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: #e2e8f0;

    z-index: 9999;
}

.reading-progress-bar-fill {
    height: 100%;
    width: 100%;

    background: linear-gradient(90deg, #2563eb, #7c3aed);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.1s linear;
}


/* ==========================================================
   PREVIOUS / NEXT — BLOG ARTICLES
========================================================== */

#article-page .article-navigation {
    padding: 28px 0 8px;

    background: #ffffff;

    display: none; /* shown by article.js only for blog articles */
}

#article-page .article-navigation.is-visible {
    display: block;
}

#article-page .article-nav-wrapper {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}

#article-page .article-nav-card {
    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 56px;

    padding: 14px 20px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: none;

    transition: 0.2s ease;
}

#article-page .article-nav-card:hover {
    border-color: #cbd5e1;

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

#article-page .article-nav-next {
    justify-content: flex-end;

    text-align: right;
}

#article-page .article-nav-card.disabled {
    opacity: 0.45;

    pointer-events: none;
}


/* ==========================================================
   RELATED ARTICLES
========================================================== */

#article-page .related-articles-section {
    padding: 30px 0 10px;

    background: #ffffff;

    display: none; /* shown by article.js only when related items exist */
}

#article-page .related-articles-section.is-visible {
    display: block;
}

#article-page .related-articles-section h2 {
    max-width: 900px;

    margin: 0 auto 18px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: 1.25rem;
}

#article-page .related-articles-grid {
    display: grid;

    max-width: 900px;
    margin: 0 auto;

    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

#article-page .related-article-card {
    display: flex;

    flex-direction: column;

    padding: 16px 18px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    color: inherit;
    text-decoration: none;

    transition: 0.2s ease;
}

#article-page .related-article-card:hover {
    border-color: #cbd5e1;

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

#article-page .related-article-card .related-article-category {
    margin-bottom: 8px;

    color: #2563eb;

    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#article-page .related-article-card strong {
    margin-bottom: 6px;

    color: #0f172a;

    font-family: "Poppins", sans-serif;
    font-size: 0.94rem;
    line-height: 1.4;
}

#article-page .related-article-card span.related-article-desc {
    color: #64748b;

    font-size: 0.82rem;
    line-height: 1.5;
}


/* ==========================================================
   RESPONSIVE — NEW SECTIONS
========================================================== */

@media (max-width: 768px) {

    #article-page .related-articles-grid {
        grid-template-columns: 1fr;
    }

    #article-page .article-nav-wrapper {
        grid-template-columns: 1fr;
    }

    #article-page .article-nav-next {
        justify-content: flex-start;

        text-align: left;
    }
}


/* ==========================================================
   FINAL — CONTINUOUS LEARNING READING LAYOUT
========================================================== */

/* The lesson is one continuous article */
#article-page .lesson-article {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
}

/* Every generated lesson topic behaves like normal
   content inside one book/article */
#article-page .lesson-article .article-content-section {
    display: block !important;

    margin: 0 !important;
    padding: 0 0 24px !important;
}

/* Remove the extra spacing before the next topic */
#article-page .lesson-article .article-content-section + .article-content-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Topic heading */
#article-page .lesson-article .article-content-section h2 {
    margin: 0 0 7px !important;
    padding: 0 !important;

    font-size: 1.35rem;
    line-height: 1.35;
}

/* Topic paragraph */
#article-page .lesson-article .article-content-section p {
    margin: 0 !important;
    padding: 0 !important;

    font-size: 1rem;
    line-height: 1.65;
}

/* Last topic should not leave unnecessary space */
#article-page .lesson-article .article-content-section:last-child {
    padding-bottom: 0 !important;
}

/* ==========================================================
   ARTICLE SOCIAL SHARING
   Centered below article content
========================================================== */

#article-share-links {
    width: 100%;
    max-width: 900px;
    margin: 32px auto 24px;
    padding: 20px 18px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

#article-share-links::before {
    content: "Share this lesson";
    display: block;
    margin-bottom: 12px;
    color: #475569;
    font-family: "Poppins", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
}

#article-share-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/*
   Keep the heading above the buttons.
   The pseudo-element participates in the flex layout,
   so make the block contents wrap cleanly.
*/
#article-share-links::before {
    flex: 0 0 100%;
}

#article-share-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 42px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

#article-share-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

#article-share-links a i {
    font-size: 0.95rem;
}

/* Individual social buttons */

#article-share-links a.share-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
}

#article-share-links a.share-linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
    color: #ffffff;
}

#article-share-links a.share-whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    #article-share-links {
        margin: 26px auto 20px;
        padding: 18px 12px;
        gap: 8px;
    }

    #article-share-links a {
        height: 38px;
        min-width: 40px;
        padding: 0 11px;
        border-radius: 9px;
        font-size: 0.78rem;
    }

    #article-share-links a i {
        font-size: 0.9rem;
    }
}