/**
 * Blog Single Post — 4SIX Smart Design v2
 */

/* ══════════════════════════════
   PAGE BACKGROUND — force dark
══════════════════════════════ */
body.single-post,
body.single-post .notout-single-post-wrapper,
body.single-post .notout-content-area,
body.single-post #primary,
body.single-post .notout-site-main,
body.single-post #main {
    background: #030d18 !important;
    color: #cbd5e1 !important;
}

/* Hide sidebar */
body.single-post .col-md-3 { display: none !important; }
body.single-post .col-md-9 { flex: 0 0 100% !important; max-width: 100% !important; }

/* ── Reading progress bar ── */
.sp-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg,#10b981,#34d399,#10b981);
    background-size: 200% 100%;
    animation: sp-shimmer 2s linear infinite;
    z-index: 99999;
    border-radius: 0 2px 2px 0;
    transition: width 0.12s linear;
}
@keyframes sp-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: 0% center; }
}

/* ══════════════════════════════
   LAYOUT WRAP
══════════════════════════════ */
.sp-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

/* ── Back link ── */
.sp-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    margin-bottom: 28px;
    transition: color 0.2s, gap 0.2s;
    letter-spacing: .2px;
}
.sp-back:hover { color: #10b981; gap: 11px; }
.sp-back svg { transition: transform 0.2s; }
.sp-back:hover svg { transform: translateX(-3px); }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.sp-hero {
    position: relative;
    width: 100%;
    height: 440px;
    border-radius: 22px;
    overflow: hidden;
    background: #071522 center/cover no-repeat;
    margin-bottom: 32px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.sp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(3,13,24,0.97) 0%,
        rgba(3,13,24,0.6)  40%,
        rgba(3,13,24,0.1)  100%
    );
}
.sp-hero-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 110px; opacity: 0.08;
}
.sp-hero-content {
    position: relative;
    z-index: 2;
    padding: 36px 40px;
    width: 100%;
}
.sp-cat-badge {
    display: inline-block;
    background: linear-gradient(135deg,#10b981,#059669);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
    text-decoration: none !important;
    transition: opacity 0.2s;
}
.sp-cat-badge:hover { opacity: 0.85; }
.sp-title {
    font-size: clamp(22px, 3.2vw, 36px);
    font-weight: 900;
    color: #ffffff !important;
    line-height: 1.22;
    margin: 0 0 18px;
    letter-spacing: -0.4px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.7);
}
.sp-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sp-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8 !important;
    font-weight: 500;
}
.sp-meta-item svg { opacity: 0.55; flex-shrink: 0; }
.sp-meta-dot { color: #334155; font-size: 10px; }
.sp-meta-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(16,185,129,0.4);
}

/* ══════════════════════════════
   ARTICLE BODY CARD
══════════════════════════════ */
.sp-body {
    background: #071d2a;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.35);
}

/* Excerpt */
.sp-excerpt {
    padding: 28px 40px;
    font-size: 16px;
    font-style: italic;
    color: #7dd3b0 !important;
    line-height: 1.8;
    background: rgba(16,185,129,0.05);
    border-bottom: 1px solid rgba(16,185,129,0.12);
}
.sp-excerpt p,
.sp-excerpt * {
    color: #7dd3b0 !important;
    margin: 0 !important;
}

/* ── Content ── */
.sp-content {
    padding: 36px 40px;
}

/* Reset all inherited dark grays */
.sp-content,
.sp-content p,
.sp-content li,
.sp-content span,
.sp-content div,
.sp-content td,
.sp-content th {
    color: #b8cad9;
}

.sp-content p {
    font-size: 16px !important;
    line-height: 1.9 !important;
    color: #b8cad9 !important;
    margin: 0 0 22px !important;
}
.sp-content p:last-child { margin-bottom: 0 !important; }

.sp-content ul,
.sp-content ol {
    padding-left: 24px;
    margin: 6px 0 22px;
    color: #b8cad9;
}
.sp-content li {
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #b8cad9 !important;
    margin-bottom: 10px !important;
}
.sp-content ul li::marker { color: #10b981; }
.sp-content ol li::marker { color: #10b981; font-weight: 700; }

.sp-content h2 {
    font-size: clamp(19px,2vw,25px) !important;
    font-weight: 800 !important;
    color: #f1f5f9 !important;
    margin: 48px 0 18px !important;
    padding-left: 18px;
    border-left: 3px solid #10b981;
    line-height: 1.3 !important;
}
.sp-content h3 {
    font-size: clamp(17px,1.7vw,21px) !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    margin: 38px 0 14px !important;
    line-height: 1.35 !important;
}
.sp-content h4 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #cbd5e1 !important;
    margin: 28px 0 10px !important;
}

.sp-content a {
    color: #34d399 !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(52,211,153,0.3);
    transition: border-color 0.2s, color 0.2s;
}
.sp-content a:hover {
    color: #10b981 !important;
    border-color: #10b981;
}

.sp-content blockquote {
    margin: 32px 0;
    padding: 22px 28px;
    border-left: 3px solid #10b981;
    background: rgba(16,185,129,0.07);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 16px !important;
}
.sp-content blockquote p,
.sp-content blockquote * {
    color: #a7c5b5 !important;
    margin: 0 !important;
}

.sp-content pre {
    background: #020c14;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 22px 26px;
    overflow-x: auto;
    font-size: 14px;
    margin: 24px 0;
    line-height: 1.65;
}
.sp-content code {
    background: rgba(16,185,129,0.1);
    color: #34d399 !important;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}
.sp-content pre code {
    background: none;
    color: #8baabf !important;
    padding: 0;
}

/* Post content tables */
.sp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}
.sp-content th {
    background: rgba(16,185,129,0.1);
    color: #f1f5f9 !important;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.07);
}
.sp-content td {
    padding: 11px 16px;
    border: 1px solid rgba(255,255,255,0.05);
    color: #94a3b8 !important;
}
.sp-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.sp-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
    display: block;
}

/* WordPress default box in post content */
.sp-content .wp-block-group,
.sp-content [class*="wp-block"] {
    color: #b8cad9;
}

/* Post-specific inner boxes (green bordered boxes) */
.sp-content > div:not([class]) {
    background: rgba(7,30,44,0.8);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 12px;
    padding: 22px 24px;
    margin: 24px 0;
}

/* ── Share bar ── */
.sp-share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}
.sp-share-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}
.sp-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sp-share-btn:hover { transform: translateY(-2px); }
.sp-share-btn--fb { background: #1877f2; color: #fff !important; box-shadow: 0 3px 12px rgba(24,119,242,0.3); }
.sp-share-btn--fb:hover { box-shadow: 0 6px 18px rgba(24,119,242,0.45); }
.sp-share-btn--tw { background: #14171a; color: #fff !important; border: 1px solid rgba(255,255,255,0.1); }
.sp-share-btn--tw:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.sp-share-btn--tg { background: #229ed9; color: #fff !important; box-shadow: 0 3px 12px rgba(34,158,217,0.3); }
.sp-share-btn--tg:hover { box-shadow: 0 6px 18px rgba(34,158,217,0.45); }

/* ── Author card ── */
.sp-author-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(16,185,129,0.03);
}
.sp-author-avatar {
    width: 54px; height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(16,185,129,0.35);
    flex-shrink: 0;
}
.sp-author-info { flex: 1; }
.sp-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9 !important;
    margin-bottom: 3px;
}
.sp-author-role {
    font-size: 11px;
    color: #10b981 !important;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.sp-author-bio {
    font-size: 13px;
    color: #64748b !important;
    line-height: 1.6;
    margin: 0;
}

/* ══════════════════════════════
   CTA STRIP
══════════════════════════════ */
.sp-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #061a10 0%, #092316 100%);
    border: 1px solid rgba(16,185,129,0.22);
    border-radius: 20px;
    padding: 36px 40px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
}
.sp-cta-glow {
    position: absolute;
    top: -60px; right: -60px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(16,185,129,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.sp-cta-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.sp-cta-text { flex: 1; min-width: 0; }
.sp-cta-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: #10b981 !important;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.sp-cta-title {
    font-size: clamp(18px,2vw,24px);
    font-weight: 800;
    color: #f1f5f9 !important;
    margin: 0 0 10px;
    line-height: 1.3;
}
.sp-cta-desc {
    font-size: 14px;
    color: #64748b !important;
    margin: 0;
    line-height: 1.65;
}
.sp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 30px;
    background: linear-gradient(135deg,#10b981,#059669);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(16,185,129,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.sp-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,185,129,0.55); }

/* ══════════════════════════════
   RELATED POSTS
══════════════════════════════ */
.sp-related { margin-bottom: 16px; }
.sp-related-title {
    font-size: 20px;
    font-weight: 800;
    color: #f1f5f9 !important;
    margin: 0 0 20px;
}
.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
}
.sp-rel-card {
    background: #071d2a;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
    display: flex;
    flex-direction: column;
}
.sp-rel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16,185,129,0.3);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.sp-rel-img {
    position: relative;
    height: 140px;
    background: #030d16;
    overflow: hidden;
    flex-shrink: 0;
}
.sp-rel-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
    display: block;
}
.sp-rel-card:hover .sp-rel-img img { transform: scale(1.06); }
.sp-rel-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; opacity: 0.15;
}
.sp-rel-cat {
    position: absolute;
    top: 8px; left: 8px;
    background: linear-gradient(135deg,#10b981,#059669);
    color: #fff !important;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    z-index: 2;
}
.sp-rel-time {
    position: absolute;
    bottom: 7px; right: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(0,0,0,0.65);
    padding: 2px 7px;
    border-radius: 5px;
    backdrop-filter: blur(3px);
}
.sp-rel-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.sp-rel-date { font-size: 11px; color: #334155 !important; }
.sp-rel-title {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0 !important;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.sp-rel-card:hover .sp-rel-title { color: #10b981 !important; }
.sp-rel-more {
    font-size: 11px;
    font-weight: 700;
    color: #10b981 !important;
    margin-top: auto;
    text-decoration: none !important;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
    .sp-wrap { padding: 18px 14px 60px; }
    .sp-hero { height: 300px; border-radius: 16px; }
    .sp-hero-content { padding: 22px 22px; }
    .sp-excerpt { padding: 22px 22px; }
    .sp-content { padding: 28px 22px; }
    .sp-share { padding: 18px 22px; }
    .sp-author-card { padding: 20px 22px; }
    .sp-cta { padding: 28px 22px; }
    .sp-cta-inner { flex-direction: column; align-items: flex-start; }
    .sp-related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .sp-content h2 { font-size: 19px !important; }
}
@media (max-width: 480px) {
    .sp-hero { height: 240px; }
    .sp-title { font-size: 19px !important; }
    .sp-related-grid { grid-template-columns: 1fr; }
    .sp-share-btns { gap: 8px; }
}
