/* ============================================================
   BILHART'S — Página /blog
   Cabeçalho compacto, barra de ferramentas e grade de artigos.
   Trilha, barra sticky, chips e estado vazio vêm de style.css
   (componentes compartilhados com /lojas); cores e medidas,
   de tokens.css.
   ============================================================ */

/* ================= 1. CABEÇALHO ================= */
.bhead {
  position: relative;
  padding: 112px 0 24px       /* o topo compensa a nav fixa de 78px */
}

.bhead-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px
}

.bsub {
  color: var(--mut);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: 1.5;
  max-width: 84ch
}

.btotal {
  flex: none;
  font-size: var(--fs-label);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--dim)
}

.btotal b {
  font-weight: var(--fw-medium);
  color: var(--cream)
}

/* ================= 2. FERRAMENTAS ================= */
.btools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

/* chips e busca dividem a barra: em telas médias os chips passam da largura,
   então rolam na horizontal em vez de empurrar a página */
.btools .chips {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none
}

.btools .chips::-webkit-scrollbar {
  display: none
}

.bbusca {
  position: relative;
  flex: none;
  width: 240px;
  display: flex;
  align-items: center
}

.bbusca svg {
  position: absolute;
  left: 12px;
  color: var(--dim);
  pointer-events: none
}

.bbusca input {
  width: 100%;
  height: 32px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--line2);
  border-radius: 50px;
  background: transparent;
  color: var(--txt);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: var(--fw-light);
  transition: border-color .4s var(--ease)
}

.bbusca input::placeholder {
  color: var(--dim)
}

.bbusca input:focus {
  outline: none;
  border-color: var(--tan)
}

.bbusca input:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 1px
}

/* o X nativo do type=search não combina com o tema escuro */
.bbusca input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none
}

/* ================= 3. DESTAQUE ================= */
.bsec {
  position: relative;
  padding: clamp(34px, 3.4vw, 52px) 0 clamp(40px, 4vw, 64px)
}

.bdest {
  display: grid;
  grid-template-columns: minmax(0, .46fr) minmax(0, .54fr);
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(30px, 3.2vw, 48px)
}

/* [hidden] sozinho não vence o display:grid */
.bdest[hidden] {
  display: none
}

.bdest-capa {
  display: block;
  aspect-ratio: 16/9;
  max-height: 264px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg3)
}

.bdest-capa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out)
}

.bdest:hover .bdest-capa img {
  transform: scale(1.04)
}

.bdest-txt h2 {
  margin: 10px 0;
  color: var(--cream);
  transition: color .4s var(--ease)
}

.bdest:hover h2 {
  color: var(--tan)
}

.bdest:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 4px
}

.bdest-txt p {
  color: var(--mut);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: 1.6;
  max-width: 56ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.bdest-mais .ar {
  transition: transform .5s var(--ease-out)
}

.bdest:hover .bdest-mais .ar {
  transform: translateX(4px)
}

.bdest-mais {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: var(--tan)
}

/* ================= 4. GRADE ================= */
.bgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.8vw, 24px)
}

.post {
  display: flex;
  flex-direction: column;
  /* --bg3 (a antiga cor de hover) já no estado normal: separa o card do
     fundo da página sem precisar de sombra */
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: background .5s var(--ease), border-color .5s var(--ease),
              transform .5s var(--ease-out), opacity .26s var(--ease)
}

/* o fundo não muda mais no hover; a resposta fica na borda, na elevação
   e no zoom da capa */
.post:hover {
  border-color: var(--line2);
  transform: translateY(-4px)
}

.pcapa {
  display: block;
  /* 16/9, e não 16/10: em 3 colunas o 16/10 levava o card a 432px, acima do
     teto de 400. É também a proporção da capa do destaque. */
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3)
}

.pcapa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out)
}

.post:hover .pcapa img {
  transform: scale(1.04)
}

.pbd {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 18px 14px
}

.pmeta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 8px
}

.ptema {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  color: var(--tan)
}

.post h2 {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: var(--fw-medium);
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--cream);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.post p {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: var(--fw-light);
  line-height: 1.6;
  color: var(--mut);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.pmais {
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--mut);
  transition: color .4s var(--ease)
}

.post:hover .pmais {
  color: var(--tan)
}

.post:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 3px
}

/* ---- estados ---- */
.post.out {
  opacity: 0;
  transform: scale(.98)
}

.post.gone,
.post.hidden {
  display: none
}

/* ================= 6. FECHAMENTO ================= */
.bonline {
  padding-bottom: clamp(40px, 4vw, 64px)
}

.bonline-box {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 2.2vw, 30px);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r)
}

.bonline-box p {
  color: var(--mut);
  font-size: var(--fs-body);
  font-weight: var(--fw-light)
}

/* ================= RESPONSIVO ================= */
@media(max-width:1100px) {
  .bgrid {
    grid-template-columns: repeat(2, 1fr)
  }

  .bdest {
    grid-template-columns: minmax(0, .5fr) minmax(0, .5fr)
  }
}

@media(max-width:860px) {
  .bdest {
    grid-template-columns: 1fr;
    gap: 18px
  }

  .bdest-capa {
    max-height: 220px
  }
}

@media(max-width:760px) {
  .btools {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 12px
  }

  .btools .chips {
    padding-bottom: 10px
  }

  .bbusca {
    width: 100%
  }

  .bhead-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px
  }

  .bonline-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px
  }
}

@media(max-width:600px) {
  .bhead {
    padding-top: 100px
  }

  .bgrid {
    grid-template-columns: 1fr
  }
}

/* ================= MOVIMENTO REDUZIDO ================= */
@media(prefers-reduced-motion:reduce) {

  .post:hover {
    transform: none
  }

  .post:hover .pcapa img,
  .bdest:hover .bdest-capa img,
  .bdest:hover .bdest-mais .ar {
    transform: none
  }

  .post.out {
    transform: none
  }
}
