/**
 * assets/css/single.css – ThemeSanBong
 * Styles riêng cho template bài viết đơn.
 * Chỉ được enqueue trên is_single() để không tải ở trang khác.
 *
 * @package ThemeSanBong
 */

/* ── Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem; font-size:.82rem; color:#6b7280; }
.breadcrumb a { color:#6b7280; }
.breadcrumb a:hover { color:#dc2626; }
.breadcrumb .sep { color:#d1d5db; }

/* ── Article Content Typography ───────────────────────────────── */
.article-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 1.75rem 0 .75rem;
    line-height: 1.4;
}
.article-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1.5rem 0 .6rem;
}
.article-content p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.85;
    margin-bottom: 1.1rem;
}
.article-content a { color: #dc2626; text-decoration: underline; }
.article-content a:hover { color: #b91c1c; }
.article-content ul,
.article-content ol {
    margin: .75rem 0 1rem 1.25rem;
    color: #374151;
    line-height: 1.8;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: .3rem; }
.article-content blockquote {
    border-left: 4px solid #3b82f6;
    background: #f0f7ff;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #1e40af;
}
.article-content blockquote p { color: #1e40af; margin-bottom: 0; }
.article-content img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    margin: 1rem 0;
}
.article-content figure { margin: 1.25rem 0; }
.article-content figcaption {
    text-align: center;
    font-size: .85rem;
    color: #6b7280;
    margin-top: .4rem;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: .9rem;
}
.article-content th,
.article-content td {
    border: 1px solid #e5e7eb;
    padding: .5rem .75rem;
    text-align: left;
}
.article-content th { background: #f9fafb; font-weight: 600; }

/* ── Tag badges ───────────────────────────────────────────────── */
.tag-pill {
    display: inline-block;
    padding: .3rem .85rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.tag-pill:hover { background: #dc2626; color: #fff; }

/* ── Share buttons ────────────────────────────────────────────── */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: opacity .2s, transform .15s;
}
.share-btn:hover { opacity: .85; transform: scale(1.1); }

/* ── Related posts card ───────────────────────────────────────── */
.related-card { transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.related-card .card-img-wrap { overflow: hidden; border-radius: 8px 8px 0 0; }
.related-card .card-img-wrap img {
    transition: transform .35s ease;
    width: 100%; height: 170px; object-fit: cover; display: block;
}
.related-card:hover .card-img-wrap img { transform: scale(1.04); }

/* ── Comment form ─────────────────────────────────────────────── */
#commentform label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .5rem;
}
#commentform .comment-form-comment,
#commentform .comment-form-author,
#commentform .comment-form-email { margin-bottom: 1.25rem; }

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: .9rem;
    color: #111827;
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
#commentform input:focus,
#commentform textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}
#commentform textarea { min-height: 140px; resize: vertical; }
#commentform .form-submit { margin-top: 1.5rem; }
#commentform .form-submit input[type="submit"] {
    background: #dc2626;
    color: #fff;
    padding: .7rem 1.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
}
#commentform .form-submit input:hover { background: #b91c1c; }
#commentform .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-top: 1rem;
}
#commentform .comment-form-cookies-consent label {
    font-weight: 400;
    font-size: .82rem;
    margin-bottom: 0;
}
#commentform .comment-notes {
    font-size: .83rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.comment-respond .comment-reply-title {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: .75rem;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list .comment { border-bottom: 1px solid #f3f4f6; padding: 1.1rem 0; }
.comment-list .comment-author img { border-radius: 50%; }
.comment-list .comment-meta { font-size: .8rem; color: #9ca3af; }
.comment-list .comment-body p {
    color: #374151;
    font-size: .9rem;
    margin: .5rem 0 0;
    line-height: 1.7;
}

/* ── CPT Nhận Định — Heading overrides ──────────────────────────
 * WordPress tự thêm class .post-type-nhandinh vào <body>
 * → Override chỉ áp dụng cho single nhận định, không ảnh hưởng post thường.
 * ────────────────────────────────────────────────────────────── */
.post-type-nhandinh .article-content h2 {
    font-size: 1.45rem;       /* +2 so với 1.25rem mặc định */
    font-weight: 400;         /* bỏ in đậm */
    color: #9b1c1c;           /* đỏ sẫm */
}
.post-type-nhandinh .article-content h3 {
    font-size: 1.2rem;        /* +1 so với 1.1rem mặc định */
    font-weight: 400;         /* bỏ in đậm */
    color: #1e3a5f;           /* xanh sẫm navy */
}
