/* JT - Ajuste V9 | 10/11/2026
   Mantém correções de logo/WhatsApp/hero e refina os cartões de serviços da home.
   Alterações:
   - troca a foto do cartão 01 com a do cartão 03;
   - aumenta a altura visual das imagens;
   - reduz o vão excessivo entre texto e CTA, sobretudo no mobile.
*/

/* Preserva o ajuste entre serviços e imóveis em destaque. */
@media (min-width: 761px) {
  body:has(#homePropertyGrid) .compact-intro { padding-bottom: 18px !important; }
  body:has(#homePropertyGrid) #imoveis { padding-top: 45px !important; }
}
@media (max-width: 760px) {
  body:has(#homePropertyGrid) .compact-intro { padding-bottom: 16px !important; }
  body:has(#homePropertyGrid) #imoveis { padding-top: 34px !important; }
}

/* WhatsApp flutuante */
a.whatsapp-float svg { display:none !important; }
a.whatsapp-float::before {
  content:"";
  display:block;
  width:32px;
  height:32px;
  background:url("assets/whatsapp-brand-white-v1.svg") center / contain no-repeat;
  flex:none;
}

/* Botão do cabeçalho */
.public-header .header-actions a.primary-button[href*="wa.me"] .wa-icon,
.property-header .header-actions a.primary-button[href*="wa.me"] .wa-icon {
  display:none !important;
}
.public-header .header-actions a.primary-button[href*="wa.me"]::before,
.property-header .header-actions a.primary-button[href*="wa.me"]::before {
  content:"" !important;
  display:inline-block !important;
  width:20px;
  height:20px;
  margin-right:7px;
  background:url("assets/whatsapp-brand-white-v1.svg") center / contain no-repeat;
  vertical-align:middle;
  flex:none;
}

/* Respiro do hero abaixo do cabeçalho fixo */
@media (min-width: 761px) {
  body:has(#homePropertyGrid) .hero.modern-hero {
    min-height:0 !important;
    align-items:flex-start !important;
    padding-top:136px !important;
    padding-bottom:68px !important;
  }
}
@media (max-width: 760px) {
  body:has(#homePropertyGrid) .hero.modern-hero {
    min-height:0 !important;
    align-items:flex-start !important;
    padding-top:106px !important;
    padding-bottom:44px !important;
  }
}

/* Cartões de serviços com fotos */
body:has(#homePropertyGrid) .cobalt-section .service-grid article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 426px;
  padding: 216px 32px 30px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
}

body:has(#homePropertyGrid) .cobalt-section .service-grid article::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: 192px;
  background-image: var(--jt-service-photo);
  background-repeat: no-repeat;
  background-position: center var(--jt-service-position, center);
  background-size: cover;
  border-bottom: 1px solid rgba(255,255,255,.17);
}

body:has(#homePropertyGrid) .cobalt-section .service-grid article > * {
  position: relative;
  z-index: 1;
}

/* Inversão solicitada: imagem 03 no cartão 01 e imagem 01 no cartão 03 */
body:has(#homePropertyGrid) .cobalt-section .service-grid article:nth-child(1) {
  --jt-service-photo: url("assets/jt-card-anunciar.webp");
  --jt-service-position: 38%;
}
body:has(#homePropertyGrid) .cobalt-section .service-grid article:nth-child(2) {
  --jt-service-photo: url("assets/jt-card-alugar.webp");
  --jt-service-position: 45%;
}
body:has(#homePropertyGrid) .cobalt-section .service-grid article:nth-child(3) {
  --jt-service-photo: url("assets/jt-card-comprar.webp");
  --jt-service-position: 53%;
}

body:has(#homePropertyGrid) .cobalt-section .service-grid .service-number {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 1;
  border-radius: 8px;
  padding: 7px 11px;
  background: rgba(6, 30, 83, .82);
  color: #fff;
  line-height: 1;
}

body:has(#homePropertyGrid) .cobalt-section .service-grid h3 {
  margin: 0 0 8px;
}

body:has(#homePropertyGrid) .cobalt-section .service-grid p {
  min-height: 0;
  margin: 0 0 14px;
  flex: 0 0 auto;
}

body:has(#homePropertyGrid) .cobalt-section .service-grid a {
  display: inline-block;
  margin-top: 4px;
}

@media (max-width: 760px) {
  body:has(#homePropertyGrid) .cobalt-section .service-grid article {
    min-height: 372px;
    padding: 200px 30px 24px;
  }
  body:has(#homePropertyGrid) .cobalt-section .service-grid article::before {
    height: 176px;
  }
  body:has(#homePropertyGrid) .cobalt-section .service-grid p {
    margin-bottom: 10px;
  }
}


/* V10 — Compactação do catálogo de COMPRA (somente comprar.html)
   Preserva a home e as demais páginas. */
@media (min-width: 761px) {
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .page-hero {
    padding-top: 124px !important;
    padding-bottom: 36px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .catalog-section {
    padding-top: 28px !important;
    padding-bottom: 78px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-toolbar {
    gap: 12px !important;
    padding: 15px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box {
    padding: 13px 15px !important;
  }
}
@media (max-width: 760px) {
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .page-hero {
    padding-top: 102px !important;
    padding-bottom: 26px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .catalog-section {
    padding-top: 22px !important;
    padding-bottom: 58px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-toolbar {
    gap: 12px !important;
    padding: 13px !important;
  }
}


/* V11 — Compactação da página ALUGAR, mantendo os ajustes V10 de COMPRAR. */
@media (min-width: 761px) {
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .page-hero {
    padding-top: 124px !important;
    padding-bottom: 36px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .catalog-section {
    padding-top: 28px !important;
    padding-bottom: 78px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-toolbar {
    gap: 12px !important;
    padding: 15px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box {
    padding: 13px 15px !important;
  }
}
@media (max-width: 760px) {
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .page-hero {
    padding-top: 102px !important;
    padding-bottom: 26px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .catalog-section {
    padding-top: 22px !important;
    padding-bottom: 58px !important;
  }
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-toolbar {
    gap: 12px !important;
    padding: 13px !important;
  }
}


/* V12 — Alinhamento refinado da caixa de busca em COMPRAR e ALUGAR.
   Deixa label, campo, botões e texto de ajuda paralelos e visualmente alinhados. */
@media (min-width: 761px) {
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box {
    display: grid !important;
    grid-template-columns: 170px minmax(320px, 1fr) auto 1fr !important;
    align-items: center !important;
    column-gap: 16px !important;
    row-gap: 0 !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > label,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > label {
    display: block !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    align-self: center !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .smart-search-row,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .smart-search-row {
    grid-column: 2 / 4 !important;
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) auto auto !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .smart-search-row input,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .smart-search-row input {
    height: 56px !important;
    margin: 0 !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .smart-search-row button,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .smart-search-row button {
    height: 56px !important;
    min-width: 96px !important;
    padding: 0 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .search-help,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .search-help {
    grid-column: 4 !important;
    margin: 0 !important;
    line-height: 1.45 !important;
    align-self: center !important;
  }
}

@media (max-width: 760px) {
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box {
    display: grid !important;
    row-gap: 10px !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > label,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > label,
  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .search-help,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .search-help {
    margin: 0 !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .smart-search-row,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .smart-search-row {
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  body:has(#catalogGrid[data-initial-purpose="comprar"]) .smart-search-box > .smart-search-row button,
  body:has(#catalogGrid[data-initial-purpose="alugar"]) .smart-search-box > .smart-search-row button {
    height: 50px !important;
  }
}


/* V23 — PÁGINA TODOS OS IMÓVEIS (imoveis.html)
   Mesma compactação das páginas Comprar e Alugar, com a busca alinhada.
   Escopo específico: o catálogo de finalidade inicial vazia. */
@media (min-width: 761px) {
  body:has(#catalogGrid[data-initial-purpose=""]) .page-hero {
    padding-top: 124px !important;
    padding-bottom: 36px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .catalog-section {
    padding-top: 28px !important;
    padding-bottom: 78px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-toolbar {
    gap: 12px !important;
    padding: 15px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box {
    display: grid !important;
    grid-template-columns: 142px minmax(0, 1.2fr) minmax(200px, .85fr) !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 13px 15px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > label {
    margin: 0 !important;
    align-self: center !important;
    line-height: 1.3 !important;
    white-space: nowrap;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > .smart-search-row {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-row input {
    flex: 1 1 160px !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 50px !important;
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-row button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    height: 50px !important;
    min-width: 75px !important;
    padding: 0 14px !important;
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > .search-help {
    margin: 0 !important;
    align-self: center !important;
    line-height: 1.45 !important;
    font-size: 12px !important;
  }
}
/* Em larguras intermediárias, a ajuda vai para baixo sem quebrar o alinhamento. */
@media (min-width: 761px) and (max-width: 1200px) {
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box {
    grid-template-columns: 142px minmax(0, 1fr) !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > .search-help {
    grid-column: 2 !important;
    padding-top: 1px !important;
  }
}
@media (max-width: 760px) {
  body:has(#catalogGrid[data-initial-purpose=""]) .page-hero {
    padding-top: 102px !important;
    padding-bottom: 26px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .catalog-section {
    padding-top: 22px !important;
    padding-bottom: 58px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-toolbar {
    gap: 12px !important;
    padding: 13px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 13px 15px !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > label,
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > .search-help {
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-box > .smart-search-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
    min-width: 0;
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-row input {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0 !important;
    height: 50px !important;
    margin: 0 !important;
  }
  body:has(#catalogGrid[data-initial-purpose=""]) .smart-search-row button {
    height: 48px !important;
    margin: 0 !important;
  }
}
