/*=========================
1. VARIABLES
=========================*/
:root {
  --bg: #0b0d11;
  --bg-soft: #11151b;
  --bg-card: #161b23;
  --bg-card-2: #1b212c;
  --text: #f3f5f7;
  --muted: #aeb6c2;
  --line: #2b313d;
  --red: #d1121b;
  --red-dark: #9d0f15;
  --red-light: #ff2a35;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --transition: 0.3s ease;
}

/*=========================
2. RESET
=========================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: var(--text);
}

ul {
  list-style: none;
}

.menu-toggle {
    display: none;
}

/*=========================
3. GLOBAL
=========================*/

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  background: White;
  overflow-x: hidden;
}

.container {
  width: min(92%, var(--container));
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.dark-section {
  background-image: url('assets/Imagens/2.jpeg');
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/*=========================
4. TYPOGRAPHY
=========================*/
h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: white;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--red);
}

p {
  color: white;
  font-size: 1rem;
}

/*=========================
5. TAGS / BADGES
=========================*/
.section-tag,
.section-tag1,
.section-tag2,
.section-tag3,
.tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-tag,
.tag {
  border: 1px solid rgba(209, 18, 27, 0.35);
  background: rgba(209, 18, 27, 0.35);
  color: white;
}

.section-tag1 {
  border: 1px solid rgba(209, 18, 27, 0.35);
  background: rgba(209, 18, 27, 0.25);
  color: black;
}

.section-tag2 {
  border: 1px solid rgba(209, 18, 27, 0.35);
  background: rgba(209, 18, 27, 0.20);
  color: black;
}

.section-tag3 {
  border: 1px solid rgba(209, 18, 27, 0.35);
  background: rgba(209, 18, 27, 0.20);
  color: black;
}

/*=========================
6. BUTTONS
=========================*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: bold;
  transition: var(--transition);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-light) 100%);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(209, 18, 27, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--red-light) 0%, var(--red) 100%);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white);
  background: #16a34a;
}

.btn-outline:hover {
  border-color: rgba(209, 18, 27, 0.4);
  background: #12813b;
}

.btn-whatsapp {
  background: #16a34a;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #12813b;
}

/*=========================
7. HEADER
=========================*/

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(12px);
  background: rgba(9, 11, 15, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
}

.nav {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
}

.logo {
  width: 100px;
  max-width: 100%;
}

.menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.menu a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: var(--transition);
}

.menu a:hover::after {
  width: 100%;
}

/*=========================
8. HERO
=========================*/

.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  background:
    radial-gradient(circle at top right, rgba(209, 18, 27, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(209, 18, 27, 0.12), transparent 22%),
    linear-gradient(180deg, #090b0f 0%, #0f1319 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.94) 0%, rgba(8, 10, 14, 0.80) 45%, rgba(8, 10, 14, 0.70) 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  background-image: url('assets/Imagens/1.jpeg');
  pointer-events: none;
}

.overlay1 {
  position: absolute;
  inset: 0;
  background-image: url('assets/Imagens/3.jpg');
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero-content p {
  max-width: 680px;
  font-size: 1.08rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  color: White;
}

/*=========================
9. CARDS
=========================*/

.hero-form-card,
.stats-card,
.service-card,
.diff-card,
.contact-cta-card {
  background: linear-gradient(180deg, rgba(22, 27, 35, 0.96) 0%, rgba(17, 21, 27, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-box {
  color: var(--red);
}

.contact-info p{
  color: #000000;
  font-weight: 500;
}

.hero-form-card {
  padding: 28px;
    width: 90%; /* Ocupa 90% da tela em celulares */
    max-width: 480px; /* Largura ideal para monitores */
    margin: 20px auto; /* Centraliza automaticamente em qualquer tela */
    box-sizing: border-box; /* Evita que o padding quebre o tamanho do card */
   }

.hero-form-card h2{
  color: var(--red);
}

.highlight-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow);
}

/*=========================
10. SERVICES
=========================*/

.container-texto {
  max-height: 2000px; /* Ajuste a altura máxima conforme o seu layout */
  overflow-y: auto;  /* Ativa a barra de rolagem vertical quando necessário */
  padding-right: 10px; /* Espaço para a barra de rolagem não cobrir o texto */
}

.container-texto::-webkit-scrollbar {
  width: 6px;
}

.section-monitoring {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Impede que a imagem crie barra de rolagem horizontal na tela */
  padding: 60px 0;
  display: flex;
  justify-content: flex-end; /* Alinha o container principal em direção à direita */

}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.services-grid h3,
.services-grid p,
.diff-card h3,
.diff-card p {
  padding-left: 10px;
}

.title-services h2,
.title-services2 h2{
  text-align: center  ;
  margin-bottom: 20px;
  font-size: 2.2rem;
  font-weight: bold;
}

.text-services p,
.text-services p {
  color: #333333;            /* Grafite escuro melhora a leitura em relação ao preto puro */
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 15px;
}

.title-services,
.title-service2 {
  flex: 0 0 450px; /* Define uma largura horizontal fixa e ideal para o texto */
  padding-right: 40px; /* Cria um respiro elegante antes da imagem */
}

.section-reverse .title-services {
  padding-right: 0;
  padding-left: 40px; /* Cria o respiro entre a imagem e o texto */
}



/*=========================
11. LOGOS
=========================*/

.logo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.logo-container h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 8px;
}

.logo-container h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 250px;
  height: 3px;
  background-color: var(--red);
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
  border-radius: 2px;
}

.logo-container h2:hover::after {
  width: 29%;
}

.logo-item {
  width: 100px;
  transition: transform 0.3s ease;
  cursor: pointer;
  filter: grayscale(100%);
  opacity: 0.6;
}

.logo-item:hover {
  transform: scale(1.2);
  filter: grayscale(0%);
  opacity: 1;
}

/*=========================
12. CONTACT / FORM
=========================*/

.contact-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
}

input,
select,
textarea {
  width: 100%;
  background: #0f1319;
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 12px;
  padding: 14px 15px;
  font-family: inherit;
  font-size: 0.96rem;
  outline: none;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--red);
}

/*=========================
13. FOOTER
=========================*/

.footer {
  background-color: #333;
  padding: 60px 0;
  margin-top: 100px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-image-container {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  min-width: 250px; 
}

.footer img {
  max-width: 100%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
}

.footer p {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.social-links p {
  transition: 0.3s;
}

.social-links p:hover {
  transform: scale(1.1);
  color: var(--red);  
}

/*=========================
14. IMAGENS LATERAIS
=========================*/

.container-image-exiting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  /* Define que o conteúdo começará alinhado à esquerda na linha do menu */
  padding-left: calc((100vw - 1200px) / 2); 
  padding-right: 0; /* Remove a margem da direita para a imagem encostar na tela */
  overflow: hidden; /* Evita que apareça uma barra de rolagem horizontal no site */
}

.container-image-exiting.section-reverse {
  flex-direction: row-reverse;
  padding-right: calc((100vw - 1200px) / 2); /* Alinha o texto na direita com o menu */
  padding-left: 0; /* Permite que a imagem encoste na borda esquerda da tela */
}

.imagem-cortada {
  width: 100%;
  max-height: 500px; /* Ajuste este valor para controlar a altura da seção */
  object-fit: cover; /* Faz a imagem preencher o bloco sem distorcer */
  display: block;
  /* Mantém o corte arredondado estiloso apenas nos cantos esquerdos */
  border-radius: 40px 0 0 40px; 
}

.imagem-posicionada {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}

.section-reverse .imagem-posicionada {
  justify-content: flex-start;
}

.section-reverse .imagem-cortada {
  border-radius: 0 40px 40px 0; 
}

.image-Mercadao {
  position: absolute;
  right: 0;          /* Cola totalmente na borda direita da página */
  top: 50%;
  transform: translateY(-50%); /* Centraliza verticalmente na seção */
  width: 45vw;       /* Ocupa 45% da largura total da tela do navegador */
  height: 80%;       /* Ocupa 80% da altura da seção */
  z-index: 1;
}

/* Garante o comportamento da imagem e aplica as bordas com opacidade */
.image-Mercadao img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ajusta a imagem sem distorcê-la */
  border: 15px solid rgba(255, 255, 255, 0.0);
  border-radius: 100px;
}

/*=========================
15.TEXTS
=========================*/

/* Torna a seção a referência de posicionamento para a imagem colada */
#sobre {
  position: relative;
  overflow: hidden; /* Impede que a imagem crie barra de rolagem horizontal */
  padding: 80px 0;
}

/* Alinha o texto à esquerda, deixando o espaço da direita livre */
#sobre .section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Divide o espaço em duas colunas */
  gap: 40px;
  align-items: center;
}

/* Centraliza o conteúdo do texto conforme você pediu anteriormente, mas dentro do seu bloco */
#sobre .section-text {
  text-align: justify;
  z-index: 2; /* Garante que o texto fique acima da imagem se elas se sobreporem */
}

#sobre .section-text p {
  text-wrap: balance;
  margin-bottom: 20px;
  color: Black;
  width: 100%;
  line-height: 1.6;
}

/*=========================
16. RESPONSIVIDADE
=========================*/
/*NOTEBOOK*/
@media (max-width: 1200px) {

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .footer-image-container {
    justify-content: center;
  }

.container-image-exiting {
    padding-left: 20px; 
  }

.container-image-exiting section-reverse {
  padding-left: 20px;
}

.container-image-exiting.section-reverse {
    padding-right: 20px;
    padding-left: 0;
  }

.social-links {
    justify-content: center;

}

/*TABLET*/
@media (max-width: 768px) {

  .desktop-only {
        display: none !important;
    }

    /* Exibe e estiliza o botão hambúrguer (as 3 linhas) */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }

    /* Desenha as 3 linhas pretas do botão (mude a cor se o fundo for escuro) */
    .menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--red); 
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Esconde a lista de menu padrão e transforma em um painel que desliza */
    #menu {
        position: fixed;
        top: 0;
        right: -100%; /* Joga o menu para fora da tela (lado direito) */
        width: 250px;
        height: 100vh;
        background-color: #11151b; /* Cor escura igual aos seus cards */
        padding: 80px 20px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    /* Quando o botão for clicado, o JS ativa essa classe e o menu aparece */
    #menu.active {
        right: 0; /* Traz o menu para dentro da tela */
    }

    /* Estiliza os links dentro do menu móvel para ficarem em lista */
    .menu {
        display: flex;
        flex-direction: column;
        gap: 20px;
        list-style: none;
        padding: 0;
    }

    .menu li a {
        color: #ffffff; /* Letras brancas para contrastar com o fundo escuro */
        font-size: 1.2rem;
        text-decoration: none;
        display: block;
    }

    .section-monitoring {
        display: block !important;
        padding: 30px 20px !important; /* Mantém a margem de segurança nas laterais */
        width: 100% !important;
        max-width: 100vw !important;
    }

    .container-image-exiting {
        display: flex !important;
        flex-direction: column !important; /* CORRIGIDO: Mantém a ordem original dos elementos */
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .title-services, 
    .container-texto, 
    .text-services {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .text-services p {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important; 
        word-break: break-word !important;
    }
    
    .imagem-posicionada,
    .imagem-cortada {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-top: 20px !important; /* Dá um espaçamento elegante entre o fim do texto e a imagem */
    }
    .text-services p {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important; /* Força o texto a quebrar a linha */
        word-break: break-word !important;
    }
    
    .imagem-posicionada,
    .imagem-cortada {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

  .hero {
    padding: 80px 0 60px;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .logo-item {
    width: 80px;
  }

  .footer-content {
    flex-direction: column;
  }

  #sobre .section-grid {
    grid-template-columns: 1fr;
  }
  .image-Mercadao {
    width: 100%;
    height: 100%;
    opacity: 0.2; /* Diminui a opacidade no celular para não atrapalhar a leitura */
  }
  .image-Mercadao img {
    border: none;
    border-radius: 0;
  }

  .container-image-exiting.section-reverse {
    padding-right: 20px;
    padding-left: 0;
  }

  .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
    }
    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}

/*CELULAR*/
@media (max-width: 480px) {

  .desktop-only {
        display: none !important;
    }

    /* Exibe e estiliza o botão hambúrguer (as 3 linhas) */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }

    /* Desenha as 3 linhas pretas do botão (mude a cor se o fundo for escuro) */
    .menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--red); 
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Esconde a lista de menu padrão e transforma em um painel que desliza */
    #menu {
        position: fixed;
        top: 0;
        right: -100%; /* Joga o menu para fora da tela (lado direito) */
        width: 250px;
        height: 100vh;
        background-color: #11151b; /* Cor escura igual aos seus cards */
        padding: 80px 20px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    /* Quando o botão for clicado, o JS ativa essa classe e o menu aparece */
    #menu.active {
        right: 0; /* Traz o menu para dentro da tela */
    }

    /* Estiliza os links dentro do menu móvel para ficarem em lista */
    .menu {
        display: flex;
        flex-direction: column;
        gap: 20px;
        list-style: none;
        padding: 0;
    }

    .menu li a {
        color: #ffffff; /* Letras brancas para contrastar com o fundo escuro */
        font-size: 1.2rem;
        text-decoration: none;
        display: block;
    }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  p {
    font-size: 0.95rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-form-card {
    padding: 20px;
  }

  .section {
    padding: 60px 0;
  }
.container-image-exiting {
    flex-direction: column; /* Empilha os elementos no celular */
    gap: 20px;
  }

  .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
    }
    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}

@keyframes pulseWhatsApp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/*=======================
17.  WHATSAPP
========================*/
/* Estilo do Botão Flutuante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366; /* Verde oficial do WhatsApp */
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000; /* Garante que fique acima de qualquer elemento ou menu */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    
    /* Efeito opcional de pulsação na tela */
    animation: pulseWhatsApp 2s infinite; 
}

/* Tamanho e cor do ícone interno */
.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: #ffffff; /* Ícone Branco */
}

/* Efeitos ao passar o mouse por cima (Desktop) */
.whatsapp-float:hover {
    transform: scale(1.1); /* Aumenta levemente de tamanho */
    background-color: #128c7e; /* Tom de verde mais escuro */
}