/* ==========================================================================
   TESW Gov Theme – Design System
   1. Tokens  2. Base  3. Layout  4. Botões/Badges/WhatsApp
   5. Seções  6. Cards  7. Blog  8. Formulários  9. Utilitários
   ========================================================================== */

/* 1. TOKENS ------------------------------------------------------------- */
:root {
	/* Marca */
	--tesw-yellow: #E3E61D;
	--tesw-yellow-600: #C9CC12;
	--tesw-yellow-100: #F7F8C2;
	--tesw-navy: #000000;
	--tesw-graphite: #111827;

	/* Neutros */
	--tesw-ink: #111827;
	--tesw-text: #374151;
	--tesw-muted: #6B7280;
	--tesw-line: #E5E7EB;
	--tesw-gray: #F3F4F6;
	--tesw-white: #FFFFFF;

	/* Tema escuro (hero/footer) */
	--tesw-dark-bg: #000000;
	--tesw-dark-card: #171717;
	--tesw-dark-line: rgba(255, 255, 255, .1);
	--tesw-dark-text: #B6C0D1;

	/* Semânticas */
	--tesw-blue: #2563EB;
	--tesw-green: #16A34A;
	--tesw-red: #DC2626;

	/* Tipografia */
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	/* Forma e sombra */
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
	--shadow: 0 8px 24px rgba(17, 24, 39, .08);
	--shadow-lg: 0 20px 48px rgba(17, 24, 39, .14);

	--container: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 72px;
}

/* 2. BASE --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs-base, 16px); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; font-family: var(--font); line-height: 1.65; color: var(--tesw-text);
	background: var(--tesw-white); -webkit-font-smoothing: antialiased;
}
html, body { max-width: 100%; overflow-x: clip; } /* "clip" evita a rolagem lateral sem quebrar o cabeçalho fixo (sticky) */
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--tesw-ink); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--tesw-yellow); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}
.skip-link {
	position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--tesw-yellow);
	color: var(--tesw-ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 8px; }
.icon { vertical-align: -.2em; flex: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Recursos do painel de acessibilidade (classes no <html>) */
html.is-gray { filter: grayscale(1); }
html.is-links a { text-decoration: underline !important; }
html.is-dyslexia body, html.is-dyslexia body * { font-family: "Comic Sans MS", "OpenDyslexic", Verdana, sans-serif !important; }
html.is-spacing body { letter-spacing: .05em; word-spacing: .14em; line-height: 1.9; }
html.is-contrast body { --tesw-text: #000; --tesw-muted: #1a1a1a; --tesw-line: #000; --tesw-gray: #fff; background: #fff; }
html.is-contrast .twb-site-header, html.is-contrast .twb-site-footer, html.is-contrast .section--dark, html.is-contrast .twb-sec.tesw-hero { background: #000 !important; }
html.is-contrast a { text-decoration: underline; }

/* 3. LAYOUT ------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(28px, 4vw, 56px); }
.section--gray { background: var(--tesw-gray); }
.section--dark { background: var(--tesw-dark-bg); color: var(--tesw-dark-text); }
.section--dark h2, .section--dark h3 { color: #fff; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 0; }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .layout-sidebar { grid-template-columns: 1fr; } }

/* 4. BOTÕES / BADGES / LINKS ------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: 10px; border: 2px solid transparent;
	font: 700 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer;
	transition: transform .15s, background .15s, box-shadow .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--yellow { background: var(--tesw-yellow); color: var(--tesw-ink); box-shadow: 0 6px 18px rgba(255, 199, 0, .35); }
.btn--yellow:hover { background: var(--tesw-yellow-600); }
.btn--dark { background: var(--tesw-navy); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn--ghost:hover { border-color: var(--tesw-yellow); color: var(--tesw-yellow); }
.btn--lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 12px; }
.btn--block { display: flex; width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--tesw-navy); text-decoration: none; }
.link-arrow:hover { color: #000; gap: 10px; }
.link-arrow:hover .icon { color: var(--tesw-yellow-600); }
.badge, .chip {
	display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
	font-size: .78rem; font-weight: 700; text-decoration: none; background: var(--tesw-gray); color: var(--tesw-text);
	border: 1px solid transparent;
}
.badge--yellow { background: var(--tesw-yellow-100); color: #7A5A00; }
.badge { background: var(--tesw-yellow-100); color: #7A5A00; }
.chip { font-size: .86rem; padding: 7px 16px; background: #fff; border-color: var(--tesw-line); font-weight: 600; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--tesw-yellow); }
.chip.is-active { background: var(--tesw-yellow); border-color: var(--tesw-yellow); color: var(--tesw-ink); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* Botão flutuante de WhatsApp */
.fab-whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 90; display: inline-flex; gap: 8px; align-items: center;
	background: var(--tesw-yellow); color: var(--tesw-ink); padding: 14px 22px; border-radius: 999px;
	font-weight: 800; text-decoration: none; box-shadow: var(--shadow-lg);
}
.fab-whatsapp:hover { background: var(--tesw-yellow-600); }

/* 5. SEÇÕES E CABEÇALHO DE PÁGINA ------------------------------------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; font-weight: 700; color: var(--tesw-muted); margin-bottom: 6px; }
.eyebrow--yellow { color: var(--tesw-yellow); }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin: 0; }
.title-bar { display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: 14px; background: linear-gradient(90deg, var(--tesw-yellow), #E3E61D, var(--tesw-blue)); }
.lead { font-size: 1.1rem; max-width: 560px; }

.page-hero { background: var(--tesw-dark-bg); background-image: radial-gradient(600px 260px at 10% 0, rgba(227, 230, 29, .18), transparent 70%), radial-gradient(600px 260px at 100% 100%, rgba(227, 230, 29, .12), transparent 70%); color: var(--tesw-dark-text); padding-block: clamp(36px, 5vw, 64px); }
.page-hero__title { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin-bottom: 10px; }
.page-hero__text { max-width: 640px; margin: 0; font-size: 1.08rem; }
.page-hero .post-meta { color: var(--tesw-dark-text); }
.page-hero__badges { margin-bottom: 12px; }
.breadcrumb { font-size: .85rem; margin-bottom: 18px; color: var(--tesw-dark-text); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--tesw-yellow); }
.site-main > .container > .breadcrumb, .woo-main .breadcrumb { color: var(--tesw-muted); }

/* 6. CARDS -------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--tesw-line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); border-color: #D9DEE7; }
.card__title { font-size: 1.12rem; font-weight: 700; margin: 14px 0 8px; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: #000; text-decoration: underline; text-decoration-color: var(--tesw-yellow); text-decoration-thickness: 3px; }
.card__text { color: var(--tesw-muted); font-size: .96rem; }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.card__price { font-weight: 800; color: var(--tesw-ink); }
.card--solution { display: flex; flex-direction: column; }
.card--solution:hover { transform: translateY(-3px); border-color: var(--tesw-yellow); }
.icon-box { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--tesw-yellow-100); color: #8A6400; }
.icon-box--lg { width: 64px; height: 64px; margin-bottom: 16px; background: var(--tesw-yellow); color: var(--tesw-ink); }
.card--post { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--post:hover { transform: translateY(-3px); }
.card__media { display: block; aspect-ratio: 16 / 10; background: var(--tesw-gray); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card--post:hover .card__media img { transform: scale(1.04); }
.card__placeholder { display: grid; place-items: center; height: 100%; color: var(--tesw-muted); background: linear-gradient(135deg, var(--tesw-yellow-100), var(--tesw-gray)); }
.card__body { padding: 22px; }
.card__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.card__date { font-size: .8rem; color: var(--tesw-muted); }
.card--price { display: flex; flex-direction: column; gap: 4px; }
.card--price:hover { border-color: var(--tesw-yellow); transform: translateY(-3px); }
.price-tag { font-size: 1.7rem; font-weight: 800; color: var(--tesw-ink); margin: 8px 0 14px; }
.price-tag del { font-size: 1rem; color: var(--tesw-muted); font-weight: 500; }
.price-tag ins { text-decoration: none; }
.card--quote { margin: 0; border-left: 5px solid var(--tesw-yellow); }
.card--quote blockquote { margin: 0 0 20px; font-size: 1rem; color: var(--tesw-ink); }
.card--quote figcaption { display: flex; align-items: center; gap: 12px; }
.card--quote small { display: block; color: var(--tesw-muted); }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.benefits .card { height: 100%; }
.empty { color: var(--tesw-muted); text-align: center; padding: 24px; }

/* 7. BLOG / ARTIGO ------------------------------------------------------ */
.filters { display: grid; gap: 16px; margin-bottom: 28px; }
.filters__search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--tesw-line); border-radius: 12px; padding: 0 14px; background: #fff; }
.filters__search input { border: 0; padding: 13px 0; flex: 1; font: inherit; background: transparent; }
.filters__search input:focus { outline: none; }
.filters__search:focus-within { border-color: var(--tesw-yellow); box-shadow: 0 0 0 3px rgba(255, 199, 0, .3); }
.filters__chips { margin-bottom: 28px; }
.pagination { margin-top: 40px; }
.pagination ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 0; margin: 0; }
.pagination a, .pagination span { display: inline-block; padding: 9px 15px; border: 1px solid var(--tesw-line); border-radius: 10px; text-decoration: none; font-weight: 600; background: #fff; }
.pagination .current { background: var(--tesw-yellow); border-color: var(--tesw-yellow); color: var(--tesw-ink); }
.pagination a:hover { border-color: var(--tesw-yellow); }

.sidebar { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 960px) { .sidebar { position: static; } }
.widget-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 3px solid var(--tesw-yellow); display: inline-block; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mini-list a { text-decoration: none; font-weight: 600; color: var(--tesw-ink); }
.mini-list a:hover { text-decoration: underline; text-decoration-color: var(--tesw-yellow); }
.mini-list time { display: block; font-size: .78rem; color: var(--tesw-muted); font-weight: 400; }
.widget--cta { background: var(--tesw-navy); border: 0; color: #C9D3E3; }
.widget--cta .widget-title { color: #fff; }
.widget--cta .card__price { color: var(--tesw-yellow); font-size: 1.3rem; }
.widget--cta .btn + .btn { margin-top: 10px; }

.post-meta { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: .88rem; color: var(--tesw-muted); }
.post-meta li + li::before { content: "•"; margin-right: 18px; opacity: .6; }
.post-meta a { text-decoration: none; }

.article__cover { margin: 0 0 32px; border-radius: var(--radius-lg); overflow: hidden; }
.article__cover img { width: 100%; display: block; }
.entry-content { font-size: 1.08rem; line-height: 1.8; color: var(--tesw-text); }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; }
.entry-content a { color: #7A5A00; font-weight: 600; text-decoration-color: var(--tesw-yellow); text-decoration-thickness: 2px; }
.entry-content blockquote { margin-inline: 0; padding: 14px 22px; border-left: 5px solid var(--tesw-yellow); background: var(--tesw-gray); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--tesw-line); text-align: left; }
.entry-content th { background: var(--tesw-gray); color: var(--tesw-ink); }
.alignwide { max-width: 100%; }
.has-tesw-yellow-background-color { background: var(--tesw-yellow); }
.has-tesw-yellow-color { color: var(--tesw-yellow); }
.has-tesw-navy-background-color { background: var(--tesw-navy); }
.has-tesw-graphite-background-color { background: var(--tesw-graphite); }
.has-tesw-gray-background-color { background: var(--tesw-gray); }
.article__tags { margin-top: 28px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0; padding-block: 18px; border-block: 1px solid var(--tesw-line); }
.author-box { display: flex; gap: 18px; align-items: center; margin-block: 28px; }
.author-box img { border-radius: 50%; }
.author-box__name { font-weight: 800; color: var(--tesw-ink); margin: 0 0 4px; }
.author-box p:last-child { margin: 0; color: var(--tesw-muted); }
.related { margin-top: 64px; }

.faq { display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--tesw-line); border-radius: var(--radius); padding: 4px 20px; }
.faq__item[open] { border-color: var(--tesw-yellow); }
.faq__item summary { cursor: pointer; font-weight: 700; color: var(--tesw-ink); padding: 14px 0; }
.comments { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.comment-list .children { list-style: none; padding-left: 28px; margin-top: 16px; display: grid; gap: 16px; }
.comment-body { background: var(--tesw-gray); border-radius: var(--radius); padding: 18px; }
.not-found { text-align: center; }
.not-found__code { font-size: 6rem; font-weight: 900; color: var(--tesw-yellow); line-height: 1; margin: 0; }

/* 8. FORMULÁRIOS -------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], select, textarea {
	width: 100%; padding: 12px 14px; border: 1px solid #CBD2DC; border-radius: 10px; font: inherit; background: #fff; color: var(--tesw-ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tesw-yellow); box-shadow: 0 0 0 3px rgba(255, 199, 0, .35); }
label { font-weight: 600; color: var(--tesw-ink); }
.search-form { display: flex; gap: 10px; margin-block: 20px; }
.search-form input { flex: 1; }

/* 9. UTILITÁRIOS ------------------------------------------------------- */
.text-center { text-align: center; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--tesw-muted); }
@media print { .twb-site-header, .twb-site-footer, .fab-whatsapp, .sidebar { display: none !important; } }
