/* ===== Banner Principal ===== */
#top-banner {
  width: 95%;
  max-width: 1900px;
  margin: 1rem auto 0;
  overflow: hidden;
  position: relative;
  user-select: none;
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.15);
  background: #f0f0f0;
  aspect-ratio: 16/9; /* Proporção mais adequada para mobile */
  height: auto;
}

/* ===== Área Interna ===== */
#top-banner .carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ===== Itens do Carrossel ===== */
#top-banner .carousel-item {
  position: relative;
  width: 100%;
  height: 100%;
  display: none;
}

#top-banner .carousel-item.active {
  display: block;
}

/* ===== Imagens ===== */
#top-banner .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* ===== Overlay ===== */
#top-banner .carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%; /* Ocupa toda a largura no mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 5;
  padding: 1rem;
  box-sizing: border-box;
  text-align: center;
}

#top-banner .overlay-content {
  width: 100%;
  color: white;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
}

#top-banner .overlay-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.3;
}

#top-banner .overlay-content p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  display: none; /* Escondemos a descrição no mobile para economizar espaço */
}

#top-banner .overlay-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: #ff6600;
  color: white;
  text-decoration: none;
  border-radius: 3rem;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#top-banner .overlay-button:hover {
  background-color: #e65c00;
  transform: translateY(-2px);
  box-shadow: 0 0.375rem 0.9375rem rgba(0, 0, 0, 0.3);
}

/* ===== Controles ===== */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control:hover {
  background: rgba(255, 255, 255, 0.45);
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

/* ===== Indicadores ===== */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 15;
}

.carousel-indicators span {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicators span.active {
  background: #fff;
  transform: scale(1.2);
}

/* ===== Animações ===== */
@keyframes slideRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
  animation: slideRight 0.6s ease;
}

.slide-in-left {
  animation: slideLeft 0.6s ease;
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets */
@media (min-width: 768px) {
  #top-banner {
    width: 90%;
    border-radius: 1.2rem;
    aspect-ratio: 19/6;
  }
  
  #top-banner .carousel-overlay {
    width: min(45%, 300px);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    justify-content: flex-start;
    padding: 2rem;
  }
  
  #top-banner .overlay-content {
    text-align: left;
  }
  
  #top-banner .overlay-content p {
    display: block; /* Mostramos a descrição em tablets e desktops */
  }
  
  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
}

/* Desktops */
@media (min-width: 1024px) {
  #top-banner {
    aspect-ratio: 19/4;
  }
  
  #top-banner .carousel-overlay {
    width: min(30%, 400px);
    padding: 3rem;
  }
  
  #top-banner .overlay-content h3 {
    font-size: 1.5rem;
  }
  
  #top-banner .overlay-content p {
    font-size: 1rem;
  }
  
  #top-banner .overlay-button {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }
  
  .carousel-control {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }
}

/* Desktop grandes */
@media (min-width: 1200px) {
  #top-banner {
    width: 90%;
    max-width: 1900px;
    margin: 1.5rem auto 0;
    border-radius: 1.5rem;
  }
  
  #top-banner .carousel-overlay {
    padding: 4rem;
  }
}

/* Prevenir seleção e arrastar imagens */
#top-banner .carousel-inner,
#top-banner .carousel-inner img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Ajuste para garantir que a navbar sempre fique por cima */
.navbar {
  z-index: 9999 !important;
  transform: translateZ(0);
}

/* Estilos para o overlay direito (apenas em desktop) */
#top-banner .right-overlay {
  display: none; /* Escondido por padrão no mobile */
}

@media (min-width: 1024px) {
  #top-banner .right-overlay {
    display: flex;
    left: auto;
    right: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    justify-content: flex-end;
  }
  
  #top-banner .instagram-content {
    text-align: right;
  }
}

/* Ajuste tamanho do botão Instagram */
#top-banner .instagram-button {
  background-color: #e1306c;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

#top-banner .instagram-button:hover {
  background-color: #c13584;
}