/* =========================================
   RESET & VARIÁVEIS
   ========================================= */
* {
  box-sizing: border-box;
  border-width: 0;
  border-style: 0;
}

:root {
  --vermelho: #b12b30;
  --branco-cinza: #f3f3f3;
  --cinza-escuro: #6c6c6b;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--branco-cinza);
  overflow-x: hidden; /* Evita scroll lateral indesejado na página inteira */
}

/* =========================================
   HEADER & NAVEGAÇÃO
   ========================================= */
.main-nav {
  background-color: var(--vermelho);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 0 20px;
  z-index: 100;
}

.logo img {
  height: 60px;
  margin-left: 20px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-links {
  display: flex;
  flex-direction: row;
  padding: 10px;
  list-style: none;
  gap: 80px;
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
}

.nav-links a {
  text-decoration: none;
  color: var(--branco-cinza);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #2b0606;
}

/* =========================================
   SLIDER (HIGHLIGHT SECTION)
   ========================================= */
.highlight-section {
  position: relative;
  width: 100%;
  height: 650px;
  overflow: hidden;
  margin: 6px 0;
  background-color: #000;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.8;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease-in-out,
    visibility 0.8s;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

/* Conteúdo de Texto do Slide */
.text-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 45%;
  height: 100%;
  justify-content: center;
  margin-left: 5%;
}

.text-content a {
  text-decoration: none;
}

.product-title {
  font-size: 42px;
  color: var(--branco-cinza);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.text-content h2 {
  font-size: 18px;
  color: var(--branco-cinza);
}

.text-content h3 {
  font-size: 30px;
  color: var(--branco-cinza);
}

.carac {
  display: flex;
  gap: 15px;
  min-height: 60px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 10px;
}

.carac img {
  height: 45px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

/* Botões do Slider */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 55px;
  width: 320px;
  border-radius: 8px;
  color: var(--branco-cinza);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition:
    transform 0.2s,
    background-color 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--vermelho);
}
.btn-primary:hover {
  background-color: #8a2024;
}

.btn-secondary {
  background-color: var(--cinza-escuro);
}
.btn-secondary:hover {
  background-color: #4a4a4a;
}

/* Imagens dos Produtos no Slider */
.product-img {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  height: 75%;
  max-height: 550px;
  width: auto;
  z-index: 2;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.6));
  opacity: 0;
  transition:
    opacity 0.6s ease 0.2s,
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}

.slide.active .product-img {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.slide:not(.active) .product-img {
  transform: translateY(-50%) translateX(60px);
}

/* Indicadores (Bolinhas) */
.slider-indicators {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.dot.active {
  background-color: var(--vermelho);
  transform: scale(1.3);
  border-color: var(--vermelho);
}

/* --- Responsividade do Slider (Mobile) --- */
@media (max-width: 768px) {
  .carac img {
    height: 100px;
    max-width: 300px;
  }
  .highlight-section {
    height: auto;
    min-height: 0;
    padding-bottom: 30px;
  }
  .slider-container {
    height: auto;
  }
  .slide {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    background: none;
    margin-bottom: 30px;
  }
  .slide:not(.active) {
    display: none;
  }
  .text-content {
    width: 98vw;
    max-width: 500px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
    padding: 18px 2vw 0 2vw;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    z-index: 2;
    position: relative;
  }
  .carac {
    justify-content: center;
  }
  .product-img {
    position: relative;
    right: auto;
    top: auto;
    transform: none !important;
    height: 120px;
    margin: 12px auto 0 auto;
    max-width: 90vw;
    display: block;
    z-index: 1;
  }
  .product-title {
    font-size: 22px;
  }
  .text-content h2 {
    font-size: 14px;
  }
  .text-content h3 {
    font-size: 16px;
  }
  .btn {
    height: 38px;
    width: 90vw;
    max-width: 320px;
    font-size: 14px;
    margin-bottom: 8px;
  }
}

/* =========================================
   SEÇÃO DE PRODUTOS (Botões Pequenos)
   ========================================= */
.solutions-section {
  padding: 40px 20px;
  text-align: center;
}

.section-title {
  color: var(--vermelho);
  font-size: 32px;
  margin-bottom: 30px;
}

.solutions-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.solution-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 200px;
  margin-left: 0;
}

.solution-item img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.solution-btn {
  background-color: var(--cinza-escuro);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

/* =========================================
   GALERIA DE PROJETOS (ATUALIZADO)
   ========================================= */
.photo-gallery-section {
  padding: 60px 0;
  background-color: var(--vermelho);
  text-align: center;
  width: 100%;
  overflow: hidden; /* Garante que a barra da página não apareça */
}

.gallery-title {
  color: var(--branco-cinza);
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px;
}

/* Grid Container com Scroll Horizontal */
.gallery-grid {
  display: grid;

  /* DESKTOP: 2 linhas de altura fixa */
  grid-template-rows: repeat(2, 300px);

  /* CÁLCULO MÁGICO: Define que cabem exatamente 2 colunas na largura disponível */
  grid-auto-columns: calc((60% - 20px) / 2);

  /* Faz o grid crescer para a direita (horizontal) */
  grid-auto-flow: column;

  gap: 20px;
  padding: 0 20px 20px 20px;

  /* Configuração do Scroll */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  /* Estilização da barra de rolagem */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

.gallery-item {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 600px;
  max-height: 600px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  scroll-snap-align: center; /* Centraliza ao soltar */
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.item-title {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(177, 43, 48, 0.9);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  z-index: 10;
  text-transform: uppercase;
}

/* Responsividade da Galeria (Mobile) */
@media (max-width: 768px) {
  .gallery-grid {
    /* MOBILE: 2 linhas, altura menor */
    grid-template-rows: repeat(2, 220px);

    /* MOBILE: 90% da largura para mostrar "frestinha" do próximo slide */
    grid-auto-columns: 90%;
    gap: 15px;
    padding: 0 15px 20px 15px;
  }

  .gallery-title {
    font-size: 24px;
  }
}

/* =========================================
   SEÇÃO DE VÍDEO (FEATURE)
   ========================================= */
.video-feature-section {
  padding: 40px 20px;
  background-color: white;
  width: 100%;
}

.feature-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.video-wrapper {
  flex: 0 0 40%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-title {
  color: var(--vermelho);
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}

.feature-desc {
  font-size: 18px;
  color: var(--cinza-escuro);
  line-height: 1.6;
  margin: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px 0;
}

.feature-list li {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.feature-list li::before {
  content: "✔";
  color: var(--vermelho);
  font-weight: bold;
  margin-right: 10px;
}

@media (max-width: 900px) {
  .feature-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .video-wrapper {
    max-width: 100%;
    flex: auto;
    width: 90%;
  }
  .text-wrapper {
    align-items: center;
  }
  .feature-list li {
    justify-content: center;
  }
}

/* =========================================
   RODAPÉ (FOOTER)
   ========================================= */
.main-footer {
  background-color: #333;
  color: #fff;
  padding: 40px 5% 20px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.column-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #a52a2a;
}

.contact-info p {
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.social-media {
  text-align: right;
}

.social-icons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.social-icons img {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  padding: 5px;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.copyright {
  text-align: center;
  margin-top: 20px;
  border-top: 1px solid #444;
  padding-top: 10px;
  font-size: 0.8em;
  color: #aaa;
}
