*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --red: #E8192C;
    --red-dark: #c0101f;
    --black: #111111;
    --dark: #1A1A1A;
    --gray: #5A5A5A;
    --light: #F5F5F5;
    --border: #E2E2E2;
    --white: #FFFFFF;
    --nav-h: 68px;
    --max-w: 1160px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--light);
    color: var(--black);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}


/* ── BLOG HERO ── */
.blog-hero {
    padding: 32px 0 40px;
}

.blog-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--red);
    background: rgba(232, 25, 44, .08);
    padding: 4px 12px;
    border-radius: 100px;
}

.blog-read-time {
    font-size: 13px;
    color: var(--gray);
}

#blogTitle {
    font-weight: 800;
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1.15;
    color: var(--black);
    margin-bottom: 24px;
}

.blog-hero-img {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    /* max-height: 500px; */
    margin-bottom: 0;
    background: #ddd;
}

.blog-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── BLOG LAYOUT ── */
.blog-layout {
    display: grid;
    grid-template-columns: 240px 1fr 260px;
    gap: 40px;
    align-items: start;
    padding: 48px 0 80px;
}

/* ── TOC (LEFT) ── */
.toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

.toc-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 14px;
}

.toc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border);
}

.toc ul li a {
    display: block;
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    padding: 7px 14px;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: color .2s, border-color .2s;
    line-height: 1.45;
}

.toc ul li a:hover {
    color: var(--red);
    border-left-color: var(--red);
}

.toc ul li a.active-toc {
    color: var(--red);
    border-left-color: var(--red);
    font-weight: 600;
}

#blogBody {
    min-width: 0;
}

#blogBody h1 {

    font-weight: 800;
    font-size: clamp(22px, 3vw, 32px);
    color: var(--black);
    margin: 40px 0 16px;
    line-height: 1.2;
}

#blogBody h2 {

    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 26px);
    color: var(--black);
  margin: 18px 0 14px;
    line-height: 1.25;
}

#blogBody h3 {
    
    font-weight: 700;
    font-size: clamp(16px, 2vw, 20px);
    color: var(--black);
    margin: 28px 0 12px;
}

#blogBody p {
    font-size: 15.5px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 3px;
}

#blogBody ul,
#blogBody ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

#blogBody li {
    font-size: 15.5px;
    color: #333;
    line-height: 1.75;
    margin-bottom: 1px;
}

#blogBody img.img-fluid {
    width: 100%;
    border-radius: 12px;
    margin: 24px 0;
    display: block;
}

#blogBody table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14px;
}

#blogBody th {
    background: var(--dark);
    color: var(--white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

#blogBody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    color: #333;
}

#blogBody tr:nth-child(even) td {
    background: rgba(0, 0, 0, .02);
}

#blogBody a {
    color: var(--red);
}
.blog-bg-text {
    position: absolute;
    top: 48%;
    left: 50%;
    /* transform: translate(-50%, -50%); */
    font-size: clamp(8rem, 17vw, 19rem);
    font-weight: 700;
    color: rgb(145 145 145 / 14%);
    letter-spacing: -2px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 1;
}
#blogBody h1,
#blogBody h2,
#blogBody h3 {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
/* ── SIDEBAR (RIGHT) ── */
.sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 16px;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
  
    font-weight: 800;
    font-size: 18px;
    color: var(--white);
    flex-shrink: 0;
}

.author-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--black);
}

.author-role {
    font-size: 13px;
    color: var(--gray);
    margin-top: 2px;
}

.blog-date-info {
    font-size: 13.5px;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-date-info span {
    display: flex;
    justify-content: space-between;
}

.blog-date-info strong {
    color: var(--black);
}

/* recent posts */
.recent-post-card {
    display: block;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.recent-post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin-bottom: 10px;
    background: #eee;
}

.recent-post-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--black);
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color .2s;
}

.recent-post-card:hover .recent-post-title {
    color: var(--red);
}

.recent-post-excerpt {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-meta {
    font-size: 11.5px;
    color: #aaa;
}

/* share */
.share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    cursor: pointer;
    color: var(--gray);
    text-decoration: none;
    transition: all .2s;
}

.share-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── CTA STRIP ── */
.cta-strip {
    background: var(--dark);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin: 0 0 80px;
}

.cta-strip h3 {
  
    font-weight: 800;
    font-size: clamp(22px, 3vw, 32px);
    color: var(--white);
    margin-bottom: 10px;
}

.cta-strip p {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
}

.cta-strip-btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cta-btn-red {
    background: var(--red);
    color: var(--white);
  
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.cta-btn-red:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.cta-btn-ghost {
    background: transparent;
    color: var(--white);
 
    font-weight: 600;
    font-size: 14px;
    padding: 11px 28px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, .2);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s;
}

.cta-btn-ghost:hover {
    border-color: rgba(255, 255, 255, .5);
}


@media(max-width:1100px) {
    .blog-layout {
        grid-template-columns: 1fr 2fr;
    }

    .sidebar {
        display: none;
    }
}

@media(max-width:768px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .toc {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links,
    .btn-nav.desktop-only {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media(max-width:500px) {
    .container {
        padding: 0 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}