:root {
  --primary-color: #c34419;
  --dark-text: #2f2f2f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth; /* Adiciona rolagem suave para links âncora */
}

body {
  color: var(--dark-text);
  line-height: 1.6;
  background-color: #fff;
}

header {
  background: white;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-link .logo {
    width: 220px;
    height: auto; /* Mantém a proporção */
    display: block; /* Remove espaço extra abaixo da imagem */
}

/* Header da página de política de privacidade (centralizado) */
.privacy-page header {
    justify-content: center;
}

header nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--dark-text);
  font-weight: 500;
  transition: color 0.3s;
}

header nav a:hover {
    color: var(--primary-color);
}

/* --- Estilos do Menu Hambúrguer --- */
.nav-toggle {
    display: none; /* Escondido em telas grandes */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Fica acima do painel de navegação */
    position: relative; /* Para o posicionamento do ícone */
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background: var(--dark-text);
    transition: all 0.25s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--dark-text);
    transition: all 0.25s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }


.hero {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero a {
  background: white;
  color: var(--primary-color);
  padding: 12px 24px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background 0.3s;
}

.hero a:hover {
  background: #f2f2f2;
}

section {
  padding: 80px 20px;
  max-width: 1000px;
  margin: auto;
}

h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
}

.services, .portfolio {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service, .project {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.project {
  padding: 0; /* Remove padding para a imagem encostar na borda */
}

.project img, .project picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* Mantém a proporção e evita pulos de layout */
  object-fit: cover; /* Garante que a imagem cubra a área sem distorcer */
  border-radius: 12px 12px 0 0; /* Cantos arredondados apenas no topo */
}

.project h3, .project p {
  padding: 0 20px; /* Adiciona o padding de volta para o texto */
}

.project h3 {
  margin-top: 20px;
}

.contact-form {
  max-width: 500px;
  margin: auto;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-family: 'Inter', sans-serif;
}

.contact-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #a33a15;
}

footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Estilos da Página de Política de Privacidade */
.policy-content {
    padding: 60px 20px;
    max-width: 800px;
    margin: auto;
}

.policy-content h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark-text);
}

.policy-content h2 {
    font-size: 1.6rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.policy-content p, .policy-content ul {
    margin-bottom: 20px;
}

.policy-content ul {
    padding-left: 25px;
}

.policy-content li {
    margin-bottom: 10px;
}

/* Campo "Honeypot" para prevenção de spam */
.honeypot {
    position: absolute;
    left: -5000px;
    top: 0;
    visibility: hidden;
}

/* === Páginas de Mensagem (Obrigado/Erro) === */
.message-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    padding: 20px;
}

.message-page h1 {
    font-size: 2.2rem;
}

.message-page p {
    margin-bottom: 30px; /* Adiciona um espaço abaixo do parágrafo */
}

.message-page a {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s;
}

/* === Animação ao Rolar (Scroll) === */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Botão Voltar ao Topo === */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: var(--primary-color);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, background-color 0.3s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #a33a15; /* Tom mais escuro da cor primária */
}

.message-page a:hover {
    background-color: #a33a15;
}

/* === Design Responsivo === */
@media (max-width: 768px) {
  /* Ajusta o cabeçalho para manter logo e botão na mesma linha */
  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 15px 20px;
  }

  .nav-toggle {
    display: block; /* Mostra o botão em telas pequenas */
  }

  /* Estiliza o painel de navegação */
  header nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 320px;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    
    display: flex; /* Essencial para que flex-direction funcione */
    flex-direction: column;
    align-items: center; /* Centraliza os links horizontalmente no painel */
    justify-content: center;
    gap: 30px;

    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  /* Classe que o JS adiciona para abrir o menu */
  header.nav-open nav {
    transform: translateX(0);
  }

  /* Animação do ícone para um "X" */
  header.nav-open .hamburger { background: transparent; }
  header.nav-open .hamburger::before { transform: rotate(45deg) translate(5px, 6px); }
  header.nav-open .hamburger::after { transform: rotate(-45deg) translate(5px, -6px); }

  header nav a {
    margin-left: 0; /* Remove a margem dos links dentro do painel */
    font-size: 1.2rem;
  }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.1rem; }
  section { padding: 60px 20px; }
  h2 { font-size: 1.8rem; }
  .policy-content h1 { font-size: 1.8rem; }
  .policy-content h2 { font-size: 1.4rem; }
}
