/* ==========================================================================
   HALO Blog Detail — article redesign
   Used by resources/views/newpage/medicare_learning.blade.php (blog-detail page)
   Namespaced with .hb- to avoid collisions with Bootstrap / site CSS.
   ========================================================================== */

:root {
    --hb-navy: #0f1c4d;
    --hb-navy-light: #182970;
    --hb-navy-deep: #0b1033;
    --hb-cyan: #00bcd4;
    --hb-cyan-dark: #0284c7;
    --hb-cyan-soft: #e0f7fa;
    --hb-teal: #10b981;
    --hb-border: #e2e8f0;
    --hb-bg: #f8fafc;
    --hb-text-main: #0f172a;
    --hb-text-body: #334155;
    --hb-text-muted: #64748b;
    --hb-radius-lg: 16px;
    --hb-radius-md: 10px;
}

/* ------------------------- Top category pill strip ---------------------- */
.hb-category-strip {
    background: #ffffff;
    border-bottom: 1.5px solid var(--hb-border);
    padding: 12px 0;
}

.hb-category-menu {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    list-style: none;
    margin-top: 0;
    margin-bottom: 0;
}

.hb-category-menu li {
    list-style: none;
}

.hb-category-pill {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--hb-text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--hb-border);
    background: #ffffff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.hb-category-pill:hover,
.hb-category-pill.active {
    background: var(--hb-navy);
    color: #ffffff;
    border-color: var(--hb-navy);
    text-decoration: none;
}

/* --------------------------- Article workspace -------------------------- */
.hb-container {
    max-width: 1280px;
    margin: 36px auto;
    padding: 0 20px;
}

.hb-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 36px;
    align-items: start;
}

/* Main article surface */
.hb-article-surface {
    background: #ffffff;
    border: 1.5px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 40px;
    box-shadow: 0 4px 20px -4px rgba(15, 28, 77, 0.05);
    min-width: 0;
}

.hb-badge {
    background: var(--hb-cyan-soft);
    color: var(--hb-cyan-dark);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    text-decoration: none;
}

.hb-headline {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--hb-navy);
    line-height: 1.25;
    margin: 0 0 16px;
}

/* E-E-A-T author / trust byline */
.hb-author-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--hb-border);
    border-bottom: 1px solid var(--hb-border);
    padding: 14px 0;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.hb-author-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hb-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hb-cyan);
    background: #d8e2ee;
}

.hb-author-meta h5 {
    font-size: 0.90rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin: 0;
}

.hb-author-meta span {
    font-size: 0.76rem;
    color: var(--hb-text-muted);
}

.hb-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: var(--hb-teal);
    border: 1px solid #a7f3d0;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.hb-featured-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 28px;
    display: block;
}

.hb-lede {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--hb-text-body);
    line-height: 1.8;
    margin-bottom: 24px;
}

/* Article body content (renders admin-authored HTML) */
.hb-body {
    color: var(--hb-text-body);
    line-height: 1.8;
}

.hb-body h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin: 32px 0 14px;
}

.hb-body h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin: 24px 0 10px;
}

.hb-body p {
    font-size: 0.96rem;
    color: var(--hb-text-body);
    margin-bottom: 18px;
}

.hb-body ul,
.hb-body ol {
    padding-left: 25px;
    margin-bottom: 18px;
}

.hb-body img {
    max-width: 100%;
    height: auto;
}

/* Key-rule callout */
.hb-callout {
    background: #f0f9ff;
    border-left: 4px solid var(--hb-cyan);
    border-radius: 0 8px 8px 0;
    padding: 20px;
    margin: 24px 0;
}

.hb-callout h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0369a1;
    margin: 0 0 6px;
}

.hb-callout p {
    margin: 0;
    font-size: 0.88rem;
    color: #0c4a6e;
}

/* Clean data table (also normalizes tables inside article HTML) */
.hb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.88rem;
}

.hb-table th {
    background: var(--hb-navy);
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 800;
}

.hb-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--hb-border);
    color: var(--hb-text-body);
}

.hb-table tr:nth-child(even) td {
    background: #f8fafc;
}

.hb-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.88rem;
}

.hb-body table th {
    background: var(--hb-navy);
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 800;
}

.hb-body table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--hb-border);
    color: var(--hb-text-body);
}

.hb-body table tr:nth-child(even) td {
    background: #f8fafc;
}

/* Dual conversion box */
.hb-dual-cta {
    background: linear-gradient(135deg, var(--hb-navy) 0%, #1e293b 100%);
    border-radius: 14px;
    padding: 32px;
    color: #ffffff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.hb-cta-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hb-cta-card h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff;
}

.hb-cta-card p {
    font-size: 0.84rem;
    color: #cbd5e1;
    margin: 0 0 16px;
}

.hb-btn {
    background: var(--hb-cyan);
    color: var(--hb-navy);
    font-size: 0.84rem;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 99px;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hb-btn:hover {
    background: var(--hb-cyan-dark);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.hb-btn-light {
    background: #ffffff;
    color: var(--hb-navy);
}

.hb-btn-light:hover {
    background: var(--hb-cyan-soft);
    color: var(--hb-navy);
}

/* ------------------------------ Sidebar --------------------------------- */
.hb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 20px;
}

.hb-widget {
    background: #ffffff;
    border: 1.5px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(15, 28, 77, 0.04);
}

.hb-widget-title {
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hb-navy);
    margin-bottom: 16px;
    border-bottom: 1.5px solid var(--hb-border);
    padding-bottom: 8px;
}

/* Advisor lead card */
.hb-agent-card {
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--hb-border);
}

.hb-agent-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hb-cyan);
    margin-bottom: 10px;
    background: #d8e2ee;
}

.hb-agent-card h5 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin: 0 0 4px;
}

.hb-agent-card p {
    font-size: 0.78rem;
    color: var(--hb-text-muted);
    margin: 0 0 14px;
}

.hb-agent-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--hb-teal);
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 8px;
}

/* Sidebar search */
.hb-search-field {
    display: flex;
    align-items: stretch;
}

.hb-search-field input {
    flex: 1;
    height: auto;
    padding: 9px 12px;
    font-size: 0.86rem;
    color: var(--hb-text-main);
    border: 1.5px solid var(--hb-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    background: var(--hb-bg);
    box-shadow: none;
    min-width: 0;
}

.hb-search-field button {
    background: var(--hb-navy);
    color: #ffffff;
    border: none;
    padding: 9px 14px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.hb-search-results {
    margin-top: 12px;
    text-align: left;
}

/* Related articles */
.hb-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hb-related-list li a {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hb-navy);
    text-decoration: none;
    line-height: 1.45;
    display: block;
}

.hb-related-list li a:hover {
    color: var(--hb-cyan-dark);
}

/* Resource download widget */
.hb-download-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin: 0 0 6px;
}

.hb-download-text {
    font-size: 0.80rem;
    color: var(--hb-text-muted);
    margin: 0 0 14px;
}

.hb-btn-soft {
    display: block;
    text-align: center;
    background: #f1f5f9;
    color: var(--hb-navy);
}

.hb-btn-soft:hover {
    background: var(--hb-cyan);
    color: var(--hb-navy);
}

/* CMS compliance notice */
.hb-widget-cms {
    background: #f8fafc;
    font-size: 0.75rem;
    color: var(--hb-text-muted);
    line-height: 1.5;
}

.hb-widget-cms .hb-widget-title {
    margin-bottom: 8px;
}

/* ------------------------- Community / comments ------------------------- */
.hb-community {
    background: #ffffff;
    border: 1.5px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(15, 28, 77, 0.04);
}

.hb-community-header {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--hb-navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hb-community-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 0;
}

.hb-community-actions {
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1.5px solid var(--hb-border);
}

.hb-community-actions textarea {
    font-size: 0.88rem;
    border: 1.5px solid var(--hb-border);
    border-radius: 8px;
    resize: vertical;
}

.hb-community-actions .post-actions {
    font-size: 0.8rem;
    color: var(--hb-text-muted);
}

.hb-community-actions .post-actions label,
.hb-community-actions .post-actions #emoji-trigger {
    color: var(--hb-cyan-dark);
    font-weight: 700;
}

/* ------------------------------- Ads ------------------------------------ */
.hb-ad-box {
    height: 250px;
    border: 2px dashed #cbd5e1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
    color: var(--hb-text-muted);
    border-radius: 10px;
    background: var(--hb-bg);
    font-weight: 700;
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 992px) {
    .hb-grid {
        grid-template-columns: 1fr;
    }

    .hb-sidebar {
        position: static;
    }

    .hb-dual-cta {
        grid-template-columns: 1fr;
    }

    .hb-article-surface {
        padding: 24px;
    }

    .hb-headline {
        font-size: 1.7rem;
    }
}

@media (max-width: 640px) {
    .hb-container {
        margin: 20px auto;
    }

    .hb-article-surface {
        padding: 20px 16px;
    }

    .hb-headline {
        font-size: 1.45rem;
    }

    .hb-featured-img {
        max-height: 260px;
    }

    .hb-dual-cta {
        padding: 22px;
    }

    .hb-author-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
