/**
 * Celular em landscape — 0.1.25 Final (última tipografia / editorias).
 * Sem UA sniffing. Sem reload na rotacao.
 *
 * Escopo:
 * 1) landscape + hover:none + pointer:coarse + altura/largura de telefone
 * 2) fallback: landscape + max-height ≤500px (altura tipica iPhone deitado)
 */

@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 700px) and (max-width: 980px),
  (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 520px) and (max-width: 1100px),
  (orientation: landscape) and (max-height: 500px) and (max-width: 980px) {
  html body .menu-toggle { display: grid; }
  html body .main-nav { display: none; }
  html body .nav-wrap:not(.is-open) .nav-inner { display: none; }
  html body .nav-wrap.is-open .nav-inner { display: flex; flex-wrap: wrap; padding-top: 0.3rem; padding-bottom: 0.3rem; }
  html body .nav-wrap.is-open .main-nav { display: flex; flex-direction: column; width: 100%; padding-bottom: 0.45rem; }
  html body .nav-wrap.is-open .nav-mobile-extra { display: flex; flex-direction: column; width: 100%; padding: 0.3rem 0 0.55rem; border-top: 1px solid var(--line); }
  html body .nav-mobile-extra a { display: block; padding: 0.55rem 0.15rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--green-deep); }
  html body .socials { display: none; }
  html body .brand-inner { grid-template-columns: 42px 1fr 42px; padding: 0.22rem 1rem; width: 100%; }
  html body .logo-link img { height: 44px; max-width: min(240px, 52vw); object-fit: contain; }
  html body .topbar-inner { grid-template-columns: 1fr auto; padding: 0.12rem 1rem; min-height: 22px; gap: 0.5rem; }
  html body .topbar-date { display: none; }
  html body .topbar { font-size: 0.62rem; }
  html body .btn-live { font-size: 0.58rem; padding: 0.18rem 0.5rem; }
  html body div.page { grid-template-columns: minmax(0, 1fr); margin-top: 0.4rem; padding-left: 0.85rem; padding-right: 0.85rem; gap: 0; }
  html body.home div.page { margin-top: 0.4rem; }
  html body.home .ad-leader { margin-top: 0.4rem; padding-left: 0.85rem; padding-right: 0.85rem; }
  html body.home .ad-leader .ad-slot {
    width: 100%;
    max-width: 728px;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 728 / 40;
    margin-inline: auto;
  }
  html body.home .ad-leader .ad-slot img,
  html body.home .ad-leader .ad-link img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center;
    display: block;
  }
  html body .ad-label,
  html body.home .ad-leader .ad-label,
  html body.home .home-mid-ad .ad-label { font-size: 0.52rem; letter-spacing: 0.08em; margin-bottom: 0.2rem; }

  html body .home-lead-band { grid-template-columns: minmax(0, 1fr); }
  html body .rjw-destaques { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 0.45rem 0.7rem; align-items: start; }
  html body .rjw-destaque-grande { padding-bottom: 30%; }
  html body .rjw-destaque-title { font-size: 0.8rem; -webkit-line-clamp: 2; }
  html body .rjw-destaque-shade { padding: 1rem 0.5rem 0.35rem; }
  html body .rjw-destaque-pequena { grid-template-columns: 68px minmax(0, 1fr); gap: 0.4rem; padding-bottom: 0.4rem; margin-bottom: 0.4rem; }
  html body .rjw-destaque-pequena img,
  html body .rjw-destaque-pequena .card-media { width: 68px; height: 50px; }
  html body .rjw-destaque-pequena h3 { font-size: 0.72rem; line-height: 1.2; font-weight: 550; }
  html body .rjw-destaques-pequenas .rjw-destaque-pequena,
  html body .rjw-destaques-pequenas .rjw-destaque-pequena:nth-child(n + 3),
  html body .rjw-destaques-pequenas .rjw-destaque-pequena:nth-child(n + 4) {
    display: grid !important;
  }
  html body.home aside.sidebar.home-partner-rail { display: none; }
  html body .section-head h2 { font-size: 1rem; }

  html body .local-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0.65rem; }
  html body .story-card img,
  html body .story-card > .card-media { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 140px; object-fit: cover; }
  html body .story-card h3 { font-size: 0.88rem; line-height: 1.25; }
  html body .story-card .body { padding: 0.45rem 0 0; }
  html body .local-list h3 { font-size: 0.78rem; line-height: 1.25; }

  html body .home-tc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; }
  html body .home-tc-card img,
  html body .home-tc-card .card-media { height: 72px; }
  html body .home-tc-card h3 { font-size: 0.72rem; line-height: 1.2; }

  /*
   * Páginas de EDITORIA (fora da HOME) — 0.1.25
   * Referência visual: editoria Política no compact list
   *   (.ed-shell .ed-grid .ed-card em max-width:900px):
   *   miniatura 104×78, título 0.875rem (14px), gap 0.62rem.
   * Causa de Jatobá/outras maiores: iPhone landscape ~932px ≥901px
   *   → NÃO entra no @media (max-width:900px) de editoria.css / #rjw-ed-compact;
   *   → aplica desktop: .ed-card img height:200px + h3 1.05rem (+ clamp do lead).
   * Solução: forçar o mesmo compact list da Política em TODAS as editorias.
   */
  html body.is-editoria .ed-shell,
  html body.is-territorio .ed-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  html body.is-editoria .ed-aside,
  html body.is-territorio .ed-aside {
    display: none;
  }
  html body.is-editoria .ed-intro h1,
  html body.is-territorio .ed-intro h1 {
    font-size: 1.15rem !important;
    line-height: 1.2;
  }
  html body.is-editoria .ed-intro .ed-desc,
  html body.is-territorio .ed-intro .ed-desc {
    font-size: 0.8rem;
    margin-top: 0.4rem;
  }
  html body.is-editoria .ed-shell .ed-grid,
  html body.is-territorio .ed-shell .ed-grid {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  html body.is-editoria .ed-shell .ed-grid .ed-card > a,
  html body.is-editoria .ed-shell .ed-grid .ed-card > a.ed-card-link,
  html body.is-territorio .ed-shell .ed-grid .ed-card > a,
  html body.is-territorio .ed-shell .ed-grid .ed-card > a.ed-card-link {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.62rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
  }
  html body.is-editoria .ed-shell .ed-grid .ed-card:last-child > a,
  html body.is-territorio .ed-shell .ed-grid .ed-card:last-child > a {
    border-bottom: 0;
  }
  html body.is-editoria .ed-shell .ed-grid .ed-card img,
  html body.is-editoria .ed-shell .ed-grid .ed-card .card-media,
  html body.is-territorio .ed-shell .ed-grid .ed-card img,
  html body.is-territorio .ed-shell .ed-grid .ed-card .card-media {
    flex: 0 0 104px !important;
    width: 104px !important;
    max-width: 104px !important;
    height: 78px !important;
    max-height: 78px !important;
    object-fit: cover;
  }
  html body.is-editoria .ed-shell .ed-grid .ed-card h3,
  html body.is-territorio .ed-shell .ed-grid .ed-card h3 {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
  }
  html body.is-editoria .ed-shell .ed-grid .ed-card .meta,
  html body.is-territorio .ed-shell .ed-grid .ed-card .meta {
    margin-top: 0.2rem !important;
    font-size: 12px !important;
  }
  /* Mesmo padrão se houver lead/side/wide (layouts equivalentes). */
  html body.is-editoria .ed-shell .ed-open,
  html body.is-editoria .ed-shell .ed-wide {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }
  html body.is-editoria .ed-shell .ed-lead > a,
  html body.is-editoria .ed-shell .ed-wide > a,
  html body.is-editoria .ed-shell .ed-side > a {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.62rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
  }
  html body.is-editoria .ed-shell .ed-lead img,
  html body.is-editoria .ed-shell .ed-lead .card-media,
  html body.is-editoria .ed-shell .ed-wide img,
  html body.is-editoria .ed-shell .ed-wide .card-media,
  html body.is-editoria .ed-shell .ed-side img,
  html body.is-editoria .ed-shell .ed-side .card-media {
    flex: 0 0 104px !important;
    width: 104px !important;
    max-width: 104px !important;
    height: 78px !important;
    max-height: 78px !important;
    object-fit: cover;
  }
  html body.is-editoria .ed-shell .ed-lead h2,
  html body.is-editoria .ed-shell .ed-lead h3,
  html body.is-editoria .ed-shell .ed-wide h3,
  html body.is-editoria .ed-shell .ed-side h3 {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
  }
  html body.is-editoria .ed-shell .ed-lead .excerpt,
  html body.is-editoria .ed-shell .ed-wide .excerpt {
    display: none !important;
  }

  /*
   * Notícias Agora — 0.1.25
   * Elementos reais distintos:
   *   a.home-agora-lead > h3.home-agora-title  → clamp(1.12–1.38) / 1.18rem @≤1100
   *   a.home-agora-item > p.home-agora-title   → 0.95rem base
   * Diferença de escala vinha do clamp do lead vs 0.95rem do item.
   * Uniformizar AMBOS em 12px / weight 600.
   */
  html body.home #noticias-agora a.home-agora-lead h3.home-agora-title,
  html body.home #noticias-agora a.home-agora-lead .home-agora-title,
  html body.home #noticias-agora .home-agora-lead h3.home-agora-title,
  html body.home #noticias-agora .home-agora-lead .home-agora-title,
  html body.home #noticias-agora a.home-agora-item p.home-agora-title,
  html body.home #noticias-agora a.home-agora-item .home-agora-title,
  html body.home #noticias-agora .home-agora-item p.home-agora-title,
  html body.home #noticias-agora .home-agora-item .home-agora-title,
  html body.home #noticias-agora h3.home-agora-title,
  html body.home #noticias-agora p.home-agora-title,
  html body.home #noticias-agora .home-agora-title {
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
  }
  html body.home #noticias-agora .home-agora-kicker { font-size: 0.55rem; }
  html body.home #noticias-agora .home-agora-lead { padding-bottom: 0.35rem; margin-bottom: 0.25rem; }
  html body.home #noticias-agora .home-agora-item { padding: 0.08rem 0 0.3rem; gap: 0.06rem; }

  /*
   * HOME Piauí + Política — 0.1.25
   * FOTOS: preservadas exatamente como na 0.1.24 (não alterar width/aspect).
   * Títulos: a.editor-lead > p e a.editor-secondary > … > p
   * Concorrentes: main 1.05rem; desktop-scale 0.96rem.
   * Alvo visual: principal 15px; secundário 12px.
   */
  html body.home .home-duo,
  html body.home #home-piaui-politica {
    gap: 0.55rem;
  }
  html body.home .home-duo .editor-lead,
  html body.home #home-piaui-politica .editor-lead {
    gap: 0.28rem;
    padding: 0.4rem 0 0.4rem;
  }
  /* Foto intocada — mesmos valores da 0.1.24 */
  html body.home .home-duo .editor-lead img,
  html body.home .home-duo .editor-lead > .card-media,
  html body.home #home-piaui-politica .editor-lead img,
  html body.home #home-piaui-politica .editor-lead > .card-media {
    display: block;
    width: 65%;
    max-width: 300px;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
  }
  html body.home .home-duo .editor-lead p,
  html body.home .home-duo a.editor-lead > p,
  html body.home .home-duo a.editor-lead p,
  html body.home #home-piaui-politica .editor-lead p,
  html body.home #home-piaui-politica a.editor-lead > p,
  html body.home #home-piaui-politica a.editor-lead p {
    font-size: 15px !important;
    line-height: 1.22 !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
  }
  html body.home .home-duo .editor-secondary,
  html body.home #home-piaui-politica .editor-secondary {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.4rem;
    padding-top: 0.4rem;
    min-height: 0;
  }
  html body.home .home-duo .editor-secondary img,
  html body.home .home-duo .editor-secondary > .card-media,
  html body.home #home-piaui-politica .editor-secondary img,
  html body.home #home-piaui-politica .editor-secondary > .card-media {
    width: 72px !important;
    height: 54px !important;
    object-fit: cover;
  }
  html body.home .home-duo .editor-secondary p,
  html body.home .home-duo a.editor-secondary p,
  html body.home .home-duo .editor-secondary div p,
  html body.home #home-piaui-politica .editor-secondary p,
  html body.home #home-piaui-politica a.editor-secondary p,
  html body.home #home-piaui-politica .editor-secondary div p {
    font-size: 12px !important;
    line-height: 1.22 !important;
    font-weight: 600 !important;
  }

  html body .radio-panel .section-head h2 { font-size: 1rem; }
  html body .now-card { padding: 0.7rem 0.85rem; gap: 0.65rem; }
  html body .now-main h3,
  html body #now-show { font-size: 1.05rem; }
  html body .now-next p { font-size: 0.95rem !important; }
  html body .btn-outline { font-size: 0.72rem; padding: 0.35rem 0.7rem; }

  html body .home-video-reel { display: flex; gap: 0.55rem; overflow-x: auto; scroll-snap-type: x mandatory; }
  html body .home-video-card { flex: 0 0 min(38vw, 180px); scroll-snap-align: start; }
  html body .home-video-card__title { font-size: 0.72rem; }
  html body .home-video-nav { display: none; }

  /* Título / share / byline: APROVADOS — não alterar. */
  html body .article-title { font-size: 1.15rem; line-height: 1.22; }
  html body .article-dek { font-size: 0.88rem; margin-top: 0.55rem; }
  html body .article-byline { margin-top: 0.55rem; font-size: 0.75rem; }
  html body .article-share { margin-top: 0.55rem; }
  html body .article-hero { margin-top: 0.85rem; }

  /* Hero: preservar 16:9 centralizado; redução mínima de largura. */
  html body.is-article .article-hero,
  html body.single .article-hero {
    display: flex;
    justify-content: center;
  }
  html body.is-article .article-hero img,
  html body.single .article-hero img,
  html body .article-hero img {
    width: 54%;
    max-width: 280px;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-inline: auto;
  }

  /*
   * Corpo da matéria — 0.1.25
   * Elemento real: .article-prose p (Gutenberg: .wp-block-paragraph).
   * Concorrente: article.css .article-prose { 1.0625rem } (~17px) herdado.
   * 0.1.24 usava 15px e ainda parecia grande no Safari → descer para 14px.
   */
  html body.is-article .article-prose,
  html body.single .article-prose,
  html body.is-article .article-prose p,
  html body.single .article-prose p,
  html body.is-article .article-prose > p,
  html body.single .article-prose > p,
  html body.is-article .article-prose li,
  html body.single .article-prose li,
  html body.is-article .article-prose blockquote,
  html body.single .article-prose blockquote,
  html body.is-article .article-prose .wp-block-paragraph,
  html body.single .article-prose .wp-block-paragraph,
  html body.is-article .article-prose p.has-background,
  html body.single .article-prose p.has-background,
  html body.is-article .article-body .article-prose p,
  html body.single .article-body .article-prose p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  html body.is-article .article-prose p,
  html body.single .article-prose p {
    margin-bottom: 0.65rem;
  }
  /* Headings internos: menores que desktop, mas acima do parágrafo. */
  html body.is-article .article-prose h2,
  html body.single .article-prose h2 {
    font-size: 16px;
    line-height: 1.3;
  }
  html body.is-article .article-prose h3,
  html body.single .article-prose h3 {
    font-size: 15px;
    line-height: 1.3;
  }

  /*
   * Imagens DENTRO do corpo (não o hero) — 0.1.24
   * Não forçar 16:9. Proporção original + largura reduzida + centralizada.
   */
  html body.is-article .article-prose .wp-block-image,
  html body.single .article-prose .wp-block-image,
  html body.is-article .article-prose figure,
  html body.single .article-prose figure {
    max-width: 60%;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
  }
  html body.is-article .article-prose img,
  html body.single .article-prose img,
  html body.is-article .article-prose .wp-block-image img,
  html body.single .article-prose .wp-block-image img,
  html body.is-article .article-prose figure img,
  html body.single .article-prose figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
  }
  html body.is-article .article-prose figcaption,
  html body.single .article-prose figcaption {
    max-width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
  }

  html body.is-busca .search-item-link {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.45rem 0;
  }
  html body.is-busca .search-item-media,
  html body.is-busca .search-item-media img,
  html body.is-busca .search-item-media .card-media {
    width: 110px !important;
    max-width: 110px !important;
    height: 72px !important;
  }
  html body.is-busca .search-item-title,
  html body.is-busca .search-item h2 { font-size: 1rem; line-height: 1.25; }
  html body.is-busca .search-item-excerpt,
  html body.is-busca .search-item .excerpt {
    font-size: 0.8rem;
    -webkit-line-clamp: 1;
  }

  html body { padding-bottom: 52px; }
  html body .player { border-top-width: 2px; }
  html body .player-inner { padding: 0.22rem 0.75rem; gap: 0.45rem; min-height: 46px; grid-template-columns: auto 1fr; }
  html body .volume { display: none !important; }
  html body .play-toggle { width: 32px; height: 32px; }
  html body .play-toggle svg { width: 15px; height: 15px; }
  html body .player-copy { display: flex; flex-direction: row; align-items: center; gap: 0.45rem; min-width: 0; }
  html body .live-flag { flex: 0 0 auto; margin-bottom: 0; padding-right: 0.5rem; position: relative; font-size: 0.54rem; white-space: nowrap; }
  html body .live-flag::after { content: ""; position: absolute; right: 0; top: 16%; bottom: 16%; width: 2px; background: var(--yellow); }
  html body .player-meta strong { font-size: 0.72rem; line-height: 1.1; }
  html body .player-meta #player-show,
  html body .player-meta #player-track { font-size: 0.62rem; }
  html body .player-meta #player-track:empty { display: none; }
  html body .wa-float { width: 40px; height: 40px; bottom: 3.8rem; right: 0.7rem; }
  html body .wa-float svg { width: 20px; height: 20px; }
  html body .toast { bottom: 4rem; }
  html body .site-footer { padding: 1.2rem 0.85rem 4.2rem; font-size: 0.85rem; }
  html body .footer-brand img { width: 88px; height: 88px; }
}
