/* BetTurtle Puput Blog Theme — Feb 2026 */
/* Aligns blog with main site design (Inter font, dark mode colours) */

/* ── Font family override (all modes) ── */
body.bt-blog,
body.bt-blog h1,
body.bt-blog h2,
body.bt-blog h3,
body.bt-blog h4,
body.bt-blog h5,
body.bt-blog h6,
body.bt-blog p,
body.bt-blog span {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI",
            Roboto, Arial, sans-serif !important;
}

/* ══════════════════════════════════════════
   DARK MODE
   ══════════════════════════════════════════ */

/* Headings */
html[data-bs-theme="dark"] body.bt-blog h1,
html[data-bs-theme="dark"] body.bt-blog h2,
html[data-bs-theme="dark"] body.bt-blog h3,
html[data-bs-theme="dark"] body.bt-blog h4,
html[data-bs-theme="dark"] body.bt-blog h5,
html[data-bs-theme="dark"] body.bt-blog h6 {
    color: #F5F5F5 !important;
}

/* Body text */
html[data-bs-theme="dark"] body.bt-blog p,
html[data-bs-theme="dark"] body.bt-blog span,
html[data-bs-theme="dark"] body.bt-blog li,
html[data-bs-theme="dark"] body.bt-blog .rich-text,
html[data-bs-theme="dark"] body.bt-blog .rich-text p {
    color: #E8E8E8 !important;
}

/* Blockquotes */
html[data-bs-theme="dark"] body.bt-blog blockquote {
    color: #E8E8E8 !important;
    opacity: 1 !important;
    border-left: 4px solid var(--main-color);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Links */
html[data-bs-theme="dark"] body.bt-blog .page-content a,
html[data-bs-theme="dark"] body.bt-blog .rich-text a,
html[data-bs-theme="dark"] body.bt-blog .blog_grid a,
html[data-bs-theme="dark"] body.bt-blog .blog_sidebar a {
    color: #93c5fd !important;
}

html[data-bs-theme="dark"] body.bt-blog .page-content a:hover,
html[data-bs-theme="dark"] body.bt-blog .rich-text a:hover,
html[data-bs-theme="dark"] body.bt-blog .blog_grid a:hover,
html[data-bs-theme="dark"] body.bt-blog .blog_sidebar a:hover {
    color: var(--main-color) !important;
}

/* Card / article backgrounds */
html[data-bs-theme="dark"] body.bt-blog .page-content,
html[data-bs-theme="dark"] body.bt-blog .blog_grid,
html[data-bs-theme="dark"] body.bt-blog .entry-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Sidebar */
html[data-bs-theme="dark"] body.bt-blog ul.sidebar {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-top-color: var(--main-color) !important;
}

html[data-bs-theme="dark"] body.bt-blog ul.sidebar h4 {
    color: #F5F5F5 !important;
}

html[data-bs-theme="dark"] body.bt-blog ul.sidebar li a {
    color: #E8E8E8 !important;
}

html[data-bs-theme="dark"] body.bt-blog .searchTerm {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #E8E8E8 !important;
}

/* Entry metadata links */
html[data-bs-theme="dark"] body.bt-blog ul.links li,
html[data-bs-theme="dark"] body.bt-blog ul.links li a {
    color: #b0b8c1 !important;
}

/* Code blocks */
html[data-bs-theme="dark"] body.bt-blog pre,
html[data-bs-theme="dark"] body.bt-blog code {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #e2e8f0 !important;
    border-radius: 0.25rem;
}
html[data-bs-theme="dark"] body.bt-blog pre {
    padding: 1rem;
    overflow-x: auto;
}
html[data-bs-theme="dark"] body.bt-blog code {
    padding: 0.125rem 0.375rem;
}

/* Related entries */
html[data-bs-theme="dark"] body.bt-blog .relatedPosts h2,
html[data-bs-theme="dark"] body.bt-blog .relatedPosts h3,
html[data-bs-theme="dark"] body.bt-blog .relatedPosts h2 span,
html[data-bs-theme="dark"] body.bt-blog .relatedPosts h3 a {
    color: #F5F5F5 !important;
}

html[data-bs-theme="dark"] body.bt-blog .relatedPosts p,
html[data-bs-theme="dark"] body.bt-blog .relatedPosts .rich-text,
html[data-bs-theme="dark"] body.bt-blog .relatedPosts .rich-text p {
    color: rgba(248, 249, 250, 0.85) !important;
}

html[data-bs-theme="dark"] body.bt-blog .relatedPosts a {
    color: #93c5fd !important;
}

html[data-bs-theme="dark"] body.bt-blog .relatedPosts a:hover {
    color: var(--main-color) !important;
}

html[data-bs-theme="dark"] body.bt-blog .itemPosts .box.feature a {
    color: #93c5fd !important;
}

/* Pagination */
html[data-bs-theme="dark"] body.bt-blog .pagination span {
    background: var(--main-color);
}

/* Archive menu */
html[data-bs-theme="dark"] body.bt-blog .menu li a {
    background-color: rgba(255, 255, 255, 0.06);
    color: #E8E8E8;
}

html[data-bs-theme="dark"] body.bt-blog .menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] body.bt-blog .menu .sub a {
    color: #b0b8c1;
}

/* Search form */
html[data-bs-theme="dark"] body.bt-blog .search_form input[type="search"] {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #E8E8E8 !important;
}

/* ══════════════════════════════════════════
   LIGHT MODE social icons (shared)
   ══════════════════════════════════════════ */
body.bt-blog .blog_grid .article .social-share li.social-item i,
body.bt-blog .page-content .social-share-all li.social-item i {
    color: #0b5ed7 !important;
}

body.bt-blog .blog_grid .article .social-share li.social-item:hover,
body.bt-blog .page-content .social-share-all li.social-item:hover {
    background-color: #0b5ed7 !important;
}

body.bt-blog .blog_grid .article .social-share li.social-item:hover i,
body.bt-blog .page-content .social-share-all li.social-item:hover i {
    color: #ffffff !important;
}

/* ══════════════════════════════════════════
   JOURNEY CATEGORY BADGES
   ══════════════════════════════════════════ */
.blog-cat-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.blog-cat-tips     { background: #ffc107; color: #000; }
.blog-cat-learn    { background: #0dcaf0; color: #000; }
.blog-cat-systems  { background: #198754; color: #fff; }
.blog-cat-data     { background: #6c757d; color: #fff; }
.blog-cat-reference { background: #0d6efd; color: #fff; }

/* Preserve badge text colors in dark mode (overrides span/link !important rules) */
html[data-bs-theme="dark"] .blog-cat-tips      { color: #000 !important; }
html[data-bs-theme="dark"] .blog-cat-learn     { color: #000 !important; }
html[data-bs-theme="dark"] .blog-cat-systems   { color: #fff !important; }
html[data-bs-theme="dark"] .blog-cat-data      { color: #fff !important; }
html[data-bs-theme="dark"] .blog-cat-reference { color: #fff !important; }

/* ══════════════════════════════════════════
   ENTRY CARDS (BS5 card layout)
   ══════════════════════════════════════════ */
.entry-card {
    transition: box-shadow 0.2s ease;
}
.entry-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}
.entry-card .card-img-top {
    /* 40/21 = the fill-800x420 rendition's ratio, so the whole hero shows */
    aspect-ratio: 40 / 21;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.entry-card .reading-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Tag pills */
.blog-tag-pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 1rem;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    text-decoration: none;
    transition: background 0.2s;
}
.blog-tag-pill:hover {
    background: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    text-decoration: none;
}
html[data-bs-theme="dark"] .blog-tag-pill {
    background: rgba(147, 197, 253, 0.15);
    color: #93c5fd;
}
html[data-bs-theme="dark"] .blog-tag-pill:hover {
    background: rgba(147, 197, 253, 0.25);
}

/* ══════════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════════ */
.blog-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.blog-breadcrumb a {
    text-decoration: none;
}

/* ══════════════════════════════════════════
   ARTICLE PAGE LAYOUT
   ══════════════════════════════════════════ */

/* Article body class — removes sidebar padding from base */
body.bt-article-page .container-blog {
    max-width: 100%;
    padding: 0;
}

/* Content wrapper — 720px for text readability */
.bt-article-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Hero image container — wider than text at 960px */
.bt-article-hero {
    max-width: 960px;
    margin: 0 auto 2rem;
    padding: 0 1.25rem;
}

.bt-article-hero img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 0.75rem;
}

/* ══════════════════════════════════════════
   ARTICLE HEADER
   ══════════════════════════════════════════ */
.bt-article-wrapper h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Meta strip — horizontal dividers */
.bt-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.bt-article-meta a {
    color: #6c757d;
    text-decoration: none;
}
.bt-article-meta a:hover {
    color: var(--main-color);
}

html[data-bs-theme="dark"] .bt-article-meta {
    border-color: rgba(255, 255, 255, 0.12);
    color: #b0b8c1;
}
html[data-bs-theme="dark"] .bt-article-meta a {
    color: #b0b8c1;
}
html[data-bs-theme="dark"] .bt-article-meta a:hover {
    color: #93c5fd;
}

/* ══════════════════════════════════════════
   ARTICLE BODY TYPOGRAPHY
   ══════════════════════════════════════════ */
.bt-article-body {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #1a1a1a;
}

.bt-article-body p {
    margin-bottom: 1.5rem;
}

.bt-article-body h2 {
    font-size: 1.625rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.bt-article-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.bt-article-body h4 {
    font-size: 1.175rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.bt-article-body blockquote {
    border-left: 4px solid var(--main-color);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: #444;
}

/* Lists */
.bt-article-body ul,
.bt-article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}
.bt-article-body li {
    margin-bottom: 0.35rem;
}

/* Tables inside articles */
.bt-article-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}
.bt-article-body th,
.bt-article-body td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}
.bt-article-body th {
    background: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

/* Images inside article body */
.bt-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Screenshots carry small UI text, so they break out of the 720px text
   column to the width of the hero. */
.bt-article-body .richtext-image {
    display: block;
    width: 960px;
    max-width: calc(100vw - 2.5rem);
    margin-left: calc(50% - 480px);
    margin-right: calc(50% - 480px);
}

@media (max-width: 1040px) {
    .bt-article-body .richtext-image {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Code blocks */
.bt-article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.bt-article-body code {
    font-size: 0.875em;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 0.25rem;
    color: #c7254e;
}

.bt-article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

/* Dark mode: article body */
html[data-bs-theme="dark"] .bt-article-body {
    color: #E8E8E8;
}

html[data-bs-theme="dark"] .bt-article-body blockquote {
    background: rgba(255, 255, 255, 0.04);
    color: #d1d5db;
}

html[data-bs-theme="dark"] .bt-article-body th {
    background: rgba(255, 255, 255, 0.06);
}
html[data-bs-theme="dark"] .bt-article-body th,
html[data-bs-theme="dark"] .bt-article-body td {
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-bs-theme="dark"] .bt-article-body code {
    background: rgba(255, 255, 255, 0.08);
    color: #f0abfc;
}

html[data-bs-theme="dark"] .bt-article-body pre code {
    background: none;
    color: inherit;
}

/* ══════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════ */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--main-color);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ══════════════════════════════════════════
   SHARE BUTTONS (circular)
   ══════════════════════════════════════════ */
.bt-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #6c757d;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.bt-share-button:hover {
    background: var(--main-color);
    color: #fff;
    transform: translateY(-2px);
}

html[data-bs-theme="dark"] .bt-share-button {
    background: rgba(255, 255, 255, 0.08);
    color: #b0b8c1;
}
html[data-bs-theme="dark"] .bt-share-button:hover {
    background: var(--main-color);
    color: #fff;
}

/* ══════════════════════════════════════════
   AUTHOR BIO
   ══════════════════════════════════════════ */
.bt-author-bio {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.bt-author-bio img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bt-author-bio .bt-author-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.bt-author-bio .bt-author-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

html[data-bs-theme="dark"] .bt-author-bio {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-bs-theme="dark"] .bt-author-bio .bt-author-desc {
    color: #b0b8c1;
}

/* ══════════════════════════════════════════
   RELATED ARTICLES (article page redesign)
   ══════════════════════════════════════════ */
.bt-related-section {
    max-width: 960px;
    margin: 3rem auto 0;
    padding: 0 1.25rem 2rem;
}

.bt-related-section h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.bt-related-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.bt-related-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.bt-related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.bt-related-card .bt-related-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bt-related-card .bt-related-body h5 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}
.bt-related-card .bt-related-body h5 a {
    color: inherit;
    text-decoration: none;
}
.bt-related-card .bt-related-body h5 a:hover {
    color: var(--main-color);
}

.bt-related-card .bt-related-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: auto;
}

/* Dark mode related cards */
html[data-bs-theme="dark"] .bt-related-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}
html[data-bs-theme="dark"] .bt-related-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
html[data-bs-theme="dark"] .bt-related-card .bt-related-body h5 a {
    color: #F5F5F5;
}
html[data-bs-theme="dark"] .bt-related-card .bt-related-body h5 a:hover {
    color: #93c5fd;
}
html[data-bs-theme="dark"] .bt-related-card .bt-related-meta {
    color: #b0b8c1;
}

/* ══════════════════════════════════════════
   ENTRY CARD REFINEMENTS (listing page)
   ══════════════════════════════════════════ */
.entry-card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.entry-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

html[data-bs-theme="dark"] .entry-card {
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-bs-theme="dark"] .entry-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ══════════════════════════════════════════
   ARTICLE TAGS
   ══════════════════════════════════════════ */
.bt-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-bs-theme="dark"] .bt-article-tags {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 767.98px) {
    body.bt-blog .blog_sidebar {
        margin-top: 2rem;
        padding: 0 !important;
    }

    /* Article page mobile */
    .bt-article-wrapper h1 {
        font-size: 1.625rem;
    }
    .bt-article-body {
        font-size: 1rem;
    }
    .bt-article-body h2 {
        font-size: 1.375rem;
        margin-top: 2rem;
    }
    .bt-article-body h3 {
        font-size: 1.175rem;
        margin-top: 1.75rem;
    }
    .bt-article-hero img {
        border-radius: 0;
        max-height: 300px;
    }
    .bt-article-hero {
        padding: 0;
    }
    .bt-related-card img {
        height: 140px;
    }
    .bt-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .bt-article-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
}
