/* Neutralização e contenção total de overflow nos containers do portlet Liferay */
.portlet:has(.bnb-banner-client-web),
.portlet-boundary_bnbbannerclientweb_,
.portlet-boundary_bnbbannerclientweb_ .portlet,
.portlet-boundary_bnbbannerclientweb_ .portlet-content,
.portlet-boundary_bnbbannerclientweb_ .portlet-content-container,
.portlet-boundary_bnbbannerclientweb_ .portlet-body,
[id^="p_p_id_bnbbannerclientweb"],
[id^="p_p_id_bnbbannerclientweb"] .portlet,
[id^="p_p_id_bnbbannerclientweb"] .portlet-content,
[id^="p_p_id_bnbbannerclientweb"] .portlet-content-container,
[id^="p_p_id_bnbbannerclientweb"] .portlet-body,
[id^="js-portlet-_bnbbannerclientweb"] {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  contain: paint layout;
}

/* Neutraliza o vazamento de 15px/30px da .row do Bootstrap quando usada com container-fluid px-0 */
.bg-light:has(.bnb-banner-client-web),
.container-fluid:has(.bnb-banner-client-web),
section:has(.bnb-banner-client-web) {
  overflow-x: hidden !important;
}

.row:has(.bnb-banner-client-web),
.row:has([id^="p_p_id_bnbbannerclientweb"]),
.container-fluid.px-0 > .row,
.bg-light .container-fluid.px-0 .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.row:has(.bnb-banner-client-web) > .col-md-12,
.row:has([id^="p_p_id_bnbbannerclientweb"]) > .col-md-12,
.container-fluid.px-0 > .row > .col-md-12,
.bg-light .container-fluid.px-0 .row > .col-md-12 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Oculta header vazio gerado pelo Liferay que possui margens negativas (.autofit-row) */
.portlet-boundary_bnbbannerclientweb_ .portlet-header,
[id^="p_p_id_bnbbannerclientweb"] .portlet-header {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Escopo de box-sizing seguro para todos os elementos internos do banner */
.bnb-banner-client-web,
.bnb-banner-client-web *,
.bnb-banner-client-web *::before,
.bnb-banner-client-web *::after {
  box-sizing: border-box;
}

.bnb-banner-client-web {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  contain: paint layout;
  font-family: 'Roboto', sans-serif;
  z-index: 1;
  line-height: normal;
}

/* Reset de contorno preto padrão de navegador ao clicar/selecionar com mouse */
.bnb-banner-client-web button:focus:not(:focus-visible),
.bnb-banner-client-web a:focus:not(:focus-visible),
.bnb-banner-client-web section:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

.bnb-banner-carousel {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  contain: paint layout;
  outline: none;
}

.bnb-banner-carousel:focus {
  outline: none;
}

.bnb-banner-carousel:focus-visible {
  outline: 2px solid #F88A27;
  outline-offset: -2px;
}

.bnb-banner-slides-wrapper {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  /* Define uma proporção base para evitar saltos severos. Depende da proporção da imagem. 1920x768 = 40% height */
  aspect-ratio: 1920 / 768;
  overflow: hidden !important;
  contain: paint layout;
  background-color: #F4F4F4;
}

@media (max-width: 991.98px) {
  .bnb-banner-slides-wrapper {
    aspect-ratio: 1280 / 768;
  }
}

@media (max-width: 575.98px) {
  .bnb-banner-slides-wrapper {
    aspect-ratio: 768 / 1152;
  }
}

/* Esteira horizontal dos slides */
.bnb-banner-slides-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

/* Base dos slides na esteira */
.bnb-banner-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  opacity: 1;
  visibility: visible;
}

.bnb-banner-picture {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.bnb-banner-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

.bnb-banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  text-decoration: none;
}

.bnb-banner-slide a:focus {
  outline: none;
}

.bnb-banner-slide a:focus-visible {
  outline: 2px solid #F88A27;
  outline-offset: -2px;
}

/* =========================================
   CONTROLES DE SETAS (CHEVRONS)
   ========================================= */

.bnb-banner-control {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 75px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 2;
  color: #909090; /* Default */
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.bnb-banner-control.prev {
  left: 0;
}

.bnb-banner-control.next {
  right: 0;
}

.bnb-banner-control:hover {
  color: #212121;
}

.bnb-banner-control.prev:hover {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
}

.bnb-banner-control.next:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
}

.bnb-banner-control:active {
  color: #F88A27;
}

.bnb-banner-control:focus {
  outline: none;
  box-shadow: none;
}

.bnb-banner-control:focus-visible {
  outline: 2px solid #F88A27;
  outline-offset: -2px;
}

.bnb-banner-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================
   BOTÃO PLAY / PAUSE (TOPO DO BANNER)
   ========================================= */

.bnb-banner-playpause {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  color: #212121;
  padding: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0px 1px 3px rgba(33, 33, 33, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.bnb-banner-playpause:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #A6193C;
  transform: translateX(-50%) scale(1.08);
}

.bnb-banner-playpause.paused {
  background: #F88A27;
  color: #FFFFFF;
}

.bnb-banner-playpause.paused:hover {
  background: #E07310;
  color: #FFFFFF;
  transform: translateX(-50%) scale(1.08);
}

.bnb-banner-playpause:focus {
  outline: none;
}

.bnb-banner-playpause:focus-visible {
  outline: 2px solid #F88A27;
  outline-offset: 2px;
}

.bnb-banner-playpause-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================
   INDICADORES DE PAGINAÇÃO (BASE DO BANNER)
   ========================================= */

.bnb-banner-indicators {
  position: absolute;
  bottom: 71.5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.bnb-banner-indicator {
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  -webkit-tap-highlight-color: transparent;
}

.bnb-banner-indicator:focus {
  outline: none;
  box-shadow: none;
}

.bnb-banner-indicator:focus-visible {
  outline: none;
}

.bnb-banner-indicator-inner {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  background: rgba(144, 144, 144, 0.6);
  border-radius: 1000px;
  overflow: hidden;
  box-shadow: 0px 1px 1.5px rgba(33, 33, 33, 0.35);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.bnb-banner-indicator:hover .bnb-banner-indicator-inner {
  background: rgba(217, 217, 217, 0.9);
}

/* Indicador Ativo (Pílula expandida de 72px) */
.bnb-banner-indicator.active .bnb-banner-indicator-inner {
  width: 72px;
  background: rgba(144, 144, 144, 0.4);
}

/* Barra de Progresso interna do Indicador Ativo */
.bnb-banner-indicator-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #F88A27;
  border-radius: 1000px;
  transform-origin: left center;
  animation: bannerProgress linear forwards;
}

.bnb-banner-indicator-progress.paused {
  animation-play-state: paused;
}

@keyframes bannerProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.bnb-banner-indicator:focus-visible .bnb-banner-indicator-inner {
  outline: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px #F88A27;
  outline-offset: 2px;
}

/* =========================================
   SKELETON & ERRO
   ========================================= */

.bnb-banner-carousel.skeleton {
  background-color: #E0E0E0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.skeleton-bg {
  background: linear-gradient(90deg, #E0E0E0 25%, #F0F0F0 50%, #E0E0E0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bnb-banner-error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  background-color: #F8D7DA;
  color: #721C24;
  font-weight: 500;
  border-radius: 4px;
  text-align: center;
  padding: 20px;
}

/* =========================================
   RESPONSIVIDADE E REDUCED MOTION
   ========================================= */

@media (max-width: 991.98px) {
  .bnb-banner-playpause {
    top: 16px;
  }
  .bnb-banner-indicators {
    bottom: 95px;
  }
  .bnb-banner-indicator.active .bnb-banner-indicator-inner {
    width: 72px;
  }
  .bnb-banner-control {
    width: 48px;
    padding: 8px 12px;
  }
}

@media (max-width: 575.98px) {
  .bnb-banner-playpause {
    top: 14px;
    width: 28px;
    height: 28px;
  }
  .bnb-banner-indicators {
    bottom: 90px;
  }
  .bnb-banner-indicator.active .bnb-banner-indicator-inner {
    width: 72px;
  }
  .bnb-banner-control {
    width: 40px;
    padding: 4px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bnb-banner-slides-track {
    transition: none;
  }
  .bnb-banner-indicator-inner {
    transition: none;
  }
  .bnb-banner-indicator-progress {
    animation: none;
    transform: scaleX(1);
  }
}