/*
 * Página da unidade: Eventos ("Universo em ação", #unit-events.eventos-home).
 *
 * Porte da seção de eventos do css/eventos-localizacao.css da Unitri para o template
 * pages/unidades/unidades.php. Todo seletor é escopado em #unit-events.eventos-home.
 * Os tokens --ui-* vêm de css/ui-tokens.css e o cabeçalho usa css/secao-cabecalho.css.
 */

/* ================================================================== */
/* 1. SEÇÃO E FUNDO (#unit-events.eventos-home)                       */
/* ================================================================== */

#unit-events.eventos-home {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding: 96px 0;
  background: var(--ui-bg-indigo);
  font-family: var(--ui-font);
}

/* ---- Pontos decorativos (lilás e amarelo), flutuando devagar atrás do conteúdo, a ~35% sobre o índigo ---- */
#unit-events.eventos-home .eventos-home__pontos {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#unit-events.eventos-home .eventos-home__pontos span {
  position: absolute;
  display: block;
  border-radius: 50%;
  animation: eventos-home-flutuar 24s ease-in-out infinite alternate;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(1) {
  top: 7%;
  left: 5%;
  width: 22px;
  height: 22px;
  background: var(--ui-lilac);
  opacity: 0.35;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(2) {
  top: 16%;
  right: 8%;
  width: 14px;
  height: 14px;
  background: var(--ui-yellow);
  opacity: 0.35;
  animation-duration: 28s;
  animation-delay: -6s;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(3) {
  top: 46%;
  left: 2%;
  width: 12px;
  height: 12px;
  background: var(--ui-yellow);
  opacity: 0.35;
  animation-duration: 30s;
  animation-delay: -12s;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(4) {
  top: 58%;
  right: 4%;
  width: 28px;
  height: 28px;
  background: var(--ui-lilac);
  opacity: 0.35;
  animation-duration: 26s;
  animation-delay: -3s;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(5) {
  bottom: 9%;
  left: 14%;
  width: 16px;
  height: 16px;
  background: var(--ui-lilac);
  opacity: 0.35;
  animation-duration: 32s;
  animation-delay: -9s;
}

#unit-events.eventos-home .eventos-home__pontos span:nth-child(6) {
  right: 18%;
  bottom: 6%;
  width: 12px;
  height: 12px;
  background: var(--ui-yellow);
  opacity: 0.35;
  animation-duration: 27s;
  animation-delay: -15s;
}

@keyframes eventos-home-flutuar {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(14px, -22px, 0);
  }
}

/* ---- Controles abaixo do trilho: seta | pílulas | seta ---- */
#unit-events.eventos-home .eventos-home__controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px 8px;
}

/* ---- Botões de navegação ---- */
#unit-events.eventos-home .eventos-home__nav-prev,
#unit-events.eventos-home .eventos-home__nav-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* Uma regra global do tema pinta os <i> de branco: a cor é definida aqui. */
#unit-events.eventos-home .eventos-home__nav-prev i,
#unit-events.eventos-home .eventos-home__nav-next i {
  color: inherit;
  font-size: 16px;
}

#unit-events.eventos-home .eventos-home__nav-prev:not(:disabled):not(.swiper-button-disabled):hover,
#unit-events.eventos-home .eventos-home__nav-next:not(:disabled):not(.swiper-button-disabled):hover,
#unit-events.eventos-home .eventos-home__nav-prev:not(:disabled):not(.swiper-button-disabled):focus-visible,
#unit-events.eventos-home .eventos-home__nav-next:not(:disabled):not(.swiper-button-disabled):focus-visible {
  border-color: var(--ui-yellow);
  background: var(--ui-yellow);
  color: var(--ui-navy);
}

#unit-events.eventos-home .eventos-home__nav-prev:focus-visible,
#unit-events.eventos-home .eventos-home__nav-next:focus-visible {
  outline: 3px solid var(--ui-yellow);
  outline-offset: 3px;
}

#unit-events.eventos-home .eventos-home__nav-prev:disabled,
#unit-events.eventos-home .eventos-home__nav-next:disabled,
#unit-events.eventos-home .eventos-home__nav-prev.swiper-button-disabled,
#unit-events.eventos-home .eventos-home__nav-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ---- Trilho de celulares ----
   Nasce alinhado à esquerda do container de 1200px e "sangra" até a borda direita da tela: o último celular aparece
   cortado e indica que dá para rolar. margin-left compensa os 16px de slidesOffsetBefore (js/unidade-eventos.js).
   Medidas: --cel-w é a largura do celular; --u é 1/128 de --cel-w; a tela tem 120u e proporção 9:19,5. */
#unit-events.eventos-home .mySwiper {
  --cel-w: min(64vw, 260px);
  --u: calc(var(--cel-w) / 128);
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 0 0 calc(max(16px, 50% - 600px) - 16px);
  padding: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  #unit-events.eventos-home .mySwiper {
    --cel-w: 220px;
  }
}

@media (min-width: 1024px) {
  #unit-events.eventos-home .mySwiper {
    --cel-w: 232px;
  }
}

/* O topo guarda a subida (8px), a inclinação e o float (4px); a base guarda a sombra do hover. */
#unit-events.eventos-home .mySwiper .swiper-wrapper {
  padding: 28px 0 56px;
}

/* Poucos celulares (Swiper em isLocked): o trilho ocupa a largura toda e o wrapper centraliza. */
#unit-events.eventos-home .mySwiper.eventos-home__trilho--poucos {
  margin-left: 0;
}

#unit-events.eventos-home .mySwiper.eventos-home__trilho--poucos .swiper-wrapper {
  justify-content: center;
  transform: none !important;
}

#unit-events.eventos-home .mySwiper.eventos-home__trilho--poucos .swiper-slide:last-child {
  margin-right: 0 !important;
}

#unit-events.eventos-home .mySwiper .swiper-slide {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: var(--cel-w) !important;
  min-width: 0 !important;
  height: auto;
  overflow: visible;
  cursor: pointer;
  transition: none !important;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible {
  outline: none;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .cel {
  outline: 3px solid var(--ui-yellow);
  outline-offset: 6px;
}

/* ---- Entrada ao rolar ---- */
#unit-events.eventos-home.eventos-home--anim .mySwiper .swiper-slide {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.96);
}

#unit-events.eventos-home.eventos-home--anim.eventos-home--visivel .mySwiper .swiper-slide {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease !important;
  transition-delay: calc(min(var(--eh-i, 0), 6) * 60ms) !important;
}

/* ---- Celular (.cel): corpo ---- */
#unit-events.eventos-home .mySwiper .swiper-slide .cel {
  --cel-corpo: #f5f5f5;
  --cel-anel: rgba(0, 0, 0, 0.1);
  --cel-botao: #d4d4d4;
  --cel-botao-sombra: #a3a3a3;
  --cel-sombra: 0 12px 28px -14px rgba(28, 26, 74, 0.35);
  position: relative;
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  padding: calc(4 * var(--u));
  border-radius: calc(24 * var(--u));
  background: var(--cel-corpo);
  box-shadow:
    0 0 0 1px var(--cel-anel),
    0 1px 2px rgba(0, 0, 0, 0.1),
    var(--cel-sombra);
  transition:
    translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

#unit-events.eventos-home .mySwiper .swiper-slide:nth-child(3n) .cel {
  --cel-corpo: #e7e4f7;
  --cel-anel: rgba(18, 3, 99, 0.12);
  --cel-botao: #cfc9ef;
  --cel-botao-sombra: #a8a1d8;
}

/* Hover e foco: o celular sobe 8px, gira -2deg, a sombra cresce, a foto dá zoom de 1.05 e a ilha se expande. */
#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .cel {
  --cel-sombra: 0 26px 44px -18px rgba(28, 26, 74, 0.5);
  translate: 0 -8px;
  rotate: -2deg;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__img {
  transform: scale(1.05);
}

@media (hover: hover) {
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .cel {
    --cel-sombra: 0 26px 44px -18px rgba(28, 26, 74, 0.5);
    translate: 0 -8px;
    rotate: -2deg;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__img {
    transform: scale(1.05);
  }
}

/* Float contínuo (0 a -4px, 6s, alternando), só no desktop com ponteiro e sem prefers-reduced-motion. */
@keyframes eventos-home-cel-flutuar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-4px);
  }
}

@media (min-width: 1024px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  #unit-events.eventos-home .mySwiper .swiper-slide .cel {
    animation: eventos-home-cel-flutuar 6s ease-in-out infinite alternate;
    animation-delay: calc(var(--eh-i, 0) * -1.3s);
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .cel,
  #unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .cel {
    animation-play-state: paused;
  }
}

/* ---- Botões laterais ---- */
#unit-events.eventos-home .cel .cel__botoes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#unit-events.eventos-home .cel .cel__botao {
  position: absolute;
  width: calc(2 * var(--u));
  background: var(--cel-botao);
  box-shadow: 0 var(--u) 0 var(--cel-botao-sombra);
}

#unit-events.eventos-home .cel .cel__botao--e1,
#unit-events.eventos-home .cel .cel__botao--e2,
#unit-events.eventos-home .cel .cel__botao--e3 {
  left: calc(-2 * var(--u));
  border-radius: calc(2 * var(--u)) 0 0 calc(2 * var(--u));
}

#unit-events.eventos-home .cel .cel__botao--e1 {
  top: calc(56 * var(--u));
  height: calc(12 * var(--u));
}

#unit-events.eventos-home .cel .cel__botao--e2 {
  top: calc(76 * var(--u));
  height: calc(20 * var(--u));
}

#unit-events.eventos-home .cel .cel__botao--e3 {
  top: calc(104 * var(--u));
  height: calc(20 * var(--u));
}

#unit-events.eventos-home .cel .cel__botao--d1 {
  top: calc(80 * var(--u));
  right: calc(-2 * var(--u));
  height: calc(32 * var(--u));
  border-radius: 0 calc(2 * var(--u)) calc(2 * var(--u)) 0;
}

/* ---- Tela (9:19,5) ---- */
#unit-events.eventos-home .swiper-slide .news-card {
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: calc(20 * var(--u));
  background: var(--ui-indigo-900);
}

#unit-events.eventos-home .swiper-slide .news-card::before {
  content: none;
  display: none;
}

/* Foto: camadas (fundo desfocado 0, foto 1, véu 2, texto 3) */
#unit-events.eventos-home .news-card .news-card__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ui-indigo-900);
}

/* Véu: topo (barra de status legível) e base (título legível sobre qualquer foto) */
#unit-events.eventos-home .news-card .news-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(18, 3, 99, 0.45) 0%, rgba(18, 3, 99, 0) 16%),
    linear-gradient(180deg, rgba(18, 3, 99, 0) 50%, rgba(18, 3, 99, 0.92) 100%);
  pointer-events: none;
}

/* Foto vertical: cover, priorizando o terço de cima (rostos). */
#unit-events.eventos-home .swiper-slide .news-card .news-card__img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: none;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.6s ease;
}

/* Cópia desfocada: escondida, só entra nas fotos contidas */
#unit-events.eventos-home .swiper-slide .news-card .news-card__fundo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  width: 100%;
  max-width: none;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  filter: blur(18px) saturate(1.2);
  opacity: 0.7;
  pointer-events: none;
  transform: scale(1.15);
}

/* Foto mais larga que 0,62 (.is-contida, medida no load): aparece inteira sobre a cópia desfocada */
#unit-events.eventos-home .swiper-slide .news-card.is-contida .news-card__img {
  object-fit: contain;
  object-position: center 40%;
}

#unit-events.eventos-home .swiper-slide .news-card.is-contida .news-card__fundo {
  display: block;
}

/* Sem imagem (URL vazia ou com erro): gradiente índigo com o ícone de jornal */
#unit-events.eventos-home .news-card .news-card__ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 72px;
}

#unit-events.eventos-home .news-card.is-sem-imagem .news-card__media {
  background: linear-gradient(180deg, var(--ui-indigo-800), var(--ui-indigo-900));
}

#unit-events.eventos-home .swiper-slide .news-card.is-sem-imagem .news-card__img,
#unit-events.eventos-home .swiper-slide .news-card.is-sem-imagem .news-card__fundo {
  display: none;
}

#unit-events.eventos-home .news-card.is-sem-imagem .news-card__ph {
  display: flex;
}

/* ---- Barra de status (decorativa): data DD/MM à esquerda; sinal, wi-fi e bateria à direita ---- */
#unit-events.eventos-home .news-card .news-card__status {
  position: absolute;
  top: calc(8 * var(--u));
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(12 * var(--u));
  padding: 0 calc(9 * var(--u));
  color: #fff;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#unit-events.eventos-home .news-card .news-card__hora {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(18, 3, 99, 0.45);
}

#unit-events.eventos-home .news-card .news-card__sinais {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

#unit-events.eventos-home .news-card .news-card__sinais i {
  color: #fff;
  font-size: 10px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(18, 3, 99, 0.45));
}

/* ---- Ilha dinâmica ---- */
#unit-events.eventos-home .news-card .news-card__ilha {
  position: absolute;
  top: calc(8 * var(--u));
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--u));
  width: calc(36 * var(--u));
  height: calc(12 * var(--u));
  overflow: hidden;
  border-radius: calc(6 * var(--u));
  background: #000;
  pointer-events: none;
  transform: translateX(-50%);
  transition:
    width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-radius 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#unit-events.eventos-home .news-card .news-card__ilha::before,
#unit-events.eventos-home .news-card .news-card__ilha::after {
  content: "";
  flex: none;
  border-radius: 50%;
  transition: opacity 0.15s ease;
}

/* Sensor */
#unit-events.eventos-home .news-card .news-card__ilha::before {
  width: calc(3 * var(--u));
  height: calc(3 * var(--u));
  background: #2a2a2e;
}

/* Lente */
#unit-events.eventos-home .news-card .news-card__ilha::after {
  width: calc(4 * var(--u));
  height: calc(4 * var(--u));
  background: radial-gradient(circle at 35% 35%, #4452b8, #12163a 70%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

#unit-events.eventos-home .news-card .news-card__ilha-info {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
}

#unit-events.eventos-home .news-card .news-card__ilha-info i {
  color: var(--ui-yellow);
  font-size: 11px;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__ilha {
  width: 60%;
  height: calc(12 * var(--u) * 1.4);
  border-radius: calc(8 * var(--u));
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__ilha::before,
#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__ilha::after,
#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__status {
  opacity: 0;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__ilha-info {
  opacity: 1;
  transition-duration: 0.2s;
  transition-delay: 0.15s;
}

@media (hover: hover) {
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__ilha {
    width: 60%;
    height: calc(12 * var(--u) * 1.4);
    border-radius: calc(8 * var(--u));
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__ilha::before,
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__ilha::after,
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__status {
    opacity: 0;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__ilha-info {
    opacity: 1;
    transition-duration: 0.2s;
    transition-delay: 0.15s;
  }
}

/* ---- Selo "Novo": a "notificação" logo abaixo da ilha ---- */
#unit-events.eventos-home .news-card .news-card__novo {
  position: absolute;
  top: calc(28 * var(--u));
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px -4px rgba(18, 3, 99, 0.4);
  color: var(--ui-navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

#unit-events.eventos-home .news-card .news-card__novo i {
  color: var(--ui-yellow);
  font-size: 11px;
  filter: drop-shadow(0 0 0.5px rgba(18, 3, 99, 0.7));
}

/* ---- Barra de home: 40u x 3u, a 6u da base da tela ---- */
#unit-events.eventos-home .news-card .news-card__home {
  position: absolute;
  bottom: calc(6 * var(--u));
  left: 50%;
  z-index: 4;
  width: calc(40 * var(--u));
  height: calc(3 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 6px rgba(18, 3, 99, 0.35);
  pointer-events: none;
  transform: translateX(-50%);
}

/* Base: título e "Ver fotos". O padding de baixo deixa a barra de home livre. */
#unit-events.eventos-home .news-card .news-card__base {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px calc(10 * var(--u)) calc(18 * var(--u));
}

#unit-events.eventos-home .swiper-slide .news-card h5.news-card__titulo {
  position: static;
  display: -webkit-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 2px 12px rgba(18, 3, 99, 0.45);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

#unit-events.eventos-home .news-card .news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

#unit-events.eventos-home .news-card .news-card__link i {
  color: var(--ui-yellow);
  font-size: 13px;
}

#unit-events.eventos-home .news-card .news-card__qtd {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  line-height: 1.3;
}

/* Sem fotos: só "Ler mais →" */
#unit-events.eventos-home .news-card .news-card__link--texto::after {
  content: "\2192";
  content: "\2192" / "";
  display: inline-block;
  transition: transform 0.2s ease;
}

#unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__link--texto::after {
  transform: translateX(4px);
}

@media (hover: hover) {
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__link--texto::after {
    transform: translateX(4px);
  }
}

/* ---- Paginação: pílulas ---- */
#unit-events.eventos-home .eventos-home__controles .swiper-pagination {
  position: static;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  margin: 0;
  transform: none;
}

/* Tudo cabe na tela: sem o que rolar, o Swiper marca os controles como "lock". */
#unit-events.eventos-home .eventos-home__nav-prev.swiper-button-lock,
#unit-events.eventos-home .eventos-home__nav-next.swiper-button-lock,
#unit-events.eventos-home .eventos-home__controles .swiper-pagination.swiper-pagination-lock {
  display: none !important;
}

#unit-events.eventos-home .swiper-pagination .swiper-pagination-bullet {
  position: relative;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  cursor: pointer;
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}

/* Área de toque maior que o ponto de 10px */
#unit-events.eventos-home .swiper-pagination .swiper-pagination-bullet::after {
  content: "";
  position: absolute;
  inset: -10px -4px;
}

#unit-events.eventos-home .swiper-pagination .swiper-pagination-bullet-active {
  width: 24px;
  background: var(--ui-yellow);
}

#unit-events.eventos-home .swiper-pagination .swiper-pagination-bullet:focus-visible {
  outline: 3px solid var(--ui-yellow);
  outline-offset: 3px;
}

/* ================================================================== */
/* Responsivo                                                         */
/* ================================================================== */
@media (max-width: 767.98px) {
  #unit-events.eventos-home {
    padding: 64px 0;
  }
}

/* ================================================================== */
/* Movimento reduzido: sem float, entrada, subida, inclinação, zoom   */
/* ================================================================== */
@media (prefers-reduced-motion: reduce) {
  #unit-events.eventos-home .eventos-home__nav-prev,
  #unit-events.eventos-home .eventos-home__nav-next,
  #unit-events.eventos-home .mySwiper .swiper-slide .cel,
  #unit-events.eventos-home .swiper-slide .news-card .news-card__img,
  #unit-events.eventos-home .news-card .news-card__ilha,
  #unit-events.eventos-home .news-card .news-card__ilha::before,
  #unit-events.eventos-home .news-card .news-card__ilha::after,
  #unit-events.eventos-home .news-card .news-card__ilha-info,
  #unit-events.eventos-home .news-card .news-card__status,
  #unit-events.eventos-home .news-card .news-card__link--texto::after,
  #unit-events.eventos-home .swiper-pagination .swiper-pagination-bullet {
    transition: none;
  }

  #unit-events.eventos-home .eventos-home__pontos span {
    animation: none;
  }

  #unit-events.eventos-home.eventos-home--anim .mySwiper .swiper-slide {
    opacity: 1;
    transform: none;
    transition: none !important;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide .cel,
  #unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .cel {
    translate: none;
    rotate: none;
    animation: none;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__img,
  #unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__link--texto::after {
    transform: none;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:focus-visible .news-card__ilha-info {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) and (hover: hover) {
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .cel {
    translate: none;
    rotate: none;
    animation: none;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__img,
  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__link--texto::after {
    transform: none;
  }

  #unit-events.eventos-home .mySwiper .swiper-slide:hover .news-card__ilha-info {
    transition: none;
  }
}

/* ================================================================== */
/* 2. MODAL DA NOTÍCIA (.noticia-modal, montado em openModalNoticia)  */
/* ================================================================== */
/* Porte do modal "Unitri em ação" (css/eventos-localizacao.css e style.css da Unitri), com os tokens --ui-*.
   2a. Base: substitui as regras antigas de pages/unidades/unidades.css (".news-events-modal { width: 60% !important;
   max-height: 80% !important }", "height: 80% !important" até 783px e ".news-text { max-height: 200px; overflow-y: auto }").
   A rolagem fica em .swal2-content: no iOS o SweetAlert2 v10 (iOSfix > shouldPreventTouchMove) bloqueia o toque
   dentro do modal a menos que .swal2-content seja rolável. Rolar outro elemento deixa o modal sem rolagem no iPhone. */
.swal2-popup.news-events-modal.noticia-modal-popup {
  width: 900px !important;
  max-width: 100%;
  height: auto !important;
  max-height: 85vh !important;
  overflow: hidden !important;
}

.swal2-popup.news-events-modal.noticia-modal-popup .swal2-content {
  overflow-y: auto !important;
  max-height: calc(78vh - 80px) !important;
  -webkit-overflow-scrolling: touch;
}

.swal2-popup.news-events-modal.noticia-modal-popup .swal2-html-container {
  padding: 0 6px 4px !important;
  margin: 0 !important;
}

.news-events-modal .noticia-modal .news-text {
  max-height: none;
  overflow: visible;
}

.news-events-modal .noticia-modal .share-btn {
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.news-events-modal .noticia-modal .share-btn:hover {
  color: #fff;
}

.news-events-modal .noticia-modal .share-copied {
  background-color: #28a745 !important;
}

@media screen and (max-width: 783px) {
  .swal2-popup.news-events-modal.noticia-modal-popup {
    width: 92% !important;
    max-height: 90vh !important;
  }

  .swal2-popup.news-events-modal.noticia-modal-popup .swal2-content {
    max-height: calc(82vh - 80px) !important;
  }
}

/* Banner de cookies (z-index 2000 inline) sob o modal: no celular ele cobria a metade de baixo da notícia.
   A página da unidade não carrega o style.css, onde está a regra equivalente para o body.modal-open. */
body.swal2-shown .nk-cookie-banner {
  z-index: 1039 !important;
}

/* 2b. Visual (igual ao da Unitri) */
.swal2-popup.noticia-modal-popup {
  border-radius: 24px;
}

.noticia-modal {
  padding: 32px 28px 8px;
  color: var(--ui-ink);
  font-family: "Josefin Sans", sans-serif;
  text-align: left;
}

/* Vence ".news-events-modal .news-title h4 { font-weight: 600; padding: 18px 0 }" */
.news-events-modal .noticia-modal .news-title h4 {
  margin: 0 0 12px;
  padding: 0 40px 0 0; /* não passa por baixo do botão de fechar */
  color: var(--ui-navy);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.noticia-modal .noticia-modal__data {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ui-tint);
  color: var(--ui-navy);
  font-size: 13px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.3;
}

.noticia-modal .noticia-modal__data i {
  color: inherit;
  font-size: 13px;
}

/* ---- Galeria (Owl) ----
   Cada foto fica inteira (contain, no máximo 70vh de altura) sobre uma cópia desfocada dela mesma, a mesma técnica dos
   cards: foto vertical aparece completa e a horizontal não deixa faixa vazia. O .item tem altura fixa para todos os
   slides terem o mesmo tamanho. */
.noticia-modal {
  --ng-altura: min(70vh, 520px);
}

.noticia-modal .noticia-modal__galeria {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 16px;
}

/* Contador "3 / 8" sobre a galeria */
.noticia-modal .noticia-modal__contador {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(18, 3, 99, 0.72);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  pointer-events: none;
}

/* !important + ID: vence "#news-events-carousel .item { max-width: 60% !important }" de pages/unidades/unidades.css */
.noticia-modal #news-events-carousel .item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100% !important;
  height: var(--ng-altura);
  max-height: none;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ui-indigo-900);
}

/* O Owl dá "width: 100%" a ".owl-item img": o ID vence e devolve o tamanho natural, limitado à caixa */
.noticia-modal #news-events-carousel .item img.noticia-modal__foto {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 100%);
  border-radius: 0;
  object-fit: contain;
}

.noticia-modal #news-events-carousel .item img.noticia-modal__fundo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  filter: blur(18px) saturate(1.2);
  object-fit: cover;
  opacity: 0.7;
  pointer-events: none;
  transform: scale(1.15);
}

.noticia-modal #news-events-carousel.owl-theme .owl-dots {
  margin-top: 12px;
}

.noticia-modal #news-events-carousel.owl-theme .owl-dots .owl-dot span {
  background: rgba(18, 3, 99, 0.25);
}

.noticia-modal #news-events-carousel.owl-theme .owl-dots .owl-dot.active span,
.noticia-modal #news-events-carousel.owl-theme .owl-dots .owl-dot:hover span {
  background: var(--ui-navy);
}

/* Botões anterior/próxima (só com mais de uma foto), circulares sobre a foto. Centralizados na altura da foto
   (--ng-altura), não da galeria inteira, que inclui os pontos do Owl. z-index acima do Owl e do contador (4). */
.noticia-modal .noticia-modal__galeria .noticia-modal__nav {
  position: absolute;
  top: calc(var(--ng-altura) / 2);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 40px;
  height: 44px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(28, 26, 74, 0.3);
  color: var(--ui-navy);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.noticia-modal .noticia-modal__galeria .noticia-modal__nav--prev {
  left: 12px;
}

.noticia-modal .noticia-modal__galeria .noticia-modal__nav--next {
  right: 12px;
}

.noticia-modal .noticia-modal__galeria .noticia-modal__nav i {
  color: inherit;
  font-size: inherit;
  pointer-events: none;
}

.noticia-modal .noticia-modal__galeria .noticia-modal__nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.noticia-modal .noticia-modal__galeria .noticia-modal__nav:focus-visible {
  outline: 3px solid var(--ui-navy);
  outline-offset: 2px;
  background: #fff;
}

@media (max-width: 767.98px) {
  .noticia-modal .noticia-modal__galeria .noticia-modal__nav--prev {
    left: 8px;
  }

  .noticia-modal .noticia-modal__galeria .noticia-modal__nav--next {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noticia-modal .noticia-modal__galeria .noticia-modal__nav {
    transition: none;
  }

  .noticia-modal .noticia-modal__galeria .noticia-modal__nav:hover {
    transform: translateY(-50%);
  }
}

/* ---- Texto ---- */
.news-events-modal .noticia-modal .news-text {
  max-width: 68ch;
  margin: 0;
  color: var(--ui-ink);
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
}

.noticia-modal .news-text p {
  margin: 0 0 1em;
}

.noticia-modal .news-text a {
  color: var(--ui-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Compartilhar ---- */
.news-events-modal .noticia-modal .share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--ui-line);
}

/* Base do botão em 2a. */
.news-events-modal .noticia-modal .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background-color: var(--ui-navy);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.2s ease;
}

.news-events-modal .noticia-modal .share-btn i {
  color: inherit;
}

.news-events-modal .noticia-modal .share-btn:hover:not(.share-copied) {
  background-color: var(--ui-indigo-800);
  opacity: 1;
}

.news-events-modal .noticia-modal .share-btn:focus-visible {
  outline: 3px solid var(--ui-navy);
  outline-offset: 3px;
}

/* Aviso com o link para copiar à mão, quando o navegador não deixa copiar (copyEventoLink) */
.news-events-modal .noticia-modal .share-manual {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-events-modal .noticia-modal .share-manual label {
  margin: 0;
  color: var(--ui-ink);
  font-size: 14px;
  font-weight: 600;
}

.news-events-modal .noticia-modal .share-manual input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-tint);
  color: var(--ui-ink);
  font-family: inherit;
  font-size: 14px;
}

.news-events-modal .noticia-modal .share-manual input:focus-visible {
  outline: 3px solid var(--ui-navy);
  outline-offset: 2px;
}

/* ---- Celular: o modal ocupa a tela toda; a galeria vai para o topo, sem margens, e o texto fica abaixo ----
   Vence as larguras e alturas de 2a.
   "noticia-modal-container" (customClass.container em openModalNoticia) tira o respiro do contêiner do SweetAlert2. */
@media (max-width: 767.98px) {
  .swal2-container.noticia-modal-container {
    padding: 0;
  }

  .swal2-popup.news-events-modal.noticia-modal-popup {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }

  /* Rola .swal2-content (e não .swal2-html-container) para o iOS liberar o toque; ver 2a. */
  /* padding 0: tira o "0 1.6em" padrão do SweetAlert2, que deixava a galeria com margens laterais. */
  .swal2-popup.news-events-modal.noticia-modal-popup .swal2-content {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding: 0;
  }

  .swal2-popup.news-events-modal.noticia-modal-popup .swal2-html-container {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Botão de fechar legível sobre qualquer foto */
  .swal2-popup.noticia-modal-popup .swal2-close {
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 14px -4px rgba(18, 3, 99, 0.45);
    color: var(--ui-navy);
    font-size: 28px;
  }

  .swal2-popup.noticia-modal-popup .swal2-close:hover,
  .swal2-popup.noticia-modal-popup .swal2-close:focus-visible {
    background: #fff;
    color: var(--ui-navy);
  }

  .noticia-modal {
    --ng-altura: min(62vh, 520px);
    display: flex;
    flex-direction: column;
    padding: 0 0 28px;
  }

  .noticia-modal .noticia-modal__galeria {
    order: -1;
    margin: 0 0 20px;
    border-radius: 0;
  }

  .noticia-modal #news-events-carousel .item {
    border-radius: 0;
  }

  .noticia-modal .news-title {
    padding: 0 16px;
  }

  .news-events-modal .noticia-modal .news-title h4 {
    padding: 0;
    font-size: 22px;
  }

  .noticia-modal .noticia-modal__data {
    align-self: flex-start;
    margin: 0 16px 16px;
  }

  .news-events-modal .noticia-modal .news-text {
    max-width: none;
    padding: 0 16px;
  }

  .news-events-modal .noticia-modal .share-buttons {
    margin: 28px 16px 0;
  }
}

/* Modal da notícia: botão de fechar no padrão dos outros modais (redondo, lavanda, foco marinho). */
.swal2-popup.noticia-modal-popup .swal2-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1effa;
  color: #120363;
  font-size: 26px;
  line-height: 1;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.swal2-popup.noticia-modal-popup .swal2-close:hover {
  background: #120363;
  color: #fff;
}

.swal2-popup.noticia-modal-popup .swal2-close:focus-visible {
  outline: 3px solid #120363;
  outline-offset: 3px;
  box-shadow: none;
}

.swal2-popup.noticia-modal-popup .swal2-close:focus:not(:focus-visible) {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .news-events-modal .noticia-modal .share-btn {
    transition: none;
  }
}
