/* Ajustes finais para aprovação do chefe — agosto/2026 */

/* Dar um pouco mais de visibilidade à marca do portal no topo */
body > nav > div:first-child img {
  width: 54px !important;
  height: 66px !important;
}
body > nav > div:first-child h1 {
  font-size: .95rem !important;
  line-height: 1.15 !important;
}

/* Retirar a marca da Camargo e Gomes da seção Quem Somos */
#quem-somos > img:first-of-type {
  display: none !important;
}

/* Banner do Seminário de Maceió */
#noticias .seminario-maceio-banner {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(17,19,19,.08);
  box-shadow: 0 10px 28px rgba(17,19,19,.08);
  background: #fff;
}
#noticias .seminario-maceio-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Fala Ouvidor: mesmo padrão visual do cabeçalho de Inscreva-se */
#fala-ouvidor > div:first-child {
  position: relative;
  overflow: hidden;
  background: #111313 !important;
  border: 1px solid #252a2a;
  border-radius: 22px !important;
  box-shadow: 0 18px 42px rgba(17,19,19,.11) !important;
}
#fala-ouvidor > div:first-child::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -55px;
  top: -65px;
  border-radius: 50%;
  background: #5d9aa9;
  opacity: .75;
}
#fala-ouvidor > div:first-child h2 {
  color: #fff !important;
  position: relative;
  z-index: 1;
}
#fala-ouvidor > div:first-child p {
  color: #c7dfe3 !important;
  position: relative;
  z-index: 1;
}

/* Controle de tela cheia independente do player incorporado */
.portal-video-fullscreen {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

[data-video-shell]:fullscreen,
[data-video-shell]:-webkit-full-screen,
[data-video-shell].portal-video-expanded {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  background: #000 !important;
}

[data-video-shell].portal-video-expanded {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
}

[data-video-shell]:fullscreen iframe,
[data-video-shell]:-webkit-full-screen iframe,
[data-video-shell].portal-video-expanded iframe {
  width: 100% !important;
  height: 100% !important;
}

html.portal-video-lock,
html.portal-video-lock body {
  overflow: hidden !important;
}

/* Google Forms permanece integrado à página, mas dentro de uma janela de
   altura proporcional à tela. Assim a rolagem longa fica contida no próprio
   formulário e a confirmação de envio não deixa um grande espaço em branco. */
.inscreva-se-form-shell,
.fala-ouvidor-form-shell {
  position: relative;
  height: clamp(40rem, 74dvh, 54rem);
  min-height: 0;
  background: #fff;
}

/* O Fala Ouvidor tem mais campos e precisa de uma janela de preenchimento
   mais alta em desktop. A regra compacta da confirmação, logo abaixo,
   continua prevalecendo depois do envio. */
.fala-ouvidor-form-shell {
  height: clamp(44rem, 82dvh, 58rem);
}

.inscreva-se-form-frame,
.fala-ouvidor-form-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  overscroll-behavior: contain;
}

/* A confirmação de envio do Fala Ouvidor ocupa muito menos espaço que as
   perguntas. Evita a grande faixa branca que sobrava sob o rodapé do Google. */
.fala-ouvidor-form-shell.form-response-view {
  height: clamp(21rem, 43dvh, 25rem);
}

/* iPad e tablets: a janela acompanha melhor as duas orientações. */
@media (min-width: 768px) and (max-width: 1180px) {
  .inscreva-se-form-shell {
    height: clamp(38rem, 72dvh, 50rem);
  }

  .fala-ouvidor-form-shell {
    height: clamp(44rem, 82dvh, 58rem);
  }

  .fala-ouvidor-form-shell.form-response-view {
    height: clamp(21rem, 43dvh, 25rem);
  }
}

/* Celular: preserva área confortável para o preenchimento sem transformar a
   seção inteira numa página de mais de dois mil pixels. */
@media (max-width: 767px) {
  .inscreva-se-form-shell {
    height: clamp(34rem, 70dvh, 44rem);
  }

  .fala-ouvidor-form-shell {
    height: clamp(42rem, 82dvh, 50rem);
  }

  .fala-ouvidor-form-shell.form-response-view {
    height: clamp(23rem, 53dvh, 27rem);
  }
}

/* Mapa: mais área visual em desktop, sem alterar dados, controles ou navegação. */
@media (min-width: 1181px) and (min-height: 621px) {
  #mapa > div:first-child {
    width: 65% !important;
  }
  #mapa > div:nth-child(2) {
    width: 35% !important;
  }
  #mapa-canvas {
    min-height: clamp(480px, 64vh, 680px) !important;
  }
}

/* No iPad e em tablets, o mapa ocupa toda a largura útil; o painel permanece
   acessível como gaveta, com os mesmos controles e informações. */
@media (min-width: 768px) and (max-width: 1180px) and (min-height: 621px) {
  #mapa {
    height: auto !important;
    min-height: 100% !important;
    flex-direction: column !important;
    overflow: visible !important;
    position: relative;
    padding-bottom: 1rem;
  }
  #mapa > div:first-child {
    width: 100% !important;
    flex: none !important;
    padding: 1rem 1.25rem !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--opb-line) !important;
  }
  #mapa-canvas {
    flex: none !important;
    width: 100% !important;
    min-height: 430px !important;
    height: clamp(430px, 54dvh, 560px) !important;
    max-height: 560px !important;
  }
  #mapa > div:nth-child(2) {
    width: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }
  #mapa-vazio {
    display: none !important;
  }
  #mapa-painel {
    position: fixed !important;
    left: 16rem;
    right: 0;
    bottom: 0;
    width: auto !important;
    height: min(60dvh, 600px) !important;
    max-height: calc(100dvh - 32px) !important;
    z-index: 40;
    background: var(--opb-paper) !important;
    border: 1px solid var(--opb-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 52px rgba(17,19,19,.20);
    overflow: hidden !important;
  }
  #mapa-painel.hidden {
    display: none !important;
  }
  #mapa-painel.flex {
    display: flex !important;
  }
}

/* No celular em pé, o mapa ganha altura, usa praticamente toda a largura
   física da tela e recebe uma pequena correção óptica para a direita. A
   gaveta, os cliques e o modo deitado permanecem iguais. */
@media (max-width: 767px) and (orientation: portrait) {
  #mapa-canvas {
    width: calc(100% + 1.8rem) !important;
    margin-left: -.9rem !important;
    min-height: 320px !important;
    height: clamp(320px, 48dvh, 400px) !important;
    max-height: 400px !important;
    overflow: hidden !important;
  }
  #mapa-canvas svg {
    transform: translateX(2.5%) scale(1.28);
    transform-origin: 50% 50%;
  }
}

@media (max-width: 767px) {
  body > nav > div:first-child {
    padding-top: .72rem !important;
    padding-bottom: .72rem !important;
  }
  body > nav > div:first-child img {
    width: 48px !important;
    height: 59px !important;
  }
  body > nav > div:first-child h1 {
    font-size: .88rem !important;
    line-height: 1.12 !important;
  }
  #noticias .seminario-maceio-banner {
    border-radius: 14px;
  }
}

/* Notícias: capa editorial com uma matéria principal e duas chamadas laterais. */
#noticias {
  max-width: 82rem !important;
}
#noticias-dinamicas {
  display: block !important;
}
#noticias-dinamicas .news-card {
  min-width: 0;
  margin-top: 0 !important;
}
#noticias-dinamicas .news-cover {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(17rem, .85fr);
  gap: 1.1rem;
  align-items: start;
}
#noticias-dinamicas .news-card-rail {
  display: grid;
  grid-auto-rows: auto;
  gap: 1rem;
  min-width: 0;
}
#noticias-dinamicas .news-card-featured .news-text-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  max-height: 16.25em;
  overflow: hidden;
}
#noticias-dinamicas .news-read-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -.4rem 0 .75rem;
  padding: .45rem .85rem;
  color: var(--opb-blue-dark, #315f69);
  background: var(--opb-soft, #edf5f6);
  border: 1px solid currentColor;
  border-radius: .5rem;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}
#noticias-dinamicas .news-read-more[hidden] { display: none; }
#noticias-dinamicas .news-read-more:hover { text-decoration: underline; }
#noticias-dinamicas .news-read-more:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
#noticias-dinamicas .news-card-secondary {
  display: flex;
  flex-direction: column;
}
#noticias-dinamicas .news-card-secondary .news-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem !important;
}
#noticias-dinamicas .news-card-secondary .news-card-image {
  margin-bottom: .85rem !important;
}
#noticias-dinamicas .news-card-secondary .news-card-image img {
  width: 100%;
  max-height: 155px;
  object-fit: contain;
  background: #f8faf9;
}
#noticias-dinamicas .news-card-secondary .news-card-image figcaption {
  display: none;
}
#noticias-dinamicas .news-card-secondary .news-card-title {
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
}
#noticias-dinamicas .news-card-secondary .news-card-subtitle {
  margin-bottom: .7rem !important;
  font-size: .78rem !important;
  line-height: 1.45 !important;
}
#noticias-dinamicas .news-card-secondary .news-card-body > p.text-sm.text-slate-600.leading-relaxed {
  display: none;
}
#noticias-dinamicas .news-card-secondary .news-card-actions {
  margin-top: auto;
  gap: .35rem !important;
  padding-top: .45rem !important;
}
#noticias-dinamicas .news-card-secondary .news-card-actions a {
  padding: .42rem .58rem !important;
  font-size: .68rem !important;
}
#noticias-dinamicas .news-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Tablets e iPad, inclusive em 1024 px: destaque integral e chamadas em dupla. */
@media (max-width: 1180px) {
  #noticias-dinamicas .news-cover {
    grid-template-columns: minmax(0, 1fr);
  }
  #noticias-dinamicas .news-card-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  #noticias-dinamicas .news-card-rail > .news-card:only-child {
    grid-column: 1 / -1;
  }
  #noticias-dinamicas .news-card-secondary .news-card-image img {
    max-height: 190px;
  }
}

/* Celular: um destaque compacto e as demais chamadas em faixa horizontal. */
@media (max-width: 679px) {
  #noticias {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  #noticias-dinamicas .news-card-featured .news-card-body {
    padding: 1rem !important;
  }
  #noticias-dinamicas .news-card-featured .news-card-image {
    margin-bottom: 1rem !important;
  }
  #noticias-dinamicas .news-card-featured .news-card-image img {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    background: #f8faf9;
  }
  #noticias-dinamicas .news-card-rail,
  #noticias-dinamicas .news-archive-grid {
    display: flex;
    gap: .85rem;
    margin-top: 1rem;
    margin-right: -1rem;
    padding-right: 1rem;
    padding-bottom: .35rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #noticias-dinamicas .news-card-rail::-webkit-scrollbar,
  #noticias-dinamicas .news-archive-grid::-webkit-scrollbar {
    display: none;
  }
  #noticias-dinamicas .news-card-rail > .news-card,
  #noticias-dinamicas .news-archive-grid > .news-card {
    flex: 0 0 min(82vw, 21rem);
    scroll-snap-align: start;
  }
}

/* Cards da capa: toda a área é uma ação real, com destino complementar ao hero. */
#home > .grid > .home-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  appearance: none;
  color: inherit;
  border: 1px solid var(--opb-line) !important;
  border-top: 3px solid var(--opb-blue) !important;
  border-radius: 17px !important;
  box-shadow: 0 9px 28px rgba(17,19,19,.055) !important;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#home > .grid > .home-feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(93,154,169,.62) !important;
  box-shadow: 0 15px 38px rgba(17,19,19,.10) !important;
}
#home > .grid > .home-feature-card > div:first-child {
  background: var(--opb-soft) !important;
  color: var(--opb-blue-dark) !important;
  border: 1px solid rgba(93,154,169,.26);
  border-radius: 12px !important;
}
#home > .grid > .home-feature-card > p { flex: 1; }
.home-feature-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  color: var(--opb-blue-dark);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .01em;
}
.home-feature-card-cta i,
.home-feature-card-cta svg {
  width: .95rem;
  height: .95rem;
  transition: transform .16s ease;
}
.home-feature-card:hover .home-feature-card-cta i,
.home-feature-card:hover .home-feature-card-cta svg { transform: translateX(3px); }

/* Indicação reutilizável de rolagem horizontal. As setas só aparecem se houver conteúdo oculto. */
.horizontal-scroll-shell {
  position: relative;
  min-width: 0;
}
.nav-scroll-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.nav-scroll-shell > #main-nav-scroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.news-scroll-shell { min-width: 0; }
.news-scroll-shell > .news-card-rail { height: 100%; }
.horizontal-scroll-cue {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  padding: 0;
  color: var(--opb-blue-deep);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(49,95,105,.22);
  border-radius: 999px;
  box-shadow: 0 7px 22px rgba(17,19,19,.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(.88);
  transition: opacity .16s ease, transform .16s ease, background-color .16s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.horizontal-scroll-cue:hover { background: #fff; }
.horizontal-scroll-cue.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}
.horizontal-scroll-cue-previous { left: .35rem; }
.horizontal-scroll-cue-next { right: .35rem; }
.horizontal-scroll-cue svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}
.nav-scroll-shell .horizontal-scroll-cue {
  color: #fff;
  background: rgba(17,19,19,.90);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 7px 20px rgba(0,0,0,.34);
}
.nav-scroll-shell .horizontal-scroll-cue:hover { background: #232929; }

@media (min-width: 768px) and (min-height: 621px) {
  .nav-scroll-shell .horizontal-scroll-cue { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .horizontal-scroll-cue,
  .home-feature-card,
  .home-feature-card-cta i,
  .home-feature-card-cta svg { transition: none !important; }
}
