/**
 * Slanggenz Child — Article / Archive / Page / 404 styles.
 *
 * Chỉ định nghĩa class MỚI. Tái sử dụng (KHÔNG redefine):
 *   .sg-eyebrow (sg-hero.css) · .sg-section-head / .sg-section-title / .sg-section-sub
 *   (sg-trend-radar.css) · .sg-badge (sg-dictionary.css) · .sg-empty (sg-dictionary.css)
 *
 * @package SlanggenzChild
 */

/* ---------- Shared wrap ---------- */
.sg-wrap {
    width: min(820px, calc(100% - 40px));
    margin: 64px auto 80px;
}
.sg-wrap--wide {
    width: min(1180px, calc(100% - 40px));
}

/* ---------- Back link ---------- */
.sg-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 8px 16px;
    border: 1px solid var(--sg-line);
    border-radius: 999px;
    color: var(--sg-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, border-color .2s, transform .2s;
}
.sg-back:hover {
    color: var(--sg-lime);
    border-color: var(--sg-lime);
    transform: translateX(-3px);
}

/* ---------- Single post ---------- */
.sg-article-header { margin-bottom: 36px; }
.sg-article-header .sg-badge { margin-top: 0; }
.sg-article-title {
    margin: 14px 0 18px;
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    color: var(--sg-text);
}
.sg-article-term {
    display: inline-block;
    margin-bottom: 20px;
    padding: 6px 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-lime) 14%, transparent);
    color: var(--sg-lime);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
}
.sg-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--sg-muted);
    font-size: 13px;
}
.sg-article-thumb { margin-bottom: 32px; }
.sg-article-thumb img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* Content typography */
.sg-article-content {
    font-size: 18px;
    line-height: 1.75;
    color: var(--sg-text);
}
.sg-article-content p { margin: 0 0 1.4em; }
.sg-article-content h2,
.sg-article-content h3 {
    margin: 1.8em 0 .6em;
    font-weight: 800;
    line-height: 1.2;
    color: var(--sg-text);
}
.sg-article-content h2 { font-size: clamp(24px, 3vw, 32px); }
.sg-article-content h3 { font-size: clamp(20px, 2.4vw, 26px); }
.sg-article-content a {
    color: var(--sg-lime);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sg-article-content ul,
.sg-article-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.sg-article-content li { margin-bottom: .5em; }
.sg-article-content blockquote {
    margin: 1.6em 0;
    padding: 18px 24px;
    border-left: 4px solid var(--sg-pink);
    border-radius: 0 14px 14px 0;
    background: color-mix(in srgb, var(--sg-card) 70%, transparent);
    color: var(--sg-muted);
    font-style: italic;
}
.sg-article-content img { max-width: 100%; height: auto; border-radius: 16px; }

/* Tags */
.sg-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--sg-line);
}
.sg-article-tags a {
    padding: 6px 14px;
    border: 1px solid var(--sg-line);
    border-radius: 999px;
    color: var(--sg-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.sg-article-tags a:hover { color: var(--sg-pink); border-color: var(--sg-pink); }

/* ---------- Related ---------- */
.sg-related { margin-top: 56px; }
.sg-related h3 {
    margin: 12px 0 22px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--sg-text);
}
.sg-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.sg-related-grid a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--sg-line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--sg-card) 88%, transparent);
    color: var(--sg-text);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.sg-related-grid a:hover {
    transform: translateY(-4px);
    border-color: var(--sg-pink);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}
.sg-related-grid a span {
    margin-top: auto;
    color: var(--sg-lime);
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 760px) {
    .sg-related-grid { grid-template-columns: 1fr; }
}

/* ---------- Archive / Index / Search ---------- */
.sg-archive-head { margin-bottom: 40px; }
.sg-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .sg-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sg-archive-grid { grid-template-columns: 1fr; } }

/* Post card (template-part) */
.sg-post-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--sg-line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--sg-card) 88%, transparent);
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.sg-post-card:hover {
    transform: translateY(-4px);
    border-color: var(--sg-pink);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}
.sg-post-card .sg-badge { margin-top: 0; align-self: flex-start; }
.sg-post-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--sg-text);
}
.sg-post-card-excerpt {
    margin: 0;
    color: var(--sg-muted);
    font-size: 14px;
    line-height: 1.6;
}
.sg-post-card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--sg-line);
    color: var(--sg-muted);
    font-size: 12px;
}

/* Pagination */
.sg-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 56px;
}
.sg-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--sg-line);
    border-radius: 12px;
    color: var(--sg-muted);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, border-color .2s, background .2s;
}
.sg-pagination .page-numbers:hover { color: var(--sg-lime); border-color: var(--sg-lime); }
.sg-pagination .page-numbers.current {
    background: var(--sg-lime);
    border-color: var(--sg-lime);
    color: #0b0b12;
}

/* ---------- Page (static) ---------- */
.sg-page-title {
    margin: 14px 0 28px;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--sg-text);
}

/* ---------- 404 ---------- */
.sg-404 { text-align: center; padding: 40px 0; }
.sg-404-code {
    font-size: clamp(80px, 18vw, 180px);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--sg-lime), var(--sg-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sg-404-title {
    margin: 20px 0 12px;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    color: var(--sg-text);
}
.sg-404 p { color: var(--sg-muted); margin-bottom: 28px; }
.sg-404 .sg-back { margin-bottom: 0; }

/* ---------- Slang single (CPT `slang`) ---------- */
.sg-slang-emoji {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
}
.sg-slang-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.sg-slang-topics .sg-badge { margin-top: 0; }
.sg-slang-def {
    margin: 0 0 8px;
    font-size: clamp(18px, 2.4vw, 22px);
    line-height: 1.5;
    color: var(--sg-muted);
    font-weight: 500;
}
.sg-slang-example,
.sg-slang-origin {
    margin: 1.8em 0;
    padding: 18px 24px;
    border-left: 4px solid var(--sg-lime);
    border-radius: 0 14px 14px 0;
    background: color-mix(in srgb, var(--sg-card) 70%, transparent);
}
.sg-slang-origin { border-left-color: var(--sg-pink); }
.sg-slang-example p,
.sg-slang-origin p {
    margin: 8px 0 0;
    color: var(--sg-text);
    font-size: 16px;
    line-height: 1.7;
}
.sg-slang-example .sg-eyebrow,
.sg-slang-origin .sg-eyebrow { margin-bottom: 0; }
