/* =====================================================
   NHS — Blog Single Template
   ===================================================== */

:root {
    --nhs-blue: #003e7e;
    --nhs-blue-strong: #002a55;
    --nhs-blue-light: #0073e6;
    --nhs-accent: #ff6b00;
    --nhs-ink: #1a1a1a;
    --nhs-text: #2c3338;
    --nhs-muted: #6b7280;
    --nhs-border: #e5e7eb;
    --nhs-bg-soft: #f8fafc;
    --nhs-radius: 8px;
    --nhs-radius-lg: 14px;
    --nhs-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --nhs-shadow-lg: 0 4px 24px rgba(0,0,0,0.08), 0 12px 48px rgba(0,0,0,0.06);
}

.nhs-blog-single {
    background: var(--nhs-bg-soft);
    padding: 32px 0 64px;
    color: var(--nhs-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
}

.nhs-blog-single .nhs-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.nhs-breadcrumb {
    font-size: 13px;
    color: var(--nhs-muted);
    margin-bottom: 20px;
}
.nhs-breadcrumb a {
    color: var(--nhs-muted);
    text-decoration: none;
    transition: color .2s;
}
.nhs-breadcrumb a:hover { color: var(--nhs-blue); }
.nhs-breadcrumb .sep { margin: 0 8px; opacity: .5; }
.nhs-breadcrumb .current { color: var(--nhs-ink); font-weight: 500; }

/* Grid 2 colunas */
.nhs-blog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}

/* Article */
.nhs-blog-article {
    background: #fff;
    border-radius: var(--nhs-radius-lg);
    padding: 40px 48px;
    box-shadow: var(--nhs-shadow);
}

.nhs-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.nhs-blog-single a.nhs-cat-pill,
.nhs-blog-single a.nhs-cat-pill:link,
.nhs-blog-single a.nhs-cat-pill:visited,
.nhs-blog-single a.nhs-cat-pill:hover,
.nhs-blog-single a.nhs-cat-pill:focus,
.nhs-blog-single a.nhs-cat-pill:active {
    display: inline-block;
    padding: 5px 14px;
    background: var(--nhs-blue) !important;
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-decoration: none !important;
    transition: background .2s;
    line-height: 1.4;
    border: none;
}
.nhs-blog-single a.nhs-cat-pill:hover,
.nhs-blog-single a.nhs-cat-pill:focus {
    background: var(--nhs-blue-strong) !important;
    color: #ffffff !important;
}

.nhs-post-title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    color: var(--nhs-ink);
    margin: 0 0 24px;
    font-weight: 700;
}

.nhs-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nhs-border);
}
.nhs-post-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--nhs-muted);
    font-size: 14px;
}
.nhs-post-meta svg { width: 16px; height: 16px; }

/* Hero image */
.nhs-post-hero {
    margin: 0 0 32px;
    border-radius: var(--nhs-radius);
    overflow: hidden;
}
.nhs-post-hero img {
    width: 100%;
    height: auto;
    display: block;
}
.nhs-post-hero figcaption {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--nhs-muted);
    background: var(--nhs-bg-soft);
}

/* Content */
.nhs-post-content {
    font-size: 17px;
    color: var(--nhs-text);
}
.nhs-post-content > * { margin: 0 0 20px; }
.nhs-post-content h2,
.nhs-post-content h3,
.nhs-post-content h4 {
    color: var(--nhs-ink);
    line-height: 1.3;
    margin: 36px 0 16px;
    font-weight: 700;
}
.nhs-post-content h2 { font-size: 28px; }
.nhs-post-content h3 { font-size: 22px; }
.nhs-post-content h4 { font-size: 18px; }
.nhs-post-content p { margin-bottom: 18px; }
.nhs-post-content a {
    color: var(--nhs-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.nhs-post-content a:hover { color: var(--nhs-blue-strong); }
.nhs-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--nhs-radius);
    margin: 24px 0;
}
.nhs-post-content blockquote {
    border-left: 4px solid var(--nhs-blue);
    background: var(--nhs-bg-soft);
    padding: 16px 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--nhs-text);
    border-radius: 0 var(--nhs-radius) var(--nhs-radius) 0;
}
.nhs-post-content ul,
.nhs-post-content ol { padding-left: 24px; margin-bottom: 20px; }
.nhs-post-content li { margin-bottom: 8px; }
.nhs-post-content pre,
.nhs-post-content code {
    background: var(--nhs-bg-soft);
    border-radius: 4px;
    font-family: "SF Mono", Monaco, "Courier New", monospace;
}
.nhs-post-content code { padding: 2px 6px; font-size: .9em; }
.nhs-post-content pre { padding: 16px; overflow-x: auto; }

/* Tags */
.nhs-post-tags {
    margin: 32px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--nhs-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nhs-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--nhs-bg-soft);
    color: var(--nhs-text);
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.nhs-tag:hover { background: var(--nhs-blue); color: #fff; }

/* Share buttons */
.nhs-post-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--nhs-border);
}
.nhs-post-share .share-label {
    font-weight: 600;
    color: var(--nhs-ink);
    margin-right: 8px;
}
.nhs-post-share .share-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--nhs-bg-soft);
    color: var(--nhs-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
    padding: 0;
    text-decoration: none;
}
.nhs-post-share .share-btn:hover { transform: translateY(-2px); }
.nhs-post-share .share-btn svg { width: 18px; height: 18px; }
.nhs-post-share .share-btn.whatsapp:hover { background: #25d366; color: #fff; }
.nhs-post-share .share-btn.linkedin:hover { background: #0a66c2; color: #fff; }
.nhs-post-share .share-btn.facebook:hover { background: #1877f2; color: #fff; }
.nhs-post-share .share-btn.twitter:hover { background: #000; color: #fff; }
.nhs-post-share .share-btn.copy:hover { background: var(--nhs-blue); color: #fff; }
.nhs-post-share .share-btn.copy.copied {
    background: #2e7d32; color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

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

.nhs-sidebar-block {
    background: #fff;
    border-radius: var(--nhs-radius-lg);
    padding: 24px;
    box-shadow: var(--nhs-shadow);
}

.nhs-sidebar-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--nhs-blue);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--nhs-blue);
    font-weight: 700;
}

.nhs-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nhs-sidebar-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: var(--nhs-text);
    align-items: flex-start;
    transition: color .2s;
}
.nhs-sidebar-link:hover { color: var(--nhs-blue); }
.nhs-sidebar-link .thumb {
    flex: 0 0 64px;
    width: 64px; height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--nhs-bg-soft);
}
.nhs-sidebar-link .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nhs-sidebar-link .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nhs-sidebar-link .title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: inherit;
}
.nhs-sidebar-link .date {
    font-size: 12px;
    color: var(--nhs-muted);
}
.nhs-sidebar-link.compact .title { font-size: 13px; font-weight: 500; }

/* CTA */
.nhs-sidebar-cta {
    background: linear-gradient(135deg, var(--nhs-blue) 0%, var(--nhs-blue-strong) 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,62,126,0.25);
}
.nhs-cta-title {
    color: #fff;
    font-size: 20px;
    margin: 0 0 8px;
    font-weight: 700;
}
.nhs-cta-text {
    color: rgba(255,255,255,0.92);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px;
}
.nhs-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    color: var(--nhs-blue);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: transform .15s, box-shadow .2s;
    width: 100%;
    justify-content: center;
}
.nhs-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    color: var(--nhs-blue-strong);
}
.nhs-cta-btn svg { width: 16px; height: 16px; }

/* Related posts grid no rodapé */
.nhs-related-grid {
    margin-top: 56px;
}
.nhs-section-title {
    font-size: 24px;
    color: var(--nhs-ink);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--nhs-blue);
    display: inline-block;
}
.nhs-related-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.nhs-related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--nhs-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--nhs-shadow);
    transition: transform .2s, box-shadow .2s;
}
.nhs-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--nhs-shadow-lg);
}
.nhs-related-card .card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--nhs-bg-soft);
}
.nhs-related-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.nhs-related-card:hover .card-thumb img { transform: scale(1.05); }
.nhs-related-card .card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.nhs-related-card .card-cat {
    font-size: 11px;
    color: var(--nhs-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.nhs-related-card .card-title {
    font-size: 16px;
    color: var(--nhs-ink);
    margin: 0;
    line-height: 1.35;
    font-weight: 600;
}
.nhs-related-card .card-date {
    font-size: 12px;
    color: var(--nhs-muted);
    margin-top: auto;
}

/* Responsivo */
@media (max-width: 980px) {
    .nhs-blog-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .nhs-blog-sidebar { position: static; }
    .nhs-blog-article { padding: 28px 24px; }
}
@media (max-width: 640px) {
    .nhs-blog-single { padding: 16px 0 40px; }
    .nhs-blog-single .nhs-container { padding: 0 14px; }
    .nhs-blog-article { padding: 20px 16px; }
    .nhs-post-meta { gap: 12px; }
    .nhs-post-meta .meta-item { font-size: 13px; }
    .nhs-post-content { font-size: 16px; }
    .nhs-post-content h2 { font-size: 22px; }
    .nhs-post-content h3 { font-size: 19px; }
    .nhs-breadcrumb { font-size: 12px; }
    .nhs-breadcrumb .sep { margin: 0 4px; }
}
