/* C:\xampp\htdocs\techsolution\css\blog-single.css */
/* Dark theme – white text, featured image: full width, no crop, dark bg */

:root {
    --red:       #D0021B;
    --red-dark:  #a80015;
    --red-light: #2a0608;
    --red-mid:   #af0303;
    --black:     #0d0d0d;
    --white:     #ffffff;
    --bg-main:   #130508;
    --bg-card:   #141414;        /* SOLID DARK – previously semi-transparent */
    --g100:      #220a0d;
    --g200:      #3a1018;
    --g400:      #9ca3af;
    --g600:      #cbd5e1;
    --g800:      #1f2937;
    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --ease:      cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

/* === FIXED: force dark background on blog-single pages === */
body.blog-single {
    font-family: var(--font-main);
    background: var(--bg-main) !important;
    color: #e8d0d4;
    overflow-x: hidden;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

#progress-bar {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: var(--red);
    z-index: 9999;
    transition: width .08s linear;
}

/* HERO SECTION */
.post-hero {
    background: var(--black);
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}
.post-hero::before {
    content: ''; position: absolute; top: -60px; right: -60px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(208,2,27,.22) 0%, transparent 68%);
    pointer-events: none;
}
.post-hero-inner {
    position: relative; z-index: 1;
    padding-bottom: 48px;
    animation: fadeUp .6s ease both .1s;
}
.back-link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600;
    color: rgba(255,255,255,.6);
    text-decoration: none; margin-bottom: 22px;
    transition: color .2s;
}
.back-link:hover { color: var(--red-mid); text-decoration: none; }
.back-link i { font-size: 10px; }

.post-cat-badge {
    display: inline-block;
    background: var(--red); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; padding: 4px 12px; border-radius: 40px;
    margin-bottom: 16px;
}
.post-hero h1 {
    font-family: var(--font-main);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800; color: #fff;
    line-height: 1.1; letter-spacing: -.025em;
    margin-bottom: 18px; max-width: 820px;
}
.post-meta-bar {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.post-meta-bar span {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500; color: rgba(255,255,255,.5);
}
.post-meta-bar i { font-size: 10px; color: var(--red-mid); }

/* ===== FEATURED IMAGE: NO CROP, DARK BACKGROUND ===== */
.post-featured-img-wrap {
    width: 100%;
    background: #0a0a0a;        /* dark background – no white */
    display: flex;
    justify-content: center;
    align-items: center;
}
.post-featured-img {
    width: 100%;
    height: auto;               /* maintain aspect ratio, no cropping */
    max-height: 500px;          /* optional limit, image scales down proportionally */
    object-fit: contain;        /* entire image visible, may add letterboxing */
    display: block;
}
.post-featured-placeholder {
    width: 100%;
    padding: 100px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.15);
    font-size: 3rem;
    background: #121212;
}

/* MAIN CONTENT (dark card, white text) */
.post-body-wrap { padding: 64px 0 80px; }

.article-content {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(208,2,27,.2);
    padding: 44px 48px;
    animation: fadeUp .5s ease both .2s;
}

.article-excerpt {
    font-size: 1.06rem;
    font-weight: 500;
    color: #fccdd4;
    font-style: italic;
    border-left: 3px solid var(--red);
    padding: 12px 18px;
    margin-bottom: 2em;
    background: rgba(25, 25, 25, 0.06);
    border-radius: 0 8px 8px 0;
    line-height: 1.75;
    display: block;
    clear: both;
    width: 100%;
}

.article-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #ddd0d4;
}

.article-body p,
.article-body p[style] {
    margin-top: 0 !important;
    margin-bottom: 1.6em !important;
    text-align: justify;
    hyphens: auto;
}
.article-body p:last-child {
    margin-bottom: 0 !important;
}

.article-body > p:first-of-type::first-letter {
    font-family: var(--font-main);
    font-size: 3.4em;
    font-weight: 800;
    color: var(--red);
    float: left;
    line-height: 0.78;
    margin: 0.06em 0.14em 0 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: var(--font-main);
    font-weight: 700;
    color: #fff;
    margin-top: 2em !important;
    margin-bottom: .65em !important;
    line-height: 1.25;
}
.article-body h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(208,2,27,.3);
    padding-bottom: .3em;
}
.article-body h3 { font-size: 1.2rem; }
.article-body h4 { font-size: 1rem; color: var(--g600); }

.article-body a { color: var(--red-mid); text-decoration: underline; }
.article-body strong { font-weight: 700; color: #fff; }

.article-body ul,
.article-body ol {
    padding-left: 1.7em;
    margin-bottom: 1.6em !important;
}
.article-body li { margin-bottom: .55em; line-height: 1.75; }

.article-body img {
    max-width: 100%; height: auto;
    border-radius: 10px; margin: 1.6em 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

.article-body blockquote {
    border-left: 3px solid var(--red);
    margin: 1.6em 0 !important;
    padding: .8em 1.4em;
    background: rgba(208,2,27,.08);
    border-radius: 0 8px 8px 0;
    font-style: italic; color: #c0b0b5;
}
.article-body blockquote p { margin-bottom: 0 !important; }

.article-body code {
    background: rgba(0,0,0,.3);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: .88em;
    font-family: 'Courier New', monospace;
    color: #f0dde0;
}
.article-body pre {
    background: #0f0f12;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 1.4em 1.6em;
    overflow-x: auto;
    margin-bottom: 1.6em !important;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body hr { border: none; border-top: 2px solid rgba(208,2,27,.2); margin: 2.5em 0 !important; }

.post-footer-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px;
    margin-top: 40px; padding-top: 28px;
    border-top: 2px solid rgba(208,2,27,.15);
}
.share-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5); margin-right: 4px; }
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px; border: 1.5px solid rgba(208,2,27,.3);
    color: rgba(255,255,255,.7);
    text-decoration: none; font-size: 13px;
    transition: all .2s ease;
}
.share-btn:hover {
    border-color: var(--red);
    color: var(--red-mid);
    background: rgba(208,2,27,.15);
    text-decoration: none;
}
.post-date-tag { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.4); }

/* SIDEBAR (dark cards) */
.post-sidebar { animation: fadeUp .5s ease both .3s; }

.sidebar-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid rgba(208,2,27,.2);
    overflow: hidden;
    margin-bottom: 20px;
}
.sidebar-head {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(208,2,27,.2);
    font-family: var(--font-main);
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-head i { color: var(--red); font-size: 13px; }
.sidebar-body { padding: 6px 18px; }

.side-post {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(208,2,27,.1);
}
.side-post:last-child { border-bottom: none; }
.side-post-img {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(208,2,27,.3);
}
.side-post-placeholder {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 8px;
    background: var(--g100);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.3);
    font-size: 1.2rem;
    border: 1px solid rgba(208,2,27,.3);
}
.side-post-title {
    font-size: .8rem;
    font-weight: 600;
    color: #f0dde0;
    line-height: 1.35;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    transition: color .2s;
}
.side-post-title:hover { color: var(--red-mid); }
.side-post-date { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.4); }

.cta-sidebar {
    background: var(--black);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid rgba(208,2,27,.3);
}
.cta-sidebar .icon-big { font-size: 1.9rem; color: var(--red); margin-bottom: 12px; display: block; }
.cta-sidebar h4 {
    font-family: var(--font-main);
    font-size: .95rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.cta-sidebar p {
    font-size: .8rem; font-weight: 400; color: rgba(255,255,255,.5); margin-bottom: 16px !important;
}
.btn-cta-side {
    display: block; text-align: center;
    background: var(--red); color: #fff; text-decoration: none;
    font-family: var(--font-main);
    font-size: .8rem; font-weight: 700;
    padding: 11px 20px; border-radius: 40px;
    transition: background .22s, transform .22s;
}
.btn-cta-side:hover { background: var(--red-dark); transform: translateY(-1px); color: #fff; }

/* RELATED POSTS SECTION */
.related-section { padding: 0 0 80px; }
.related-section h2 {
    font-family: var(--font-main);
    font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 28px;
}
.related-section h2 span { color: var(--red); }
.rel-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid rgba(208,2,27,.2);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.rel-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(208,2,27,.15); border-color: rgba(208,2,27,.4); }
.rel-img { aspect-ratio: 16/9; overflow: hidden; background: var(--g100); flex-shrink: 0; }
.rel-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.rel-card:hover .rel-img img { transform: scale(1.05); }
.rel-img-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.3);
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--g100), var(--g200));
}
.rel-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.rel-date {
    font-size: 11px; font-weight: 500;
    color: rgba(255,255,255,.4);
    margin-bottom: 7px;
    display: flex; align-items: center; gap: 4px;
}
.rel-title {
    font-family: var(--font-main);
    font-size: .9rem; font-weight: 700;
    color: #f0dde0;
    line-height: 1.35;
    margin-bottom: 8px;
    transition: color .2s;
}
.rel-card:hover .rel-title { color: var(--red-mid); }
.rel-excerpt {
    font-size: .8rem; font-weight: 400;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0 !important;
}
.rel-read-more {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700;
    color: var(--red-mid);
    text-decoration: none;
    margin-top: 12px;
    transition: gap .2s;
}
.rel-read-more:hover { gap: 9px; color: var(--red); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* RESPONSIVE */
@media (max-width: 767.98px) {
    .post-hero { padding: 60px 0 0; }
    .article-content { padding: 24px 18px; }
    .post-body-wrap { padding: 36px 0 56px; }
    .article-body > p:first-of-type::first-letter { font-size: 2.6em; }
    .post-featured-img {
        max-height: 300px;
    }
}