/* =========================================================
   Blog Hora-Extra — cabeçalho do site do escritório (Afonso Paciléo)
   Regras copiadas de AfonsoPacileo/assets/css/site.css (topo, menu, gaveta,
   atalhos, quadrado de ícone) + o topo próprio do blog (banner da home,
   faixa das páginas internas e menu do blog com a busca).
   O rodapé está em rodape.css; o miolo do blog em style.css.
   ========================================================= */

:root {
  --laranja: #FCB961;
  --laranja-hover: #F4A43C;
  --dourado-escuro: #E7A854;
  --laranja-titulo: #C47A1B;   /* texto dourado GRANDE sobre fundo claro */
  --laranja-texto: #9A5800;    /* texto dourado PEQUENO sobre fundo claro (contraste 5,5:1) */
  --tinta: #202020;
  --grafite: #292929;
  --barra: #2F2F2E;
  --cinza-texto: #7A7A7A;
  --cinza-fundo: #F9F9F9;
  --branco: #fff;
  --foco: #202020;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Segoe UI", Arial, sans-serif;
  --sans-rodape: "Lato", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --largura: 1280px;
  --quadrado: clamp(72px, 6vw, 112px);
  --ease-saida: cubic-bezier(.16, .84, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding: 16px 0 32px; }
@media (max-width: 1239px) { html { scroll-padding-bottom: 110px; } }
body { position: relative; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
main:focus { outline: none; }
.topo, .ap-hero, .ap-faixa, .rodape { --foco: var(--laranja); }

.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pular {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--laranja); color: var(--tinta); font: 700 15px/1.2 var(--sans);
  padding: 12px 20px; text-decoration: none;
}
.pular:focus { top: 16px; }

/* ---------- Topo (igual ao site) ---------- */
.topo { position: absolute; inset: 0 0 auto 0; z-index: 50; color: var(--branco); font-family: var(--sans); }
.topo:focus { outline: none; }
.topo__barra { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.topo__contato {
  display: flex; align-items: center; min-height: 47px;
  background: var(--barra); color: var(--branco);
  font: 700 .8125rem/1 var(--sans); text-decoration: none;
}
.topo__contato > span:last-child { padding: 0 16px; }
.topo__contato:hover > span:last-child { text-decoration: underline; }
.topo__ic { display: grid; place-items: center; width: 45px; align-self: stretch; background: var(--laranja); }
.topo__ic img { width: 17px; height: 17px; display: block; }
.topo__ic--tel img { width: 45px; height: 45px; }
.topo__contato .topo__ic img { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.topo__contato:hover .topo__ic img { transform: rotate(-12deg) scale(1.15); }

.topo__linha { display: flex; align-items: center; gap: 24px; padding: 6px clamp(16px, 2.4vw, 46px) 0; }
.topo__logo { flex: none; display: block; }
.topo__logo img { display: block; width: clamp(190px, 14vw, 270px); height: auto; }

.menu { margin-left: clamp(24px, 4.4vw, 84px); }
.menu ul { display: flex; flex-wrap: wrap; gap: 4px clamp(18px, 2.4vw, 46px); list-style: none; margin: 0; padding: 0; }
.menu a {
  position: relative; display: inline-block; padding: 8px 0;
  font: 700 1rem/1.2 var(--sans); color: var(--branco); text-decoration: none; white-space: nowrap;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--laranja); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.menu a:hover::after, .menu a[aria-current="page"]::after { transform: scaleX(1); }
.topo__menu-btn { display: none; }
.menu__grupo { position: relative; }
.menu .menu__sub {
  position: absolute; left: -18px; top: 100%; z-index: 5;
  display: none; flex-direction: column; gap: 0; min-width: 210px; padding: 8px 18px 10px;
  background: rgba(32, 32, 32, .96); box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.menu__grupo:hover .menu__sub, .menu__grupo:focus-within .menu__sub { display: flex; }
.menu .menu__sub a { font-weight: 600; padding: 10px 0; }

/* Atalhos (Fale com o advogado / Proposta / Processo) */
.atalhos { position: absolute; z-index: 40; right: clamp(16px, 2vw, 38px); top: clamp(150px, 13.4vw, 258px); font-family: var(--sans); }
.atalhos ul { display: grid; gap: clamp(14px, 1.2vw, 23px); list-style: none; margin: 0; padding: 0; }
.atalhos a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: clamp(88px, 5.6vw, 107px); min-width: min-content; min-height: clamp(88px, 5.6vw, 107px); padding: 8px 6px;
  background: rgba(20, 20, 20, .9); color: var(--branco);
  font: 500 .9375rem/1.2 var(--sans); text-align: center; text-decoration: none;
  transition: background-color .25s, color .25s, transform .35s var(--ease-saida);
}
.atalhos img { display: block; width: 40px; height: 40px; object-fit: contain; transition: filter .2s; }
.atalhos a:hover, .atalhos a:focus-visible { background: var(--laranja); color: var(--tinta); transform: translateX(-6px); }
.atalhos a:hover img, .atalhos a:focus-visible img { filter: brightness(0); }
/* No computador, os atalhos ficam só sobre o banner da home (nas páginas internas a faixa é baixa). */
@media (min-width: 1240px) { body:not(.blog-home) .atalhos { display: none; } }

.quadrado-icone { display: grid; place-items: center; width: var(--quadrado); height: var(--quadrado); background: var(--laranja); }
.quadrado-icone img { display: block; width: 70%; height: 70%; object-fit: contain; }

/* ---------- Banner da home (como o topo da página Blog do site) ---------- */
.ap-hero {
  position: relative; isolation: isolate; color: var(--branco);
  min-height: clamp(540px, 44vw, 760px);
  background: var(--ap-hero-bg, var(--grafite));
  display: flex; flex-direction: column;
}
.ap-hero__fundo {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--quadrado)), 55.3125% calc(100% - var(--quadrado)), 55.3125% 100%, 0 100%);
}
.ap-hero__fundo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ap-hero__fundo::before, .ap-hero__fundo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ap-hero__fundo::before { background: linear-gradient(rgba(0,0,0,.82) 0, rgba(0,0,0,.6) 120px, rgba(0,0,0,0) 240px), rgba(0,0,0,.32); }
.ap-hero__fundo::after { background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(0,0,0,.45), rgba(0,0,0,0) 100%); }
.ap-hero__conteudo {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 48px;
  width: min(var(--largura), 100% - 2 * var(--gutter)); margin: 0 auto;
  padding: 150px 0 calc(var(--quadrado) + 24px);
}
.ap-hero__texto { max-width: 820px; text-align: center; }
.ap-hero__eyebrow { margin: 0; font: 700 clamp(1rem, .879rem + .518vw, 1.5rem)/1.25 var(--sans); text-transform: uppercase; letter-spacing: .02em; }
.ap-hero__titulo { margin: .1em 0 0; font: 400 clamp(2.5rem, 1.9rem + 2.4vw, 4.25rem)/1.1 var(--serif); }
.ap-hero__eyebrow, .ap-hero__titulo, .ap-hero__descricao { text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.6); }
.ap-hero__descricao { margin: 18px auto 0; max-width: 640px; font: 500 clamp(1rem, .95rem + .2vw, 1.125rem)/1.55 var(--sans); }
.ap-hero__btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 54px; padding: 12px 28px;
  background: var(--laranja); color: var(--tinta); font: 600 .9375rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.ap-hero__btn:hover { background: var(--branco); color: var(--tinta); box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.ap-hero__icone { position: absolute; z-index: 2; left: calc(55.3125% - var(--quadrado)); bottom: 0; }
/* Imagem ao lado do texto (Painel > Páginas, modo "ao lado") */
.ap-hero--lado .ap-hero__fundo { clip-path: none; }
.ap-hero--lado .ap-hero__conteudo { justify-content: space-between; }
.ap-hero--lado .ap-hero__texto { text-align: left; max-width: 620px; }
.ap-hero--lado .ap-hero__descricao { margin-left: 0; }
.ap-hero__lado { flex: 0 1 560px; width: 560px; max-width: 46%; aspect-ratio: 680 / 420; height: auto; object-fit: cover; }
.ap-hero--lado .ap-hero__icone { display: none; }

/* ---------- Faixa das páginas internas (fundo escuro atrás do topo) ---------- */
.ap-faixa { position: relative; isolation: isolate; min-height: 232px; background: var(--grafite); color: var(--branco); display: flex; align-items: flex-end; }
.ap-faixa__fundo { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.ap-faixa__fundo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .45; }
.ap-faixa__fundo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.35)); }
.ap-faixa__marca {
  width: min(var(--largura), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 0 0 22px;
  font: 400 clamp(1.5rem, 1.2rem + 1vw, 2.125rem)/1.1 var(--serif); color: var(--branco);
}
.ap-faixa__marca span { display: block; margin-bottom: 4px; font: 700 .8125rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--laranja); }

/* ---------- Menu do blog + busca ---------- */
.blog-nav { background: var(--branco); border-bottom: 1px solid #e7e7e7; font-family: var(--sans); }
.blog-nav__inner {
  width: min(var(--largura), 100% - 2 * var(--gutter)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px;
}
.blog-nav__links { display: flex; flex-wrap: wrap; gap: 0 28px; }
.blog-nav__links a {
  position: relative; display: inline-block; padding: 21px 0 19px;
  color: var(--tinta); font: 600 .8125rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.blog-nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--laranja); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.blog-nav__links a:hover::after, .blog-nav__links a.is-active::after { transform: scaleX(1); }
.blog-nav__links a.is-active { color: var(--tinta); font-weight: 700; }
.blog-nav__busca { display: flex; align-items: stretch; flex: 0 1 300px; min-width: 220px; border: 1px solid #d5d5d5; background: var(--branco); transition: border-color .2s; }
.blog-nav__busca:focus-within { border-color: var(--tinta); }
.blog-nav__busca input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; background: transparent; font: 500 .9375rem/1.3 var(--sans); color: var(--tinta); outline: none; }
.blog-nav__busca input::placeholder { color: #767676; }
.blog-nav__busca button { display: grid; place-items: center; width: 44px; border: 0; background: var(--laranja); color: var(--tinta); cursor: pointer; transition: background-color .2s; }
.blog-nav__busca button:hover { background: var(--laranja-hover); }

/* ---------- Gaveta do menu (abaixo de 1240px, como no site) ---------- */
@media (max-width: 1239px) {
  .topo__linha { justify-content: space-between; }
  .topo__menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px;
    background: rgba(20,20,20,.6); color: var(--branco); border: 1px solid rgba(255,255,255,.35); cursor: pointer;
    font: 700 .9375rem/1 var(--sans); text-transform: uppercase; letter-spacing: .04em;
  }
  .topo__menu-icone, .topo__menu-icone::before, .topo__menu-icone::after {
    display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background-color .2s;
  }
  .topo__menu-icone::before, .topo__menu-icone::after { content: ""; position: absolute; left: 0; }
  .topo__menu-icone::before { top: -7px; }
  .topo__menu-icone::after { top: 7px; }
  .topo__menu-btn[aria-expanded="true"] .topo__menu-icone { background: transparent; }
  .topo__menu-btn[aria-expanded="true"] .topo__menu-icone::before { transform: translateY(7px) rotate(45deg); }
  .topo__menu-btn[aria-expanded="true"] .topo__menu-icone::after { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(360px, 88vw);
    margin: 0; padding: 88px 28px 32px; overflow-y: auto;
    background: var(--grafite); box-shadow: -12px 0 32px rgba(0,0,0,.35);
    transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
  }
  .menu.aberto { transform: none; visibility: visible; transition: transform .3s, visibility 0s; }
  .menu ul { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .menu a { display: block; padding: 14px 0; font-size: 1.125rem; border-bottom: 1px solid rgba(255,255,255,.12); }
  .menu a::after { bottom: 8px; right: auto; width: 40px; }
  .menu .menu__sub { position: static; display: flex; min-width: 0; padding: 0 0 0 18px; background: none; box-shadow: none; }
  .menu .menu__sub a { font-size: 1rem; font-weight: 500; }
  .topo__menu-btn { position: relative; z-index: 70; }
  .fundo-menu { position: fixed; inset: 0; z-index: 48; background: rgba(0,0,0,.55); }
  body.menu-aberto { overflow: hidden; }

  /* Atalhos viram barra fixa no rodapé da tela */
  .atalhos { position: fixed; inset: auto 0 0 0; top: auto; z-index: 45; }
  .atalhos ul { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .atalhos a {
    width: 100%; min-height: 64px; flex-direction: row; gap: 8px; padding: 8px;
    background: var(--tinta); font-size: .8125rem; border-right: 1px solid rgba(255,255,255,.12);
  }
  .atalhos a:hover, .atalhos a:focus-visible { transform: none; }
  .atalhos img { width: 26px; height: 26px; }
  body { padding-bottom: 64px; }
}

@media (max-width: 1100px) {
  .blog-nav__inner { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 14px; }
  .blog-nav__links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .blog-nav__links::-webkit-scrollbar { display: none; }
  .blog-nav__links a { padding: 16px 0 14px; }
  .blog-nav__busca { flex: 1 1 auto; min-width: 0; }
}

@media (max-width: 899px) {
  :root { --quadrado: 72px; }
  .ap-hero { min-height: clamp(440px, 118vw, 600px); }
  .ap-hero__fundo { clip-path: none; }
  .ap-hero__conteudo { flex-direction: column; padding: 140px 0 calc(var(--quadrado) * .5 + 32px); }
  .ap-hero__icone { left: var(--gutter); bottom: calc(-1 * var(--quadrado) / 2); }
  .ap-hero { margin-bottom: calc(var(--quadrado) / 2); }
  .ap-hero--lado .ap-hero__texto { text-align: center; }
  .ap-hero__lado { width: 100%; max-width: 100%; flex: none; }
  .ap-faixa { min-height: 190px; }
}

@media (max-width: 599px) {
  .topo__barra .topo__contato--email { display: none; }
  .topo__barra { justify-content: flex-start; }
  .topo__contato { flex: 1; }
  .topo__linha { padding-top: 10px; }
  .topo__logo img { width: 170px; }
  .topo__menu-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .atalhos a { flex-direction: column; gap: 4px; font-size: .8125rem; line-height: 1.15; }
  .atalhos img { width: 24px; height: 24px; }
  body { padding-bottom: 72px; }
  .ap-hero__conteudo { padding-top: 150px; }
  .ap-faixa { min-height: 178px; }
  .ap-faixa__marca { padding-bottom: 16px; }
}

/* Entrada suave do topo (só sem pedido de movimento reduzido) */
@keyframes ap-subir { from { opacity: 0; transform: translate3d(0, 22px, 0); } }
@keyframes ap-aproximar { from { transform: scale(1.08); } }
@media (prefers-reduced-motion: no-preference) {
  .ap-hero__fundo img { animation: ap-aproximar 2.4s var(--ease-saida) both; }
  .ap-hero__texto > * { animation: ap-subir .9s var(--ease-saida) both; }
  .ap-hero__texto > :nth-child(2) { animation-delay: .12s; }
  .ap-hero__texto > :nth-child(n+3) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .quadrado-icone { border: 1px solid CanvasText; } }
