/* ============================================
   SINGLE POST — DARK PROFESSIONAL LAYOUT
   ============================================ */

/* ===== HERO ===== */
.sp-hero {
    background: linear-gradient(135deg, #0A1628 0%, #0F2035 50%, #0A1628 100%);
    padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(45,125,210,.1);
}
.sp-hero__container {
    max-width: 850px;
    margin: 0 auto;
}
.sp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(0,230,118,.1);
    color: var(--brand-accent);
    padding: .35rem 1rem;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--font-display);
    margin-bottom: 1.25rem;
}
.sp-hero__badge i { font-size: .75rem; }
.sp-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 1.25rem;
}
.sp-hero__meta {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.sp-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,.04);
    padding: .4rem .9rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}
.sp-hero__meta span i {
    color: var(--brand-primary);
    font-size: .8rem;
}

/* ===== FEATURED IMAGE ===== */
.sp-featured {
    background: var(--bg-body);
    padding: 0 1.25rem;
}
.sp-featured__container {
    max-width: 900px;
    margin: 0 auto;
    margin-top: -1.5rem;
    position: relative;
    z-index: 2;
}
.sp-featured__img {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.sp-featured__img img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* ===== BODY LAYOUT ===== */
.sp-body {
    background: var(--bg-body);
    padding: 2.5rem 1.25rem;
}
.sp-body__container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ===== TOC SIDEBAR ===== */
.sp-toc {
    position: sticky;
    top: 90px;
}
.sp-toc__inner {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}
.sp-toc__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sp-toc__title i {
    color: var(--brand-primary);
    font-size: .85rem;
}
.sp-toc__nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.sp-toc__link {
    display: block;
    padding: .5rem .75rem;
    font-size: .85rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all .2s;
    border-right: 3px solid transparent;
    line-height: 1.5;
    text-decoration: none;
}
.sp-toc__link:hover {
    color: var(--brand-primary);
    background: rgba(45,125,210,.06);
}
.sp-toc__link.active {
    color: var(--brand-primary);
    background: rgba(45,125,210,.08);
    border-right-color: var(--brand-primary);
    font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.sp-content {
    min-width: 0;
}

/* Article body prose */
.sp-content__body {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-primary);
}

/* Headings */
.sp-content__body h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 2.5rem 0 1rem;
    padding: .85rem 1.25rem;
    background: linear-gradient(135deg, rgba(45,125,210,.12), rgba(0,230,118,.06));
    border-right: 4px solid var(--brand-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    line-height: 1.4;
}
.sp-content__body h2:first-child {
    margin-top: 0;
}
.sp-content__body h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin: 2rem 0 .75rem;
    padding-right: 1rem;
    border-right: 3px solid var(--brand-accent);
}
.sp-content__body h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 .5rem;
}

/* Paragraphs */
.sp-content__body p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* Links */
.sp-content__body a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-decoration-color: rgba(45,125,210,.3);
    text-underline-offset: 3px;
    transition: all .2s;
}
.sp-content__body a:hover {
    color: var(--brand-accent);
    text-decoration-color: var(--brand-accent);
}

/* Lists */
.sp-content__body ul,
.sp-content__body ol {
    margin: 1.25rem 0;
    padding-right: 1.5rem;
}
.sp-content__body ul { list-style: none; }
.sp-content__body ul li {
    position: relative;
    padding-right: 1.25rem;
    margin-bottom: .6rem;
}
.sp-content__body ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: .65rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-primary);
}
.sp-content__body ol li {
    margin-bottom: .6rem;
}

/* Tables */
.sp-content__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: .95rem;
}
.sp-content__body table thead th {
    background: rgba(45,125,210,.15);
    color: var(--brand-primary);
    padding: .85rem 1rem;
    font-weight: 700;
    text-align: right;
    font-family: var(--font-display);
    border-bottom: 2px solid var(--brand-primary);
}
.sp-content__body table tbody td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}
.sp-content__body table tbody tr:nth-child(even) {
    background: rgba(255,255,255,.02);
}
.sp-content__body table tbody tr:hover {
    background: rgba(45,125,210,.04);
}

/* Blockquote */
.sp-content__body blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: rgba(0,230,118,.04);
    border-right: 4px solid var(--brand-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.sp-content__body blockquote p:last-child { margin-bottom: 0; }

/* Images inside content */
.sp-content__body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

/* Video */
.sp-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.sp-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Strong / Bold */
.sp-content__body strong {
    color: #fff;
    font-weight: 700;
}

/* ===== AD SLOT ===== */
.sp-ad {
    margin: 1.5rem 0;
    text-align: center;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.sp-ad img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

/* ===== TAGS ===== */
.sp-tags {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sp-tags__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sp-tags__title i { color: var(--brand-primary); }
.sp-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.sp-tags__item {
    display: inline-block;
    padding: .35rem .85rem;
    background: rgba(45,125,210,.08);
    color: var(--text-secondary);
    border-radius: 99px;
    font-size: .82rem;
    transition: all .2s;
    text-decoration: none;
}
.sp-tags__item:hover {
    background: rgba(45,125,210,.15);
    color: var(--brand-primary);
}

/* ===== SHARE ===== */
.sp-share {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sp-share__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sp-share__title i { color: var(--brand-primary); }
.sp-share__btns {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.sp-share__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: transform .2s, filter .2s;
}
.sp-share__btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}
.sp-share__btn--fb { background: #1877f2; }
.sp-share__btn--tw { background: #1da1f2; }
.sp-share__btn--wa { background: #25d366; color: var(--brand-dark); }
.sp-share__btn--tg { background: #0088cc; }

/* ===== AUTHOR BOX ===== */
.sp-author {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sp-author__avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-primary);
}
.sp-author__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .25rem;
}
.sp-author__bio {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== RELATED POSTS ===== */
.sp-related {
    background: var(--bg-section-alt);
    padding: var(--section-py) 1.25rem;
}
.sp-related__container {
    max-width: 1100px;
    margin: 0 auto;
}
.sp-related__title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.sp-related__title i { color: var(--brand-primary); }
.sp-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.sp-related__card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.sp-related__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.sp-related__img {
    height: 160px;
    overflow: hidden;
}
.sp-related__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.sp-related__card:hover .sp-related__img img {
    transform: scale(1.06);
}
.sp-related__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(45,125,210,.06);
    color: var(--text-muted);
    font-size: 2rem;
}
.sp-related__body {
    padding: 1rem 1.25rem;
    flex: 1;
}
.sp-related__body h4 {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 .5rem;
}
.sp-related__date {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ===== COMMENTS ===== */
.sp-comments {
    background: var(--bg-body);
    padding: 2.5rem 1.25rem;
}
.sp-comments__container {
    max-width: 800px;
    margin: 0 auto;
}
.sp-comments__container #comments {
    font-family: var(--font-body);
    color: var(--text-primary);
}
.sp-comments__container .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sp-comments__container .comment-list li {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.sp-comments__container .comment-author { font-weight: 700; color: var(--brand-primary); }
.sp-comments__container .comment-meta { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.sp-comments__container .comment-content { font-size: .95rem; line-height: 1.7; }
.sp-comments__container .children {
    margin-top: 1rem;
    margin-right: 1.5rem;
    border-right: 2px solid var(--border-light);
    padding-right: 1rem;
}
.sp-comments__container .comment-respond {
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}
.sp-comments__container .comment-respond h3 {
    color: var(--text-primary);
    font-family: var(--font-display);
    margin-top: 0;
}
.sp-comments__container .comment-respond label {
    display: block;
    margin-bottom: .25rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.sp-comments__container .comment-respond input[type="text"],
.sp-comments__container .comment-respond input[type="email"],
.sp-comments__container .comment-respond input[type="url"],
.sp-comments__container .comment-respond textarea {
    width: 100%;
    padding: .65rem .9rem;
    margin-bottom: 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text-primary);
    box-sizing: border-box;
    transition: border-color .2s;
}
.sp-comments__container .comment-respond input:focus,
.sp-comments__container .comment-respond textarea:focus {
    border-color: var(--brand-primary);
    outline: none;
}
.sp-comments__container .comment-respond input[type="submit"] {
    background: linear-gradient(135deg, var(--brand-accent), #00C853);
    color: var(--brand-dark);
    border: none;
    padding: .75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.sp-comments__container .comment-respond input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .sp-body__container {
        grid-template-columns: 1fr;
    }
    .sp-toc {
        position: relative;
        top: 0;
        order: -1;
    }
}

@media (max-width: 600px) {
    .sp-hero { padding: 4.5rem 1rem 1.5rem; }
    .sp-hero__title { font-size: 1.2rem; line-height: 1.45; overflow-wrap: break-word; word-break: break-word; }
    .sp-hero__meta { gap: .4rem; flex-wrap: wrap; justify-content: center; }
    .sp-hero__meta span { font-size: .72rem; padding: .25rem .5rem; }

    .sp-featured__img { border-radius: 8px; overflow: hidden; margin: 0 .5rem; }
    .sp-featured__img img { width: 100%; height: auto; border-radius: 8px; }

    .sp-content__body { padding: 1rem; font-size: .85rem; line-height: 1.8; }
    .sp-content__body h2 { font-size: 1.05rem; padding: .6rem .85rem; margin: 1.5rem -1rem 1rem; }
    .sp-content__body h3 { font-size: .92rem; }
    .sp-content__body p { margin-bottom: .8rem; overflow-wrap: break-word; }
    .sp-content__body img { border-radius: 8px; height: auto; }
    .sp-content__body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: .78rem; }
    .sp-content__body ul, .sp-content__body ol { padding-right: 1.25rem; }
    .sp-content__body li { font-size: .85rem; margin-bottom: .4rem; }
    .sp-content__body blockquote { padding: .75rem 1rem; margin: 1rem 0; font-size: .85rem; }

    .sp-tags__list { gap: .35rem; }
    .sp-tags__item { font-size: .72rem; padding: .3rem .6rem; }

    .sp-share__btns { flex-direction: column; gap: .4rem; }
    .sp-share__btn { justify-content: center; padding: .6rem; font-size: .82rem; }

    .sp-author { flex-direction: column; text-align: center; gap: .75rem; padding: 1rem; }
    .sp-author__avatar img { width: 60px; height: 60px; margin: 0 auto; }
    .sp-author__name { font-size: .9rem; }
    .sp-author__bio { font-size: .78rem; }

    .sp-related__grid { grid-template-columns: 1fr; gap: .75rem; }
    .sp-related__card { border-radius: 8px; }
    .sp-related__img { height: 150px; }
    .sp-related__img img { width: 100%; height: 100%; object-fit: cover; }
    .sp-related__body h4 { font-size: .82rem; line-height: 1.4; overflow-wrap: break-word; }

    .sp-ad img { border-radius: 8px; }
    
    .sp-toc__inner { padding: 1rem; }
    .sp-toc__title { font-size: .9rem; }
    .sp-toc__link { font-size: .78rem; padding: .35rem 0; }
    
    .sp-video-wrap { border-radius: 8px; overflow: hidden; }
}
