/* Estilos da area publica do blog (SSR). Usa as variaveis do _ToolsLayout. */

.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .blog-layout { grid-template-columns: 1fr; } }

/* ===== Home "magazine" ===== */
.mag-hero { display: grid; grid-template-columns: 1.15fr 1fr; background: #fff; border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; text-decoration: none; transition: box-shadow .18s ease, transform .18s ease; margin: 8px 0 30px; }
.mag-hero:hover { box-shadow: 0 18px 44px rgba(11,30,48,.10); transform: translateY(-2px); }
.mag-hero .cover { min-height: 340px; }
.mag-hero .body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.mag-hero .cat { font-size: 12px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .05em; }
.mag-hero h2 { font-size: clamp(24px, 2.6vw, 33px); line-height: 1.16; margin: 8px 0 12px; color: var(--ink); letter-spacing: -0.02em; }
.mag-hero p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.mag-hero .meta { font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .mag-hero { grid-template-columns: 1fr; } .mag-hero .cover { min-height: 220px; } .mag-hero .body { padding: 24px; } }

.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.mag-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.mag-card:hover { box-shadow: 0 12px 30px rgba(11,30,48,.09); transform: translateY(-3px); }
.mag-thumb { height: 180px; overflow: hidden; }
.mag-card:hover .mag-thumb .cover { transform: scale(1.05); }
.mag-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.mag-card .cat { font-size: 11.5px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.mag-card h3 { font-size: 17px; line-height: 1.3; margin: 4px 0 8px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card p { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card .meta { font-size: 12px; color: var(--muted); }

/* Capa: imagem OU placeholder branded */
.cover { background: center / cover no-repeat; transition: transform .35s ease; }
.mag-thumb .cover { width: 100%; height: 100%; }
.cover-ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0B1E30 0%, #116A5B 62%, #0E8F6E 100%); }
.cover-ph span { font-family: 'Outfit', 'Inter', sans-serif; font-weight: 800; font-size: 68px; color: rgba(255,255,255,.16); text-transform: uppercase; line-height: 1; }

/* Busca */
.blog-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--hairline); border-radius: 100px; padding: 6px 8px 6px 16px; margin: 0 0 22px; max-width: 520px; transition: border-color .15s ease, box-shadow .15s ease; }
.blog-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,143,110,.10); }
.blog-search svg { color: var(--muted); flex: none; }
.blog-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; font-family: inherit; color: var(--ink); min-width: 0; }
.blog-search input::placeholder { color: var(--muted); }
.blog-search button { border: none; border-radius: 100px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; padding: 8px 18px; cursor: pointer; transition: background .15s ease; }
.blog-search button:hover { background: var(--teal); }
.blog-search-lg { max-width: 640px; margin: 6px 0 24px; padding: 8px 8px 8px 18px; }
.blog-search-lg input { font-size: 16px; }

/* Chips de categoria */
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; }
.blog-chips a { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--hairline); border-radius: 100px; padding: 7px 15px; transition: all .15s ease; }
.blog-chips a:hover { border-color: var(--teal); color: var(--teal); }
.blog-chips a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Autor no card/hero */
.mag-author { display: inline-flex; align-items: center; gap: 7px; }
.mag-avatar, .mag-avatar-ph { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.mag-avatar { object-fit: cover; }
.mag-avatar-ph { background: linear-gradient(135deg, #116A5B, #0E8F6E); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.mag-hero .mag-avatar, .mag-hero .mag-avatar-ph { width: 26px; height: 26px; font-size: 12px; }

/* Faixa de newsletter (home full-width) */
.nl-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--ink); color: #fff; border-radius: 16px; padding: 26px 30px; margin: 30px 0; }
.nl-band .t { font-weight: 700; font-size: 19px; }
.nl-band .s { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 3px; }
.nl-band form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-band input[type=email] { padding: 11px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font-size: 14px; min-width: 250px; outline: none; }
.nl-band input[type=email]::placeholder { color: rgba(255,255,255,.5); }
.nl-band input[type=email]:focus { border-color: #13DBA2; }
.nl-band button { padding: 11px 24px; border: none; border-radius: 8px; background: #13DBA2; color: #0B1E30; font-weight: 700; font-size: 14px; cursor: pointer; }
.nl-band button:hover { background: #0fce97; }
@media (max-width: 640px) { .nl-band form { width: 100%; } .nl-band input[type=email] { flex: 1; min-width: 0; } }

.post-list { display: flex; flex-direction: column; gap: 22px; }
.post-card { display: grid; grid-template-columns: 230px 1fr; background: #fff; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.post-card:hover { box-shadow: 0 12px 30px rgba(11,30,48,.08); transform: translateY(-2px); }
.post-card .thumb { background: #e9f0ed center/cover no-repeat; min-height: 150px; }
.post-card .body { padding: 16px 18px; }
.post-card .cat { font-size: 12px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.post-card h2 { font-size: 19px; margin: 4px 0 6px; color: var(--ink); line-height: 1.25; }
.post-card p { color: var(--muted); font-size: 14px; margin: 0; }
.post-card .meta { margin-top: 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .post-card { grid-template-columns: 1fr; } .post-card .thumb { min-height: 170px; } }

.blog-empty { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 40px; text-align: center; color: var(--muted); }

.blog-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 84px; }
.side-box { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 18px; }
.side-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 12px; }
.side-recent a { display: block; font-size: 14px; color: var(--ink); text-decoration: none; padding: 7px 0; border-bottom: 1px solid #f0f3f1; line-height: 1.35; }
.side-recent a:last-child { border-bottom: none; }
.side-recent a:hover { color: var(--teal); }
.side-list a { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); text-decoration: none; padding: 5px 0; }
.side-list a:hover { color: var(--teal); }
.side-list .count { color: var(--muted); font-size: 12px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--hairline); font-size: 14px; text-decoration: none; color: var(--ink); }
.pagination a:hover { border-color: var(--teal); color: var(--teal); }
.pagination .cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* Artigo */
.article { max-width: 760px; margin: 0 auto; }
.article .cover { width: 100%; border-radius: 14px; margin-bottom: 22px; }
.article .cat { font-size: 12px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.article h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.14; margin: 8px 0 10px; letter-spacing: -0.02em; }
.article .lede { font-size: 19px; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.5; }
.article .meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--hairline); padding-bottom: 16px; margin-bottom: 26px; }

.article-body { font-size: 17px; line-height: 1.75; color: #1f2a26; }
.article-body h2 { font-size: 24px; margin: 34px 0 10px; letter-spacing: -0.01em; }
.article-body h3 { font-size: 20px; margin: 26px 0 8px; }
.article-body h4 { font-size: 17px; margin: 22px 0 6px; }
.article-body p { margin: 0 0 18px; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.article-body a { color: var(--teal-dark, #0B7458); text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote { border-left: 3px solid var(--teal); margin: 20px 0; padding: 6px 18px; color: var(--ink-soft); background: #F5FAF8; border-radius: 0 8px 8px 0; }
.article-body pre { background: #0B1E30; color: #E8EDE9; padding: 16px; border-radius: 10px; overflow: auto; font-size: 14px; margin: 0 0 18px; }
.article-body :not(pre) > code { background: #eef2f0; padding: 2px 6px; border-radius: 4px; font-size: 14px; }

/* Tags do artigo */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--hairline); }
.article-tags a { font-size: 13px; font-weight: 600; color: var(--teal-dark, #0B7458); text-decoration: none; background: #F5FAF8; border: 1px solid var(--hairline); border-radius: 100px; padding: 5px 13px; transition: all .15s ease; }
.article-tags a:hover { border-color: var(--teal); background: #eaf5f1; }

.article-cta { max-width: 760px; margin: 40px auto 0; }
.related { max-width: 760px; margin: 44px auto 0; }
.related h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-card { background: #fff; border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; text-decoration: none; }
.related-card:hover { border-color: #cfe3db; }
.related-card .t { font-size: 15px; font-weight: 600; color: var(--ink); }
.related-card .d { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Formulário de newsletter */
.nl-box { background: var(--ink); color: #fff; border-radius: 14px; padding: 18px; }
.nl-box .nl-title { font-size: 15px; font-weight: 700; color: #fff; text-transform: none; letter-spacing: 0; margin: 0 0 4px; }
.nl-desc { font-size: 13px; color: rgba(255,255,255,.75); margin: 0 0 12px; line-height: 1.45; }
.nl-form { display: flex; flex-direction: column; gap: 8px; }
.nl-input { padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font-size: 14px; font-family: inherit; outline: none; }
.nl-input::placeholder { color: rgba(255,255,255,.5); }
.nl-input:focus { border-color: #13DBA2; }
.nl-btn { padding: 10px; border-radius: 8px; border: none; background: #13DBA2; color: #0B1E30; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s; }
.nl-btn:hover { background: #0fce97; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.nl-legal { display: block; margin-top: 10px; font-size: 11px; color: rgba(255,255,255,.55); line-height: 1.4; }
.article-nl { max-width: 760px; margin: 32px auto 0; }

/* Autor */
.section-label { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 8px 0 14px; }
.author-hero { display: flex; gap: 22px; align-items: flex-start; margin: 8px 0 22px; }
.author-hero-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--hairline); flex: none; }
.author-hero-name { font-size: clamp(26px, 4vw, 36px); margin: 0 0 4px; letter-spacing: -0.02em; }
.author-hero-hl { color: var(--teal); font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.author-hero-bio { color: var(--ink-soft); font-size: 16px; max-width: 640px; margin: 0 0 10px; line-height: 1.55; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; }
.author-links a { font-size: 13px; font-weight: 600; color: var(--teal-dark, #0B7458); text-decoration: none; border: 1px solid var(--hairline); border-radius: 100px; padding: 5px 12px; }
.author-links a:hover { border-color: var(--teal); background: #F5FAF8; }

/* ===== Barra de progresso de leitura ===== */
#read-progress-wrap { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: transparent; z-index: 2000; pointer-events: none; }
#read-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #13DBA2); box-shadow: 0 0 6px rgba(19,219,162,.5); transition: width .08s linear; }

/* ===== Banner de pre-visualizacao ===== */
.preview-banner { max-width: 760px; margin: 0 auto 20px; background: #FFF7E6; border: 1px solid #F5D98B; color: #8A6100; border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.preview-banner strong { color: #7A5500; }

/* ===== Compartilhar ===== */
.share-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 24px; flex-wrap: wrap; }
.share-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hairline); background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .15s ease; padding: 0; }
.share-btn:hover { color: #fff; transform: translateY(-1px); }
.share-btn.wa:hover { background: #25D366; border-color: #25D366; }
.share-btn.li:hover { background: #0A66C2; border-color: #0A66C2; }
.share-btn.x:hover { background: #000; border-color: #000; }
.share-btn.copy:hover { background: var(--teal); border-color: var(--teal); }
.share-btn.copy .ic-check { display: none; }
.share-btn.copy.copied { background: var(--teal); border-color: var(--teal); color: #fff; transform: none; }
.share-btn.copy.copied .ic-link { display: none; }
.share-btn.copy.copied .ic-check { display: inline; }

/* ===== Indice (TOC) ===== */
.article-toc { background: #F5FAF8; border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 20px; margin: 0 0 28px; }
.article-toc .toc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; margin-bottom: 8px; }
.article-toc .toc-list { display: flex; flex-direction: column; gap: 3px; }
.article-toc .toc-list a { font-size: 14px; color: var(--ink-soft); text-decoration: none; line-height: 1.4; padding: 2px 0; }
.article-toc .toc-list a:hover { color: var(--teal); }
.article-toc .toc-sub { padding-left: 16px; font-size: 13px; color: var(--muted); }
/* Compensa a rolagem sob o cabecalho fixo ao clicar nas ancoras */
.article-body h2, .article-body h3 { scroll-margin-top: 80px; }

/* ===== Voltar ao topo ===== */
#back-to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 50; box-shadow: 0 6px 18px rgba(11,30,48,.22); }
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--teal); }

.article-authorbox { max-width: 760px; margin: 36px auto 0; }
.author-box { display: flex; gap: 16px; background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; }
.author-box-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--hairline); }
.author-box-ey { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.author-box-name { font-size: 18px; font-weight: 700; color: var(--ink); }
.author-box-hl { font-size: 13px; color: var(--teal); font-weight: 600; margin-bottom: 6px; }
.author-box-bio { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; line-height: 1.55; }
.author-box-all { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: none; }
@media (max-width: 560px) { .author-hero { flex-direction: column; } }
