/* Hero */
.post-hero {
    background-color: var(--ink);
    background-size: cover;
    background-position: center;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
}

.post-hero.post-hero--noimage {
    background-image: linear-gradient(120deg, var(--teal-dark), var(--ink) 70%);
}

.post-hero__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 60px 28px 36px;
    width: 100%;
    box-sizing: border-box;
}

.post-breadcrumb {
    color: #EFE6DA;
    font-size: 13px;
    margin-bottom: 14px;
    opacity: 0.9;
}

.post-breadcrumb a {
    color: #EFE6DA;
    text-decoration: underline;
}

.post-breadcrumb span {
    margin: 0 6px;
}

.post-hero__title {
    color: #fff;
    font-size: 38px;
    line-height: 1.15;
    max-width: 780px;
    margin: 0 0 16px;
}

.post-hero__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: #EFE6DA;
    font-size: 13.5px;
}

.post-hero__meta .dot {
    opacity: 0.5;
}

@media (max-width: 640px) {
    .post-hero__title {
        font-size: 26px;
    }
    .post-hero {
        min-height: 260px;
    }
}

/* Two-column layout: content + sidebar */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 44px 28px 10px;
    align-items: start;
    box-sizing: border-box;
}

.post-content {
    max-width: 700px;
    min-width: 0;
    color: var(--ink);
    font-size: 16.5px;
    line-height: 1.7;
}

.post-content p {
    margin: 0 0 1.2em;
}

.post-content h2 {
    font-size: 24px;
    margin: 1.8em 0 0.6em;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content h3 {
    font-size: 19px;
    margin: 1.5em 0 0.5em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Editors sometimes paste raw <table> markup straight into post content
   instead of using the .guide-table/.table-wrap wrapper from
   content-blocks.css. Give bare tables the same horizontal-scroll
   containment so they can't force the whole page wider than the
   viewport on mobile. */
.post-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-sidebar {
    position: sticky;
    top: 24px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
}

.sidebar-card h4 {
    font-family: var(--font-body);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--teal-dark);
    font-weight: 700;
    margin: 0 0 12px;
}

#post-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#post-toc-list li a {
    display: block;
    color: var(--ink-soft);
    font-size: 13.5px;
    text-decoration: none;
    padding: 6px 0 6px 14px;
    margin-left: -2px;
    border-left: 2px solid transparent;
}

#post-toc-list li a:hover,
#post-toc-list li a.is-active {
    color: var(--orange-dark);
    border-left-color: var(--orange);
}

.sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-categories a {
    display: inline-block;
    background: var(--paper-tint);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 12.5px;
    padding: 5px 10px;
    border-radius: 14px;
}

.sidebar-categories a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

@media (max-width: 960px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .post-sidebar .sidebar-card {
        flex: 1 1 240px;
    }
}

.container-single {
    max-width: var(--maxw);
    padding: 0 28px;
    margin: auto;
    box-sizing: border-box;
}

/* Next / Previous Button */
.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--teal);
    color: #fff;
    transition: background-color 0.3s;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: var(--orange);
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Related articles — own minimal card style, not the listing .blog cards */
.related {
    background: var(--paper-tint);
    padding: 56px 0;
    margin-top: 60px;
}

.related h3 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    margin: 0 0 22px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.rel-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.rel-thumb-link {
    display: block;
}

.rel-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rel-thumb--placeholder {
    background: linear-gradient(135deg, #DCE9E8, #EFE6DA);
    color: var(--ink-soft);
    font-size: 12px;
}

.rel-body {
    padding: 16px 18px;
}

.rel-body h4 {
    font-size: 16px;
    margin: 0 0 8px;
}

.rel-body h4 a {
    color: var(--ink);
    text-decoration: none;
}

.rel-body h4 a:hover {
    color: var(--teal-dark);
}

.rel-body p {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin: 0 0 10px;
}

.rel-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
}

.rel-link:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Css */
@media (min-width: 768px) and (max-width: 900px) {
    .nav-links {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-previous a,
    .nav-next a {
        padding: 10px 15px;
    }

    nav.navigation.post-navigation {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .container-single {
        padding: 0 20px;
    }

    .nav-links {
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-previous,
    .nav-next {
        text-align: center;
        margin-bottom: 20px;
    }

    .nav-previous a,
    .nav-next a {
        width: 100%;
        padding: 15px 0;
        box-sizing: border-box;
    }

    nav.navigation.post-navigation {
        justify-content: center;
    }
}
