/* =========================================
   SINGLE POST — inherits global.css
   (vars, reset, typography, .wrapper, btns)
   ========================================= */


section.single_hero {
    background: var(--dark-surface);
    padding: 60px 30px 50px;
    border-bottom: 1px solid var(--dark-border);

    .sp_breadcrumbs {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 28px;
        font-size: 0.8rem;
        color: var(--text-muted);

        a {
            display: inline;
            color: var(--text-muted);
            transition: color var(--transition);

            &:hover {
                color: var(--gold);
            }
        }

        .sp_bc_sep {
            color: var(--text-dim);
        }
    }

    .sp_title {
        max-width: 820px;
        margin-bottom: 24px;
    }

    .sp_meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 20px;

        span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        i {
            color: var(--gold);
            font-size: 0.75rem;
        }
    }

    @media (max-width: 767px) {
        padding: 40px 20px 36px;
    }
}


.sp_featured_img_wrap {
    background: var(--dark-surface);
    padding: 0 30px 60px;

    .sp_featured_img {
        width: 100%;
        height: auto;
        max-height: 480px;
        object-fit: cover;
        border-radius: var(--radius-lg);
        border: 1px solid var(--dark-border);
    }

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


section.sp_body {
    padding: 70px 30px;

    /* ── Article ───────────────────────────── */
    .sp_content {
        padding-right: 48px;
        margin-bottom: 48px;

        /* Restore globals reset so WP content renders correctly */
        a {
            display: inline;
            color: var(--gold);
            text-decoration: underline;
            transition: color var(--transition);

            &:hover {
                color: var(--gold-hover);
            }
        }

        ul {
            list-style: disc;
            padding-left: 1.5rem;
            margin-bottom: 1.5rem;
        }

        ol {
            list-style: decimal;
            padding-left: 1.5rem;
            margin-bottom: 1.5rem;
        }

        li {
            margin-bottom: 0.5rem;
        }

        p {
            margin-bottom: 1.25rem;
        }

        h2 {
            margin: 2.5rem 0 1rem;
            width: auto;
        }

        h3 {
            margin: 2rem 0 0.875rem;
        }

        h4 {
            margin: 1.5rem 0 0.75rem;
        }

        img {
            border-radius: var(--radius-md);
            margin: 1.5rem 0;
        }

        blockquote {
            border-left: 3px solid var(--gold);
            padding: 16px 24px;
            margin: 2rem 0;
            background: rgba(232, 200, 64, 0.05);
            border-radius: 0 var(--radius-sm) var(--radius-sm) 0;

            p {
                color: var(--text-light);
                font-style: italic;
                margin-bottom: 0;
            }
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 1.5rem;
            font-size: 0.875rem;
        }

        th {
            background: var(--dark-card);
            color: var(--text-light);
            padding: 10px 14px;
            text-align: left;
            border: 1px solid var(--dark-border);
            font-weight: 600;
        }

        td {
            padding: 10px 14px;
            border: 1px solid var(--dark-border);
        }

        pre {
            background: var(--dark-card);
            border: 1px solid var(--dark-border);
            border-radius: var(--radius-sm);
            padding: 16px 20px;
            overflow-x: auto;
            margin: 1.5rem 0;
        }

        code {
            background: var(--dark-card);
            border: 1px solid var(--dark-border);
            border-radius: var(--radius-sm);
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
            color: var(--green-mid);
            padding: 2px 6px;
        }

        pre code {
            border: none;
            padding: 0;
            background: transparent;
        }
    }

    /* ── Tags ─────────────────────────────── */
    .sp_tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 24px 0;
        border-top: 1px solid var(--dark-border);
        margin-bottom: 24px;

        .sp_tags_label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 0;
        }

        .sp_tag {
            display: inline-flex;
            padding: 4px 12px;
            background: rgba(232, 200, 64, 0.07);
            border: 1px solid rgba(232, 200, 64, 0.2);
            border-radius: var(--radius-pill);
            font-size: 0.75rem;
            color: var(--gold);
            transition: background var(--transition), border-color var(--transition);

            &:hover {
                background: rgba(232, 200, 64, 0.15);
                border-color: var(--gold);
            }
        }
    }

    /* ── Share Row ────────────────────────── */
    .sp_share {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 24px 0;
        border-top: 1px solid var(--dark-border);
        border-bottom: 1px solid var(--dark-border);
        margin-bottom: 48px;

        .sp_share_label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 0;
        }
    }

    /* ── Share Buttons (shared by row + sidebar) */
    .sp_share_btns {
        display: flex;
        gap: 8px;
    }

    .sp_share_btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--dark-card);
        border: 1px solid var(--dark-border);
        color: var(--text-muted);
        font-size: 0.8rem;
        transition: background var(--transition), color var(--transition), border-color var(--transition);

        &.fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
        &.tw:hover { background: #1DA1F2; border-color: #1DA1F2; color: #fff; }
        &.li:hover { background: #0A66C2; border-color: #0A66C2; color: #fff; }
    }

    /* ── Related Posts ────────────────────── */
    .sp_related {
        margin-bottom: 48px;

        .sp_related_title {
            margin-bottom: 24px;
        }

        .sp_related_card {
            background: var(--dark-card);
            border: 1px solid var(--dark-border);
            border-radius: var(--radius-md);
            overflow: hidden;
            height: 100%;
            transition: border-color var(--transition), transform var(--transition);

            &:hover {
                border-color: var(--gold);
                transform: translateY(-4px);

                .sp_related_img img {
                    transform: scale(1.05);
                }
            }

            .sp_related_img {
                display: block;
                overflow: hidden;

                img {
                    width: 100%;
                    height: 160px;
                    object-fit: cover;
                    transition: transform var(--transition);
                }
            }

            .sp_related_body {
                padding: 16px;

                h5 a {
                    display: inline;
                    color: var(--text-light);
                    transition: color var(--transition);

                    &:hover {
                        color: var(--gold);
                    }
                }

                .sp_related_date {
                    font-size: 0.75rem;
                    color: var(--text-muted);
                    margin-bottom: 0;

                    i {
                        color: var(--gold-muted);
                        margin-right: 4px;
                    }
                }
            }
        }
    }

    /* ── Comments ─────────────────────────── */
    .sp_comments {
        padding-top: 48px;
        border-top: 1px solid var(--dark-border);
    }

    /* ── Sidebar ──────────────────────────── */
    .sp_sidebar {
        position: sticky;
        top: 100px;
        padding-left: 32px;
        display: flex;
        flex-direction: column;
        gap: 20px;

        .sp_toc,
        .sp_sidebar_share {
            background: var(--dark-card);
            border: 1px solid var(--dark-border);
            border-radius: var(--radius-md);
            padding: 22px 24px;
        }

        .sp_toc_label {
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--gold);
            margin-bottom: 16px;
        }

        .sp_toc_list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .sp_toc_link {
            display: block;
            font-size: 0.82rem;
            color: var(--text-muted);
            padding: 5px 0;
            line-height: 1.4;
            transition: color var(--transition);
            text-decoration: none;

            &:hover,
            &.active {
                color: var(--gold);
            }
        }

        .sp_toc_h3 .sp_toc_link {
            padding-left: 14px;
            font-size: 0.78rem;
        }

        .sp_sidebar_share {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .sp_back_link {
            display: inline;
            font-size: 0.8rem;
            color: var(--text-muted);
            transition: color var(--transition);

            &:hover {
                color: var(--gold);
            }
        }
    }

    @media (max-width: 991px) {
        .sp_content {
            padding-right: 0;
        }

        .sp_sidebar {
            position: static;
            padding-left: 0;
            margin-top: 40px;
            flex-direction: row;
            flex-wrap: wrap;

            .sp_toc,
            .sp_sidebar_share {
                flex: 1 1 260px;
            }
        }
    }

    @media (max-width: 767px) {
        padding: 50px 20px;

        .sp_sidebar {
            flex-direction: column;
        }
    }
}


section.sp_cta {
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: 80px 30px;
    text-align: center;

    .sp_cta_sub {
        font-size: 1rem;
        color: var(--text-muted);
        margin-bottom: 32px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .btn_gold {
        margin: 0 auto;
    }

    @media (max-width: 767px) {
        padding: 60px 20px;
    }
}
