/**
 * SG Page — page hero (trang /tu-dien/) + dictionary teaser (trang chủ) + author box (E-E-A-T).
 *
 * Tái sử dụng token (--sg-*) + class có sẵn (.sg-eyebrow, .sg-section-head/title/sub, .sg-page-title).
 *
 * @package SlanggenzChild
 */

/* ---------- Page hero (archive-slang /tu-dien/) ---------- */
.sg-page-hero { margin-bottom: 44px; }
.sg-page-hero .sg-page-title { margin: 14px 0 16px; }
.sg-page-sub {
    max-width: 62ch;
    margin: 0;
    color: var(--sg-muted);
    font-size: 17px;
    line-height: 1.65;
}
/* Page hero thay thế head nội bộ của dictionary block → ẩn head block để khỏi trùng. */
.sg-dict-page .sg-dictionary .sg-section-head { display: none; }
.sg-dict-page .sg-dictionary { padding-top: 0; }

/* ---------- Dictionary teaser (trang chủ — "Từ của ngày") ---------- */
.sg-dict-teaser {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 88px;
}
.sg-wod-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
    padding: 30px 34px;
    border: 1px solid var(--sg-line);
    border-radius: 22px;
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--sg-lime) 10%, transparent), transparent 55%),
        color-mix(in srgb, var(--sg-card) 90%, transparent);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sg-wod-card:hover {
    transform: translateY(-4px);
    border-color: var(--sg-lime);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}
.sg-wod-emoji { font-size: 60px; line-height: 1; }
.sg-wod-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sg-wod-term {
    font-family: var(--sg-font-display);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--sg-text);
}
.sg-wod-def { color: var(--sg-muted); font-size: 16px; line-height: 1.55; }
.sg-wod-example { color: var(--sg-lime); font-size: 14px; font-style: italic; line-height: 1.5; }
.sg-wod-cta {
    align-self: center;
    white-space: nowrap;
    padding: 12px 20px;
    border: 1px solid var(--sg-line);
    border-radius: 999px;
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease;
}
.sg-wod-card:hover .sg-wod-cta { border-color: var(--sg-lime); color: var(--sg-lime); }

.sg-teaser-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sg-teaser-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--sg-line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-card) 80%, transparent);
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}
.sg-teaser-chip:hover { border-color: var(--sg-pink); transform: translateY(-2px); }

/* Mobile: teaser chips → scroll rail 1 hàng (cùng pattern filter từ điển) */
@media (max-width: 700px) {
    .sg-teaser-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 2px 2px 14px;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    }
    .sg-teaser-chips::-webkit-scrollbar { display: none; }
    .sg-teaser-chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }
}

.sg-teaser-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 15px 30px;
    border-radius: 999px;
    background: var(--sg-lime);
    color: #0b0b12;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.sg-teaser-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--sg-lime) 34%, transparent);
}

@media (max-width: 720px) {
    .sg-wod-card { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
    .sg-wod-emoji { font-size: 46px; }
    .sg-wod-cta { justify-self: start; }
}

/* ---------- Author box (E-E-A-T) ---------- */
.sg-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 26px 28px;
    border: 1px solid var(--sg-line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--sg-card) 88%, transparent);
}
.sg-author-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    border: 2px solid var(--sg-lime);
}
.sg-author-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sg-author-name {
    font-family: var(--sg-font-display);
    font-size: 19px;
    font-weight: 800;
    color: var(--sg-text);
}
.sg-author-bio { margin: 2px 0 0; color: var(--sg-muted); font-size: 14px; line-height: 1.6; }
.sg-author-link {
    margin-top: 6px;
    color: var(--sg-lime);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.sg-author-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
    .sg-author-box { flex-direction: column; }
}
