/* =========================================================
   Tech Commit — design system (tokens + componentes)
   Traduzido do layout Tech Commit.dc.html
   ========================================================= */

:root{
	--bg:#FAFAFA; --surface:#FFFFFF; --surface-offset:#F1F5F9;
	--text:#0F172A; --text-muted:#475569; --text-faint:#94A3B8;
	--primary:#0284C7; --primary-hover:#0369A1; --primary-light:#E0F2FE;
	--green:#059669; --green-light:#DCFCE7; --orange:#D97706; --orange-light:#FEF3C7;
	--purple:#7C3AED; --purple-light:#F3E8FF; --gray-badge:#475569; --gray-light:#F1F5F9;
	--border:rgba(15,23,42,0.08);
	--shadow-sm:0 1px 3px rgba(15,23,42,0.06);
	--shadow-md:0 4px 16px rgba(15,23,42,0.08);
}

html{ scroll-behavior:smooth; }
body{ background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
::selection{ background:var(--primary-light); }

/* Container 1200px (wide) já vem do theme.json; aqui só utilitários */
.tc-wrap{ max-width:1200px; margin-inline:auto; padding-inline:24px; }
.tc-narrow{ max-width:760px; margin-inline:auto; padding-inline:24px; }

/* ---------- Reading progress bar ---------- */
.tc-progress{ position:fixed; top:0; left:0; height:3px; width:0; background:var(--primary); z-index:200; transition:width .08s linear; }

/* =========================================================
   HEADER
   ========================================================= */
.tc-header{ position:sticky; top:0; z-index:100; background:var(--surface); border-bottom:1px solid var(--border); }
.tc-header__inner{ max-width:1200px; margin-inline:auto; padding:0 24px; min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.tc-logo{ display:flex; align-items:center; gap:9px; flex:none; }
.tc-logo__text{ font-weight:800; font-size:20px; letter-spacing:-0.02em; color:var(--text); }
.tc-logo__text .accent{ color:var(--primary); }
.tc-nav{ display:flex; align-items:center; gap:4px; }
.tc-nav a{ padding:8px 14px; font-size:15px; font-weight:500; color:var(--text-muted); border-radius:8px; transition:background .15s,color .15s; }
.tc-nav a:hover,.tc-nav .current-menu-item a{ background:var(--gray-light); color:var(--text); }
.tc-yt{ display:inline-flex; align-items:center; gap:7px; background:var(--primary); color:#fff !important; font-size:14px; font-weight:600; padding:9px 16px; border-radius:8px; transition:background .15s; flex:none; }
.tc-yt:hover{ background:var(--primary-hover); }
.tc-burger{ display:none; background:none; border:1px solid var(--border); border-radius:8px; width:40px; height:40px; cursor:pointer; align-items:center; justify-content:center; color:var(--text); }

/* =========================================================
   BADGES (pílulas de categoria)
   ========================================================= */
.tc-badge{ display:inline-block; border-radius:9999px; padding:4px 12px; font-size:12px; font-weight:600; background:var(--gray-light); color:var(--gray-badge); }
.tc-badge--dark{ background:var(--text); color:#fff; }
.tc-badge--arquitetura{ background:var(--primary-light); color:var(--primary); }
.tc-badge--tutorial{ background:var(--green-light); color:var(--green); }
.tc-badge--carreira{ background:var(--orange-light); color:var(--orange); }
.tc-badge--noticias{ background:var(--purple-light); color:var(--purple); }
.tc-badge--ferramentas{ background:var(--gray-light); color:var(--gray-badge); }
/* O filtro render_block adiciona tc-badge--{slug} a cada link de categoria */
.wp-block-post-terms a{ text-decoration:none; }
.wp-block-post-terms a.tc-badge{ display:inline-block; }
/* categoria sem classe específica (slug desconhecido) cai no cinza base */
.wp-block-post-terms a:not([class]){ display:inline-block; background:var(--gray-light); color:var(--gray-badge); border-radius:9999px; padding:4px 12px; font-size:12px; font-weight:600; }
/* na breadcrumb a categoria é texto simples, não pílula */
.tc-breadcrumb .wp-block-post-terms a{ background:none !important; color:var(--text-muted) !important; padding:0 !important; font-size:13px; font-weight:400; }

/* =========================================================
   HERO (home)
   ========================================================= */
.tc-hero{ background:var(--surface-offset); border-bottom:1px solid var(--border); }
.tc-hero__inner{ max-width:1200px; margin-inline:auto; padding:64px 24px; }
.tc-hero__inner .wp-block-columns{ gap:48px; align-items:center; margin:0; }
.tc-hero__text{ display:flex; flex-direction:column; align-items:flex-start; gap:18px; }
.tc-hero h1,.tc-hero .wp-block-post-title{ font-size:42px; line-height:1.1; font-weight:800; letter-spacing:-0.025em; margin:0; text-wrap:balance; }
.tc-hero .wp-block-post-excerpt{ font-size:18px; line-height:1.6; color:var(--text-muted); margin:0; max-width:46ch; }
.tc-hero .wp-block-post-excerpt p{ margin:0; }
.tc-hero__img img,.tc-hero .wp-block-post-featured-image img{ width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:14px; box-shadow:var(--shadow-md); display:block; }
.tc-hero__meta{ display:flex; align-items:center; gap:8px; font-size:14px; color:var(--text-faint); }

/* =========================================================
   CARDS DE POST + GRID
   ========================================================= */
.tc-grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.tc-grid3sm{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.tc-card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; box-shadow:var(--shadow-sm); transition:transform .2s ease,box-shadow .2s ease; display:flex; flex-direction:column; }
.tc-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); }
.tc-card .wp-block-post-featured-image{ margin:0; }
.tc-card .wp-block-post-featured-image img{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.tc-card__body{ padding:20px; display:flex; flex-direction:column; gap:10px; }
.tc-card .wp-block-post-title{ font-size:18px; font-weight:600; line-height:1.35; margin:0; letter-spacing:0; }
.tc-card .wp-block-post-title a{ color:var(--text); }
.tc-card .wp-block-post-excerpt{ font-size:14.5px; line-height:1.55; color:var(--text-muted); margin:0; }
.tc-card .wp-block-post-excerpt__excerpt{ margin:0; }
.tc-card__meta{ display:flex; align-items:center; gap:8px; margin-top:6px; padding-top:14px; border-top:1px solid var(--border); font-size:13px; color:var(--text-faint); }

/* títulos de seção da home */
.tc-section{ max-width:1200px; margin-inline:auto; padding:72px 24px; }
.tc-section__head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:32px; flex-wrap:wrap; gap:8px; }
.tc-section h2{ font-size:28px; font-weight:700; letter-spacing:-0.02em; margin:0; }

/* =========================================================
   BANNER YOUTUBE (escuro)
   ========================================================= */
.tc-ytbanner{ background:#0F172A; }
.tc-ytbanner__inner{ max-width:1200px; margin-inline:auto; padding:64px 24px; display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; }
.tc-ytbanner__inner h2{ font-size:34px; font-weight:800; line-height:1.15; letter-spacing:-0.02em; color:#fff; margin:0; }
.tc-ytbanner__inner p{ font-size:17px; line-height:1.6; color:#94A3B8; margin:0; }
.tc-ytbanner__eyebrow{ display:inline-flex; align-items:center; gap:8px; color:#F87171; font-weight:600; font-size:14px; }
.tc-btn-ghost{ display:inline-flex; align-items:center; gap:8px; border:1.5px solid rgba(255,255,255,0.4); color:#fff !important; font-size:15px; font-weight:600; padding:11px 22px; border-radius:8px; transition:background .15s,border-color .15s; }
.tc-btn-ghost:hover{ background:#fff; color:#0F172A !important; border-color:#fff; }

/* =========================================================
   NEWSLETTER
   ========================================================= */
.tc-newsletter{ background:var(--surface-offset); border-top:1px solid var(--border); }
.tc-newsletter__inner{ max-width:720px; margin-inline:auto; padding:72px 24px; display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
.tc-newsletter h2{ font-size:30px; font-weight:800; letter-spacing:-0.02em; margin:0; }
.tc-newsletter p{ font-size:17px; line-height:1.6; color:var(--text-muted); margin:0; }
.tc-form{ display:flex; gap:10px; width:100%; max-width:480px; margin-top:8px; flex-wrap:wrap; }
.tc-form input[type=email]{ flex:1; min-width:200px; padding:12px 16px; border:1px solid var(--border); border-radius:8px; font-size:15px; background:var(--surface); outline:none; }
.tc-form button{ background:var(--primary); color:#fff; font-size:15px; font-weight:600; padding:12px 22px; border:none; border-radius:8px; cursor:pointer; transition:background .15s; }
.tc-form button:hover{ background:var(--primary-hover); }
.tc-form__note{ font-size:13px; color:var(--text-faint); }

/* botões genéricos */
.tc-btn{ display:inline-flex; align-items:center; gap:6px; background:var(--primary); color:#fff !important; font-size:15px; font-weight:600; padding:11px 22px; border-radius:8px; transition:background .15s; }
.tc-btn:hover{ background:var(--primary-hover); }

/* =========================================================
   ARTIGO (single) + SIDEBAR
   ========================================================= */
.tc-article{ max-width:1200px; margin-inline:auto; padding:32px 24px 72px; display:grid; grid-template-columns:1fr 300px; gap:56px; align-items:start; }
.tc-article__main{ min-width:0; max-width:760px; justify-self:center; width:100%; }
.tc-breadcrumb{ font-size:13px; color:var(--text-faint); margin-bottom:20px; display:flex; gap:8px; flex-wrap:wrap; }
.tc-breadcrumb a{ color:var(--text-muted); }
.tc-postmeta{ display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-faint); margin:16px 0 28px; flex-wrap:wrap; }
.tc-postmeta .avatar,.tc-postmeta img{ width:38px; height:38px; border-radius:50%; object-fit:cover; }
.tc-cover img{ width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; display:block; }

/* prosa do artigo */
.tc-prose{ font-size:17px; line-height:1.75; color:var(--text); max-width:65ch; }
.tc-prose > *{ margin-block:0 22px; }
.tc-prose h2{ font-size:27px; font-weight:700; letter-spacing:-0.015em; margin:44px 0 14px; scroll-margin-top:90px; }
.tc-prose h2::before{ content:"—●—"; display:block; color:var(--primary); font-weight:700; font-size:13px; letter-spacing:3px; margin-bottom:6px; }
.tc-prose h3{ font-size:19px; font-weight:600; margin:0 0 10px; }
.tc-prose a{ color:var(--primary); text-decoration:underline; text-underline-offset:2px; }
.tc-prose code:not(.hljs):not(pre code){ font-family:'JetBrains Mono',monospace; font-size:14.5px; background:var(--gray-light); padding:2px 6px; border-radius:4px; color:var(--primary); }
.tc-prose ul{ list-style:none; padding:0; margin:0 0 24px; display:flex; flex-direction:column; gap:10px; }
.tc-prose ul li{ position:relative; padding-left:19px; }
.tc-prose ul li::before{ content:""; position:absolute; left:0; top:11px; width:7px; height:7px; border-radius:2px; background:var(--primary); }
.tc-prose figure img{ width:100%; border-radius:10px; display:block; }
.tc-prose figure figcaption{ font-size:13px; color:var(--text-faint); margin-top:8px; text-align:left; }

/* =========================================================
   CALLOUTS (info / dica / atenção / cuidado)
   ========================================================= */
.tc-callout{ border-left:3px solid var(--primary); background:var(--primary-light); border-radius:0 8px 8px 0; padding:14px 18px; margin:0 0 24px; }
.tc-callout p{ margin:0; font-size:15px; line-height:1.6; color:var(--text); }
.tc-callout p:first-child{ font-weight:700; font-size:13px; margin-bottom:4px; color:var(--primary); }
.tc-callout--dica{ border-left-color:var(--green); background:var(--green-light); }
.tc-callout--dica p:first-child{ color:var(--green); }
.tc-callout--atencao{ border-left-color:var(--orange); background:var(--orange-light); }
.tc-callout--atencao p:first-child{ color:var(--orange); }
.tc-callout--cuidado{ border-left-color:#EF4444; background:#FEF2F2; }
.tc-callout--cuidado p:first-child{ color:#EF4444; }

/* =========================================================
   CODE BLOCK (com barra de linguagem + copiar)
   ========================================================= */
.tc-code{ background:#0F172A; border-radius:8px; overflow:hidden; margin:0 0 24px; border:1px solid rgba(255,255,255,0.06); }
.tc-code__bar{ display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid rgba(255,255,255,0.08); }
.tc-code__lang{ background:rgba(255,255,255,0.08); color:#94A3B8; font-size:12px; font-weight:500; padding:3px 10px; border-radius:6px; font-family:'JetBrains Mono',monospace; }
.tc-code__copy{ background:none; border:none; color:#94A3B8; font-size:12.5px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font-family:inherit; }
.tc-code__copy:hover{ color:#E2E8F0; }
.tc-code pre,.tc-code .wp-block-code{ margin:0; background:transparent; border:none; border-radius:0; padding:18px; overflow-x:auto; }
.tc-code code{ font-family:'JetBrains Mono',monospace; font-size:14px; line-height:1.7; color:#E2E8F0; white-space:pre; }

/* =========================================================
   WATCH BOX (chamada do YouTube no artigo)
   ========================================================= */
.tc-watch{ background:var(--surface-offset); border-radius:12px; padding:20px 22px; display:flex; align-items:center; gap:18px; margin:0 0 28px; flex-wrap:wrap; }
.tc-watch__icon{ width:46px; height:46px; border-radius:10px; background:#FEE2E2; display:flex; align-items:center; justify-content:center; flex:none; }
.tc-watch__text{ flex:1; min-width:180px; }
.tc-watch__text strong{ display:block; font-weight:600; font-size:15px; color:var(--text); }
.tc-watch__text span{ font-size:14px; color:var(--text-muted); }
.tc-watch--block{ flex-direction:column; align-items:flex-start; padding:24px; gap:14px; }

/* tags */
.tc-tags{ display:flex; gap:8px; flex-wrap:wrap; margin:36px 0 0; }
.tc-tags .wp-block-post-terms a,.tc-tag{ background:var(--gray-light); color:var(--text-muted); font-size:13px; font-weight:500; padding:5px 12px; border-radius:9999px; text-decoration:none; }

/* author bio */
.tc-author{ display:flex; gap:18px; align-items:flex-start; flex-wrap:wrap; }
.tc-author__avatar img,.tc-author img.avatar{ width:64px; height:64px; border-radius:50%; object-fit:cover; flex:none; }
.tc-author__eyebrow{ font-size:13px; color:var(--text-faint); font-weight:600; text-transform:uppercase; letter-spacing:0.05em; margin-bottom:4px; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.tc-sidebar{ position:sticky; top:84px; display:flex; flex-direction:column; gap:24px; }
.tc-sidebar__title{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-faint); margin-bottom:12px; }
.tc-toc{ display:flex; flex-direction:column; gap:2px; border-left:2px solid var(--border); }
.tc-toc a{ font-size:14px; color:var(--text-muted); padding:6px 0 6px 14px; margin-left:-2px; border-left:2px solid transparent; transition:color .15s,border-color .15s; }
.tc-toc a:hover,.tc-toc a.is-active{ color:var(--primary); border-left-color:var(--primary); }
.tc-divider{ height:1px; background:var(--border); }
.tc-recent a{ display:flex; gap:12px; align-items:flex-start; }
.tc-recent img{ width:60px; height:42px; border-radius:6px; object-fit:cover; flex:none; }
.tc-sidebar-card{ background:var(--surface-offset); border-radius:12px; padding:18px; }

/* =========================================================
   FOOTER (escuro)
   ========================================================= */
.tc-footer{ background:#0F172A; color:#94A3B8; margin-top:auto; }
.tc-footer__inner{ max-width:1200px; margin-inline:auto; padding:56px 24px 28px; }
.tc-footer__cols{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr 1fr; gap:40px; }
.tc-footer a{ color:#94A3B8; }
.tc-footer a:hover{ color:#fff; }
.tc-footer__brand .accent{ color:#38BDF8; }
.tc-footer__heading{ color:#fff; font-weight:600; font-size:14px; margin-bottom:14px; }
.tc-footer__col{ display:flex; flex-direction:column; gap:10px; font-size:14px; }
.tc-footer__social{ display:flex; gap:14px; }
.tc-footer__social a{ color:#64748B; }
.tc-footer__social a:hover{ color:#fff; }
.tc-footer__bottom{ border-top:1px solid rgba(255,255,255,0.08); margin-top:40px; padding-top:24px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:13px; color:#64748B; }

/* ---------- Banner de cookies (LGPD / AdSense) ---------- */
.tc-cookie{ position:fixed; left:16px; right:16px; bottom:16px; z-index:300; background:#0F172A; color:#E2E8F0; border:1px solid rgba(255,255,255,0.10); border-radius:14px; box-shadow:0 8px 30px rgba(15,23,42,0.35); }
.tc-cookie[hidden]{ display:none; }
.tc-cookie__inner{ max-width:1000px; margin-inline:auto; padding:18px 22px; display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.tc-cookie__text{ margin:0; flex:1 1 320px; font-size:14px; line-height:1.55; color:#CBD5E1; }
.tc-cookie__text a{ color:#38BDF8; text-decoration:underline; }
.tc-cookie__actions{ display:flex; gap:10px; flex-shrink:0; }
.tc-cookie__btn{ font-size:14px; font-weight:600; padding:9px 18px; border-radius:9px; cursor:pointer; border:1px solid transparent; transition:background .15s, border-color .15s, color .15s; }
.tc-cookie__btn--ghost{ background:transparent; color:#CBD5E1; border-color:rgba(255,255,255,0.18); }
.tc-cookie__btn--ghost:hover{ color:#fff; border-color:rgba(255,255,255,0.4); }
.tc-cookie__btn--solid{ background:var(--primary); color:#fff; }
.tc-cookie__btn--solid:hover{ background:var(--primary-hover); }
@media (max-width:560px){ .tc-cookie__actions{ width:100%; } .tc-cookie__btn{ flex:1; } }

/* =========================================================
   CATEGORY / ARCHIVE
   ========================================================= */
.tc-archive-head{ max-width:1200px; margin-inline:auto; padding:40px 24px 0; }
.tc-archive-head h1{ font-size:34px; font-weight:800; letter-spacing:-0.02em; margin:0; }
.tc-archive-head p{ font-size:17px; color:var(--text-muted); line-height:1.6; margin:10px 0 0; max-width:60ch; }

/* paginação */
.wp-block-query-pagination{ justify-content:center; gap:8px; margin-top:44px; }
.wp-block-query-pagination .page-numbers{ display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text-muted); font-weight:600; }
.wp-block-query-pagination .page-numbers.current{ background:var(--primary); color:#fff; border-color:var(--primary); }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width:980px){
	.tc-article{ grid-template-columns:1fr; }
	.tc-sidebar{ position:static; }
	.tc-hero__inner,.tc-ytbanner__inner{ grid-template-columns:1fr; gap:32px; }
	.tc-grid3{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:760px){
	.tc-nav{ display:none; }
	.tc-burger{ display:inline-flex; }
	.tc-grid3,.tc-grid3sm{ grid-template-columns:1fr; }
	.tc-footer__cols{ grid-template-columns:1fr 1fr; gap:28px; }
	.tc-hero h1,.tc-hero .wp-block-post-title{ font-size:32px; }
	.tc-mobile-nav{ display:flex; flex-direction:column; gap:2px; padding:8px 16px 16px; border-top:1px solid var(--border); }
}
.tc-mobile-nav{ display:none; }
.tc-mobile-nav.is-open{ display:flex; }
