/* ============================================
   TRADING BLITZ - LEARN PAGES
   Light mode palette:
     page bg:   #c5c2b8
     card bg:   #eeeae0 / #dfdcd2
     text:      #040C20 / #5D6371
   Dark mode overrides use body.dark-mode selectors.
   ============================================ */

/* ---- PAGE WRAPPER ---- */
.learn-wrapper {
    background: #c5c2b8;
    min-height: 100vh;
}

/* ---- HERO (index) ---- */
.learn-hero {
    background: linear-gradient(135deg, #1a3c5e 0%, #0d6efd 100%);
    color: #fff;
    padding: 60px 0 40px;
    text-align: center;
}
.learn-hero h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 0.5rem; }
.learn-hero p  { font-size: 1.1rem; opacity: 0.85; }
@media (max-width: 576px) {
    .learn-hero h1 { font-size: 1.6rem; }
    .learn-hero p  { font-size: 0.95rem; }
}

/* ---- CATEGORY NAV (index) ---- */
.learn-nav {
    background: rgba(13,110,253,0.07);
    border-bottom: 1px solid rgba(13,110,253,0.15);
    padding: 12px 0;
}
.learn-nav-inner {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    align-items: center;
    gap: 8px;
}
.learn-nav-spacer { /* mirrors search width to keep links truly centered */ }
.learn-nav-links {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.8;
}
.learn-nav-sep { color: #6c757d; }
.learn-nav a { color: #0d6efd; text-decoration: none; margin: 0 6px; font-weight: 500; white-space: nowrap; }
.learn-nav a:hover { text-decoration: underline; }

/* ---- NAV mobile ---- */
@media (max-width: 768px) {
    .learn-nav-inner {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .learn-nav-spacer { display: none; }
    .learn-nav-links { white-space: normal; }
    .learn-nav a { white-space: normal; display: inline-block; margin: 2px 6px; }
    .learn-search-wrap { justify-content: center; }
    .learn-search-wrap .form-control { max-width: 100%; }
}

/* ---- SECTION (index) ---- */
.learn-section { padding: 40px 0; }
.learn-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-left: 4px solid #0d6efd;
    padding-left: 10px;
    color: #040C20;
}

/* ---- CATEGORY HEADING ROW ---- */
.category-heading-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
}
.category-heading-row h2 { margin-bottom: 0; }

/* ---- VIEW MORE BUTTON ---- */
.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid #0d6efd;
    color: #0d6efd;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s, color 0.18s;
}
.btn-view-more:hover {
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
}

/* ---- CATEGORY HEADING ROW mobile ---- */
@media (max-width: 576px) {
    .category-heading-row {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }
    .category-heading-row h2 {
        font-size: 1.3rem;
    }
    .btn-view-more {
        display: inline-flex;
        border: 1.5px solid #0d6efd;
        font-size: 0.75rem;
        padding: 4px 10px;
        flex-shrink: 0;
    }
}

/* ---- BACK TO LEARN LINK (category page) ---- */
.learn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0d6efd;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}
.learn-back-link:hover { text-decoration: underline; color: #0d6efd; }

/* ---- ARTICLE CARDS (index) ---- */
.article-card {
    border: 1px solid rgba(93,99,113,0.17);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 14px;
    transition: box-shadow 0.2s;
    background: #eeeae0;
    display: block;
    text-decoration: none;
    color: #040C20;
}
.article-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    color: #040C20;
    text-decoration: none;
}
.article-card h5 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; color: #040C20; }
.article-card .meta { font-size: 12px; color: #5D6371; }
.article-card .meta span { margin-right: 12px; }

/* ---- SEARCH (index) ---- */
.learn-search-wrap { display: flex; align-items: center; justify-content: flex-end; }
.learn-search-wrap .form-control { max-width: 220px; width: 100%; }
#search-no-results { display: none; }

/* ---- ARTICLE DETAIL WRAPPER ---- */
.learn-article-wrapper {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ---- ARTICLE HERO (detail) ---- */
.article-hero { margin-bottom: 28px; }
.article-hero img { width: 100%; object-fit: contain; border-radius: 8px; margin-bottom: 20px; }

/* ---- ARTICLE META (detail) ---- */
.article-meta { font-size: 13px; color: #5D6371; margin-bottom: 18px; }
.article-meta span { margin-right: 16px; }

/* ---- ARTICLE TITLE (detail) ---- */
.article-title { font-size: 2.5rem; font-weight: 700; line-height: 1.25; margin-bottom: 10px; color: #040C20; }
@media (max-width: 576px) {
    .article-title { font-size: 1.7rem; }
    .article-body h2 { font-size: 1.4rem; }
    .article-body h3 { font-size: 1.2rem; }
}

/* ---- CATEGORY BADGE (detail) ---- */
.article-category a {
    display: inline-block;
    background: #e8f0fe;
    color: #0d6efd;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 10px;
    text-decoration: none;
    margin-bottom: 12px;
}

/* ---- ARTICLE BODY (detail) ---- */
.article-body { font-size: 1.05rem; line-height: 1.8; color: #040C20; }
.article-body h2 { font-size: 1.8rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.8rem; }
.article-body h3 { font-size: 1.4rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.6rem; }
.article-body p  { margin-bottom: 1rem; font-size: 1.26rem; }
.article-body img { max-width: 100%; height: auto !important; display: block; }
.article-body iframe,
.article-body table,
.article-body figure { max-width: 100%; overflow-x: auto; }
.article-body ul, .article-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.3rem; font-size: 1.12rem; }

/* ---- RELATED ARTICLES (detail) ---- */
.related-section { margin-top: 48px; border-top: 1px solid rgba(93,99,113,0.17); padding-top: 32px; }
.related-section h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; color: #040C20; }
.related-card {
    border: 1px solid rgba(93,99,113,0.17);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    color: #040C20;
    background: #eeeae0;
    transition: box-shadow 0.2s;
}
.related-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.09); color: #040C20; }
.related-card h6 { font-size: 1.1rem; font-weight: 600; margin-bottom: 2px; color: #040C20; }
.related-card .meta { font-size: 11px; color: #5D6371; }

/* ---- SHARE SECTION (detail) ---- */
.share-section { margin-top: 32px; border-top: 1px solid rgba(93,99,113,0.17); padding-top: 24px; }
.share-section h5 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: #040C20; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1.4;
}
.share-btn:hover { opacity: 0.82; color: #fff; text-decoration: none; }
.share-facebook  { background: #1877F2; }
.share-x         { background: #000; }
.share-linkedin  { background: #0A66C2; }
.share-reddit    { background: #FF4500; }
.share-whatsapp  { background: #25D366; }
.share-telegram  { background: #0088cc; }
.share-pinterest { background: #E60023; }
.share-stocktwits { background: #FF8C00; }
.share-email     { background: #6c757d; }
.share-copy      { background: #6c757d; }

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */
body.dark-mode .learn-wrapper {
    background: rgb(18,35,50);
}
body.dark-mode .learn-nav {
    background: rgba(21,82,239,0.1);
    border-bottom-color: rgba(21,82,239,0.2);
}
body.dark-mode .learn-nav a { color: #7cb9fb; }
body.dark-mode .learn-search-wrap .form-control {
    background: #1e2433;
    border-color: #3a4256;
    color: #ccc;
}
body.dark-mode .learn-section h2 { color: #dfdfdf; }
body.dark-mode .article-card {
    background: rgb(32,57,79);
    border-color: rgba(255,255,255,0.08);
    color: #dfdfdf;
}
body.dark-mode .article-card:hover { color: #dfdfdf; }
body.dark-mode .article-card h5 { color: #dfdfdf; }
body.dark-mode .article-card .meta { color: #9aa0ab; }
body.dark-mode .article-title { color: #dfdfdf; }
body.dark-mode .article-meta { color: #9aa0ab; }
body.dark-mode .article-body { color: #dfdfdf; }
body.dark-mode .article-body h2,
body.dark-mode .article-body h3 { color: #dfdfdf; }
body.dark-mode .related-section { border-top-color: rgba(255,255,255,0.08); }
body.dark-mode .related-section h3 { color: #dfdfdf; }
body.dark-mode .related-card {
    background: rgb(32,57,79);
    border-color: rgba(255,255,255,0.08);
    color: #dfdfdf;
}
body.dark-mode .related-card:hover { color: #dfdfdf; }
body.dark-mode .related-card h6 { color: #dfdfdf; }
body.dark-mode .related-card .meta { color: #9aa0ab; }
body.dark-mode .share-section { border-top-color: rgba(255,255,255,0.08); }
body.dark-mode .share-section h5 { color: #dfdfdf; }
body.dark-mode .btn-view-more { border-color: #7cb9fb; color: #7cb9fb; }
body.dark-mode .btn-view-more:hover { background: #7cb9fb; color: #122332; }
body.dark-mode .learn-back-link { color: #7cb9fb; }
body.dark-mode .learn-back-link:hover { color: #7cb9fb; }
