/* ===== Hero search: Advanced panel, mobile sheet, WhatsApp clearance ===== */
.wp-select { appearance: auto; height: auto; }
.wp-adv-toggle { background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.wp-adv-toggle.is-open { border-color: #006039; color: #006039; }
.wp-adv-count { background: #E6B005; color: #161e2d; border-radius: 999px; min-width: 20px; height: 20px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.wp-adv-count[hidden], .wp-adv[hidden] { display: none !important; }
.wp-adv { background: #fff; border-radius: 16px; padding: 24px 20px; margin-top: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.wp-adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 20px; }
.wp-adv-grid label { display: block; font-size: 13px; margin-bottom: 6px; }
.wp-adv-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.wp-search-trigger-wrap, .wp-search-backdrop, .wp-search-head { display: none; }

/* Keep WhatsApp (and AI chat) clear of the controls */
.whatsapp-float { z-index: 990 !important; right: 16px !important; bottom: 20px !important; }
body.wp-search-open .whatsapp-float,
body.wp-search-open #ai-chat-toggle { display: none !important; }

/* Hero text legibility over any photo */
.flat-slider.home-1 .slider-content .heading { text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.flat-slider.home-1::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25) 55%, rgba(0,0,0,.45)); z-index: 1; pointer-events: none; }
.flat-slider.home-1 .container { z-index: 10; }

@media (max-width: 991.98px) { .wp-adv-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 767.98px) {
  .wp-search-trigger-wrap { display: flex; justify-content: center; padding: 8px 0 28px; }
  .wp-search-trigger { min-width: 240px; justify-content: center; font-size: 16px; padding: 14px 28px; }
  /* bottom sheet */
  .wp-search { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060; background: #fff; border-radius: 20px 20px 0 0;
               max-height: 88vh; overflow-y: auto; padding: 0 16px 20px; transform: translateY(105%); visibility: hidden;
               transition: transform .3s ease, visibility .3s; margin: 0 !important; }
  .wp-search.is-open { transform: translateY(0); visibility: visible; }
  .wp-search-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; padding: 14px 0 10px; z-index: 2; }
  .wp-search-title { font-weight: 700; font-size: 18px; color: #006039; }
  .wp-search-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #e4e4e4; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
  .wp-search-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1055; opacity: 0; visibility: hidden; transition: opacity .3s; }
  .wp-search-backdrop.is-open { opacity: 1; visibility: visible; }
  .wp-search .wd-find-select, .wp-search .inner-group { box-shadow: none !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  .wp-search .nav-tab-form { margin: 4px 0 14px; }
  .wp-search .nav-tab-form .nav-link-item:not(.active) { color: #161e2d; border-color: #c9ced6; background: #fff; }
  .wp-search .box-btn-advanced { display: flex; gap: 12px; width: 100%; }
  .wp-search .box-btn-advanced .box-filter, .wp-search .box-btn-advanced .btn-search { flex: 1; width: auto; }
  .wp-search .box-btn-advanced .tf-btn { width: 100%; justify-content: center; }
  .wp-adv { box-shadow: none; padding: 16px 0 0; border-top: 1px solid #eee; border-radius: 0; }
  .wp-adv-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wp-adv-actions .tf-btn { flex: 1; justify-content: center; }
  /* hero text size + photo framing on phones */
  .flat-slider.home-1 { background-position: center 30% !important; }
  .whatsapp-float { right: 14px !important; bottom: 16px !important; width: 52px !important; height: 52px !important; }
}

/* ===== Image presentation safeguards ===== */
.flat-slider.home-1 { background-size: cover; background-repeat: no-repeat; background-position: center; }
.flat-title-page { background-size: cover !important; background-position: center !important; position: relative; }
.flat-title-page::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.25)); pointer-events: none; }
.flat-title-page .container { position: relative; z-index: 1; }
.flat-title-page h1, .flat-title-page .breadcrumb-content, .flat-title-page a { text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.box-location img, .box-service img, .box-benefit img, .service-img img, .property-card img, .box-house img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 767.98px) {
  .flat-title-page { min-height: 170px; }
  .box-location img, .box-house img { object-position: center 40%; }   /* keep buildings, not sky/ground */
}
