/*
Theme Name: Fireman Ambiental
Theme URI: https://www.firemanambiental.com.br
Author: Fireman Ambiental
Description: Tema leve e moderno do site Fireman Ambiental. Feito para funcionar com o plugin "Fireman Ambiental – Site": cabeçalho com submenus das aplicações, páginas em largura total, notícias em cartões, rodapé do design e animações discretas.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: fireman-ambiental-tema
*/

:root {
	--fa-ink: #12302F;
	--fa-accent: #C2410C;
	--fa-accent-dark: #9A3412;
	--fa-blue: #0757A0;
	--fa-hero: #EEF5F2;
	--fa-soft: #F3F8F6;
	--fa-chip: #E5EFEB;
	--fa-line: #D6E4DF;
	--fa-line-2: #9DBDB4;
	--fa-muted: #4C6B65;
	--fa-text-2: #3E5C56;
	--fa-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
	--fa-mono: 'IBM Plex Mono', ui-monospace, monospace;
	--fat-header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--fat-header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--fa-ink); font: 400 16px/1.6 var(--fa-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, video, svg { max-width: 100%; height: auto; }
a { color: var(--fa-accent); }
a:hover { color: var(--fa-accent-dark); }
h1, h2, h3, h4 { color: var(--fa-ink); line-height: 1.15; }
:focus-visible { outline: 3px solid rgba(194, 65, 12, .55); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(194, 65, 12, .18); }
.fat-lock { overflow: hidden; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.fat-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--fa-ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.fat-skip:focus { top: 12px; color: #fff; }

.fat-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.fat-wrap--narrow { max-width: 820px; }
.fat-full > *:first-child { margin-top: 0; }
.fat-main { display: block; min-height: 50vh; }

/* ---------- Cabeçalho ---------- */
.fat-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .86);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--fa-line);
	transition: box-shadow .25s ease, background .25s ease;
}
.admin-bar .fat-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fat-header { top: 0; } }
.fat-header.is-scrolled { background: rgba(255, 255, 255, .96); box-shadow: 0 8px 24px rgba(18, 48, 47, .08); }
.fat-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--fat-header-h); transition: min-height .25s ease; }
.fat-header.is-scrolled .fat-header__in { min-height: 64px; }
.fat-brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.fat-brand__img { height: 52px; width: auto; display: block; transition: height .25s ease; }
.fat-header.is-scrolled .fat-brand__img { height: 44px; }
.fat-brand--text { font-weight: 800; font-size: 20px; color: var(--fa-ink); }

.fat-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.fat-menu li { position: relative; list-style: none; }
.fat-menu > li > a {
	position: relative; display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 12px; color: var(--fa-ink); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 8px;
}
.fat-menu > li > a::before {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
	background: var(--fa-accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.fat-menu > li:not(.fa-menu-cta) > a:hover::before,
.fat-menu > li.current-menu-item:not(.fa-menu-cta) > a::before { transform: scaleX(1); }
.fat-menu > li > a:hover, .fat-menu > li.current-menu-item > a { color: var(--fa-accent); }
.fat-menu > li.menu-item-has-children > a::after {
	content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; opacity: .7;
}
.fat-menu > li.menu-item-has-children:hover > a::after,
.fat-menu > li.menu-item-has-children:focus-within > a::after { transform: rotate(225deg) translate(-2px, -2px); }

.fat-menu .sub-menu {
	position: absolute; top: calc(100% + 8px); left: -8px; min-width: 330px; margin: 0; padding: 8px; list-style: none;
	background: var(--fa-soft); border: 1px solid var(--fa-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(18, 48, 47, .14);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.fat-menu .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.fat-menu li:hover > .sub-menu, .fat-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.fat-menu .sub-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--fa-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.fat-menu .sub-menu a:hover { background: var(--fa-chip); color: var(--fa-ink); }

.fat-menu .fa-menu-cta { margin-left: 8px; }
.fat-menu .fa-menu-cta > a {
	background: var(--fa-accent); color: #fff; font-weight: 600; padding: 11px 18px;
	box-shadow: 0 6px 16px rgba(194, 65, 12, .25); transition: background .2s ease, transform .2s ease;
}
.fat-menu .fa-menu-cta > a:hover { background: var(--fa-accent-dark); color: #fff; transform: translateY(-1px); }

.fat-burger { display: none; width: 46px; height: 46px; border: 1px solid var(--fa-line); border-radius: 12px; background: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.fat-burger span { display: block; width: 20px; height: 2px; background: var(--fa-ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.fat-header.is-open .fat-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fat-header.is-open .fat-burger span:nth-child(2) { opacity: 0; }
.fat-header.is-open .fat-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
	.fat-burger { display: inline-flex; }
	.fat-nav {
		position: fixed; left: 0; right: 0; top: var(--fat-nav-top, var(--fat-header-h)); bottom: 0;
		background: #fff; border-top: 1px solid var(--fa-line); padding: 16px 20px 40px; overflow-y: auto;
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .fat-nav { --fat-nav-top: calc(var(--fat-header-h) + 46px); }
	.fat-header.is-open .fat-nav { opacity: 1; visibility: visible; transform: none; }
	.fat-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.fat-menu > li > a { padding: 14px 6px; font-size: 18px; border-bottom: 1px solid var(--fa-soft); border-radius: 0; }
	.fat-menu > li > a::before, .fat-menu > li.menu-item-has-children > a::after { display: none; }
	.fat-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; min-width: 0; margin: 6px 0 10px; }
	.fat-menu .fa-menu-cta { margin: 18px 0 0; }
	.fat-menu .fa-menu-cta > a { justify-content: center; border-radius: 10px; border: 0; }
}

/* ---------- Topo das páginas internas ---------- */
.fat-hero {
	background-color: var(--fa-hero);
	background-image:
		radial-gradient(900px 420px at 85% 0%, rgba(194, 65, 12, .07), transparent 60%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Cg fill='none' stroke='%2312302F' stroke-opacity='.06' stroke-width='1.2'%3E%3Cpath d='M0 60 C100 20 200 100 300 60 S500 20 600 60'/%3E%3Cpath d='M0 110 C100 70 200 150 300 110 S500 70 600 110'/%3E%3Cpath d='M0 160 C100 120 200 200 300 160 S500 120 600 160'/%3E%3Cpath d='M0 210 C100 170 200 250 300 210 S500 170 600 210'/%3E%3Cpath d='M0 260 C100 220 200 300 300 260 S500 220 600 260'/%3E%3C/g%3E%3C/svg%3E");
	background-size: auto, 600px 300px;
	border-bottom: 1px solid var(--fa-line);
	padding: 64px 0 52px;
}
.fat-hero .fat-wrap { display: flex; flex-direction: column; gap: 12px; }
.fat-hero__title { margin: 0; font-weight: 800; font-size: clamp(34px, 4.8vw, 54px); line-height: 1.05; letter-spacing: -.025em; }
.fat-hero__lead { margin: 0; max-width: 720px; font-size: 18px; color: var(--fa-text-2); }
.fat-kicker { font-family: var(--fa-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--fa-blue); }
.fat-back { color: var(--fa-muted); font-size: 14px; text-decoration: none; align-self: flex-start; }
.fat-back:hover { color: var(--fa-accent); }
.fat-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 0; }

/* ---------- Texto corrido (Sobre, Termos, posts) ---------- */
.fat-prose { padding-top: 48px; padding-bottom: 88px; font-size: 18px; color: var(--fa-text-2); }
.fat-prose > * { margin-top: 0; margin-bottom: 1.1em; }
.fat-prose h2 { font-size: 28px; font-weight: 800; color: var(--fa-ink); margin-top: 1.8em; margin-bottom: .5em; letter-spacing: -.01em; }
.fat-prose h3 { font-size: 21px; font-weight: 700; color: var(--fa-ink); margin-top: 1.5em; }
.fat-prose ul, .fat-prose ol { padding-left: 1.2em; }
.fat-prose li { margin: .35em 0; }
.fat-prose li::marker { color: var(--fa-accent); }
.fat-prose strong { color: var(--fa-ink); }
.fat-prose a { color: var(--fa-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fat-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--fa-accent); color: var(--fa-ink); font-size: 20px; }
.fat-prose img { border-radius: 12px; }
.fat-prose .fa-lead { font-size: 20px; color: var(--fa-ink); }
.fat-prose .fa-alert { font-size: 15px; }

/* ---------- Notícias ---------- */
.fat-list { padding-top: 40px; padding-bottom: 96px; }
.fat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.fat-filter a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--fa-line); color: var(--fa-ink); text-decoration: none; font-size: 14px; font-weight: 500; background: #fff; transition: border-color .2s, background .2s; }
.fat-filter a:hover { border-color: var(--fa-line-2); }
.fat-filter a.is-on { background: var(--fa-ink); border-color: var(--fa-ink); color: #fff; }
.fat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.fat-card { border: 1px solid var(--fa-line); border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.fat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(18, 48, 47, .12); border-color: var(--fa-line-2); }
.fat-card__img { display: block; aspect-ratio: 16 / 9; background: var(--fa-chip); overflow: hidden; }
.fat-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.fat-card:hover .fat-card__img img { transform: scale(1.05); }
.fat-card__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #12302F, #1F5A57 60%, #C2410C); opacity: .9; }
.fat-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.fat-card__body .fat-kicker { font-size: 11px; letter-spacing: .1em; }
.fat-card__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.fat-card__title a { color: var(--fa-ink); text-decoration: none; }
.fat-card__title a:hover { color: var(--fa-accent); }
.fat-card__body p { margin: 0; color: var(--fa-muted); font-size: 15px; }
.fat-more { margin-top: auto; padding-top: 4px; font-weight: 600; text-decoration: none; }
.fat-more span { display: inline-block; transition: transform .2s ease; }
.fat-more:hover span { transform: translateX(4px); }
.fat-empty { color: var(--fa-muted); padding: 40px 0; }
.fat-pagination { margin-top: 40px; }
.fat-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.fat-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--fa-line); border-radius: 10px; color: var(--fa-ink); text-decoration: none; }
.fat-pagination .page-numbers.current { background: var(--fa-ink); color: #fff; border-color: var(--fa-ink); }

.fat-hero--post { padding-top: 48px; }
.fat-article__img { margin: 32px auto 0; }
.fat-article__img img { width: 100%; border-radius: 16px; display: block; }
.fat-postnav { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 88px; border-top: 1px solid var(--fa-line); padding-top: 24px; }
.fat-postnav a { color: var(--fa-ink); text-decoration: none; font-weight: 600; }
.fat-postnav a:hover { color: var(--fa-accent); }

/* ---------- Outros ---------- */
.fat-hero--404 { padding: 120px 0; }
.fat-footer-simple { background: var(--fa-ink); color: #C9DED8; padding: 32px 0; font-size: 14px; }
.fat-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 999px;
	border: 1px solid var(--fa-line); background: #fff; color: var(--fa-ink); font-size: 18px; cursor: pointer;
	box-shadow: 0 10px 24px rgba(18, 48, 47, .14); opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.fat-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.fat-top:hover { border-color: var(--fa-accent); color: var(--fa-accent); }

@media (max-width: 720px) {
	:root { --fat-header-h: 66px; }
	.fat-brand__img { height: 42px; }
	.fat-hero { padding: 44px 0 36px; }
	.fat-prose { font-size: 17px; }
}
