/* Correções de compatibilidade e abertura local. Mantido separado para não alterar a base visual. */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;padding:0}
img{display:block;max-width:100%}
a{text-decoration:none;color:inherit}
button{font:inherit}

.hero{height:100vh;min-height:700px}

/* Ajustes tipográficos exclusivos da Home */
.topbar .brand{font-size:15.6px;font-weight:700;text-shadow:0 2px 5px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.25);transition:all .3s ease}
.topbar nav a{font-size:13.2px;font-weight:700;text-shadow:0 2px 5px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.25);transition:all .3s ease}
.topbar .brand:hover,.topbar nav a:hover{opacity:1;filter:brightness(1.12);text-shadow:0 0 8px rgba(255,255,255,.55),0 2px 5px rgba(0,0,0,.35)}
.hero .eyebrow{font-size:14px;text-shadow:0 2px 5px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.35)}
.hero h1{text-shadow:0 3px 10px rgba(0,0,0,.35),0 1px 3px rgba(0,0,0,.25)}
.hero-tagline{margin-bottom:30px;text-shadow:0 2px 6px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.30)}
.hero-details{font-size:16.5px;font-weight:600;line-height:1.55;white-space:nowrap;text-shadow:0 2px 6px rgba(0,0,0,.55),0 1px 3px rgba(0,0,0,.35)}

@media(max-width:1100px){.hero-details{white-space:normal}}

.whatsapp-float{
  position:fixed;
  right:max(24px,env(safe-area-inset-right));
  bottom:max(24px,env(safe-area-inset-bottom));
  z-index:100;
  width:80px;
  height:80px;
  min-width:80px;
  min-height:80px;
  border-radius:50%;
  background:#43584a;
  display:grid;
  place-items:center;
  box-shadow:0 8px 25px rgba(20,40,25,.22);
  animation:nudge 5s 2s infinite;
  transition:background-color .3s ease,transform .3s ease;
}

.whatsapp-float:hover{background:#2d4436;transform:translateY(-2px)}

.whatsapp-float svg,
.whatsapp-float img{
  display:block;
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  max-width:38px;
  max-height:38px;
  fill:#fff;
}

/* Galerias dinâmicas: carrossel leve, ordenado pelos dados do Admin */
body{overflow-x:hidden}
#gallery-grid{display:block;position:relative;padding:0 48px}
.carousel-viewport{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-inline:contain;touch-action:pan-x}
.carousel-viewport::-webkit-scrollbar{display:none}
.carousel-track{display:flex;gap:18px;min-width:100%}
.carousel-item{flex:0 0 calc((100% - 36px)/3);scroll-snap-align:start;min-width:0}
.carousel-track[data-count="1"],.carousel-track[data-count="2"]{justify-content:center}
.carousel-arrow{position:absolute;top:50%;z-index:3;width:36px;height:36px;border:1px solid rgba(45,48,39,.12);border-radius:50%;background:rgba(245,241,232,.9);color:#2d3027;display:grid;place-items:center;padding:0 0 3px;font:300 27px/1 Georgia,serif;box-shadow:0 5px 16px rgba(23,25,20,.1);opacity:.82;transform:translateY(-50%);transition:opacity .3s ease,background-color .3s ease,box-shadow .3s ease}
.carousel-arrow:hover{opacity:1;background:#fff;box-shadow:0 6px 20px rgba(23,25,20,.16)}
.carousel-prev{left:0}.carousel-next{right:0}

/* Plantas publicadas lado a lado, mantendo a imagem integral */
#plans-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(22px,4vw,56px)}
#plans-grid .media-card img{width:100%;height:100%;object-fit:contain}

.video-section{background:#171914;color:#fff}
.video-section video{display:block;width:100%;max-height:82vh;aspect-ratio:16/9;object-fit:contain;background:#0b0c0a}

/* A imagem aberta nunca é recortada */
.lightbox figure{width:90vw;height:85vh;margin:48px auto;overflow:visible;display:flex;align-items:center;justify-content:center}
.lightbox figure img{display:block;width:auto;height:auto;max-width:90vw;max-height:85vh;object-fit:contain}
.lightbox figcaption{max-width:70vw;text-align:center}
.lightbox-prev{left:18px}.lightbox-next{right:18px}

@media(max-width:600px){
  .hero{height:100svh;min-height:700px}
  .hero-content{left:auto;right:4vw;width:70vw;max-width:none;text-align:left}
  .topbar .brand{font-size:12px}
  .topbar nav a{font-size:9.6px}
  .hero .eyebrow{font-size:12.5px}
  .hero-tagline{margin-bottom:28px}
  .hero-details{font-size:13px;line-height:1.7;white-space:normal;max-width:350px}
  .location-media img{object-position:72% center}
  .whatsapp-float{width:70px;height:70px;min-width:70px;min-height:70px}
  .whatsapp-float svg,.whatsapp-float img{width:34px;height:34px;min-width:34px;min-height:34px;max-width:34px;max-height:34px}
  #gallery-grid{padding:0 34px}
  .carousel-track{gap:12px}
  .carousel-item{flex-basis:calc((100% - 12px)/2)}
  .carousel-arrow{width:28px;height:28px;font-size:22px}
  #plans-grid{grid-template-columns:1fr;gap:28px}
  .lightbox figure{width:calc(100vw - 24px);height:82vh;margin:58px 12px}
  .lightbox figure img{max-width:calc(100vw - 24px);max-height:82vh}
  .lightbox-prev{left:5px}.lightbox-next{right:5px}
}

@media(prefers-reduced-motion:reduce){.whatsapp-float{animation:none}}
