/*
* ======================================
* 1. VARIÁVEIS E BASE
* ======================================
*/

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  /* Cores Primárias */
  --primary-color: #007bff; /* Azul principal */
  --text-light: #ffffff;
  --text-dark: #333;
  --cta-blue: var(--primary-color);
  --light-blue: #e0f0ff; /* Usado nos botões de plano */

  /* Hero */
  --overlay-color: rgba(0, 0, 0, 0.45);
  --navbar-bg: rgba(0, 0, 0, 0.1);

  /* Fundo de Seções */
  --section-bg-light: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/*
* ======================================
* 2. HERO E NAVBAR
* ======================================
*/

/* HERO HEADER */
.hero-header {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  color: var(--text-light);
  position: relative;
  padding-bottom: 120px;
  z-index: 1;
}

.hero-video-background,
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-video-background {
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  background-color: var(--overlay-color);
  z-index: -1;
}

/* HERO CONTENT */
.hero-content {
  position: absolute;
  top: 15%;
  left: 8%;
  max-width: 800px;
  color: #fff;
  z-index: 2;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  text-align: left;
}

.hero-content p {
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 30px;
  text-align: left;
}

.btn-demonstracao {
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
  display: inline-block;
  border: 2px solid #166bca;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  width: fit-content;
  color: #166bca;
  transition: background-color 0.3s, color 0.3s;
}

.btn-demonstracao:hover {
  background-color: #166bca;
  color: #fff;
}
/* Se a stats-bar ficar dentro do .hero-content, estilizamos aqui para que
   apareça imediatamente abaixo do botão e fique centralizada ao conteúdo do hero */
.hero-content .stats-bar {
  position: relative;
  transform: none;
  left: 0;
  width: 100%;
  margin: 18px 0 0 0;
  padding: 14px 12px;
  background-color: #fff;
  color: var(--text-dark);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  z-index: 3;
}

.hero-content .stats-bar .stat-item {
  flex: 0 0 20%;
  max-width: 20%;
  text-align: left;
  padding: 6px 8px;
}

@media (max-width: 768px) {
  .hero-content .stats-bar .stat-item {
    flex: 0 0 30%;
    max-width: 30%;
  }
}

@media (max-width: 576px) {
  .hero-content .stats-bar {
    width: 100%;
    gap: 8px;
    padding: 10px;
  }
  /* layout: 3 icons on first row, 2 on second row */
  .hero-content .stats-bar .stat-item {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
  .hero-content .stats-bar .stat-item:nth-child(4),
  .hero-content .stats-bar .stat-item:nth-child(5) {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .hero-content {
    left: 50%;
    transform: translateX(-50%);
    max-width: 92%;
  }
}

/* Desktop: expand visual largura da stats-bar um pouco além do conteúdo do hero */
@media (min-width: 992px) {
  .hero-content .stats-bar {
    width: 110%;
    margin-left: -5%;
    justify-content: space-around;
  }
  .hero-content .stats-bar .stat-item {
    flex: 0 0 18%;
    max-width: 18%;
  }
}
/* STATS BAR */
/* Container principal da barra de estatísticas */
.hero-header .stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;

  /* AJUSTE ESSENCIAL PARA TIRAR A SOBREPOSIÇÃO NO MOBILE: */
  position: relative; /* Volta ao fluxo normal do documento */
  bottom: auto; /* Remove o posicionamento fixo */
  left: auto; /* Remove o posicionamento fixo */

  width: 90%; /* Mantém o visual de card centralizado */
  margin: 30px auto; /* Adiciona margem acima e embaixo (não negativa) */

  /* Estilo do card */
  padding: 30px 15px 15px 15px; /* Padding interno */
  background-color: white;
  border-radius: 12px; /* Arredonda todas as bordas, pois não está mais no fundo da tela */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); /* Sombra suave para destacar */

  z-index: 20;
}

/* Estilos para cada Item Individual (.stat-item) (Mantido Layout 3/2) */
.hero-header .stat-item {
  text-align: center;
  padding: 10px 0;
  flex: 1 1 30%;
  max-width: 33.33%;
}

/* Ajuste de Estilo para os Ícones, Números e Rótulos (Mantido) */
.hero-header .stat-item i {
  font-size: 28px;
  color: #007bff;
  margin-bottom: 5px;
  display: block;
}

.hero-header .stat-item .number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.hero-header .stat-item .label {
  display: block;
  font-size: 11px;
  color: #6c757d;
  line-height: 1.2;
  padding: 0 5px;
}

/* Media Query para Telas Maiores (Desktop) */
@media (min-width: 768px) {
  .hero-header .stats-bar {
    flex-wrap: nowrap;
    justify-content: space-between; /* Melhor que 'center' para 5 itens */
    max-width: 1140px;

    /* AJUSTE ESSENCIAL PARA TIRAR A SOBREPOSIÇÃO NO DESKTOP: */
    margin: 30px auto; /* Remove margem negativa (sobrava o menu) */
    position: relative;

    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 15px 10px;
  }

  .hero-header .stat-item {
    flex: 1 1 18%;
    padding: 15px 10px;
    max-width: 20%;
  }

  .hero-header .stat-item .number {
    font-size: 32px;
  }

  .hero-header .stat-item .label {
    font-size: 14px;
  }
}
/* NAVBAR */
.custom-navbar {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 0;
  font-family: "Poppins", sans-serif;
  z-index: 1000;
  transition: all 0.3s ease;
}

.custom-navbar .container {
  width: min(90vw, 1200px);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */

/* LINKS */
.custom-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin: 0 14px;
  position: relative;
  transition: all 0.3s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: #166bca;
}

/* DROPDOWN */
.custom-navbar .dropdown-menu {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  min-width: 200px;
}

.custom-navbar .dropdown-item {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.custom-navbar .dropdown-item:hover {
  background-color: #166bca;
  color: #fff;
}

/* BOTÃO MOBILE */
.navbar-toggler {
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.25);
}

.navbar-toggler i {
  color: #fff;
  font-size: 1.4rem;
}

/* MENU MOBILE EXPANDIDO */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    text-align: center;
  }

  .custom-navbar .nav-link {
    display: block;
    color: #fff;
    margin: 10px 0;
  }

  .custom-navbar .nav-link.active {
    color: #166bca;
    font-weight: 700;
    border-bottom: 3px solid #166bca;
    padding-bottom: 5px;
  }
}

/*
* ======================================
* 3. SEÇÕES GERAIS E COMPONENTES
* ======================================
*/

/* SECTION LABEL */
.section-label {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 40px;
}
.section-label span {
  position: relative;
  padding-bottom: 5px;
  padding-left: 15px;
}
.section-label span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 6px;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* CARDS */
.custom-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* SOLUTIONS */
.solucon-card img {
  height: 150px;
}
.solution-card h5 {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.solution-card p {
  font-weight: 400;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

.solution-card .btn {
  background-color: #166bca;
  color: #fff;
  font-weight: 500;
  border-radius: 8px;
  padding: 6px 15px;
  transition: background-color 0.3s, transform 0.3s;
}

.solution-card .btn:hover {
  background-color: #002e72;
  transform: scale(1.05);
}

/*
* ======================================
* 4. LOGOS (CARROSSEL)
* ======================================
*/
.logo-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 3rem 0;
}

.logo-track {
  display: flex;
  gap: 60px;
  width: fit-content;
  animation: scrollInfinite 40s linear infinite;
}

.logo-track:hover {
  animation-play-state: paused;
}

.logo-carousel img {
  height: 60px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  transition: 0.3s;
}

.logo-carousel img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

@keyframes scrollInfinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

#logos-parceiros {
  margin-top: 160px; /* padrão desktop */
}

@media (max-width: 992px) {
  #logos-parceiros {
    margin-top: 200px;
  }
}

@media (max-width: 576px) {
  #logos-parceiros {
    margin-top: 260px; /* espaço extra no mobile para stats-bar em duas linhas */
  }
}

@media (min-width: 992px) {
  .hero-content {
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: min(1100px, 95vw) !important;
  }

  header.hero-header .hero-content .stats-bar {
    width: min(1200px, 95vw) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    padding: 18px 22px !important;
    justify-content: space-around !important;
  }

  header.hero-header .hero-content .stats-bar .stat-item {
    flex: 0 0 18% !important;
    max-width: 18% !important;
  }
}

/*
* ======================================
* 5. SEÇÃO EXECUTIVOS
* ======================================
*/
.executive-section {
  background: url("../img/executivo.png") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
}

.executive-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.executive-section .container {
  position: relative;
  z-index: 2;
}

.executive-section h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.executive-section ul {
  list-style: none;
  padding: 0;
}

.executive-section li {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.executive-section li i {
  color: #166bca;
  margin-right: 0.75rem;
  font-size: 1.3rem;
  line-height: 1.5;
}

/*
* ======================================
* 7. SEÇÃO NOTÍCIAS
* ======================================
*/

.news-card {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card .card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.news-card .card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
}

.news-card .news-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #166bca;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.news-card .card-footer {
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: #999;
}

.news-card .card-footer i {
  color: var(--primary-color);
}

/* CARROSSEL NOTÍCIAS */
.news-carousel .carousel-control-prev,
.news-carousel .carousel-control-next {
  width: 5%;
  opacity: 0.7;
}

.news-carousel .carousel-control-prev-icon,
.news-carousel .carousel-control-next-icon {
  background-image: none;
  font-size: 3rem;
  color: #166bca;
}

.news-carousel .carousel-control-prev-icon::before {
  content: "\f2b2"; /* bi-chevron-left */
  font-family: "bootstrap-icons";
}

.news-carousel .carousel-control-next-icon::before {
  content: "\f2b3"; /* bi-chevron-right */
  font-family: "bootstrap-icons";
}

.news-carousel .custom-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.news-carousel .custom-arrow i {
  font-size: 2.5rem;
  color: var(--cta-blue) !important;
  line-height: 1;
}

.news-carousel .carousel-control-prev.custom-arrow {
  left: -40px;
}
.news-carousel .carousel-control-next.custom-arrow {
  right: -20px;
}

@media (max-width: 576px) {
  .news-carousel .custom-arrow {
    width: 44px;
    height: 44px;
    box-shadow: none;
  }
  .news-carousel .custom-arrow i {
    font-size: 2.4rem;
  }

  .news-carousel .carousel-control-prev.custom-arrow {
    left: -20px;
  }
  .news-carousel .carousel-control-next.custom-arrow {
    right: -20px;
  }

  .news-card,
  .custom-card,
  .solution-card {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding: 0.6rem !important; /* reduz espaçamento interno */
  }

  .news-card img {
    height: 120px; /* menor altura para imagens no mobile */
    object-fit: cover;
  }

  .news-card .card-body {
    padding: 0.75rem !important;
  }

  .solution-card h5 {
    font-size: 1rem;
  }

  .solution-card p {
    font-size: 0.85rem;
  }
}

/*
* ======================================
* 8. RODAPÉ (FOOTER)
* ======================================
*/

.footer-section {
  background-color: var(--section-bg-light);
  color: #333;
  padding: 4rem 0 2rem 0;
}

.footer-section h5 {
  font-weight: 700;
  color: #000;
  margin-bottom: 1.5rem;
}

.footer-section .text-muted {
  color: #555 !important;
}

.footer-section a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #166bca;
}

.footer-brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #166bca;
}

.footer-logo-right {
  height: 50px;
}

/*
* ======================================
* 9. ANIMAÇÕES (REVEAL)
* ======================================
*/

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/*
* ======================================
* 10. RESPONSIVIDADE
* ======================================
*/

/* Hero e Stats */
@media (max-width: 992px) {
  .hero-content {
    padding: 150px 20px 0;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 40px 20px 0;
  }
  .hero-content h1 {
    font-size: 3rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .stats-bar {
    width: 95%;
    padding: 15px 20px;
    bottom: -50px;
  }
  .stat-item .number {
    font-size: 16px;
  }
  .stat-item .label {
    font-size: 9px;
  }
}

/* Hero Mobile */
@media (max-width: 576px) {
  .hero-content {
    padding: 15px 0;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
}
/* Ajustes para tablets: reduzimos a largura/padding da stats-bar para evitar overflow
   e melhorar leitura entre 577px e 992px */
@media (min-width: 577px) and (max-width: 992px) {
  .hero-header .stats-bar,
  .hero-content .stats-bar {
    width: 85% !important;
    padding: 12px 14px !important;
    margin: 18px auto !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09) !important;
  }

  .hero-header .stat-item,
  .hero-content .stat-item {
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }

  /* Pequeno ajuste tipográfico */
  .hero-header .stat-item .number {
    font-size: 20px;
  }
  .hero-header .stat-item .label {
    font-size: 11px;
  }
}

/* Executivos e Logos */
@media (max-width: 992px) {
  .executive-section h2 {
    font-size: 2.5rem;
  }
  .executive-section li {
    font-size: 1rem;
  }
  .logo-track {
    gap: 40px;
    animation-duration: 30s;
  }
  .footer-section .col-md-4 {
    margin-bottom: 20px;
  }
  #interface .tab-content img {
    max-width: 50%;
    margin: auto;
  }
}

@media (max-width: 768px) {
  .executive-section h2 {
    font-size: 2rem;
  }
  .executive-section li {
    font-size: 0.9rem;
  }
  .app-logos img {
    height: 40px;
  }
}

@media (max-width: 576px) {
  .executive-section {
    align-items: center;
  }
  .logo-track {
    gap: 30px;
    animation-duration: 25s;
  }
  .logo-carousel img {
    height: 40px;
  }
  .solucoes {
    width: 80%;
  }
  .footer-section p,
  .footer-section a {
    font-size: 0.8rem;
  }
}

/*
* ======================================
* 11. AJUSTES GERAIS
* ======================================
*/

.container,
.hero-content,
.stats-bar,
.executive-section .container,
#interface,
.footer-section .container {
  width: min(90vw, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ======================================
   DARK MODE (acionado adicionando a classe
   'dark-mode' no elemento <html>)
   ====================================== */

html.dark-mode body {
  /* Força cor de fundo sólida (sobrepõe a imagem de fundo definida inline) */
  background: #263238 !important;
  background-image: none !important;
  background-attachment: unset !important;
}

html.dark-mode,
html.dark-mode body,
html.dark-mode .container,
html.dark-mode .hero-content,
html.dark-mode .custom-card,
html.dark-mode .news-card,
html.dark-mode .solution-card {
  color: #e6eef1 !important;
}

html.dark-mode .custom-navbar {
  background: rgba(8, 15, 16, 0.55) !important;
}

html.dark-mode .custom-navbar .nav-link {
  color: rgba(230, 238, 241, 0.95) !important;
}

html.dark-mode .custom-navbar .nav-link.active,
html.dark-mode .custom-navbar .nav-link:hover {
  color: #81d1ff !important; /* soft blue for active/hover */
}

html.dark-mode .custom-card,
html.dark-mode .news-card,
html.dark-mode .solution-card {
  background-color: #37474f !important;
  border-color: #455a64 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

html.dark-mode .footer-section {
  background-color: #263238 !important;
  color: #cfe6ea !important;
}

/* Links e elementos interativos */
html.dark-mode a,
html.dark-mode .btn-demonstracao,
html.dark-mode .dropdown-item {
  color: #e6eef1 !important;
}

html.dark-mode .dropdown-menu {
  background: rgba(12, 18, 20, 0.85) !important;
}

/* Pequeno ajuste para o ícone da lua quando ativo */
html.dark-mode #theme-toggle {
  filter: brightness(1.2) saturate(0.8);
}
