/* FocaWeb CMS v1.5.0
   Integração dinâmica preservando o contrato visual do front congelado v1.0.3. */

[hidden] { display: none !important; }

.focaweb-media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 13.5rem;
  background: #eaf0f8;
  color: var(--gr-blue-700, #1557b0);
  font-size: 2.35rem;
}

.gr-news-archive__grid .gr-latest-news__item-media {
  min-height: 14rem;
  background: #eaf0f8;
}

.gr-news-archive__grid .gr-latest-news__item-media img,
.gr-single-related__grid .gr-latest-news__item-media img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
}

.gr-news-archive__grid .gr-latest-news__item-content > p,
.gr-single-related__grid .gr-latest-news__item-content > p,
.gr-flag-card__copy > p,
.gr-city-flag-accordion__delivery-copy > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.focaweb-active-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin: 0 0 1.25rem;
  padding: .8rem 1rem;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-sm);
  background: var(--gr-white);
  color: var(--gr-blue-900);
  font-weight: 700;
}

.focaweb-active-filter a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  color: var(--gr-blue-700);
}

.focaweb-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: .65rem;
  padding: 3.5rem 1.5rem;
  border: 1px dashed rgba(12, 69, 155, .25);
  border-radius: var(--gr-radius-lg);
  background: rgba(239, 246, 255, .7);
  text-align: center;
}

.focaweb-empty-state > i {
  color: var(--gr-blue-700);
  font-size: 2.2rem;
}

.focaweb-empty-state h2,
.focaweb-empty-state p { margin: 0; }

.focaweb-entry-featured { margin: 0 0 1.5rem; }
.focaweb-entry-featured img { display: block; width: 100%; }
.focaweb-entry-featured figcaption,
.gr-news-article__featured figcaption {
  margin-top: .65rem;
  color: var(--gr-muted);
  font-size: .82rem;
}

.focaweb-article-body {
  color: var(--gr-text);
  font-size: var(--gr-type-body, 1rem);
  line-height: 1.75;
}

.focaweb-article-body > :first-child { margin-top: 0; }
.focaweb-article-body p,
.focaweb-article-body ul,
.focaweb-article-body ol { margin: 0 0 1.25rem; }
.focaweb-article-body h2,
.focaweb-article-body h3,
.focaweb-article-body h4 {
  margin: 2rem 0 .8rem;
  color: var(--gr-blue-950);
  line-height: 1.22;
}
.focaweb-article-body a {
  color: var(--gr-blue-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.focaweb-article-body li + li { margin-top: .4rem; }

.gr-page-single-action .gr-article > .gr-quote,
.gr-page-single-action .gr-article > .gr-timeline,
.gr-page-single-action .gr-article > .gr-gallery,
.gr-page-single-action .gr-article > .gr-share { margin-top: 1.75rem; }

.gr-page-single-action .gr-page-hero__meta .gr-chip,
.gr-page-single-news .gr-news-article__details span,
.gr-page-single-news .gr-news-article__details a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.focaweb-comments-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.2rem;
  border: 1px dashed rgba(12, 69, 155, .24);
  border-radius: var(--gr-radius-lg);
  background: rgba(239, 246, 255, .55);
}
.focaweb-comments-empty > i { color: var(--gr-blue-700); font-size: 1.65rem; }
.focaweb-comments-empty strong,
.focaweb-comments-empty p { margin: 0; }

.gr-pagination .is-current {
  color: var(--gr-white);
  background: var(--gr-blue-800);
  pointer-events: none;
}

@media (max-width: 720px) {
  .focaweb-active-filter { align-items: flex-start; flex-direction: column; }
  .focaweb-active-filter a { margin-left: 0; }
  .focaweb-comments-empty { grid-template-columns: 1fr; }
}

/* Passo 3 — correção isolada da listagem geral de Notícias.
   Categoria e Busca permanecem com o contrato visual congelado. */
.gr-page-news-index .gr-news-archive__grid .gr-latest-news__item-media {
  min-height: 0;
}

.gr-page-news-index .gr-news-archive__grid .gr-latest-news__item-media img {
  min-height: 0;
}

.gr-page-news-index .gr-latest-news__item-content {
  position: relative;
  z-index: 1;
  background: var(--gr-white);
}

.gr-page-news-index .gr-latest-news__item-meta {
  position: static;
  margin: 0;
  transform: none;
}

/* Fechamento final v1.7.0 -------------------------------------------------- */

/* Os quatro destaques de Atuação usam a capa real do conteúdo. */
.gr-page-actions .gr-actions-flags-showcase .gr-flag-card.has-cms-featured-image {
  background:
    linear-gradient(135deg, rgba(4, 24, 58, .88), rgba(4, 24, 58, .52)),
    var(--focaweb-card-image) center / cover no-repeat !important;
}

.gr-page-actions .gr-actions-flags-showcase .gr-flags-grid > .gr-flag-card:first-child {
  background:
    linear-gradient(145deg, rgba(10, 143, 70, .66), rgba(4, 27, 77, .88)),
    var(
      --focaweb-card-image,
      var(--gr-city-hero-image, url("../../images/mapa-ms-regioes.svg"))
    ) center / cover no-repeat !important;
}

.gr-page-actions .gr-actions-flags-showcase .gr-flag-card.has-cms-featured-image,
.gr-page-actions .gr-actions-flags-showcase .gr-flag-card.has-cms-featured-image :is(h3, p, small, span, i) {
  color: #fff;
}

/* Conteúdo produzido no RichEditor do Filament. */
.focaweb-article-body blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.4rem;
  border-left: .3rem solid var(--gr-blue-700, #1557b0);
  border-radius: 0 var(--gr-radius-sm, .75rem) var(--gr-radius-sm, .75rem) 0;
  background: rgba(21, 87, 176, .07);
  color: var(--gr-blue-950, #071d43);
  font-size: 1.08em;
  font-weight: 700;
}

.focaweb-article-body hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--gr-border, #dce4ef);
}

.focaweb-article-body pre,
.focaweb-article-body code {
  border-radius: .45rem;
  background: #eef3f8;
  color: #17243a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.focaweb-article-body code { padding: .15em .35em; }
.focaweb-article-body pre { overflow-x: auto; padding: 1rem; }
.focaweb-article-body pre code { padding: 0; background: transparent; }

.focaweb-article-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  background: #fff;
}

.focaweb-article-body th,
.focaweb-article-body td {
  padding: .75rem;
  border: 1px solid var(--gr-border, #dce4ef);
  text-align: left;
  vertical-align: top;
}

.focaweb-article-body th {
  background: #eef4fb;
  color: var(--gr-blue-950, #071d43);
}

/* Aviso editorial configurado no admin. */
.focaweb-editorial-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(21, 87, 176, .2);
  border-left-width: .3rem;
  border-radius: var(--gr-radius-sm, .75rem);
  background: #f0f6ff;
  color: var(--gr-blue-950, #071d43);
}

.focaweb-editorial-notice > i { margin-top: .1rem; font-size: 1.35rem; }
.focaweb-editorial-notice strong { display: block; margin-bottom: .25rem; }
.focaweb-editorial-notice p { margin: 0; }
.focaweb-editorial-notice--success { border-color: #159a66; background: #edf9f3; }
.focaweb-editorial-notice--warning { border-color: #d69a00; background: #fff8e6; }
.focaweb-editorial-notice--important { border-color: #c43f4f; background: #fff0f2; }

@media (max-width: 720px) {
  .focaweb-editorial-notice { grid-template-columns: 1fr; }
  .focaweb-article-body table { display: block; overflow-x: auto; }
}

/* Ícone das bandeiras nos 4 destaques de Atuação: mantém o mesmo padrão
   visual do accordion (fundo amarelo, símbolo azul), mesmo quando o card
   tem foto de fundo. */
.gr-page-actions .gr-actions-flags-showcase .gr-flag-card.has-cms-featured-image .gr-flag-card__icon {
  background: var(--gr-yellow-500);
}

.gr-page-actions .gr-actions-flags-showcase .gr-flag-card.has-cms-featured-image .gr-flag-card__icon i {
  color: var(--gr-blue-950) !important;
}
