/* =========================================================
   PUBLICAÇÕES - Carrossel (Swiper)
   Estrutura:
   .jch-pubs-wrap
     .jch-pubs-swiper.swiper
       .swiper-wrapper
         .swiper-slide.jch-pubs-card
     .jch-pubs-prev/.jch-pubs-next
     .jch-pubs-pagination
   ========================================================= */

:root{ --jch-gap: 18px; } /* precisa bater com data-gap / JS */

/* Wrapper externo: setas/bullets fora */
.jch-pubs-wrap{
  position: relative;
  overflow: visible !important;
  padding-bottom: 22px;
  z-index: 1;
}

/* Swiper viewport */
.jch-pubs-wrap .jch-pubs-swiper.swiper{
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box;
  display: block !important;
}

/* Wrapper precisa ser flex */
.jch-pubs-wrap .jch-pubs-swiper .swiper-wrapper{
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch;
  box-sizing: border-box;
}

/* IMPORTANTÍSSIMO: largura por CSS (Swiper está em slidesPerView:'auto') */
.jch-pubs-wrap .jch-pubs-swiper .swiper-slide{
  flex: 0 0 auto !important;
  box-sizing: border-box;
  height: auto;
  overflow: hidden;

  /* mobile: mostra 1.x */
  width: 86% !important;
}

/* >=520: 2 colunas */
@media (min-width: 520px){
  .jch-pubs-wrap .jch-pubs-swiper .swiper-slide{
    width: calc((100% - var(--jch-gap)) / 2) !important;
  }
}

/* >=900: 3 colunas */
@media (min-width: 900px){
  .jch-pubs-wrap .jch-pubs-swiper .swiper-slide{
    width: calc((100% - (2 * var(--jch-gap))) / 3) !important;
  }
}

/* >=1024: 4 colunas */
@media (min-width: 1024px){
  .jch-pubs-wrap .jch-pubs-swiper .swiper-slide{
    width: calc((100% - (3 * var(--jch-gap))) / 4) !important;
  }
}

/* Card/link não podem “estourar” largura */
.jch-pubs-card{ min-width: 0 !important; }
.jch-pubs-link{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-decoration: none !important;
  color: #fff !important;
  white-space: normal !important;
}

/* Imagem (um pouco menos “A4 alto”) */
.jch-pubs-media{
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.08);
  aspect-ratio: 210 / 297;
  max-height: 360px; /* ajuste fino */
}
.jch-pubs-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.jch-pubs-img--placeholder{
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.15);
}

/* Título (quebra garantida) */
.jch-pubs-title{
  margin: 10px 0 6px;
  font-size: 1.08rem; /* um pouco maior */
  line-height: 1.25;
  font-weight: 700;
  color: #fff !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;

  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;

  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* Meta */
.jch-pubs-meta{
  font-size: .9rem;
  opacity: .95;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.jch-pubs-date, .jch-pubs-sep, .jch-pubs-more{ color:#fff !important; }
.jch-pubs-more{ text-decoration: underline; }

/* Setas brancas */
.jch-pubs-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.18);
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  z-index: 9999;
  cursor: pointer;
}
.jch-pubs-prev{ left: -18px; }
.jch-pubs-next{ right: -18px; }

.jch-pubs-arrow::before{
  content:"";
  width: 10px; height: 10px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: center;
}
.jch-pubs-prev::before{ transform: translate(-35%,-50%) rotate(135deg); }
.jch-pubs-next::before{ transform: translate(-65%,-50%) rotate(-45deg); }

/* Bullets */
.jch-pubs-pagination{
  position: absolute;
  left: 0; right: 0;
  bottom: -18px;
  text-align: center;
  z-index: 9999;
}
.jch-pubs-pagination .swiper-pagination-bullet{
  width:10px; height:10px;
  margin:0 5px;
  background:#fff;
  opacity:.35;
}
.jch-pubs-pagination .swiper-pagination-bullet-active{ opacity:1; }

@media (max-width: 1024px){
  .jch-pubs-prev{ left: -12px; }
  .jch-pubs-next{ right: -12px; }
}
@media (max-width: 767px){
  .jch-pubs-wrap{ padding-bottom: 22px; }
  .jch-pubs-pagination{ bottom: -14px; }
  .jch-pubs-media{ max-height: 420px; }
}
.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-media{
  max-height: 410px !important;
  margin: 0 auto 6px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-title{
  text-align: center !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-meta{
  justify-content: center !important;
  text-align: center !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap{
  padding-bottom: 34px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-pagination{
  bottom: -26px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-arrow{
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.45) !important;
}


/* ===== Imagem maior e centralizada ===== */
.jch-pubs-wrap .jch-pubs-media{
  max-height: 410px;              /* era 360 — ajuste fino: 390–430 */
  margin: 0 auto 6px;            /* centraliza e dá respiro antes do título */
}

/* Centralizar título e meta */
.jch-pubs-wrap .jch-pubs-title{
  text-align: center !important;
}
.jch-pubs-wrap .jch-pubs-meta{
  justify-content: center !important;
  text-align: center !important;
}

/* Respiro entre carrossel e bullets */
.jch-pubs-wrap{
  padding-bottom: 34px !important; /* aumenta o espaço total */
}
.jch-pubs-wrap .jch-pubs-pagination{
  bottom: -26px !important;        /* afasta mais do conteúdo */
}

/* Setas: ícone branco, fundo mais transparente */
.jch-pubs-wrap .jch-pubs-arrow{
  background: rgba(255,255,255,.10) !important;  /* mais transparente */
  border: 1px solid rgba(255,255,255,.45) !important;
}
.jch-pubs-wrap .jch-pubs-arrow::before{
  border-right: 3px solid #fff !important;
  border-bottom: 3px solid #fff !important;
}
.jch-pubs-wrap .jch-pubs-arrow:hover{
  background: rgba(255,255,255,.16) !important;
}
.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-media{
  max-height: 410px !important;
  margin: 0 auto 6px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-title{
  text-align: center !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-meta{
  justify-content: center !important;
  text-align: center !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap{
  padding-bottom: 34px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-pagination{
  bottom: -26px !important;
}

.elementor .elementor-shortcode .jch-pubs-wrap .jch-pubs-arrow{
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.45) !important;
}

/* ===== Ajuste fino: enquadrar imagem no espaço (sem esticar) ===== */

/* diminui um pouco a altura do bloco e garante o corte correto */
.jch-pubs-wrap .jch-pubs-media{
  /* antes estava 210/297 (bem alto). aqui fica um pouco menos vertical */
  aspect-ratio: 210 / 280 !important;     /* ajuste fino (270–285) */
  max-height: 360px !important;           /* diminui um pouco a vertical */
  display: block !important;
  margin: 0 auto 10px !important;
  overflow: hidden !important;
  background: rgba(0,0,0,.10) !important;
}

/* garante que a imagem SEMPRE preencha e corte dentro do frame */
.jch-pubs-wrap .jch-pubs-media .jch-pubs-img,
.jch-pubs-wrap .jch-pubs-media img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;           /* força enquadrar/cortar */
  object-position: center center !important;
}

/* placeholder também ocupa o frame inteiro */
.jch-pubs-wrap .jch-pubs-img--placeholder{
  width: 100% !important;
  height: 100% !important;
}

