:root {
  --black: #0B0B0B;
  --green: #227722; /* updated accent */
  --green-dark: #185A18; /* darker accent */
  --gray: #4a4a4a;
  --light-gray: #f6f8f9;
  --border: #e1e4e8;
  --white: #FFFFFF;
}

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= BASE ================= */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  color: var(--black);
  line-height: 1.75;
  font-size: 16px;
}

/* ================= CONTAINER ================= */
.container {
  width: 90%;
  max-width: 1120px;
  margin: auto;
}

/* ================= HEADER ================= */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* antes space-between */
  height: 88px; /* CONTROLA O HEADER */
}

nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 28px;
  text-decoration: none;
  color: #444;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.btn-outline {
  margin-left: 28px;
  border: 1.5px solid var(--green);
  padding: 9px 18px;
  border-radius: 8px;
  color: var(--green);
  font-weight: 600;
  transition: 0.25s;
}

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.logo {
  height: 52px;               /* Altura ideal para preencher o header de 88px */
  width: auto;                
  max-width: 280px;           
  display: block;
  object-fit: contain;
  object-position: left center;
  
  /* --- CORREÇÃO DE NITIDEZ --- */
  /* Força o navegador a renderizar os pixels da imagem embutida sem suavizar demais */
  image-rendering: -webkit-optimize-contrast; 
  image-rendering: crisp-edges;
  image-rendering: pixelated; /* Garante nitidez em telas de alta resolução */
  
  /* Remove qualquer suavização de borda do vetor */
  shape-rendering: geometricPrecision;
  
  /* Remove filtros de cor que podem causar desfoque no renderizador do Chrome */
  filter: none !important;
  -webkit-filter: none !important;

  padding: 0;
  margin: 0;
}

/* Se precisar no canto direito, use uma classe utilitária */
/* .logo--right { margin-left: auto; } */

/* ================= HERO ================= */
.hero {
  padding: 110px 0;
  background: radial-gradient(circle at top left, #eafaf1 0%, #ffffff 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero h1 {
  font-size: 46px;
  font-weight: 700;
  margin-bottom: 22px;
  line-height: 1.2;
}

.hero p {
  color: var(--gray);
  margin-bottom: 34px;
  font-size: 19px;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ================= BUTTON ================= */
.btn-primary {
  background: var(--green);
  color: var(--white);
  padding: 15px 34px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: 0.25s ease;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(34, 119, 34, 0.35); /* updated glow */
}

/* ================= SECTIONS ================= */
section {
  padding: 100px 0;
}

section h2 {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

.section-tag {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(34, 119, 34, 0.1); /* updated tint */
  border: 1px solid var(--green);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-subtitle {
  max-width: 720px;
  margin: 0 auto 60px;
  color: var(--gray);
  font-size: 17px;
  text-align: center;
}

/* ================= ABOUT ================= */
.about {
  text-align: center;
}

.about p {
  max-width: 760px;
  margin: 0 auto 20px;
  font-size: 17px;
  color: var(--gray);
}

/* ================= WHY US ================= */
.why-us {
  background: var(--light-gray);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 50px;
}

.why-item {
  background: var(--white);
  padding: 34px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: 0.3s;
}

.why-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.why-item h3 {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 600;
}

.why-item p {
  color: var(--gray);
  font-size: 15px;
}

/* ================= SERVICES ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  transition: 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--green);
  box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

.service-icon {
  font-size: 36px;
  margin-bottom: 22px;
}

.service-card h3 {
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 600;
}

.service-card p {
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 20px;
}

.service-benefit {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

/* ================= CONTACT ================= */
.contact {
  background: var(--light-gray);
}

.contact-form {
  max-width: 560px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 16px;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 119, 34, 0.15); /* updated focus ring */
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ================= FOOTER ================= */
.footer {
  padding: 34px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: #777;
  font-size: 14px;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-social a {
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-social a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.footer-social .icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.footer-social .icon svg {
  width: 100%;
  height: 100%;
  color: var(--black);
}

.footer-social a:hover .icon svg {
  color: var(--green-dark);
}

.footer-copy {
  color: #777;
  font-size: 14px;
}

/* ================= LOADING ================= */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.show { display: flex; }

.loading-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  padding: 20px 22px;
  text-align: center;
  color: var(--black);
  max-width: 320px;
}

.loading-box .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.9s linear infinite;
}

.loading-box .message {
  font-size: 14px;
  color: var(--gray);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .container { width: 92%; }

  /* Header */
  .header-content { height: 72px; }
  .logo { height: 52px; }
  nav a { margin-left: 16px; font-size: 14px; }
  .btn-outline { padding: 8px 14px; font-size: 14px; }

  /* Hero */
  .hero { padding: 70px 0; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero h1 { font-size: 32px; line-height: 1.25; }
  .hero p { font-size: 16px; margin-bottom: 22px; }
  .hero-image img { max-width: 80%; margin: 0 auto; }

  /* Sections */
  section { padding: 70px 0; }
  section h2 { font-size: 28px; margin-bottom: 14px; }
  .section-subtitle { margin: 0 auto 34px; font-size: 15px; }

  /* Grids to single column */
  .services-grid, .why-grid { grid-template-columns: 1fr; gap: 22px; }

  /* Cards */
  .service-card { padding: 24px; }
  .service-icon { font-size: 28px; margin-bottom: 14px; }
  .service-card h3 { font-size: 18px; }
  .service-card p { font-size: 14px; }

  /* Contact form */
  .contact-form { max-width: 100%; gap: 16px; }
  .contact-form input, .contact-form textarea { font-size: 16px; padding: 14px; }
  .contact-form textarea { min-height: 120px; }

  /* Buttons */
  .btn-primary { width: 100%; text-align: center; padding: 14px 20px; }

  /* Footer */
  .footer { padding: 26px 0; font-size: 13px; }
}

/* Extra small devices */
@media (max-width: 380px) {
  .hero h1 { font-size: 28px; }
  nav a { margin-left: 12px; font-size: 13px; }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 18px;
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  /* Esconde nav por padrão no mobile e mostra ao togglar */
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
  nav a { margin-left: 0; }
}

/* Mobile nav dropdown with backdrop to avoid overlap */
@media (max-width: 768px) {
  .header { position: sticky; top: 0; z-index: 100; }
  .header-content { position: relative; }

  /* Hidden by default */
  nav { display: none; }

  /* When open, show as fixed dropdown below header and add backdrop */
  nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 88px; /* matches header height */
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    padding: 12px 16px;
    z-index: 101; /* above header */
  }

  nav.open a { display:block; padding:12px 8px; margin:0; border-radius:8px; }
  nav.open a:hover { background: var(--light-gray); }
  nav.open .btn-outline { margin: 0; text-align:center; }

  /* Backdrop */
  .header.has-open::after {
    content: "";
    position: fixed;
    top: 88px; /* below header */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100; /* below dropdown, above content */
  }

  /* Prevent body scroll when menu is open */
  body.menu-open { overflow: hidden; }
}
