/* ==========================================================================
   NerbitinBuku — Single Post CSS
   ========================================================================== */

/* ----------------------------------------------------------
   HERO HEADER
   ---------------------------------------------------------- */
.nb-post-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
}

.nb-post-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(251,191,36,.06) 0%, transparent 70%);
    pointer-events: none;
}

.nb-post-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.nb-post-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.nb-cat-badge {
    display: inline-block;
    background: rgba(251,191,36,.15);
    border: 1px solid rgba(251,191,36,.35);
    color: #fbbf24;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s;
}

.nb-cat-badge:hover {
    background: rgba(251,191,36,.25);
    color: #fbbf24;
}

.nb-post-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -.02em;
}

.nb-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .875rem;
    color: #cbd5e1;
}

.nb-post-meta__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-author-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(251,191,36,.4);
    object-fit: cover;
}

.nb-sep { opacity: .4; }

/* ----------------------------------------------------------
   FEATURED IMAGE
   ---------------------------------------------------------- */
.nb-post-featured-img {
    background: #1e40af;
    padding: 0 24px;
}

.nb-post-featured-img__inner {
    max-width: 900px;
    margin: 0 auto;
    transform: translateY(-32px);
}

.nb-featured-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
    display: block;
}

/* ----------------------------------------------------------
   BODY KONTEN
   ---------------------------------------------------------- */
.nb-post-body {
    background: #ffffff;
    padding: 0 24px 80px;
}

/* Kalau tidak ada featured image, tambah padding atas */
.nb-single-post:not(:has(.nb-post-featured-img)) .nb-post-body {
    padding-top: 56px;
}

.nb-post-body__inner {
    max-width: 760px;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   TIPOGRAFI KONTEN
   ---------------------------------------------------------- */
.nb-post-content {
    font-family: 'Inter', sans-serif;
    font-size: 1.07rem;
    line-height: 1.85;
    color: #1e293b;
    padding-top: 8px;
}

.nb-post-content > * + * { margin-top: 1.25em; }

.nb-post-content h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-top: 2.5rem;
    margin-bottom: .5rem;
}

.nb-post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: .4rem;
}

.nb-post-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.5rem;
}

.nb-post-content p { color: #334155; }

.nb-post-content a {
    color: #1e40af;
    border-bottom: 1px solid rgba(30,64,175,.25);
    text-decoration: none;
    transition: color .2s, border-color .2s;
}

.nb-post-content a:hover {
    color: #fbbf24;
    border-color: #fbbf24;
}

.nb-post-content ul,
.nb-post-content ol {
    padding-left: 1.5rem;
    color: #334155;
}

.nb-post-content li { margin-bottom: .4rem; }

.nb-post-content blockquote {
    border-left: 4px solid #fbbf24;
    background: #fffbf0;
    padding: 18px 24px;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    color: #1e293b;
    font-style: italic;
}

.nb-post-content blockquote p { color: #1e293b; margin: 0; }

.nb-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    margin: 1.5rem auto;
    display: block;
}

.nb-post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: .9rem;
    line-height: 1.7;
}

.nb-post-content code {
    background: #f1f5f9;
    color: #be185d;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: .88em;
    font-family: 'Courier New', monospace;
}

.nb-post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.nb-post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    margin: 1.5rem 0;
}

.nb-post-content th,
.nb-post-content td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.nb-post-content th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.nb-post-content tr:nth-child(even) td { background: #f8fafc; }

.nb-post-content figure { margin: 1.5rem 0; }
.nb-post-content figcaption {
    text-align: center;
    font-size: .83rem;
    color: #94a3b8;
    margin-top: .5rem;
}

.nb-post-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2.5rem 0;
}

/* ----------------------------------------------------------
   TAGS
   ---------------------------------------------------------- */
.nb-post-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 28px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 48px;
    font-size: .875rem;
}

.nb-post-tags__label {
    color: #64748b;
    font-weight: 600;
}

.nb-tag-item {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}

.nb-tag-item:hover {
    background: #1e40af;
    color: #ffffff;
}

/* ----------------------------------------------------------
   NAVIGASI PREV / NEXT
   ---------------------------------------------------------- */
.nb-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 40px 0;
}

.nb-post-nav__item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    text-decoration: none;
    transition: all .25s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nb-post-nav__item:hover {
    background: #1e40af;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30,64,175,.2);
}

.nb-post-nav__next { text-align: right; }

.nb-post-nav__label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
    transition: color .25s;
}

.nb-post-nav__title {
    font-size: .925rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .25s;
}

.nb-post-nav__item:hover .nb-post-nav__label,
.nb-post-nav__item:hover .nb-post-nav__title {
    color: #ffffff;
}

/* ----------------------------------------------------------
   AUTHOR BOX
   ---------------------------------------------------------- */
.nb-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    margin: 40px 0;
}

.nb-author-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fbbf24;
    flex-shrink: 0;
}

.nb-author-box__label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: .25rem;
}

.nb-author-box__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .4rem;
}

.nb-author-box__bio {
    font-size: .9rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* ----------------------------------------------------------
   CTA WHATSAPP
   ---------------------------------------------------------- */
.nb-post-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 36px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.nb-post-cta__text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: .4rem;
}

.nb-post-cta__text p {
    font-size: .9rem;
    color: rgba(255,255,255,.7);
    margin: 0;
}

.nb-btn-wa-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #ffffff;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(37,211,102,.35);
    transition: all .25s;
}

.nb-btn-wa-cta:hover {
    background: #1ebd5c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37,211,102,.45);
}

/* ----------------------------------------------------------
   KOMENTAR
   ---------------------------------------------------------- */
.nb-post-comments {
    background: #f8fafc;
    padding: 48px 24px 64px;
    border-top: 1px solid #e2e8f0;
}

.nb-post-comments .comments-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.nb-post-comments .comment-list { list-style: none; padding: 0; }

.nb-post-comments .comment-body {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.nb-post-comments .comment-author .fn { font-weight: 700; color: #0f172a; }
.nb-post-comments .comment-metadata a { color: #94a3b8; font-size: .82rem; }
.nb-post-comments .comment-content p { color: #334155; margin-top: .75rem; }
.nb-post-comments .reply a {
    color: #1e40af;
    font-size: .82rem;
    font-weight: 600;
}

.nb-post-comments #respond { margin-top: 2rem; }
.nb-post-comments .comment-reply-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.nb-post-comments .comment-form input[type="text"],
.nb-post-comments .comment-form input[type="email"],
.nb-post-comments .comment-form input[type="url"],
.nb-post-comments .comment-form textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    color: #1e293b;
    transition: border-color .2s;
}

.nb-post-comments .comment-form input:focus,
.nb-post-comments .comment-form textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30,64,175,.1);
}

.nb-post-comments .comment-form .submit {
    background: #fbbf24;
    color: #0f172a;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    transition: all .25s;
    font-family: 'Inter', sans-serif;
}

.nb-post-comments .comment-form .submit:hover {
    background: #d97706;
    transform: translateY(-2px);
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .nb-post-hero { padding: 60px 20px 40px; }
    .nb-post-title { font-size: 1.75rem; }

    .nb-post-body { padding: 0 16px 60px; }

    .nb-post-nav { grid-template-columns: 1fr; }
    .nb-post-nav__next { text-align: left; }

    .nb-author-box { flex-direction: column; align-items: center; text-align: center; }

    .nb-post-cta {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }

    .nb-btn-wa-cta { width: 100%; justify-content: center; }

    .nb-post-featured-img__inner { transform: translateY(-20px); }
}

@media (max-width: 480px) {
    .nb-post-title { font-size: 1.5rem; }
    .nb-post-meta { font-size: .8rem; gap: 6px; }
    .nb-post-content { font-size: 1rem; }
}
