/* =========================================================
   DCaruso Imóveis - Responsive Fixes (override-only)
   Objetivo: responsivo sem mexer no visual desktop.
   IMPORTANTE: este CSS deve ser carregado POR ÚLTIMO.
========================================================= */

/* ---------- HEADER (hamburguer sempre acessível) ---------- */
@media (max-width: 900px){
  .header .container.header-inner{ gap: 10px; }

  .brand{
    min-width: 0 !important;
    gap: 10px;
  }

  .brand .name span{ display: none !important; }

  .header-actions .btn.btn-primary,
  .header-cta .btn.btn-primary{
    padding: 9px 10px !important;
    font-size: 12px !important;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .burger{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 auto !important;
  }

  .nav{ display: none !important; }
  .nav.is-open{ display: flex !important; }
}

/* ---------- HOME: HERO (corrigir “voando”) ---------- */
/* O seu home.css define .hero-premium como display:flex + min-height:620px + align-items:center.
   Isso força o conteúdo a ficar CENTRALIZADO verticalmente, dando sensação de “flutuar”.
   Aqui a gente remove o flex do section e deixa a altura ser do conteúdo. */
.hero-premium{
  display: block !important;
  min-height: auto !important;
  padding: 34px 0 0 !important;
  overflow: hidden !important;
}

/* Seu HTML usa: <div class="container hero-content"> */
.container.hero-content{
  align-items: stretch !important;              /* texto central + imagem no chão */
  grid-template-columns: 1.15fr 0.85fr !important;
}

.hero-text{
  align-self: center !important;
  padding-bottom: 14px !important;
}

.hero-image{
  align-self: end !important;
}

/* coluna da imagem */
.hero-image{
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-end !important;
  min-height: auto !important;
}

/* imagem: não pode ter margin/inline-gap */
.hero-image img{
  display: block !important;
  margin: 0 !important;
}

/* Em tablet/mobile, empilha e centraliza a foto */
@media (max-width: 980px){
  .hero-premium{
    padding: 34px 0 !important;
  }

  .hero-premium .container.hero-content{
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    align-items: start !important;
  }

  .hero-text{ order: 1; }
  .hero-image{
    order: 2;
    justify-content: center !important;
  }
}

@media (max-width: 640px){
  .hero-title{
    font-size: 40px !important;
    line-height: 1.05 !important;
  }
  .hero-desc{ font-size: 14px !important; }
  .hero-actions{ gap: 10px !important; flex-wrap: wrap !important; }
  .hero-image img{ max-height: 420px !important; }
}

/* ---------- HOME: featured slider (evita overflow) ---------- */
.featured-slider, .featured-viewport{ max-width: 100%; }
@media (max-width: 640px){
  .featured .container{ padding-left: 14px !important; padding-right: 14px !important; }
}

/* ---------- SOBRE: cards em 1 coluna no tablet/mob ---------- */
@media (max-width: 980px){
  .about-header{ padding: 0 10px !important; }
  .about-values{ grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* ---------- IMÓVEIS: filtros e grid ---------- */
@media (max-width: 980px){
  .imoveis-filters{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .imoveis-tabs{
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .imoveis-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px){
  .imoveis-grid{ grid-template-columns: 1fr !important; }
}

/* ---------- MODAL / GALERIA: sempre caber ---------- */
.modal .modal-box{
  width: min(980px, 96vw) !important;
  max-height: 92vh !important;
}
.modal .modal-content{ max-height: 72vh !important; }
.modal img[data-modal-img]{
  max-width: 100% !important;
  max-height: 68vh !important;
  height: auto !important;
}

/* ---------- BOTÕES FLUTUANTES: não brigar ---------- */
@media (max-width: 640px){
  .back-to-top{ bottom: 86px !important; }
  .wa-float{ right: 14px !important; bottom: 14px !important; }
}

/* ---------- FOOTER: quebra bonita no tablet (sem truncar) ---------- */
.footer-desc{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.footer-line-1{ font-size: 14px; }
.footer-line-2{ font-size: 16px; font-weight: 600; }

@media (min-width: 700px) and (max-width: 1100px){
  .footer-center{ flex-wrap: wrap !important; }

  /* deixa a descrição quebrar sem cortar */
  .footer-desc{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    max-width: 100% !important;
  }
}


/* --- CTA “Ver imóveis” mais destacada --- */
.hero-actions .btn,
.hero-actions a.btn{
  padding: 14px 22px !important;
  font-weight: 800 !important;
  letter-spacing: .3px;
  border-radius: 999px !important;
  box-shadow: 0 14px 28px rgba(0,0,0,.35) !important;
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.hero-actions .btn:hover,
.hero-actions a.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0,0,0,.45) !important;
  filter: brightness(1.03);
}
