/* ============================================================
   blog.css — StudentSite public Blog (Index / Category / Detail)
   Mọi rule scope dưới .home-page. Dùng lại hp-news-card/-grid,
   hp-section-*, hp-btn-outline, hp-empty từ home.css.
   KHÔNG khai báo :root — dùng var(--xxx) từ home.css.
   ============================================================ */

.home-page .hp-blog {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--stack-md) var(--gutter) var(--stack-lg);
}
.home-page .hp-blog .hp-section-header {
    margin-bottom: 20px;
}

/* ── Featured ───────────────────────────────────────────── */
.home-page .hp-blog-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--surface-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    margin-bottom: var(--stack-md);
    transition: transform .25s ease, box-shadow .25s ease;
}
.home-page .hp-blog-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 32, 102, .12);
}
@media (min-width: 768px) {
    .home-page .hp-blog-featured { grid-template-columns: 1.3fr 1fr; }
}
.home-page .hp-blog-featured-img {
    position: relative;
    min-height: 220px;
    background: var(--surface-container);
}
.home-page .hp-blog-featured-img img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.home-page .hp-blog-featured-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}
.home-page .hp-blog-featured-body h3 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--on-surface);
    margin: 0;
}
.home-page .hp-blog-featured-body p {
    color: var(--on-surface-variant);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-page .hp-blog-featured-cta {
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

/* ── Chips ──────────────────────────────────────────────── */
.home-page .hp-blog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--stack-md);
}
.home-page .hp-blog-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--news-cat-bg);
    color: var(--news-cat-color);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}
.home-page .hp-blog-chip:hover {
    border-color: var(--primary);
}

/* ── Section heads ──────────────────────────────────────── */
.home-page .hp-blog-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: var(--stack-md) 0 16px;
}
.home-page .hp-blog-subtitle {
    font-size: 22px;
    font-weight: 700;
    color: var(--on-surface);
    margin: 0;
}
.home-page .hp-blog-seeall {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.home-page .hp-blog-seeall:hover { text-decoration: underline; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.home-page .hp-blog-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 16px;
}
.home-page .hp-blog-crumb a {
    color: var(--primary);
    text-decoration: none;
}
.home-page .hp-blog-crumb a:hover { text-decoration: underline; }
.home-page .hp-blog-crumb-sep { color: var(--outline-variant); }

/* ── Detail ─────────────────────────────────────────────── */
.home-page .hp-blog-detail { max-width: var(--container-max); }
.home-page .hp-blog-detail-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--on-surface);
    margin: 8px 0 16px;
}
.home-page .hp-blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--on-surface-variant);
    font-size: 14px;
}
.home-page .hp-blog-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.home-page .hp-blog-meta-item .material-symbols-outlined { font-size: 18px; }
.home-page .hp-blog-detail-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--surface-container);
}
.home-page .hp-blog-detail-cover img {
    width: 100%; display: block;
    max-height: 460px; object-fit: cover;
}

/* ── Rendered content (Html.Raw) ────────────────────────── */
.home-page .hp-blog-content {
    max-width: 860px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--on-surface);
}
.home-page .hp-blog-content h2,
.home-page .hp-blog-content h3 {
    font-weight: 700;
    color: var(--on-surface);
    margin: 1.6em 0 .6em;
    line-height: 1.3;
}
.home-page .hp-blog-content p { margin: 0 0 1.1em; }
.home-page .hp-blog-content a { color: var(--primary); text-decoration: underline; }
.home-page .hp-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1em 0;
}
.home-page .hp-blog-content ul,
.home-page .hp-blog-content ol { margin: 0 0 1.1em 1.4em; }
.home-page .hp-blog-content blockquote {
    margin: 1.2em 0;
    padding: 8px 20px;
    border-left: 4px solid var(--primary);
    background: var(--surface);
    color: var(--on-surface-variant);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.home-page .hp-blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    display: block;
    overflow-x: auto;
}
.home-page .hp-blog-content th,
.home-page .hp-blog-content td {
    border: 1px solid var(--outline-variant);
    padding: 8px 12px;
    text-align: left;
}

/* ── Placeholder ảnh (khi blog thiếu ảnh bìa) ─────────────── */
.home-page .hp-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface-container), var(--news-cat-bg));
    color: var(--primary);
}
.home-page .hp-img-ph .material-symbols-outlined { font-size: 48px; opacity: .55; }
.home-page .hp-news-img.hp-img-ph { min-height: 160px; }
.home-page .hp-blog-featured-img.hp-img-ph { min-height: 220px; }
.home-page .hp-blog-detail-cover.hp-img-ph { min-height: 240px; }
