/* banner-teste.css
   Versão final: mantém proporção 1900x600, mostra 100% da imagem, remove faixas pretas residuais.
   Escopo total em .banner-teste para evitar conflitos. */

/* ---------- RESET LOCAL E ISOLAMENTO ---------- */
.banner-teste, 
.banner-teste * {
  box-sizing: border-box;
}

/* Remove espaços inline, evita gaps causados por fontes/line-height */
.banner-teste {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 0;      /* elimina gaps de inline elements */
  line-height: 0;    /* elimina espaçamentos verticais */
  background-color: #000; /* cor das barras (letterbox/pillarbox) */
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0); /* força composição por GPU, reduz artefatos */
  transform: translateZ(0);
}

/* ---------- PROPORÇÃO FIXA (PRIORIDADE) ---------- */
/* Preferência moderna */
.banner-teste {
  aspect-ratio: 1900 / 600;
  height: auto; /* deixa o browser controlar via aspect-ratio */
}

/* ---------- FALLBACK PARA NAVEGADORES SEM aspect-ratio ---------- */
/* Usamos um wrapper interno .banner-teste__spacer para simular altura via padding-top.
   A ideia: o wrapper cria a altura, o conteúdo absoluto cobre exatamente essa caixa. */

.banner-teste__spacer {
  display: block;
  width: 100%;
  padding-top: 31.578947%; /* 600 / 1900 * 100% */
  pointer-events: none;
  visibility: hidden;
  height: 0;
  margin: 0;
}

/* O conteúdo real fica absoluto cobrindo 100% */
.banner-teste > .slider {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: initial; /* restaura se for necessário conteúdo textual */
  line-height: normal;
}

/* ---------- ESTRUTURA DOS SLIDES ---------- */
.banner-teste .slydes {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Cada slide ocupa toda a área e é empilhado */
.banner-teste .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  will-change: opacity;
}

/* Slide visível */
.banner-teste .slide.active {
  opacity: 1;
  z-index: 2;
}

/* ---------- IMAGENS: mostrar 100% sem cortes ---------- */
/* Ajustes para evitar 1px de sobra (vertical-align, display:block) e forçar escala correta */
.banner-teste .slide-image {
  display: block;
  width: auto;         /* allow natural width */
  height: 100%;        /* fill the vertical space of the box */
  max-width: 100%;
  object-fit: contain; /* garante 100% da imagem visível (sem crop) */
  object-position: center center;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  user-select: none;
  pointer-events: auto;
  -webkit-user-drag: none;
  image-rendering: auto;
  -webkit-transform: translateZ(0); /* reduzir artefatos de render */
  transform: translateZ(0);
  line-height: 0;
}

/* Observação: usamos height:100% e width:auto para preencher verticalmente a caixa
   mantendo proporção da imagem e evitando cortes laterais indevidos. */

/* ---------- CONTEÚDO (texto sobre o banner) ---------- */
.banner-teste .slide-content {
  position: absolute;
  bottom: 6%;
  left: 5%;
  right: 5%;
  z-index: 3;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: auto;
  font-size: 1rem; /* define fonte local sem afetar resto do site */
  line-height: 1.1;
}

/* tipografia */
.banner-teste .slide-title {
  font-size: clamp(18px, 2.2rem, 36px);
  margin: 0 0 6px 0;
  font-weight: 700;
}

.banner-teste .slide-subtitle {
  font-size: clamp(12px, 1rem, 18px);
  margin: 0;
}

/* ---------- BOTOES NAVEGAÇÃO ---------- */
.banner-teste .nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  transition: background .2s ease;
}

.banner-teste .nav-arrow.prev { left: 12px; }
.banner-teste .nav-arrow.next { right: 12px; }

.banner-teste .nav-arrow:hover {
  background: rgba(0,0,0,0.75);
}

/* ---------- RESPONSIVIDADE (ajustes finos) ---------- */
@media (max-width: 1200px) {
  .banner-teste .slide-title { font-size: clamp(18px, 1.9rem, 28px); }
  .banner-teste .slide-subtitle { font-size: clamp(12px, .95rem, 16px); }
}

@media (max-width: 768px) {
  .banner-teste .slide-title { font-size: clamp(16px, 1.4rem, 22px); }
  .banner-teste .slide-subtitle { font-size: clamp(12px, .9rem, 14px); }
  .banner-teste .slide-content {
    bottom: 4%;
    left: 4%;
    right: 4%;
  }
}

@media (max-width: 480px) {
  .banner-teste .nav-arrow { width: 38px; height: 38px; font-size: 1.2rem; }
  .banner-teste .slide-title { font-size: 16px; }
  .banner-teste .slide-subtitle { font-size: 13px; }
}

/* ---------- UTILITÁRIOS PARA DEBUG/COMPATIBILIDADE ---------- */
/* Caso ainda haja um navegador antigo que não respeite aspect-ratio, insira no HTML
   logo após abrir .banner-teste um elemento: <div class="banner-teste__spacer"></div>
   (essa classe já estilizada como fallback acima) */

/* Garante que imagens externas não adicionem bordas/margens indesejadas */
.banner-teste img { border: 0; outline: 0; }

/* =======================================
   CORREÇÃO DE LINHAS PRETAS / BORDAS
   ======================================= */

/* Garante que o banner e seus pais diretos não tenham borda ou sombra */
body,
header,
main,
section,
.container,
.banner-teste,
.banner-teste .slider,
.banner-teste .slydes,
.banner-teste .slide {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background-color: transparent !important;
  overflow: visible !important;
}

/* Mantém proporção fixa 1900x600 (16:5) em qualquer tela */
.banner-teste {
  position: relative;
  width: 100%;
  aspect-ratio: 1900 / 600;
  overflow: hidden;
}

.banner-teste .slydes,
.banner-teste .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Garante que a imagem ocupe 100% sem cortar */
.banner-teste .slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* exibe a imagem inteira, sem corte */
  background-color: transparent;
  display: block;
}

/* Ajusta o conteúdo sobreposto */
.banner-teste .slide-content {
  position: absolute;
  bottom: 8%;
  left: 5%;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Setas */
.banner-teste .nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  font-size: 2.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s;
}

.banner-teste .nav-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.banner-teste .nav-arrow.prev { left: 20px; }
.banner-teste .nav-arrow.next { right: 20px; }
