/* =============================================================================
   SG Education — Blog (listing + article)
   public/assets/css/sg-blog.css   (loaded only by blog/index + blog/show)

   Same design language as the rest of the site: tokens from sg-custom.css §1
   (--sg-line, --sg-radius, --sg-shadow, --sg-tint …), CTA from §19, FAQ from §13.

     1. Shared ........ tags, cover, post card
     2. Listing ....... intro, filter, grid, featured card, pager
     3. Article ....... hero, layout, TOC, side card
     4. Article body .. typography + content components used inside
                        resources/content/blog/*.html:
                        .sg-lead .sg-key .sg-flow .sg-ladder .sg-cards/.sg-cardlet
                        .sg-phases .sg-mistakes/.sg-mistake .sg-table .sg-note
                        .sg-checklist .sg-panel .sg-pills .sg-takeaway
     5. Article end ... FAQ block, share row, related
     6. Responsive + reduced motion
   ========================================================================== */

/* ---------- 1. Shared ---------- */
.sg-blog :focus-visible,
.sg-read :focus-visible {
    outline: 3px solid var(--eduhive-primary);
    outline-offset: 3px;
}

.sg-btag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--eduhive-base);
    background: rgba(var(--eduhive-base-rgb), .06);
}

.sg-btag i {
    font-size: 12px;
    color: var(--eduhive-primary);
}

.sg-btag--cat {
    color: #fff;
    background: var(--eduhive-primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 12px;
}

/* Cover: photo, or a branded typographic cover when a post has no image */
.sg-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at 85% 15%, rgba(var(--eduhive-primary-rgb), .5) 0%, transparent 55%),
        linear-gradient(150deg, #2b3846 0%, var(--eduhive-base) 100%);
}

.sg-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;   /* keeps faces in frame when the photo is taller than the box */
    transition: transform .8s var(--sg-ease);
}

.sg-cover--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(var(--eduhive-base-rgb), 0) 50%, rgba(var(--eduhive-base-rgb), .45) 100%);
    pointer-events: none;
}

.sg-cover__word {
    position: absolute;
    left: 7%;
    bottom: -.12em;
    font-size: clamp(56px, 7vw, 96px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, .5);
}

.sg-cover--lg .sg-cover__word {
    font-size: clamp(64px, 10vw, 140px);
}

.sg-cover__dots {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .16) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000);
    mask-image: linear-gradient(90deg, transparent, #000);
}

.sg-cover__tag {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 1;
}

/* Post card (listing + "keep reading") */
.sg-bcard {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--sg-radius);
    background: #fff;
    border: 1px solid var(--sg-line);
    box-shadow: var(--sg-shadow);
    transition: transform .45s var(--sg-ease), box-shadow .45s var(--sg-ease), border-color .3s ease;
}

.sg-bcard:hover {
    transform: translateY(-6px);
    box-shadow: var(--sg-shadow-hover);
    border-color: rgba(var(--eduhive-primary-rgb), .35);
}

.sg-bcard:hover .sg-cover img {
    transform: scale(1.06);
}

.sg-bcard__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 26px 26px;
}

.sg-bcard__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sg-muted);
}

.sg-bcard__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.sg-bcard__meta i {
    font-size: 13px;
    color: var(--eduhive-primary);
}

.sg-bcard__title {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.32;
}

.sg-bcard__title a {
    color: var(--eduhive-base);
    transition: color .25s ease;
}

/* Whole card is the link */
.sg-bcard__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.sg-bcard:hover .sg-bcard__title a {
    color: var(--eduhive-primary);
}

.sg-bcard__excerpt {
    margin: 0 0 22px;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--sg-muted);
}

.sg-bcard__more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--sg-line);
    font-size: 14px;
    font-weight: 700;
    color: var(--eduhive-base);
}

.sg-bcard__more i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    background: var(--eduhive-base);
    transition: background .3s ease, transform .3s var(--sg-ease);
}

.sg-bcard:hover .sg-bcard__more i {
    background: var(--eduhive-primary);
    transform: translateX(4px);
}

/* ---------- 2. Listing ---------- */
.sg-blog__intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.sg-blog__intro p {
    margin: 18px 0 0;
    font-size: 17px;
    line-height: 1.7;
    color: var(--sg-muted);
}

.sg-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 0;
}

.sg-cats a {
    padding: 10px 18px;
    border: 1px solid var(--sg-line);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--eduhive-base);
    background: #fff;
    transition: border-color .25s ease, background .25s ease, color .25s ease;
}

.sg-cats a:hover {
    border-color: rgba(var(--eduhive-primary-rgb), .5);
}

.sg-cats a[aria-current="page"] {
    color: #fff;
    background: var(--eduhive-base);
    border-color: var(--eduhive-base);
}

.sg-posts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-top: 44px;
}

/* First post on page 1: wide card, photo left */
.sg-bcard--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.sg-bcard--featured .sg-cover {
    height: 100%;
    min-height: 340px;
    aspect-ratio: auto;
}

.sg-bcard--featured .sg-bcard__body {
    justify-content: center;
    padding: 44px;
}

.sg-bcard--featured .sg-bcard__title {
    font-size: clamp(24px, 2.5vw, 32px);
    line-height: 1.22;
}

.sg-bcard--featured .sg-bcard__excerpt {
    font-size: 17px;
}

.sg-bcard--featured .sg-bcard__more {
    margin-top: 6px;
}

.sg-bcard__flag {
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--eduhive-primary);
    background: var(--sg-tint);
}

.sg-empty {
    margin: 44px 0 0;
    padding: 50px 20px;
    border-radius: var(--sg-radius);
    border: 1px dashed var(--sg-line);
    text-align: center;
    font-size: 17px;
    color: var(--sg-muted);
}

.sg-empty a {
    font-weight: 700;
    color: var(--eduhive-primary);
}

.sg-debug {
    max-width: 900px;
    margin: 24px auto 0;
    padding: 20px 24px;
    border: 2px dashed #f59e0b;
    border-radius: 14px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #7c2d12;
    background: #fffbeb;
    overflow-x: auto;
}

.sg-debug ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

/* Pagination (Bootstrap 5 markup) */
.sg-pager {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.sg-pager .pagination {
    gap: 6px;
    margin: 0;
}

.sg-pager .page-link {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px !important;
    border: 1px solid var(--sg-line);
    font-weight: 700;
    color: var(--eduhive-base);
}

.sg-pager .page-item.active .page-link {
    color: #fff;
    background: var(--eduhive-primary);
    border-color: var(--eduhive-primary);
}

.sg-pager .page-link:focus {
    box-shadow: 0 0 0 3px rgba(var(--eduhive-primary-rgb), .3);
}

.sg-pager nav > div:first-child.d-sm-none,
.sg-pager .small.text-muted {
    display: none;
}

/* ---------- 3. Article: hero, layout, TOC ---------- */
.sg-read {
    --sg-sticky-top: 120px;
}

.sg-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 4px;
    pointer-events: none;
}

.sg-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--eduhive-primary);
    transform: scaleX(0);
    transform-origin: left;
}

.sg-ahero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
}

.sg-ahero--text {
    grid-template-columns: minmax(0, 860px);
}

.sg-ahero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.sg-ahero__title {
    margin: 0 0 18px;
    font-size: clamp(30px, 3.5vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--eduhive-base);
}

.sg-ahero__excerpt {
    margin: 0 0 26px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--sg-muted);
}

.sg-ahero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--sg-line);
}

.sg-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--sg-muted);
}

.sg-byline strong {
    display: block;
    font-size: 15px;
    color: var(--eduhive-base);
}

.sg-byline__logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: var(--eduhive-primary);
    box-shadow: 0 0 0 4px var(--sg-tint);
}

.sg-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sg-share a,
.sg-share button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--sg-line);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--eduhive-base);
    background: #fff;
    cursor: pointer;
    transition: border-color .25s ease, transform .3s var(--sg-ease);
}

.sg-share a:hover,
.sg-share button:hover {
    color: var(--eduhive-base);
    border-color: var(--eduhive-primary);
    transform: translateY(-2px);
}

.sg-share .fa-whatsapp {
    font-size: 16px;
    color: #1faa55;
}

.sg-share .fa-link {
    color: var(--eduhive-primary);
}

.sg-ahero__media {
    position: relative;
}

.sg-ahero__media .sg-cover {
    border-radius: var(--sg-radius);
    aspect-ratio: 4 / 3;
    box-shadow: var(--sg-shadow-hover);
}

/* Orange offset frame behind the photo, like the site's image blocks */
.sg-ahero__media::before {
    content: "";
    position: absolute;
    right: -14px;
    bottom: -14px;
    width: 60%;
    height: 60%;
    border-radius: var(--sg-radius);
    background: var(--eduhive-primary);
    opacity: .9;
}

.sg-ahero__media .sg-cover {
    position: relative;
}

.sg-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 300px;
    justify-content: space-between;
    gap: 60px;
}

.sg-aside {
    position: sticky;
    top: var(--sg-sticky-top);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - var(--sg-sticky-top) - 20px);
}

.sg-toc {
    min-height: 0;
    overflow-y: auto;
    padding: 22px 20px 22px 22px;
    border-radius: var(--sg-radius-sm);
    border: 1px solid var(--sg-line);
    background: #fff;
    box-shadow: var(--sg-shadow);
}

.sg-toc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--eduhive-base);
}

.sg-toc__title i {
    color: var(--eduhive-primary);
}

.sg-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--sg-line);
}

.sg-toc a {
    display: block;
    margin-left: -2px;
    padding: 6px 0 6px 14px;
    border-left: 2px solid transparent;
    font-size: 14px;
    line-height: 1.45;
    color: var(--sg-muted);
    transition: color .2s ease, border-color .2s ease;
}

.sg-toc a.is-sub {
    padding-left: 26px;
    font-size: 13.5px;
}

.sg-toc a:hover {
    color: var(--eduhive-primary);
}

.sg-toc a.is-active {
    border-left-color: var(--eduhive-primary);
    font-weight: 700;
    color: var(--eduhive-base);
}

.sg-aside-cta {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    padding: 24px;
    border-radius: var(--sg-radius-sm);
    color: #fff;
    background: linear-gradient(150deg, #2b3846 0%, var(--eduhive-base) 100%);
}

.sg-aside-cta::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(var(--eduhive-primary-rgb), .35) 0%, transparent 70%);
    pointer-events: none;
}

.sg-aside-cta p {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

.sg-aside-cta a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--eduhive-primary);
    transition: transform .3s var(--sg-ease);
}

.sg-aside-cta a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* Mobile TOC */
.sg-toc-m {
    display: none;
    margin-bottom: 32px;
    border: 1px solid var(--sg-line);
    border-radius: var(--sg-radius-sm);
    background: var(--sg-soft);
}

.sg-toc-m summary {
    padding: 16px 18px;
    font-weight: 800;
    color: var(--eduhive-base);
    cursor: pointer;
}

.sg-toc-m .sg-toc {
    max-height: 50vh;
    padding: 0 18px 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* ---------- 4. Article body ---------- */
.sg-article {
    font-size: 17.5px;
    line-height: 1.8;
    color: rgba(var(--eduhive-base-rgb), .85);
}

.sg-article > * {
    margin-top: 0;
    margin-bottom: 20px;
}

.sg-article > :last-child {
    margin-bottom: 0;
}

.sg-article h2 {
    position: relative;
    margin: 64px 0 20px;
    padding-left: 18px;
    font-size: clamp(25px, 2.5vw, 31px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--eduhive-base);
    scroll-margin-top: calc(var(--sg-sticky-top) + 10px);
}

/* Orange bar: the same accent the site's section titles use */
.sg-article h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 5px;
    border-radius: 5px;
    background: var(--eduhive-primary);
}

.sg-article h3 {
    margin: 46px 0 14px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--eduhive-base);
    scroll-margin-top: calc(var(--sg-sticky-top) + 10px);
}

.sg-article h4 {
    margin: 28px 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--eduhive-base);
}

.sg-article strong {
    color: var(--eduhive-base);
}

.sg-article a:not([class]) {
    font-weight: 700;
    color: var(--eduhive-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Plain lists → orange check bullets (same icon as .sg-focus) */
.sg-article ul:not([class]) {
    display: grid;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.sg-article ul:not([class]) li {
    position: relative;
    padding-left: 34px;
    line-height: 1.6;
}

.sg-article ul:not([class]) li::before {
    content: "\f00c";
    position: absolute;
    left: 0;
    top: .2em;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-family: "Font Awesome 5 Free";
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    background: var(--eduhive-primary);
}

.sg-lead {
    font-size: 20px;
    line-height: 1.7;
    color: var(--eduhive-base);
}

/* Key statement → navy callout (site .sg-callout) */
.sg-key {
    position: relative;
    margin: 30px 0 !important;
    padding: 20px 24px 20px 66px;
    border-radius: var(--sg-radius-sm);
    font-size: 18.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    background: var(--eduhive-base);
}

.sg-key::before {
    content: "\f0eb";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Font Awesome 5 Free";
    font-size: 24px;
    font-weight: 900;
    color: var(--eduhive-primary);
}

/* Process chain → same chips as the site's Learn → Practise chain */
.sg-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 0;
    margin: 24px 0 28px !important;
    padding: 0;
    list-style: none;
}

.sg-flow li {
    display: flex;
    align-items: center;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--eduhive-base);
}

.sg-flow li span {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid var(--sg-line);
    background: var(--sg-soft);
}

.sg-flow li:last-child span {
    color: #fff;
    background: var(--eduhive-primary);
    border-color: var(--eduhive-primary);
}

.sg-flow li + li::before {
    content: "\f054";
    margin: 0 9px;
    font-family: "Font Awesome 5 Free";
    font-size: 10px;
    font-weight: 900;
    color: rgba(var(--eduhive-base-rgb), .3);
}

/* Ladder + phases → numbered steps with a dotted connector */
.sg-ladder,
.sg-phases {
    margin: 26px 0 32px !important;
    padding: 0;
    list-style: none;
    counter-reset: sgstep;
}

.sg-ladder > li,
.sg-phases > li {
    position: relative;
    counter-increment: sgstep;
}

.sg-ladder > li::before,
.sg-phases > li::before {
    content: counter(sgstep);
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 800;
    color: var(--eduhive-base);
    background: #fff;
    border: 2px solid rgba(var(--eduhive-primary-rgb), .45);
}

.sg-ladder > li:not(:last-child)::after,
.sg-phases > li:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            rgba(var(--eduhive-primary-rgb), .45) 0 4px, transparent 4px 9px);
}

.sg-ladder > li:last-child::before,
.sg-phases > li:last-child::before {
    color: #fff;
    background: var(--eduhive-primary);
    border-color: var(--eduhive-primary);
}

.sg-ladder > li {
    min-height: 32px;
    padding: 3px 0 14px 46px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--eduhive-base);
}

.sg-ladder > li::before {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

.sg-ladder > li:not(:last-child)::after {
    left: 14px;
    top: 32px;
}

.sg-ladder > li:last-child {
    padding-bottom: 0;
}

.sg-ladder small {
    display: block;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--sg-muted);
}

.sg-phases > li {
    padding: 0 0 24px 60px;
}

.sg-phases > li:last-child {
    padding-bottom: 0;
}

.sg-phases > li::before {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.sg-phases > li:not(:last-child)::after {
    left: 19px;
    top: 42px;
}

.sg-phases h4 {
    margin: 0 0 4px;
    padding-top: 7px;
}

.sg-phases p,
.sg-phases ul {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.65;
}

.sg-phases ul {
    padding-left: 20px;
}

/* Card grid */
.sg-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0 30px !important;
}

.sg-cards--3 {
    grid-template-columns: repeat(3, 1fr);
}

.sg-cardlet {
    padding: 20px 22px;
    border-radius: var(--sg-radius-sm);
    background: #fff;
    border: 1px solid var(--sg-line);
    border-top: 3px solid var(--eduhive-primary);
    box-shadow: var(--sg-shadow);
    transition: transform .4s var(--sg-ease), box-shadow .4s var(--sg-ease);
}

.sg-cardlet:hover {
    transform: translateY(-4px);
    box-shadow: var(--sg-shadow-hover);
}

.sg-article .sg-cardlet h4 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.35;
}

.sg-article .sg-cardlet h4:only-child {
    margin: 0;
}

.sg-cardlet p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--sg-muted);
}

/* Mistakes: red cross + green fix */
.sg-mistakes {
    display: grid;
    gap: 14px;
    margin: 24px 0 30px !important;
}

.sg-mistake {
    position: relative;
    padding: 22px 24px 22px 66px;
    border-radius: var(--sg-radius-sm);
    border: 1px solid var(--sg-line);
    background: #fff;
    box-shadow: var(--sg-shadow);
}

.sg-mistake::before {
    content: "\f00d";
    position: absolute;
    left: 22px;
    top: 22px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-family: "Font Awesome 5 Free";
    font-size: 13px;
    font-weight: 900;
    color: #c0392b;
    background: rgba(192, 57, 43, .1);
}

.sg-article .sg-mistake h4 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.4;
}

.sg-mistake p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.sg-mistake .sg-fix {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(27, 122, 61, .08);
}

.sg-fix strong {
    color: #1b7a3d;
}

/* Table */
.sg-table {
    margin: 24px 0 12px !important;
    overflow-x: auto;
    border: 1px solid var(--sg-line);
    border-radius: var(--sg-radius-sm);
    box-shadow: var(--sg-shadow);
}

.sg-table table {
    width: 100%;
    min-width: 460px;
    margin: 0;
    border-collapse: collapse;
    font-size: 16px;
}

.sg-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    color: #fff;
    background: var(--eduhive-base);
}

.sg-table td {
    padding: 14px 18px;
    border-top: 1px solid var(--sg-line);
    vertical-align: top;
}

.sg-table tbody tr:first-child td {
    border-top: 0;
}

.sg-table tr:nth-child(even) td {
    background: var(--sg-soft);
}

.sg-table td:first-child {
    font-weight: 700;
    color: var(--eduhive-base);
    white-space: nowrap;
}

.sg-note {
    font-size: 15px;
    font-style: italic;
    color: var(--sg-muted);
}

/* Checklist → the site's card bullets (.sg-focus) with empty tick boxes */
.sg-checklist {
    display: grid;
    gap: 10px;
    margin: 24px 0 28px !important;
    padding: 0;
    list-style: none;
}

.sg-checklist li {
    position: relative;
    padding: 13px 18px 13px 54px;
    border-radius: 12px;
    border: 1px solid var(--sg-line);
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--eduhive-base);
    transition: border-color .3s ease, transform .35s var(--sg-ease);
}

.sg-checklist li:hover {
    border-color: var(--eduhive-primary);
    transform: translateX(4px);
}

.sg-checklist li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 14px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid var(--eduhive-primary);
    background: var(--sg-tint);
}

/* Dark panel (SG approach) — same navy as the CTA card */
.sg-panel {
    position: relative;
    overflow: hidden;
    margin: 28px 0 32px !important;
    padding: 34px;
    border-radius: var(--sg-radius);
    color: rgba(255, 255, 255, .78);
    background: linear-gradient(150deg, #2b3846 0%, var(--eduhive-base) 100%);
}

.sg-panel::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .1) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: .5;
    pointer-events: none;
}

.sg-panel > * {
    position: relative;
    z-index: 1;
}

.sg-article .sg-panel h4,
.sg-panel strong {
    color: #fff;
}

.sg-panel p {
    margin: 0 0 12px;
    font-size: 16px;
}

.sg-panel .sg-panel__gap {
    margin-top: 22px;
}

.sg-panel .sg-cardlet {
    border-color: rgba(255, 255, 255, .1);
    border-top-color: var(--eduhive-primary);
    background: rgba(255, 255, 255, .05);
    box-shadow: none;
}

.sg-article .sg-panel .sg-cardlet h4 {
    color: #fff;
}

.sg-panel .sg-cardlet p {
    color: rgba(255, 255, 255, .7);
}

.sg-panel .sg-flow li {
    color: #fff;
}

.sg-panel .sg-flow li span {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
}

.sg-panel .sg-flow li:last-child span {
    background: var(--eduhive-primary);
    border-color: var(--eduhive-primary);
}

.sg-panel .sg-flow li + li::before {
    color: rgba(255, 255, 255, .35);
}

.sg-panel .sg-table {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: none;
}

.sg-panel .sg-table td {
    background: transparent !important;
    border-color: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .78);
}

.sg-panel .sg-table td:first-child {
    color: #fff;
}

.sg-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.sg-pills li {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: rgba(var(--eduhive-primary-rgb), .28);
}

.sg-pills--light {
    margin-bottom: 24px !important;
}

.sg-pills--light li {
    color: var(--eduhive-base);
    background: var(--sg-tint);
}

/* Final takeaway */
.sg-takeaway {
    margin: 28px 0 !important;
    padding: 30px 32px;
    border-radius: var(--sg-radius);
    border-top: 4px solid var(--eduhive-primary);
    background: rgba(var(--eduhive-primary-rgb), .06);
}

.sg-takeaway .sg-takeaway__intro {
    margin-bottom: 14px;
}

.sg-takeaway ul {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.sg-takeaway li {
    position: relative;
    padding-left: 30px;
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--eduhive-base);
}

.sg-takeaway li::before {
    content: "\f00c";
    position: absolute;
    left: 0;
    top: .12em;
    font-family: "Font Awesome 5 Free";
    font-size: 15px;
    font-weight: 900;
    color: var(--eduhive-primary);
}

.sg-takeaway p {
    margin: 0;
    font-size: 17px;
}

/* ---------- 5. Article end ---------- */
.sg-afaq {
    margin-top: 64px;
}

.sg-afaq__title {
    position: relative;
    margin: 0 0 24px;
    padding-left: 18px;
    font-size: clamp(25px, 2.5vw, 31px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--eduhive-base);
    scroll-margin-top: calc(var(--sg-sticky-top) + 10px);
}

.sg-afaq__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 5px;
    border-radius: 5px;
    background: var(--eduhive-primary);
}

.sg-endshare {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 48px;
    padding: 20px 24px;
    border-radius: var(--sg-radius-sm);
    background: var(--sg-soft);
    border: 1px solid var(--sg-line);
    font-weight: 700;
    color: var(--eduhive-base);
}

.sg-related {
    padding: 100px 0 110px;
    background: var(--eduhive-white3);
}

.sg-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 400px));
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

/* ---------- 6. Responsive ---------- */
@media (max-width: 1199px) {
    .sg-posts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-aside {
        display: none;
    }

    .sg-toc-m {
        display: block;
    }

    .sg-article,
    .sg-afaq,
    .sg-endshare {
        max-width: 780px;
    }
}

@media (max-width: 991px) {
    .sg-bcard--featured,
    .sg-ahero {
        grid-template-columns: 1fr;
    }

    .sg-bcard--featured .sg-cover {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .sg-bcard--featured .sg-bcard__body {
        padding: 28px;
    }

    .sg-ahero {
        gap: 34px;
        margin-bottom: 44px;
    }

    .sg-ahero__media {
        max-width: 560px;
    }
}

@media (max-width: 767px) {
    .sg-read {
        --sg-sticky-top: 90px;
    }

    .sg-posts,
    .sg-cards,
    .sg-cards--3 {
        grid-template-columns: 1fr;
    }

    .sg-related__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-posts {
        gap: 22px;
    }

    .sg-article {
        font-size: 17px;
    }

    .sg-key {
        padding: 18px 18px 18px 56px;
        font-size: 17px;
    }

    .sg-key::before {
        left: 18px;
        font-size: 20px;
    }

    .sg-panel,
    .sg-takeaway {
        padding: 26px 20px;
    }

    .sg-flow li + li::before {
        margin: 0 5px;
    }

    .sg-share a span,
    .sg-share button span {
        display: none;
    }

    .sg-ahero__media::before {
        right: -8px;
        bottom: -8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg-bcard,
    .sg-cover img,
    .sg-bcard__more i,
    .sg-cardlet,
    .sg-checklist li,
    .sg-share a,
    .sg-share button,
    .sg-aside-cta a,
    .sg-progress span {
        transition: none !important;
    }

    .sg-bcard:hover,
    .sg-bcard:hover .sg-cover img,
    .sg-cardlet:hover,
    .sg-checklist li:hover,
    .sg-share a:hover,
    .sg-share button:hover {
        transform: none !important;
    }
}
