/* Reset and base */
*,
*::before,
*::after { box-sizing: border-box; }

html { 
  -webkit-text-size-adjust: 100%; 
  overflow-x: hidden; /* Impede que o menu empurre a tela para o lado */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #111827;
  background: #ffffff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Reforço para evitar o erro de arrastar a tela */
}

/* Impede a rolagem vertical quando o menu está aberto */
body.nav-open {
  overflow: hidden !important;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #0f766e; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1100px;
  padding: 0 16px;
  margin: 0 auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffffcc;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e5e7eb;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img {
  width: 168px;
  height: 42px;
}

/* Nav Mobile */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  z-index: 70; /* Fica acima de tudo */
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.45);
  backdrop-filter: blur(2px);
  z-index: 55;
  display: none;
}
.nav-open .nav-backdrop { display: block; }

.site-nav {
  /* Estilos para mobile (off-canvas) */
  position: fixed;
  top: 0;
  right: 0;
  width: 280px; /* Largura fixa para não bugar no celular */
  max-width: 80%;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  z-index: 60;
  
  /* Escondido por padrão no mobile */
  transform: translateX(100%);
  visibility: hidden; 
  transition: transform 0.3s ease, visibility 0.3s;
  
  padding-top: 84px;
  padding-left: 16px;
  padding-right: 16px;
  overflow-y: auto;
}

/* Quando o menu mobile abre */
.nav-open .site-nav { 
  transform: translateX(0); 
  visibility: visible;
}

.site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-nav a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: #111827;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus { background: #f3f4f6; text-decoration: none; }

/* Desktop nav (Notebook) */
@media (min-width: 960px) {
  .nav-toggle, .nav-backdrop { display: none !important; }
  
  .site-nav {
    /* Reseta todas as regras de mobile */
    position: static;
    transform: none !important;
    visibility: visible !important;
    width: auto;
    max-width: none;
    height: auto;
    border: 0;
    padding: 0;
    background: transparent;
    overflow-y: visible;
    box-shadow: none;
  }
  
  .site-nav .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
  }
  
  .site-nav a {
    width: auto;
    white-space: nowrap;
  }
}

/* Main */
.main {
  display: block;
  flex-grow: 1;
}

/* --- NOVOS ESTILOS PARA IMAGEM PRINCIPAL NA PÁGINA HOME --- */
.home-banner-image {
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.home-banner-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
}

@media (max-width: 959px) {
  .home-banner-image img {
    width: 90%;
    border-radius: 0;
  }
}

/* --- NOVOS ESTILOS PARA PÁGINA KEYSTONE EMPREENDIMENTOS --- */
.keystone-image-wrapper {
  text-align: center;
  margin-top: 20px;
}

.keystone-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
}

@media (max-width: 959px) {
  .keystone-image-wrapper img {
    width: 90%;
    border-radius: 0;
  }
}

/* Features */
.features { padding: 28px 0; }
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Cards com imagens de fundo */
.card-mission, .card-vision, .card-values {
  background: transparent;
  color: #FFFFFF;
}

.card-mission h2, .card-mission p,
.card-vision h2, .card-vision p,
.card-values h2, .card-values p {
  color: #FFFFFF;
}

.card-mission::before, .card-vision::before, .card-values::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), var(--card-bg-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: -1;
}

.card-mission { --card-bg-image: url('../img/lote.png'); }
.card-vision { --card-bg-image: url('../img/olho.png'); }
.card-values { --card-bg-image: url('../img/aperto.png'); }

/* CTA */
.cta { padding: 24px 0 40px; }
.cta-inner {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 20px;
  background: #eff6ff;
  text-align: center;
}

/* Page header */
.page-header { padding: 28px 0; }
.page-header h1 { margin: 0 0 8px 0; }

/* Contact page layout */
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
}
.contact-link:hover { color: #0f766e; }

.contact-icon { width: 24px; height: 24px; flex-shrink: 0; }
.contact-link.whatsapp { color: #25D366; }

.contact-image-wrapper { text-align: center; }
.contact-image { max-width: 100%; border-radius: 8px; }

@media (min-width: 960px) {
  .contact-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .contact-details { flex: 1; max-width: 52%; }
  .contact-image-wrapper { flex: 1; max-width: 48%; text-align: right; }
}

/* Services page layout */
.services-content-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.services-column-left ul, .services-column-right ul {
    list-style: disc;
    margin-left: 20px;
}

@media (min-width: 960px) {
  .services-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  text-align: center;
  align-items: center;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Quem Somos */
.about-page-header {
  position: relative;
  overflow: hidden;
  padding: 28px 0;
}

.about-page-header .background-overlay {
  position: absolute;
  inset: 0;
  background-image: url('../img/vila5.png');
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

.about-content-frame {
  position: relative;
  z-index: 1;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  margin-top: 24px;
}