/* SAAM Blog — extensão visual do site institucional */
:root {
  --blog-ink: #07142d;
  --blog-blue: #2f67d8;
  --blog-blue-soft: #eaf1ff;
  --blog-gold: #d9ad43;
  --blog-surface: #f5f7fb;
  --blog-line: #dfe6f1;
}

body.blog-page { background: #fff; color: var(--text); }
.blog-page #navbar { background: rgba(5, 13, 32, .97); }
.blog-page main { overflow: clip; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10000; padding: 12px 18px; border-radius: 8px; background: #fff; color: var(--blog-ink); font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.skip-link:focus { top: 16px; }

.blog-hero {
  position: relative;
  padding: 176px 24px 94px;
  background:
    radial-gradient(circle at 80% 20%, rgba(47,103,216,.28), transparent 32%),
    radial-gradient(circle at 15% 105%, rgba(217,173,67,.13), transparent 34%),
    linear-gradient(135deg, #050d20 0%, #0b1c3f 58%, #102b5b 100%);
  color: #fff;
}
.blog-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.blog-kicker { display: inline-flex; align-items: center; gap: 9px; color: #7fa9ff; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.blog-kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 99px; }
.blog-hero h1 { max-width: 820px; margin: 22px 0 22px; font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.055em; color: #fff; }
.blog-hero h1 em { color: #72a1ff; font-style: normal; }
.blog-hero p { max-width: 690px; font-size: clamp(1rem, 1.5vw, 1.16rem); color: rgba(255,255,255,.64); line-height: 1.75; }
.blog-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.blog-shell { max-width: 1120px; margin: 0 auto; padding: 78px 24px; }
.blog-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.blog-section-head h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); color: var(--blog-ink); letter-spacing: -.04em; }
.blog-section-head p { max-width: 520px; color: var(--text-muted); line-height: 1.7; }

.blog-categories { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 34px; }
.blog-chip { display: inline-flex; min-height: 38px; align-items: center; padding: 8px 14px; border: 1px solid var(--blog-line); border-radius: 999px; background: #fff; color: #496078; font-size: .78rem; font-weight: 700; }
.blog-chip.active { background: var(--blog-ink); border-color: var(--blog-ink); color: #fff; }
.blog-chip:not(.active):hover, .blog-chip:not(.active):focus-visible { border-color: #9bb5ec; color: #235ec8; background: #f6f9ff; }

.featured-post { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 430px; border: 1px solid var(--blog-line); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 22px 70px rgba(6,25,60,.09); }
.featured-visual, .post-visual { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.featured-visual { min-height: 430px; background: linear-gradient(145deg, #06132c, #143872); }
.featured-visual::before, .post-visual::before { content:""; position:absolute; width:260px; height:260px; border:1px solid rgba(255,255,255,.13); border-radius:50%; transform:translate(38%,-28%); }
.featured-visual::after, .post-visual::after { content:""; position:absolute; width:160px; height:160px; border:1px solid rgba(255,255,255,.08); border-radius:50%; transform:translate(-70%,65%); }
.visual-mark { position: relative; z-index: 1; width: 148px; height: 148px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 32px; background: rgba(255,255,255,.08); box-shadow: inset 0 1px rgba(255,255,255,.11), 0 24px 60px rgba(0,0,0,.26); backdrop-filter: blur(12px); }
.visual-mark svg { width: 66px; height: 66px; stroke: #82adff; fill: none; stroke-width: 1.35; }
.featured-content { display: flex; flex-direction: column; justify-content: center; padding: 54px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #667991; font-size: .74rem; font-weight: 650; }
.post-category { color: var(--blog-blue); text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #9eacbc; }
.featured-content h2 { margin: 18px 0 16px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.045em; color: var(--blog-ink); }
.featured-content p { color: #5f7186; line-height: 1.75; }
.post-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; color: var(--blog-blue); font-weight: 800; font-size: .9rem; }
.post-link span { transition: transform .2s ease; }
.post-link:hover span { transform: translateX(4px); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 28px; }
.post-card { min-width: 0; border: 1px solid var(--blog-line); border-radius: 18px; overflow: hidden; background: #fff; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.post-card:hover { transform: translateY(-5px); border-color: #bfd0f5; box-shadow: 0 18px 45px rgba(7,20,45,.1); }
.post-visual { height: 190px; background: linear-gradient(145deg,#0a1b3b,#194a93); }
.post-visual.audit { background: linear-gradient(145deg,#071c2d,#0d6170); }
.post-visual.erp { background: linear-gradient(145deg,#171332,#493786); }
.post-visual .visual-mark { width: 92px; height: 92px; border-radius: 22px; }
.post-visual .visual-mark svg { width: 42px; height: 42px; }
.post-card-body { padding: 25px; }
.post-card h3 { margin: 14px 0 12px; color: var(--blog-ink); font-size: 1.25rem; line-height: 1.28; letter-spacing: -.025em; }
.post-card p { color: #65778b; font-size: .9rem; line-height: 1.7; }

/* Archive do acervo original */
.blog-tools { margin-bottom: 30px; }
.blog-search { position: relative; display: flex; align-items: center; width: min(100%, 560px); margin-bottom: 20px; }
.blog-search input { width: 100%; min-height: 52px; padding: 0 48px 0 16px; border: 1px solid var(--blog-line); border-radius: 12px; background: #fff; color: var(--blog-ink); font: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.blog-search input:focus { border-color: #7fa9ff; box-shadow: 0 0 0 4px rgba(47,103,216,.1); }
.blog-search > span[aria-hidden] { position: absolute; right: 17px; color: #6c7f95; font-size: 1.3rem; pointer-events: none; }
.blog-tools .blog-categories { margin-bottom: 0; }
.blog-tools button.blog-chip { cursor: pointer; font: inherit; }
.archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-card[hidden] { display: none !important; }
.archive-card-image { display: block; height: 190px; overflow: hidden; background: linear-gradient(145deg,#0a1b3b,#194a93); }
.archive-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.archive-card:hover .archive-card-image img { transform: scale(1.035); }
.archive-card h2 { margin: 14px 0 12px; color: var(--blog-ink); font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.archive-card h2 a { color: inherit; }
.archive-card .post-card-body { display: flex; flex-direction: column; min-height: 306px; }
.archive-card .post-link { margin-top: auto; padding-top: 24px; }
.blog-empty { margin: 42px auto 0; padding: 28px; border: 1px dashed #b8c5d5; border-radius: 14px; color: #65778b; text-align: center; }
.blog-load-wrap { margin-top: 38px; text-align: center; }
.blog-load-wrap .btn { cursor: pointer; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.blog-cta { margin-top: 76px; padding: 58px; border-radius: 24px; background: linear-gradient(135deg,#07142d,#123a78); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.blog-cta h2 { max-width: 620px; color: #fff; font-size: clamp(1.8rem,4vw,2.8rem); line-height: 1.08; }
.blog-cta p { margin-top: 12px; max-width: 620px; color: rgba(255,255,255,.58); line-height: 1.65; }
.blog-cta .btn { flex-shrink: 0; }
.article-content .blog-cta h2 { margin: 0; color: #fff; }
.article-content .blog-cta p { color: rgba(255,255,255,.72); }

/* Article */
.article-hero { padding: 156px 24px 74px; background: linear-gradient(135deg,#050d20,#102b59); color:#fff; }
.article-hero-inner { max-width: 920px; margin: 0 auto; }
.breadcrumbs { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin-bottom:30px; color:rgba(255,255,255,.48); font-size:.76rem; }
.breadcrumbs a:hover { color:#fff; }
.article-hero h1 { margin:18px 0 20px; max-width:900px; color:#fff; font-size:clamp(2.25rem,6vw,4.25rem); line-height:1.04; letter-spacing:-.052em; }
.article-deck { max-width:760px; color:rgba(255,255,255,.67); font-size:clamp(1rem,2vw,1.2rem); line-height:1.72; }
.article-meta { display:flex; flex-wrap:wrap; gap:12px 18px; margin-top:30px; color:rgba(255,255,255,.48); font-size:.78rem; }
.article-layout { display:grid; grid-template-columns:minmax(0,740px) 250px; gap:64px; max-width:1080px; margin:0 auto; padding:74px 24px 92px; align-items:start; }
.article-content { min-width:0; font-size:1.04rem; color:#354a62; line-height:1.82; }
.article-layout-simple { grid-template-columns:minmax(0,820px); justify-content:center; }
.article-featured { margin:0 0 38px; border-radius:18px; overflow:hidden; background:#eef2f8; box-shadow:0 16px 44px rgba(7,20,45,.1); }
.article-featured img { display:block; width:100%; max-height:520px; object-fit:cover; }
.article-content img { max-width:100%; height:auto; border-radius:12px; }
.article-inline-media { margin:40px 0; }
.article-inline-media img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:16px; box-shadow:0 14px 34px rgba(7,20,45,.1); }
.article-inline-media figcaption { margin-top:10px; color:#718297; font-size:.78rem; line-height:1.55; }
.article-insight-card { --insight:#2f67d8; --insight-soft:#edf4ff; display:grid; grid-template-columns:52px minmax(0,1fr); gap:18px; align-items:start; margin:36px 0; padding:24px 26px; border:1px solid #dbe6f3; border-left:4px solid var(--insight); border-radius:4px 16px 16px 4px; background:linear-gradient(135deg,#fff,var(--insight-soft)); box-shadow:0 11px 30px rgba(7,20,45,.06); }
.article-insight-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:var(--insight); color:#fff; box-shadow:0 8px 20px color-mix(in srgb,var(--insight) 26%,transparent); }
.article-insight-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.article-insight-label { display:block; margin:1px 0 5px; color:var(--insight); font-size:.67rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.article-insight-card p { margin:0 !important; color:#2d435c; font-size:.98rem; line-height:1.72; }
.article-insight-card strong { color:#10284b; }
.article-insight-card.insight-audit { --insight:#17775b; --insight-soft:#edf9f5; }
.article-insight-card.insight-fiscal { --insight:#a8740f; --insight-soft:#fff8e8; }
.article-insight-card.insight-logistics { --insight:#30628b; --insight-soft:#edf6fc; }
.article-insight-card.insight-business { --insight:#805b9d; --insight-soft:#f8f1fc; }
.article-insight-card.insight-reform { --insight:#b17908; --insight-soft:#fff7e3; }
.article-content table { display:block; width:100%; max-width:100%; overflow-x:auto; border-collapse:collapse; }
.article-content th, .article-content td { padding:10px 12px; border:1px solid var(--blog-line); }
.article-content blockquote { margin:28px 0; padding:22px 26px; border-left:4px solid var(--blog-blue); background:var(--blog-blue-soft); border-radius:0 12px 12px 0; }
.article-content h2 { margin:52px 0 18px; color:var(--blog-ink); font-size:clamp(1.65rem,3vw,2.25rem); line-height:1.17; letter-spacing:-.035em; scroll-margin-top:110px; }
.article-content h3 { margin:34px 0 12px; color:var(--blog-ink); font-size:1.25rem; }
.article-content p + p { margin-top:18px; }
.article-content ul, .article-content ol { margin:18px 0 24px 22px; }
.article-content li { margin:10px 0; padding-left:5px; }
.article-visual-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:26px 0 34px !important; padding:0 !important; list-style:none !important; counter-reset:article-step; }
.article-visual-list > li { position:relative; min-height:66px; margin:0 !important; padding:16px 17px 16px 51px !important; border:1px solid #dce6f3; border-radius:14px; background:linear-gradient(145deg,#fff,#f8fbff); color:#314861; line-height:1.55; box-shadow:0 7px 22px rgba(8,29,62,.045); }
.article-visual-list > li::before { position:absolute; top:16px; left:16px; display:grid; place-items:center; width:24px; height:24px; border-radius:8px; background:#eaf2ff; color:#2762c8; font-size:.76rem; font-weight:800; line-height:1; }
.article-visual-list.is-checklist > li::before { content:'✓'; }
.article-visual-list.is-steps > li { counter-increment:article-step; }
.article-visual-list.is-steps > li::before { content:counter(article-step); background:#102d60; color:#fff; }
.article-visual-list > li:hover { border-color:#b9d0ef; transform:translateY(-1px); box-shadow:0 10px 25px rgba(8,29,62,.075); }
.article-visual-list.cards-count-3 > li:last-child,
.article-visual-list.cards-count-5 > li:last-child,
.article-visual-list.cards-count-7 > li:last-child { grid-column:1/-1; width:calc(50% - 6px); justify-self:center; }
.article-content strong { color:#0b1c38; }
.article-lead { font-size:1.2rem; color:#24405f; line-height:1.72; }
.article-callout { position:relative; margin:34px 0; padding:24px 26px 24px 70px; border:1px solid #cfe0f8; border-left:4px solid var(--blog-blue); border-radius:0 14px 14px 0; background:var(--blog-blue-soft); }
.article-callout::before { content:'i'; position:absolute; top:24px; left:24px; display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:#235ec8; color:#fff; font:800 .88rem/1 Inter,sans-serif; }
.article-callout strong { display:block; margin-bottom:6px; color:#174baf; }
.article-note { position:relative; margin:36px 0; padding:25px 25px 25px 68px; border:1px solid #e8d7a8; border-radius:14px; background:#fffaf0; color:#5d4a21; }
.article-note::before { content:'!'; position:absolute; top:24px; left:23px; display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:#d7a62a; color:#17213a; font:800 .9rem/1 Inter,sans-serif; }
.article-content a:not(.btn) { color:#235ec8; text-decoration:underline; text-underline-offset:3px; }
.article-aside { position:sticky; top:112px; border:1px solid var(--blog-line); border-radius:16px; padding:22px; background:#fff; box-shadow:0 12px 35px rgba(7,20,45,.06); }
.article-aside-title { margin-bottom:14px; color:#8190a2; font-size:.66rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.article-toc { list-style:none; }
.article-toc li + li { margin-top:10px; }
.article-toc a { color:#52677f; font-size:.82rem; line-height:1.4; }
.article-toc a:hover { color:var(--blog-blue); }
.article-share { margin-top:22px; padding-top:20px; border-top:1px solid var(--blog-line); }
.article-share .btn { width:100%; }
.article-end { margin-top:54px; padding-top:34px; border-top:1px solid var(--blog-line); }
.article-end h2 { margin-top:0; }
.faq-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-top:22px; }
.faq-list.cards-count-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.faq-list.cards-count-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.faq-list.cards-count-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.faq-list.cards-count-5 { grid-template-columns:repeat(6,minmax(0,1fr)); }
.faq-list.cards-count-5 > .faq-item { grid-column:span 2; }
.faq-list.cards-count-5 > .faq-item:nth-child(4) { grid-column:2 / span 2; }
.faq-list.cards-count-6 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.faq-item { padding:22px; border:1px solid var(--blog-line); border-radius:15px; background:linear-gradient(145deg,#fff,#f8fbff); box-shadow:0 9px 26px rgba(8,29,62,.05); }
.article-card-icon { display:grid; place-items:center; width:40px; height:40px; margin-bottom:17px; border-radius:12px; background:#eaf2ff; color:#2762c8; }
.article-card-icon svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.faq-item:nth-child(2n) .article-card-icon { background:#fff4d9; color:#9b7011; }
.faq-item:nth-child(3n) .article-card-icon { background:#e7f7ef; color:#168152; }
.faq-item h3 { margin:0 0 8px; font-size:1rem; line-height:1.35; }
.faq-item p { font-size:.92rem; line-height:1.65; }

@media (max-width: 900px) {
  .featured-post { grid-template-columns:1fr; }
  .featured-visual { min-height:300px; }
  .post-grid { grid-template-columns:1fr 1fr; }
  .archive-grid { grid-template-columns:1fr 1fr; }
  .article-layout { grid-template-columns:1fr; gap:38px; }
  .article-aside { position:static; order:-1; }
  .article-toc { display:grid; grid-template-columns:1fr 1fr; gap:10px 24px; }
  .article-toc li + li { margin-top:0; }
}

@media (max-width: 640px) {
  .blog-hero { padding:122px 18px 64px; }
  .blog-hero h1 { font-size:2.65rem; }
  .blog-shell { padding:58px 16px; }
  .blog-section-head { align-items:start; flex-direction:column; }
  .featured-post { border-radius:18px; }
  .featured-visual { min-height:240px; }
  .visual-mark { width:112px; height:112px; border-radius:26px; }
  .visual-mark svg { width:52px; height:52px; }
  .featured-content { padding:30px 24px 34px; }
  .post-grid { grid-template-columns:1fr; }
  .archive-grid { grid-template-columns:1fr; }
  .post-visual { height:175px; }
  .archive-card-image { height:180px; }
  .archive-card .post-card-body { min-height:0; }
  .blog-cta { margin-top:56px; padding:34px 24px; flex-direction:column; align-items:flex-start; }
  .blog-cta .btn { width:100%; }
  .article-hero { padding:116px 18px 58px; }
  .article-layout { padding:48px 18px 70px; }
  .article-content { font-size:.98rem; line-height:1.76; }
  .article-featured { margin-bottom:28px; border-radius:14px; }
  .article-inline-media { margin:30px 0; }
  .article-inline-media img { border-radius:13px; }
  .article-insight-card { grid-template-columns:42px minmax(0,1fr); gap:14px; margin:28px 0; padding:20px; }
  .article-insight-icon { width:40px; height:40px; border-radius:12px; }
  .article-insight-icon svg { width:21px; height:21px; }
  .article-lead { font-size:1.08rem; }
  .article-toc { grid-template-columns:1fr; }
  .article-visual-list { grid-template-columns:1fr; gap:10px; }
  .article-visual-list.cards-count-3 > li:last-child,
  .article-visual-list.cards-count-5 > li:last-child,
  .article-visual-list.cards-count-7 > li:last-child { grid-column:auto; width:100%; }
  .article-callout, .article-note { padding:20px 20px 20px 60px; }
  .article-callout::before, .article-note::before { top:19px; left:18px; }
  .faq-list,
  .faq-list.cards-count-2,
  .faq-list.cards-count-3,
  .faq-list.cards-count-4,
  .faq-list.cards-count-5,
  .faq-list.cards-count-6 { grid-template-columns:1fr; }
  .faq-list.cards-count-5 > .faq-item,
  .faq-list.cards-count-5 > .faq-item:nth-child(4) { grid-column:auto; }
}
