/* ════════════════════════════════════════
   BLOG DETAILS — Enhanced Reading Experience
════════════════════════════════════════ */

/* ── Reading progress bar ── */
.read-progress-bar {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 3px;
    background: linear-gradient(90deg, #00C7B1, #03477B);
    width: 0%;
    z-index: 9999;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
}

/* ── Hero image ── */
.blogDetails { margin-top: 40px; margin-bottom: 5rem; }
.blogDetails .blog-hero-img-wrap {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 0;
}
.blogDetails .blog-hero-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
    pointer-events: none;
}
.blogDetails .blogImage1 {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 28px;
    transition: transform .6s ease;
}
.blogDetails .blog-hero-img-wrap:hover .blogImage1 { transform: scale(1.02); }

/* ── Meta bar ── */
.blog-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    margin: 0 0 2.5rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-top: none;
    border-radius: 0 0 20px 20px;
}
.blog-meta-left { display: flex; flex-direction: column; gap: 6px; }
.blog-meta-left h1 { color: #fff; line-height: 1.45; margin: 0; }
.blog-meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-meta-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0,199,177,.3);
}
.blog-meta-author span { color: rgba(255,255,255,.75); font-size: .9rem; }
.blog-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
.blog-stat-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.65);
    font-size: .82rem;
    cursor: pointer;
    transition: all .25s ease;
}
.blog-stat-pill:hover,
.blog-stat-pill.share-pill:hover {
    border-color: rgba(0,199,177,.3);
    color: #00C7B1;
}
.blog-stat-pill img { width: 14px; height: 14px; opacity: .7; }
.blog-stat-pill.share-pill { cursor: pointer; }

/* ── Reading time badge ── */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(0,199,177,.09);
    border: 1px solid rgba(0,199,177,.2);
    color: #00C7B1;
    font-size: .8rem;
    margin-bottom: 2rem;
}
.reading-time-badge svg { width: 13px; height: 13px; stroke: #00C7B1; fill: none; }

/* ── Article content ── */
.contentBlog {
    max-width: 820px;
    margin: 0 auto;
}
.contentBlog p {
    color: rgba(255,255,255,.82) !important;
    font-size: 1.4rem !important;
    line-height: 1.9 !important;
    margin-bottom: 1.5rem;
}
.contentBlog h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 2.5rem 0 1.25rem;
    padding-inline-start: 1rem;
    border-inline-start: 3px solid #00C7B1;
}
.contentBlog h3 {
    color: rgba(255,255,255,.9);
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}
.contentBlog img {
    width: 100%;
    border-radius: 16px;
    margin: 2rem 0;
    object-fit: cover;
}
.contentBlog blockquote {
    border-inline-start: 3px solid #00C7B1;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: rgba(0,199,177,.05);
    border-radius: 0 12px 12px 0;
    color: rgba(255,255,255,.75);
    font-style: italic;
}
.contentBlog ul, .contentBlog ol {
    color: rgba(255,255,255,.8);
    padding-inline-start: 1.5rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}
.contentBlog a {
    color: #00C7B1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Tables (TinyMCE output) ── */
.contentBlog table {
    width: 100% !important;
    margin: 1.75rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(0, 199, 177, 0.22);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}
.contentBlog table caption {
    caption-side: top;
    text-align: start;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 0 0 .5rem;
}
.contentBlog table th,
.contentBlog table td {
    padding: 0.85rem 1rem;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.7;
}
.contentBlog table th:last-child,
.contentBlog table td:last-child { border-inline-end: 0; }
.contentBlog table tr:last-child td { border-bottom: 0; }

.contentBlog table thead th,
.contentBlog table tbody tr:first-child th {
    background: linear-gradient(180deg, rgba(0, 199, 177, 0.18), rgba(0, 199, 177, 0.08));
    color: #fff;
    font-weight: 600;
    letter-spacing: .01em;
    border-bottom: 1px solid rgba(0, 199, 177, 0.35);
}
.contentBlog table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}
.contentBlog table tbody tr:hover td {
    background: rgba(0, 199, 177, 0.06);
}
.contentBlog table p { margin: 0 !important; color: inherit !important; font-size: inherit !important; }
.contentBlog table a { color: #00C7B1; }

/* Horizontal scroll on small screens */
@media (max-width: 614px) {
    .contentBlog table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .contentBlog table th,
    .contentBlog table td { padding: 0.65rem 0.75rem; font-size: .95rem; }
}

/* ── Related articles section ── */
.cardsBlogsSection {
    margin: 0 0 6rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.cardsBlogsSection .related-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    border-radius: 100px;
    border: 1px solid rgba(0,199,177,.25);
    background: rgba(0,199,177,.06);
    color: #00C7B1;
    font-size: 12px;
    margin: 0 auto 1.25rem;
    letter-spacing: .05em;
}

@media (max-width: 877px) {
    .blogDetails .blogImage1 { height: 360px; }
    .blog-meta-bar { flex-direction: column; align-items: flex-start; border-radius: 0 0 16px 16px; padding: 1.25rem 1.5rem; }
    .blog-meta-right { align-items: flex-start; flex-direction: row; }
}
@media (max-width: 614px) {
    .blogDetails { margin-top: 20px; }
    .blogDetails .blogImage1 { height: 240px; border-radius: 18px; }
    .blogDetails .blog-hero-img-wrap { border-radius: 18px; }
    .blog-meta-bar { padding: 1rem 1.25rem; }
    .contentBlog p { font-size: 1rem !important; }
    .contentBlog h2 { font-size: 1.3rem; }
}

/* ── Light mode overrides ── */
body.light-mode .blog-meta-bar {
    background: rgba(0,0,0,.02);
    border-color: rgba(0,0,0,.07);
}
body.light-mode .blog-meta-left h1 { color: #111; }
body.light-mode .blog-meta-author span { color: rgba(0,0,0,.65); }
body.light-mode .blog-stat-pill {
    border-color: rgba(0,0,0,.1);
    background: rgba(0,0,0,.03);
    color: rgba(0,0,0,.6);
}
body.light-mode .contentBlog p { color: rgba(0,0,0,.78) !important; }
body.light-mode .contentBlog h2 { color: #111; }
body.light-mode .contentBlog h3 { color: rgba(0,0,0,.85); }
body.light-mode .contentBlog blockquote { color: rgba(0,0,0,.65); background: rgba(0,199,177,.04); }
body.light-mode .contentBlog ul,
body.light-mode .contentBlog ol { color: rgba(0,0,0,.72); }
body.light-mode .cardsBlogsSection { border-top-color: rgba(0,0,0,.08); }

body.light-mode .contentBlog table {
    background: #fff;
    color: rgba(0,0,0,.82);
    border-color: rgba(0,199,177,.25);
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
body.light-mode .contentBlog table th,
body.light-mode .contentBlog table td {
    border-bottom-color: rgba(0,0,0,.08);
    border-inline-end-color: rgba(0,0,0,.05);
}
body.light-mode .contentBlog table thead th,
body.light-mode .contentBlog table tbody tr:first-child th {
    background: linear-gradient(180deg, rgba(0,199,177,.12), rgba(0,199,177,.05));
    color: #0b3a35;
    border-bottom-color: rgba(0,199,177,.3);
}
body.light-mode .contentBlog table tbody tr:nth-child(even) td { background: rgba(0,0,0,.025); }
body.light-mode .contentBlog table tbody tr:hover td { background: rgba(0,199,177,.06); }
