/**** Estilos Globais ***/
:root {
  --bs-primary: #0d6efd;
  --bs-secondary: #6c757d;
  --bs-dark: #212529;
  --bs-light: #f8f9fa;
  --bs-white: #ffffff;
  --bs-body: #6c757d;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden; /* Previne scroll horizontal */
}

img {
    max-width: 100%; /* Garante que imagens não ultrapassem seus containers */
    height: auto;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Botão Voltar ao Topo ***/
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  transition: 0.5s;
  z-index: 99;
  /* Inicialmente escondido, JS deve mostrar ao rolar */
  opacity: 0;
  visibility: hidden;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

/*** Botões ***/
.btn {
  font-weight: 600;
  transition: .5s;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square,
.btn-xl-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

.btn-square {
  width: 32px;
  height: 32px;
}

.btn-sm-square {
  width: 34px;
  height: 34px;
}

.btn-md-square {
  width: 44px;
  height: 44px;
}

.btn-lg-square {
  width: 56px;
  height: 56px;
}

.btn-xl-square {
  width: 66px;
  height: 66px;
}

.btn.btn-primary {
  color: var(--bs-white);
  border: none;
  background: linear-gradient(135deg, #003366, #005599);
  border-radius: 50px;
}

.btn.btn-primary:hover {
  background: linear-gradient(135deg, #005599, #003366);
  color: var(--bs-white);
}

.btn.btn-light {
  color: var(--bs-primary);
  border: none;
}

.btn.btn-light:hover {
  color: var(--bs-white);
  background: var(--bs-dark);
}

.btn.btn-dark {
  color: var(--bs-white);
  border: none;
}

.btn.btn-dark:hover {
  color: var(--bs-primary);
  background: var(--bs-light);
}

/*** Navbar ***/
/* Estilos da Navbar mantidos, parecem razoáveis para responsividade */
.nav-bar {
  background: var(--bs-white);
  transition: 1s;
}

.navbar-light .navbar-brand img {
  max-height: 60px;
  transition: .5s;
}

.nav-bar .navbar-light .navbar-brand img {
  max-height: 50px;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar .navbar-nav .nav-item .nav-link {
  padding: 0;
}

.navbar .navbar-nav .nav-item {
  display: flex;
  align-items: center;
  padding: 15px;
}

.navbar-light .navbar-nav .nav-item:hover,
.navbar-light .navbar-nav .nav-item.active,
.navbar-light .navbar-nav .nav-item:hover .nav-link,
.navbar-light .navbar-nav .nav-item.active .nav-link {
  color: var(--bs-primary);
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 600;
  vertical-align: middle;
  margin-left: 8px;
}

.dropdown .dropdown-menu .dropdown-item:hover {
  background: var(--bs-primary);
  color: var(--bs-white);
}

.navbar-toggler {
  margin-left: auto;
  padding: 8px 15px;
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary);
}

@media (max-width: 991.98px) { /* Ajustado breakpoint para .98 */
  .navbar {
    padding: 15px 0; /* Reduzido padding */
  }

  .navbar .navbar-nav .nav-link {
    padding: 10px 0; /* Adicionado padding vertical no mobile */
  }

  .navbar .navbar-nav .nav-item {
    display: flex;
    padding: 0; /* Removido padding do item */
    flex-direction: column;
    justify-content: center; /* Centralizado */
    align-items: center; /* Centralizado */
    width: 100%; /* Ocupa largura total */
    margin-bottom: 10px;
  }

  .navbar .navbar-nav .nav-btn {
    display: flex;
    justify-content: center; /* Centralizado */
    width: 100%;
    margin-top: 10px;
  }

  .navbar .navbar-nav {
    width: 100%;
    display: flex;
    margin-top: 15px;
    padding: 15px;
    background: var(--bs-light);
    border-radius: 10px;
  }
}

@media (min-width: 992px) {
  .navbar {
    padding: 20px 0;
  }

  .navbar .nav-btn {
    display: flex;
    align-items: center;
    justify-content: end;
  }

  .navbar .navbar-nav {
    width: auto; /* Ajustado para auto */
    display: flex;
    justify-content: center;
    align-items: center;
    background: none; /* Removido background no desktop */
    border-radius: 0;
    margin-top: 0;
    padding-bottom: 0;
  }

  .navbar .navbar-nav .nav-btn {
    width: auto; /* Ajustado para auto */
    display: flex;
    margin-left: auto;
  }

  .navbar .nav-item .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    border: 0;
    border-radius: 10px;
    transition: .5s;
    opacity: 0;
    margin-top: 0; /* Removido margin-top */
  }

  .navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light);
    transition: .5s;
    opacity: 1;
  }
}

/*** Carousel Hero Header ***/
.header-carousel .header-carousel-item {
  /* height: 700px; */ /* Removida altura fixa base */
  min-height: 70vh; /* Altura mínima baseada na viewport */
  padding-top: 80px; /* Espaçamento superior */
  padding-bottom: 80px; /* Espaçamento inferior */
  display: flex;
  align-items: center;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
  position: absolute;
  width: 50px; /* Reduzido tamanho */
  height: 50px; /* Reduzido tamanho */
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.8); /* Fundo semi-transparente */
  color: var(--bs-primary);
  font-size: 22px; /* Reduzido tamanho fonte */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  bottom: 20px; /* Ajustado posicionamento */
}

.header-carousel .owl-nav .owl-prev {
  left: 20px; /* Posicionado à esquerda */
  transform: none;
  margin-left: 0;
}

.header-carousel .owl-nav .owl-next {
  right: 20px; /* Posicionado à direita */
  left: auto; /* Reset left */
  transform: none;
  margin-right: 0;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
  background: var(--bs-primary);
  color: var(--bs-white);
  box-shadow: none; /* Removido inset shadow */
}

.header-carousel .header-carousel-item .carousel-caption {
  position: static; /* Removido position absolute */
  width: 100%;
  height: auto; /* Altura automática */
  background: none; /* Removido fundo escuro */
  display: block; /* Mudado para block */
  text-align: center; /* Centralizado por padrão */
}

@media (min-width: 992px) {
    .header-carousel .header-carousel-item .carousel-caption {
        text-align: left; /* Alinha à esquerda em telas grandes */
    }
    .header-carousel .header-carousel-item .text-lg-start {
         text-align: left !important;
    }
     .header-carousel .header-carousel-item .text-lg-end {
         text-align: right !important;
    }
     .header-carousel .header-carousel-item .justify-content-lg-start {
        justify-content: flex-start !important;
    }
    .header-carousel .header-carousel-item .justify-content-lg-end {
        justify-content: flex-end !important;
    }
}

@media (max-width: 991.98px) {
  .header-carousel .header-carousel-item .carousel-caption {
    padding-top: 30px;
    padding-bottom: 80px; /* Espaço para botões de navegação */
  }
  /* Removida altura fixa de 1300px */
  .header-carousel .header-carousel-item {
     min-height: auto; /* Altura automática em telas menores */
  }
}

@media (max-width: 767.98px) {
  /* Removida altura fixa de 950px */
  .header-carousel .header-carousel-item {
     padding-top: 60px;
     padding-bottom: 100px; /* Mais espaço para botões */
  }

  /* Ajustes de posicionamento dos botões já feitos acima */
  /* Removidos ajustes específicos de margin para owl-prev/next aqui */

  .header-carousel-item .row {
    flex-direction: column-reverse;
  }

  .header-carousel-item .col-lg-7,
  .header-carousel-item .col-lg-5 {
    text-align: center !important;
  }

  .header-carousel-item .text-md-start,
  .header-carousel-item .text-md-end {
    text-align: center !important;
  }

  .header-carousel-item .justify-content-md-start,
  .header-carousel-item .justify-content-md-end {
    justify-content: center !important;
  }

  .calrousel-img {
    margin-bottom: 20px;
    max-width: 80%; /* Limita largura da imagem no mobile */
    margin-left: auto;
    margin-right: auto;
  }
}

/*** Feature ***/
/* Estilos mantidos, parecem OK */
.feature .feature-item {
  border-radius: 10px;
  background: var(--bs-white);
  transition: 0.5s;
  height: 100%; /* Garante altura igual para cards na mesma linha */
  display: flex; /* Usar flexbox para alinhar conteúdo */
  flex-direction: column;
}

.feature .feature-item .feature-content {
    flex-grow: 1; /* Faz o conteúdo crescer para preencher espaço */
    padding: 1.5rem; /* Adicionado padding interno */
}

.feature .feature-item:hover {
  background: var(--bs-primary);
}

.feature .feature-item .feature-icon {
  position: relative;
  width: 80px; /* Reduzido */
  height: 80px; /* Reduzido */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%; /* Ícone circular */
  background: var(--bs-light);
}

.feature .feature-item:hover .feature-icon i {
  z-index: 9;
}

.feature .feature-item .feature-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: var(--bs-dark);
  transition: 0.5s;
  z-index: 1;
}

.feature .feature-item:hover .feature-icon::after {
  height: 100%;
}

.feature .feature-item .feature-icon i {
    font-size: 2rem; /* Ajustado tamanho do ícone */
    color: var(--bs-primary);
    transition: 0.5s;
}

.feature .feature-item h4,
.feature .feature-item p {
  transition: 0.5s;
}

.feature .feature-item:hover .feature-icon i {
  color: var(--bs-white);
}

.feature .feature-item:hover h4,
.feature .feature-item:hover p {
  color: var(--bs-white);
}

.feature .feature-item .feature-btn {
    margin-top: auto; /* Empurra o botão para baixo */
    padding-top: 1rem;
}

.feature .feature-item:hover a.btn {
  background: var(--bs-white);
  color: var(--bs-primary);
}

.feature .feature-item:hover a.btn:hover {
  background: var(--bs-dark);
  color: var(--bs-white);
}

@media (max-width: 575.98px) {
  .feature-icon {
    width: 70px;
    height: 70px;
  }

  .feature-icon i {
    font-size: 1.8rem !important;
  }
}

/*** FAQs ***/
/* Estilos mantidos */
.faq-section .accordion .accordion-item .accordion-header .accordion-button {
  color: var(--bs-white);
  background: rgba(1, 95, 201, .8);
  font-size: 18px;
}

.faq-section .accordion .accordion-item .accordion-header .accordion-button.collapsed {
  color: var(--bs-primary);
  background: var(--bs-light);
}

/*** Testimonial ***/
/* Estilos mantidos, a correção principal foi feita no HTML/inline style */
.testimonial-carousel .owl-stage-outer {
  margin-top: 58px;
  margin-right: -1px;
}

.testimonial .owl-nav .owl-prev {
  position: absolute;
  top: -58px;
  left: 0;
  background: var(--bs-primary);
  color: var(--bs-white);
  padding: 5px 30px;
  border-radius: 30px;
  transition: 0.5s;
}

.testimonial .owl-nav .owl-prev:hover {
  background: var(--bs-dark);
  color: var(--bs-white);
}

.testimonial .owl-nav .owl-next {
  position: absolute;
  top: -58px;
  right: 0;
  background: var(--bs-primary);
  color: var(--bs-white);
  padding: 5px 30px;
  border-radius: 30px;
  transition: 0.5s;
}

.testimonial .owl-nav .owl-next:hover {
  background: var(--bs-dark);
  color: var(--bs-white);
}

/*** Footer ***/
.footer {
  background: var(--bs-dark);
  color: var(--bs-light);
}

.footer .footer-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px; /* Espaçamento entre itens */
}

.footer .footer-item a,
.footer .footer-item .btn-link {
  line-height: 35px;
  color: rgba(255, 255, 255, 0.7); /* Cor mais suave para links */
  transition: 0.5s;
  text-decoration: none;
}

.footer .footer-item p {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.footer .footer-item a:hover,
.footer .footer-item .btn-link:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

.footer .footer-item .footer-btn a,
.footer .footer-item .footer-btn a i {
  transition: 0.5s;
}

.footer .footer-item .footer-btn a:hover {
  background: var(--bs-white);
}

.footer .footer-item .footer-btn a:hover i {
  color: var(--bs-primary);
}

.footer .footer-item .footer-instagram {
  position: relative;
  overflow: hidden;
  border-radius: 5px; /* Bordas arredondadas */
}

.footer .footer-item .footer-instagram img {
  transition: 0.5s;
}

.footer .footer-item .footer-instagram:hover img {
  transform: scale(1.1); /* Efeito de zoom suave */
}

.footer .footer-item .footer-instagram .footer-search-icon {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  opacity: 0;
  background: rgba(13, 110, 253, 0.7); /* Overlay primário */
}

.footer .footer-item .footer-instagram:hover .footer-search-icon {
  opacity: 1;
}

.footer .footer-item .footer-btn a {
  background: var(--bs-light);
  color: var(--bs-primary);
}

.footer .footer-item .footer-btn a:hover {
  background: var(--bs-primary);
}

.footer .footer-item .footer-btn a:hover i {
  color: var(--bs-white);
}

.footer h4 {
    color: var(--bs-white);
}

@media (max-width: 767.98px) {
  .footer .d-flex:not(.footer-btn) { /* Não aplicar ao container dos botões sociais */
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer .btn-xl-square {
    margin-bottom: 15px;
    margin-right: 0 !important; /* Remover margem direita no mobile */
  }

  .footer .text-md-end,
  .footer .text-md-start {
    text-align: center !important;
  }

  .footer-btn a {
    width: 35px;
    height: 35px;
    line-height: 35px;
  }

  .btn-xl-square {
    padding: 1.5rem !important; /* Ajustado padding */
  }

  .btn-xl-square i {
    font-size: 1.5rem !important;
  }
}

/*** Modal e Formulários ***/
/* Estilos mantidos */
.modal-content {
  font-size: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-header .modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto;
  color: #0d6efd;
}

.form-control {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  color: #000;
  width: 100%;
}

.form-control::placeholder {
  color: #888;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
}

.position-relative .form-control {
  padding-left: 2.5rem;
}

.btn-close {
  background: none;
  border: none;
  opacity: 0.7;
}

.btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.modal.fade .modal-dialog {
  transform: translateY(-50px);
  transition: transform 0.3s ease-out;
}

.modal.fade.show .modal-dialog {
  transform: translateY(0);
}

/*** Cards ***/
/* Estilos mantidos */
.card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.card i {
  color: #0d6efd;
  margin-bottom: 10px;
  font-size: 2.5rem; /* Ajustado tamanho */
}

.card-title {
  color: #333333;
  font-weight: 600;
  font-size: 1.1rem;
}

.card-text {
  color: #555555;
  font-size: 0.95rem;
}

@media (max-width: 576px) {
  .card {
    margin-bottom: 1rem;
  }
}

/*** Botões Customizados (Boleto/Cotação) ***/
.btn-custom {
  display: inline-flex;
  flex-direction: column; /* Empilha ícone e texto */
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  padding: 1rem 1.5rem; /* Ajustado padding */
  font-size: 1rem; /* Ajustado tamanho fonte */
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  min-height: 100px; /* Altura mínima para consistência */
}

.btn-custom i {
  margin-right: 0; /* Removida margem direita */
  margin-bottom: 0.5rem; /* Adicionada margem inferior */
  font-size: 1.8rem; /* Ajustado tamanho ícone */
}

.btn-cotacao {
  background-color: #0056b3;
  color: #fff;
}

.btn-cotacao:hover {
  background-color: #004494;
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.btn-boleto {
  background-color: #ff6f00;
  color: #fff;
}

.btn-boleto:hover {
  background-color: #e65c00;
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

/* Removida regra @media (max-width: 576px) específica para .btn-custom pois os estilos base já foram ajustados */

/*** Animações ***/
/* Estilos mantidos */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

/*** Responsividade Geral ***/
@media (max-width: 1199.98px) {
  .display-1 {
    font-size: 3.5rem;
  }

  .display-4 {
    font-size: 2.5rem;
  }
}

@media (max-width: 991.98px) {
  /* Removida regra .navbar-nav aqui pois foi ajustada acima */

  .display-1 {
    font-size: 3rem;
  }

  .display-4 {
    font-size: 2rem;
  }

  .feature-item {
    margin-bottom: 30px;
  }

  .footer-item {
    margin-bottom: 30px;
  }
}

@media (max-width: 767.98px) {
  /* Removida regra .navbar-nav aqui */

  .display-1 {
    font-size: 2.5rem;
  }

  .display-4 {
    font-size: 1.8rem;
  }

  .carousel-caption {
    padding: 20px 0;
  }

  /* Removida altura fixa de .btn-boleto, .btn-cotacao */

  .btn-boleto i,
  .btn-cotacao i {
    font-size: 1.5rem;
  }

  .footer .row > div {
    margin-bottom: 30px;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand span {
    font-size: 1.2rem !important; /* Reduzido ainda mais */
  }

  .display-1 {
    font-size: 2rem;
  }

  .display-4 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem; /* Reduzido fonte botão */
  }
}

/*** Menu Responsivo (Toggler Icon) ***/
/* Estilos mantidos */
.navbar-toggler-icon {
  width: 30px;
  height: 20px;
  position: relative;
  margin: 0;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
  cursor: pointer;
}

.navbar-toggler-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #007bff;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.navbar-toggler-icon span:nth-child(1) {
  top: 0px;
}

.navbar-toggler-icon span:nth-child(2),
.navbar-toggler-icon span:nth-child(3) {
  top: 9px;
}

.navbar-toggler-icon span:nth-child(4) {
  top: 18px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(1) {
  top: 9px;
  width: 0%;
  left: 50%;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(2) {
  transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(3) {
  transform: rotate(-45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(4) {
  top: 9px;
  width: 0%;
  left: 50%;
}

/* Ajuste final para garantir que o botão back-to-top funcione com JS */
.back-to-top {
  display: flex; /* Usa flex para centralizar ícone */
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}