/* =========================================================
   COMADEMS — Home · refinamento fino (v3)
   Carregar DEPOIS de comadems-home-v2.css (tema filho).
   Só sobrescreve; não mexe em conteúdo nem em estrutura.
   ========================================================= */

/* 0) Causa raiz dos "respiros" e do desalinhamento:
      o wpautop do WPBakery injeta <br> e <p> vazios dentro de grids/flex,
      e cada <br> vira um item (ocupa célula do grid / cria gap extra). */
.hx-bleed br,
.cmd-v br,
.cmd05-grid br { display: none !important; }
.hx-bleed p:empty { display: none !important; }

/* 1) Ritmo vertical — menos espaço morto entre seções */
body .hx-sec {
  padding-top: clamp(36px, 4.6vw, 56px);
  padding-bottom: clamp(36px, 4.6vw, 56px);
}
body .hx-event       { padding-top: clamp(64px, 7vw, 80px); }
body .hx-slider-sec  { padding-top: 18px; padding-bottom: 18px; }
body .hx-cta         { padding-top: 38px; padding-bottom: 38px; }
body .hx-head        { margin-bottom: clamp(20px, 2.6vw, 30px); }
body .hx-title       { padding-top: 0; line-height: 1.1; }   /* tinha 24px de padding-top */
body .hx-eyebrow     { margin-bottom: 6px; }

/* 2) Topo — hero mais alto para a transparência do header funcionar */
body .hx-hero {
  min-height: clamp(600px, 82vh, 720px);
}
body .hx-hero__inner {
  padding-top: clamp(150px, 18vh, 190px);
  padding-bottom: clamp(96px, 12vh, 120px);
}

/* 3) Cards do evento — 4 colunas alinhadas, mais compactos e finos */
body .hx-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: none;
  width: 100%;
  margin: 0;
  align-items: stretch;
}
body .hx-card {
  padding: 26px 16px 22px;
  gap: 4px;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  border-radius: 14px;
  border: 1px solid rgba(19, 50, 76, .08);
  box-shadow: 0 1px 2px rgba(19, 50, 76, .04), 0 8px 22px -14px rgba(19, 50, 76, .28);
  transition: transform .25s ease, box-shadow .25s ease;
}
body .hx-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(19, 50, 76, .06), 0 16px 30px -14px rgba(19, 50, 76, .38);
}
body .hx-card b      { font-size: 19px; line-height: 1.2; }
body .hx-card b em   { font-size: inherit; }
body .hx-card > span:last-child { font-size: 13px; opacity: .8; }

/* 3b) Ícones em losango — um tamanho só, em todo o site */
body .hx-diamond {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 2px 0 14px;
}
body .hx-diamond::before {
  width: 42px;
  height: 42px;
  top: 50%;
  left: 50%;
  margin: 0;
  border-radius: 6px;
  transform: translate(-50%, -50%) rotate(45deg);
}
body .hx-diamond svg { width: 22px; height: 22px; position: relative; z-index: 1; }

/* 3c) Cards 1 e 2 usavam o logo no lugar do ícone → mesmo losango dos demais */
body .hx-card .hx-logo {
  position: relative;
  width: 60px;
  height: 60px;
  grid-template-columns: 1fr;
  margin: 2px 0 14px;
}
body .hx-card .hx-logo img { display: none; }
body .hx-card .hx-logo::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  border-radius: 6px;
  background: #3fb8e8;
  transform: translate(-50%, -50%) rotate(45deg);
}
body .hx-card .hx-logo::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  background: #fff;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
}
body .hx-event a.hx-card:nth-of-type(1) .hx-logo {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E");
}
body .hx-event a.hx-card:nth-of-type(2) .hx-logo {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

/* 3d) Faixa azul-marinho do evento: sem coluna vazia, mais baixa */
body .cmd-v-event--hero { grid-template-columns: minmax(0, 1fr); }
body .cmd-v-event--hero .cmd-v-event__body { padding: 26px 36px; gap: 4px; }
body .cmd-v-event__title { margin: 0; }

/* 4) Hotéis — losangos menores, itens com largura uniforme */
body .hx-stay__row { gap: clamp(28px, 6vw, 72px); }
body .hx-stay__item { min-width: 150px; }

/* 5) Credencial / Anuidade — imagens com proporção única, botões alinhados */
body .hx-duo { gap: 20px; align-items: stretch; }
body .hx-panel { padding: 20px; }
body .hx-panel > img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
body .hx-panel > div { display: flex; flex-direction: column; flex: 1; }
body .hx-panel > div > p:last-child { margin-top: auto; padding-top: 4px; }

/* 6) Diretoria — fotos sempre redondas e centradas no rosto */
body .cmd-v-people { gap: 14px; }
body .cmd-v-person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
body .cmd-v-person--lead { padding: 14px 22px; }
body .cmd-v-person--lead .cmd-v-person__photo { width: 92px; height: 92px; }
body .cmd-v-person:not(.cmd-v-person--lead) { padding: 14px 10px 16px; }
body .cmd-v-person:not(.cmd-v-person--lead) .cmd-v-person__photo {
  width: 84px; height: 84px; margin-bottom: 10px;
}

/* 7) Notícias — imagem 16:10, título enxuto, "Leia" sempre alinhado embaixo */
body .cmd05-grid { gap: 22px; }
body .cmd05-card { display: flex; flex-direction: column; }
body .cmd05-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
}
body .cmd05-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
body .cmd05-card:hover .cmd05-thumb img { transform: scale(1.04); }
body .cmd05-card-body { flex: 1; display: flex; flex-direction: column; }
body .cmd05-meta { margin: 12px 0 6px; }
body .cmd05-card-body h3 {
  padding: 0;
  margin: 0 0 8px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.22;
}
body .cmd05-card-body p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body .cmd05-read { margin-top: auto; }

/* 8) Igrejas — miniatura quadrada uniforme, nome em até 2 linhas */
body .cmd-v-churches {
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
body .cmd-v-church {
  padding: 12px;
  gap: 10px;
  align-content: start;
  text-align: center;
}
body .cmd-v-church img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f3f6f9;
  border-radius: 10px;
}
body .cmd-v-church__name {
  justify-self: stretch;
  font-size: 13px;
  line-height: 1.25;
  min-height: 2.5em;
}

/* 9) Responsivo dos cards do evento */
@media (max-width: 860px) { body .hx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { body .hx-cards { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  body .hx-card, body .cmd05-thumb img { transition: none; }
  body .hx-card:hover, body .cmd05-card:hover .cmd05-thumb img { transform: none; }
}

/* =========================================================
   1.19.0 — Topo com fotos de fundo e números da Convenção
   Marcação: comadems-core 0.5.9 ([comadems_topo_fundo] e
   [comadems_numeros]). Conteúdo em Comunicação › Topo da Home.
   ========================================================= */

/* Fotos de fundo do topo: monocromático azul, em transparência,
   alternando devagar atrás do texto (o canvas de partículas fica por cima). */
body .hx-hero { isolation: isolate; }
.hx-hero__art {
  position: absolute; inset: 0; z-index: 0; margin: 0; pointer-events: none; overflow: hidden;
}
.hx-hero__art img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none;
  object-fit: cover; object-position: 50% 22%;
  opacity: 0; filter: grayscale(1) contrast(1.15) brightness(1.05); mix-blend-mode: screen;
  transform: scale(1.04);
  transition: opacity 1.8s ease, transform 9s ease-out;
}
.hx-hero__art img.is-on { opacity: var(--hx-art-opacity, .3); transform: scale(1); }
.hx-hero__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 44% 52% at 50% 56%, rgba(10, 34, 54, .78) 0%, rgba(10, 34, 54, .38) 55%, rgba(10, 34, 54, .04) 100%),
    linear-gradient(180deg, rgba(10, 34, 54, .62) 0%, rgba(10, 34, 54, 0) 24%, rgba(10, 34, 54, 0) 70%, rgba(10, 34, 54, .92) 100%);
}
body .hx-hero .hx-hero__fx { z-index: 1; }
body .hx-hero .hx-hero__glow { z-index: 1; }
body .hx-hero .hx-hero__inner,
body .hx-hero .hx-scroll { position: relative; z-index: 2; }
@media (max-width: 767px) {
  .hx-hero__art img { object-position: 50% 18%; }
  .hx-hero__art::after {
    background: linear-gradient(180deg, rgba(10, 34, 54, .7) 0%, rgba(10, 34, 54, .45) 35%, rgba(10, 34, 54, .6) 70%, rgba(10, 34, 54, .95) 100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hx-hero__art img { transition: none; transform: none; }
}

/* Números: número grande, rótulo e a linha de detalhe embaixo. */
body .hx-counter { align-items: center; padding-top: 22px; padding-bottom: 22px; }
body .hx-counter__txt { min-width: 0; }
body .hx-counter__txt strong { letter-spacing: -.01em; }
body .hx-counter__txt > span { margin-top: .35rem; font-weight: 600; line-height: 1.2; }
body .hx-counter__note {
  display: block; margin-top: .3rem; max-width: 22ch;
  font-size: .8125rem; font-weight: 400; line-height: 1.35; opacity: .78;
}
body .hx-counter .cmd-icon { width: 26px; height: 26px; }
@media (min-width: 900px) {
  body .hx-counters--n4 .hx-counter { justify-content: flex-start; padding-left: 22px; padding-right: 18px; }
}
@media (max-width: 560px) {
  body .hx-counters__list { grid-template-columns: 1fr !important; }
  body .hx-counter { justify-content: flex-start; padding-left: 22px; }
  body .hx-counter__note { max-width: none; }
}

/* ==========================================================================
   1.19.1 — Números: conteúdo alinhado pelo topo, para os quatro cartões
   ficarem na mesma linha mesmo quando um rótulo quebra; notas sem palavra solta.
   ========================================================================== */
body .hx-counter { align-items: flex-start !important; gap: .9rem; padding: 24px 20px 24px 22px; }
body .hx-counter__ico { width: 48px; height: 48px; margin-top: 2px; }
body .hx-counter__txt { flex: 1 1 auto; }
body .hx-counter__txt > span { font-size: .9375rem; }
body .hx-counter__note { max-width: none; text-wrap: balance; }
@media (min-width: 640px) {
  body .hx-counter { justify-content: flex-start; }
}
