/* Tribuna 98 — layout para tablet e celular. Carrega depois do main.css. */

/* ============ Tablet e celular (até 960px) ============ */
@media (max-width: 960px) {
  .t98-wrap { padding: 0 20px; }

  /* Cabeçalho: logo | lupa + WhatsApp (ícone) + menu ☰ */
  .t98-header__in { gap: 10px; height: 64px; }
  .t98-logo img { height: 32px; }
  .t98-header__r { order: 1; margin-left: auto; gap: 10px; }
  .t98-burger { order: 2; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel2); cursor: pointer; padding: 0; }
  .t98-burger span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .t98-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .t98-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .t98-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .t98-searchbtn { width: 44px; height: 44px; }
  .t98-wa { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .t98-wa__txt { display: none; }
  .t98-wa__ic { display: block; }

  /* Menu principal vira painel vertical sob o cabeçalho */
  .t98-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 6px 20px 18px; box-shadow: 0 18px 30px rgba(0, 0, 0, .45); }
  .t98-nav.is-open { display: block; }
  .t98-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .t98-menu li { border-bottom: 1px solid var(--line); }
  .t98-menu li:last-child { border-bottom: 0; }
  .t98-nav a { display: block; padding: 15px 0; font-size: 13px; }

  /* Hero: foto em cima, texto centralizado embaixo */
  .t98-hero { background: var(--bg); }
  .t98-hero::after { display: none; }
  .t98-hero__in { flex-direction: column; min-height: 0; align-items: stretch; padding-left: 0; padding-right: 0; }
  /*
   * Foto adaptativa e SEMPRE centralizada.
   * A moldura tem altura proporcional à tela (300–560px). A foto é um pouco mais larga que a moldura (123%) e
   * deslocada para a esquerda (-4%) de modo que o rosto (a ~43,9% da largura da foto) caia exatamente em 50% da moldura.
   * O object-position horizontal igual a 43,9% mantém essa conta correta mesmo quando o navegador recorta a foto.
   * Se trocar a foto, refaça a conta: left = 50% - (posição do rosto na foto × 123%).
   */
  .t98-hero__media { display: block; position: relative; order: -1; width: 100%; height: clamp(300px, 88vw, 560px); overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%); mask-image: linear-gradient(180deg, #000 68%, transparent 100%); }
  .t98-hero__img { position: absolute; top: 0; right: auto; left: -4%; width: 123% !important; height: 100%; max-width: none; object-fit: cover; object-position: 43.9% 36%; -webkit-mask-image: none; mask-image: none; }
  .t98-hero__txt { max-width: none; padding: 4px 20px 44px; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .t98-hero__title { font-size: clamp(34px, 11.6vw, 70px); justify-content: center; margin: 18px 0 4px; }
  .t98-hero__tag { letter-spacing: .2em; font-size: 12px; margin: 6px 0 14px; }
  .t98-hero__sub { font-size: 17px; max-width: 520px; margin: 0 0 24px; }
  .t98-hero__btns { flex-direction: column; width: 100%; max-width: 250px; gap: 10px; }
  .t98-hero__btns .t98-btn { width: 100%; padding: 11px 18px; font-size: 13px; border-width: 1.5px; }

  /* Ticker */
  .t98-ticker { height: 52px; }
  .t98-ticker__lbl { margin-left: 20px; }

  /* Seções */
  .t98-sec { padding: 52px 0; }
  .t98-sechead h2 { font-size: 38px; }

  /* Últimas: tudo em uma coluna */
  .t98-latest { grid-template-columns: 1fr; gap: 22px; }
  .t98-latest__title { font-size: 32px; }
  .t98-latest__side { gap: 0; }
  .t98-latest__side .t98-mini { padding: 16px 0; border-top: 1px solid var(--line); }

  /* Lista + lateral: lateral vai para baixo, em largura total */
  .t98-cols { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .t98-side { position: static; }

  .t98-videos { grid-template-columns: 1fr 1fr; gap: 18px; }
  .t98-cards4 { grid-template-columns: 1fr 1fr; }
  .t98-steps { grid-template-columns: 1fr 1fr; }
  .t98-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .t98-footer__grid > div:first-child { grid-column: 1 / -1; }

  /* Matéria */
  .t98-article__head { padding: 32px 0 28px; }
  .t98-article__title { font-size: 32px; }
  .t98-cols--article { padding-top: 24px; padding-bottom: 52px; }
  .t98-pagehead { padding: 38px 0 32px; }
  .t98-pagehead h1 { font-size: 46px; }
}

/* ============ Celular (até 600px) ============ */
@media (max-width: 600px) {
  .t98-topbar { display: none; }
  .t98-editorias__lbl { display: none; }
  .t98-editorias__in { min-height: 48px; }

  .t98-sec { padding: 44px 0; }
  .t98-sechead { margin-bottom: 22px; }
  .t98-sechead h2 { font-size: 34px; }

  /* Títulos de seção com linha amarela embaixo (Notícias, Bastidores) */
  .t98-sec:not(.t98-sec--blue) .t98-sechead--row { border-bottom: 3px solid var(--yellow); padding-bottom: 14px; margin-bottom: 22px; }

  /* Entrevistas: cartões empilhados e "Ver o canal" embaixo, em largura total */
  #entrevistas .t98-wrap { display: flex; flex-direction: column; }
  #entrevistas .t98-sechead--row { display: contents; }
  #entrevistas .t98-sechead--row > div { order: 0; margin-bottom: 22px; }
  #entrevistas .t98-videos { order: 1; grid-template-columns: 1fr; gap: 22px; }
  /* "Ver o canal": mesmo tamanho dos botões do hero ("Ver as últimas") e centralizado */
  #entrevistas .t98-sechead--row .t98-btn { order: 2; align-self: center; width: 100%; max-width: 250px; margin-top: 26px; padding: 11px 18px; font-size: 13px; border-width: 1.5px; }

  /* Lista de matérias em cartão: categoria e título (completo) em cima, imagem ocupando toda a largura embaixo */
  .t98-item { display: flex; flex-direction: column; gap: 0; padding: 24px 0 26px; }
  .t98-item__body { order: 0; }
  .t98-item__img { order: 1; display: block; width: 100%; aspect-ratio: 16 / 9; margin-top: 14px; border-radius: 12px; }
  .t98-item--noimg .t98-item__img { display: none; } /* matéria sem foto: só categoria e título */
  .t98-item__title { font: 600 18px/1.22 var(--body); text-transform: none; letter-spacing: 0; }
  .t98-item__exc { display: none; }
  .t98-mini { grid-template-columns: 96px 1fr; gap: 14px; }

  /* Paginação: setas nas pontas e poucos números */
  .t98-pager { gap: 8px; justify-content: center; }
  .t98-pager .page-numbers { min-width: 44px; height: 44px; padding: 0; font-size: 15px; }
  .t98-pager .dots { display: none; }
  .t98-pager .dots + .page-numbers:not(.next) { display: none; }
  .t98-pager .prev, .t98-pager .next { font-size: 0; }
  .t98-pager .prev::before { content: "←"; font-size: 18px; }
  .t98-pager .next::before { content: "→"; font-size: 18px; }
  .t98-pager .prev { margin-right: auto; }
  .t98-pager .next { margin-left: auto; }

  .t98-box { padding: 22px; }
  .t98-box__t { font-size: 28px; }
  .t98-denuncia { padding: 24px; }
  .t98-denuncia .t98-btn { width: 100%; }

  .t98-ad--970 { height: 110px; }

  .t98-cards4 { grid-template-columns: 1fr; gap: 14px; }
  .t98-card { min-height: 0; padding: 20px; }

  /* Do fato à publicação: número à esquerda, texto à direita */
  .t98-steps { grid-template-columns: 1fr; gap: 26px; }
  .t98-step { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; align-items: start; }
  .t98-step__n { grid-row: 1 / span 2; font-size: 46px; }
  .t98-step h3 { margin: 6px 0 4px; }

  /* Números em 3 colunas, "Anuncie" em coluna */
  .t98-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .t98-stat { padding: 18px 14px; border-radius: 14px; }
  .t98-stat strong { font-size: 38px; }
  .t98-stat span { font-size: 12px; line-height: 1.3; display: block; margin-top: 4px; }
  .t98-anuncie { flex-direction: column; align-items: stretch; padding: 28px 24px; gap: 18px; }
  .t98-anuncie h2 { font-size: 34px; }
  .t98-anuncie .t98-btn { width: 100%; }

  /* Rodapé */
  .t98-footer { border-top: 4px solid var(--yellow); padding-top: 44px; }
  .t98-footer__grid > div:nth-child(3) { order: 5; grid-column: 1 / -1; }
  .t98-footer__copy { padding: 18px 20px; margin-top: 32px; }

  /* Matéria e listagens */
  .t98-article__title { font-size: 28px; }
  .t98-article__lead { font-size: 17px; }
  .t98-prose { font-size: 17px; line-height: 1.7; }
  .t98-prose h2 { font-size: 30px; }
  .t98-prose h3 { font-size: 24px; }
  .t98-pagehead h1 { font-size: 38px; }
  .t98-share a { padding: 9px 14px; }
}

/* Telas muito estreitas */
@media (max-width: 380px) {
  .t98-stat strong { font-size: 32px; }
  .t98-hero__tag { letter-spacing: .14em; }
}

/* Ajustes finos (celular) */
.t98-more { white-space: nowrap; }
@media (max-width: 600px) {
  .t98-stat { padding: 16px 12px; }
  .t98-stat strong { font-size: 32px; white-space: nowrap; }
  .t98-anuncie h2 { font-size: 30px; text-wrap: balance; }
  .t98-sechead--row { gap: 12px; }
}
@media (max-width: 380px) {
  .t98-stat strong { font-size: 28px; }
}

/* ===== Faixa de editorias como carrossel ===== */
.t98-editorias { position: relative; }
.t98-editorias__in { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-left: 20px; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.t98-editorias.can-left .t98-editorias__in, .t98-editorias.can-right .t98-editorias__in { cursor: grab; }
.t98-editorias .t98-editorias__in.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.t98-menu-ed { flex: none; }
.t98-menu-ed li { flex: none; scroll-snap-align: start; }
.t98-editorias__lbl { flex: none; }
/* degradês nas bordas quando há mais itens para o lado */
.t98-editorias::before, .t98-editorias::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.t98-editorias::before { left: 0; background: linear-gradient(90deg, var(--blue) 15%, rgba(10, 43, 176, 0)); }
.t98-editorias::after { right: 0; background: linear-gradient(270deg, var(--blue) 15%, rgba(10, 43, 176, 0)); }
.t98-editorias.can-left::before, .t98-editorias.can-right::after { opacity: 1; }
