/**
 * Site-specific styles.
 *
 * The Houzez stylesheets do the heavy lifting; this file only covers the
 * behaviour that used to come from theme JavaScript (the off-canvas menu, the
 * sticky header) plus small additions the rebuild introduces.
 */

/* ------------------------------------------------------ off-canvas menu */
.nav-mobile .slideout-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1100;
  background: #fff;
  box-shadow: 0 0 24px rgba(0, 0, 0, .15);
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: block;
}

.nav-mobile .slideout-menu.is-open {
  transform: translateX(0);
}

.slideout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1090;
}

body.slideout-open {
  overflow: hidden;
}

.mobile-navbar-nav {
  display: block;
  padding: 16px 0;
}

.mobile-navbar-nav .nav-item {
  position: relative;
  display: block;
  border-bottom: 1px solid #eef0f3;
}

.mobile-navbar-nav .nav-link {
  display: block;
  padding: 12px 20px;
  color: #222;
}

.mobile-navbar-nav .dropdown-menu {
  display: none;
  position: static;
  float: none;
  border: 0;
  box-shadow: none;
  padding: 0 0 8px 12px;
  margin: 0;
}

.mobile-navbar-nav .nav-mobile-trigger {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

/* --------------------------------------------------------- sticky header */
#header-section.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  animation: bp-slide-down .25s ease;
}

@keyframes bp-slide-down {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ----------------------------------------------------------- form status */
.form-status {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}

.form-status.is-success { color: #1a9c53; }
.form-status.is-error   { color: #d23c3c; }

/* --------------------------------------------------------------- misc */
.property-gallery-wrap .lSSlideOuter { overflow: hidden; }

.page-content-wrap img,
.post-content-wrap img,
.block-content-wrap img {
  max-width: 100%;
  height: auto;
}

.listing-empty {
  padding: 60px 20px;
  text-align: center;
  color: #6a6a6a;
}

/* Keep long tables inside the content column on narrow screens. */
.page-content-wrap table,
.post-content-wrap table,
.block-content-wrap table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* ------------------------------------------------- lead-capture popup */
/* Two panels on desktop -- picture left, form right -- stacking below 768px,
   which is how the Elementor popup on the live site behaved. */
.bp-popup { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; }
.bp-popup[hidden] { display: none; }
.bp-popup-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 22, .62); }

.bp-popup-panel {
  position: relative;
  width: min(430px, 100%);
  /* Tie the cap to the visual viewport as well as the parent: a fixed
     element's containing block is the viewport, and percentage widths against
     it are unreliable on mobile browsers whose toolbars resize it. */
  max-width: calc(100vw - 32px);
  max-height: 88svh;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
  animation: bp-zoom-in .28s ease;
}

/* With a picture the panel becomes the two-column dialog. Half the width it
   started at, with the type and spacing scaled to match -- shrinking the box
   alone would have left 30px headings in a 260px column. */
.bp-popup-split {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
}

.bp-popup-media {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* The copy sits on a photo, so it needs its own contrast rather than relying
   on whichever image the admin picks. */
.bp-popup-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 22, 46, .55) 0%, rgba(4, 22, 46, .72) 100%);
}

.bp-popup-media-link { display: block; width: 100%; height: 100%; }
.bp-popup-media-link,
.bp-popup-media-link:hover { text-decoration: none; }

.bp-popup-media-copy {
  position: relative;
  z-index: 1;
  padding: 22px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.bp-popup-media-copy .bp-popup-eyebrow {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.bp-popup-headline {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.bp-popup-detail {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
}

.bp-popup-gap { margin: 0; height: 10px; }

.bp-popup-close {
  position: absolute; top: 8px; right: 10px; z-index: 3;
  border: 0; background: none; font-size: 30px; line-height: 1;
  color: #6a6a6a; cursor: pointer; padding: 4px 8px;
}
.bp-popup-close:hover { color: #111; }

.bp-popup-body { padding: 22px 20px 20px; }
/* The close button sits over this column, so the heading stops short of it. */
.bp-popup-split .bp-popup-body h2 { padding-right: 26px; }
.bp-popup-eyebrow-dark { margin: 0 0 2px; font-size: 14px; color: #6a7280; font-weight: 400; }
.bp-popup-body h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; color: #00baf2; text-align: center; }
.bp-popup-note { margin: 0 0 14px; font-size: 13px; color: #4a5260; text-align: center; }
.bp-popup-form .form-group { margin-bottom: 9px; }
.bp-popup-form .form-control { height: 38px; font-size: 14px; }
.bp-popup-form textarea.form-control { height: auto; min-height: 56px; }
.bp-popup-submit { height: 40px; font-weight: 700; }

body.popup-open { overflow: hidden; }

/* The picture leads on a phone, but a tall photo would push the form off the
   screen, so it is capped and the panel scrolls. */
@media (max-width: 767.98px) {
  .bp-popup-split { grid-template-columns: 1fr; width: min(430px, 100%); }
  .bp-popup-media { min-height: 0; height: 190px; }
  .bp-popup-media-copy { padding: 22px 20px; }
  .bp-popup-media-copy .bp-popup-eyebrow,
  .bp-popup-headline { font-size: 21px; margin-bottom: 10px; }
  .bp-popup-detail { font-size: 15px; }
  .bp-popup-gap { height: 8px; }
}

@media (max-width: 480px) {
  .bp-popup { padding: 12px; }
  .bp-popup-body { padding: 22px 18px 20px; }
  .bp-popup-body h2 { font-size: 21px; }
}

@keyframes bp-zoom-in { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- reviews */
.reviews-list { margin: 0 0 26px; }
.review-item {
  padding: 16px 0;
  border-bottom: 1px solid #eceff3;
}
.review-item:last-child { border-bottom: 0; }
.review-title { font-size: 16px; }
.review-stars { color: #f0a500; letter-spacing: 1px; display: inline-block; margin: 4px 0 6px; }
.review-stars .icon-rating-star-empty { opacity: .3; }
.review-body { margin: 4px 0 6px; }
.review-form-wrap { padding-top: 8px; }
.review-form-wrap h3 { font-size: 18px; margin-bottom: 14px; }

.agent-rating { margin-bottom: 8px; font-size: 14px; }
.agent-rating strong { margin-right: 6px; }

.agent-stats-wrap { margin: 20px 0 28px; }
.agent-stats-list li { padding: 3px 0; font-size: 14px; }
.agent-stats-list .stats-percent { display: inline-block; min-width: 46px; font-weight: 600; color: #00baf2; }
.stats-title { font-size: 15px; margin-bottom: 8px; }

.listing-tools-wrap { margin-bottom: 16px; }
.sort-by-wrap .form-control { width: auto; min-width: 180px; }
.sort-by-title { margin-bottom: 0; white-space: nowrap; }

/* --------------------------------------------------------- sidebar widgets */
.widget-wrap { margin-bottom: 28px; }
.widget-header { margin-bottom: 12px; }
.widget-title { font-size: 17px; margin: 0; }
.widget-featured-item,
.widget-post-item { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.widget-featured-item:last-child,
.widget-post-item:last-child { border-bottom: 0; }
.widget-featured-thumb img,
.widget-post-thumb img { width: 70px; height: 52px; object-fit: cover; border-radius: 4px; }
.widget-featured-body .item-title,
.widget-post-body .item-title { font-size: 14px; margin: 0 0 2px; line-height: 1.35; }
.widget-featured-body .item-price { font-size: 13px; font-weight: 600; color: #00baf2; }
.widget-featured-body .item-address { font-size: 12px; color: #7a828c; margin: 0; font-style: normal; }
.widget-taxonomy li { padding: 3px 0; }
.widget-taxonomy .count { color: #9aa1aa; font-size: 12px; margin-left: 4px; }

/* ------------------------------------------- sticky property section nav */
/* The theme collapses this bar until the reader scrolls past the gallery. */
.property-navigation-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #eceff3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  overflow: hidden;
  max-height: 0;
  transition: max-height .2s ease;
}

.property-navigation-wrap.is-visible { max-height: 64px; }

.property-navigation {
  margin: 0;
  padding: 14px 0;
  gap: 18px;
  overflow-x: auto;
}

.property-navigation-item a {
  color: #4a5260;
  font-size: 14px;
  white-space: nowrap;
}

.property-navigation-item a:hover,
.property-navigation-item a.is-current { color: #00baf2; }

/* Anchor targets clear the fixed bar. */
.property-section-wrap,
#similar-listings-wrap { scroll-margin-top: 80px; }

/* ------------------------------------------------------------------- FAQ */
/* Uses <details>/<summary> so the accordion works without JavaScript. */
.faq-intro {
  font-size: 16px;
  color: #5a6470;
  margin-bottom: 28px;
}

.faq-group { margin-bottom: 34px; }

.faq-group-title {
  font-size: 20px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #00aeff;
  display: inline-block;
}

.faq-item {
  border: 1px solid #e4e8ed;
  border-radius: 6px;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.faq-item[open] {
  border-color: #bfe6fb;
  box-shadow: 0 2px 10px rgba(0, 66, 116, .06);
}

.faq-question {
  list-style: none;
  cursor: pointer;
  padding: 15px 46px 15px 18px;
  position: relative;
  font-weight: 500;
  font-size: 16px;
  color: #004274;
}

/* Hide the native disclosure marker in both engines. */
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { content: ''; }

.faq-question:hover { color: #00aeff; }

.faq-question::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid #8a949f;
  border-bottom: 2px solid #8a949f;
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(-135deg);
  margin-top: -2px;
  border-color: #00aeff;
}

.faq-question:focus-visible {
  outline: 2px solid #00aeff;
  outline-offset: -2px;
  border-radius: 6px;
}

.faq-answer {
  padding: 0 18px 16px;
  color: #4a5260;
}

.faq-answer p:last-child,
.faq-answer ul:last-child { margin-bottom: 0; }
.faq-answer ul { padding-left: 20px; }
.faq-answer li { margin-bottom: 5px; }

.faq-cta {
  margin-top: 36px;
  padding: 26px;
  background: #f4f9fd;
  border: 1px solid #dcecf7;
  border-radius: 8px;
}

.faq-cta h2 { font-size: 20px; margin: 0 0 8px; }
.faq-cta p:last-child { margin-bottom: 0; }
.faq-cta .btn { margin: 6px 8px 0 0; }

@media (max-width: 575px) {
  .faq-question { font-size: 15px; padding-right: 40px; }
}

/* -------------------------------------------------- support / info pages */
.page-lede {
  font-size: 17px;
  line-height: 1.6;
  color: #4a5260;
  margin-bottom: 26px;
}

.page-content-wrap h2 {
  font-size: 21px;
  margin: 30px 0 12px;
}

.page-content-wrap h3 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.page-note {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #eceff3;
  color: #7a828c;
}

.process-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.process-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 44px;
  margin: 0;
}

.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f6fe;
  color: #0079b0;
  font-size: 13px;
  font-weight: 600;
}

/* ------------------------------------------------------------ help desk */
.help-channels { margin-bottom: 12px; }

.help-channel {
  height: 100%;
  padding: 18px;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  background: #fbfdff;
}

.help-channel h3 { margin: 0 0 6px; font-size: 15px; }
.help-channel p { margin: 0 0 4px; }
.help-channel p:last-child { margin-bottom: 0; }
.help-channel .muted { font-size: 13px; color: #7a828c; }

/* ------------------------------------------------- in-content lead forms */
.lead-form-wrap {
  margin-top: 32px;
  padding: 24px;
  background: #f4f9fd;
  border: 1px solid #dcecf7;
  border-radius: 8px;
}

.lead-form-wrap h2 { margin-top: 0; }
.lead-form .form-group { margin-bottom: 12px; }
.lead-form .form-status { display: block; margin-top: 8px; }

/* --------------------------------------------- property overview tiles */
/* The theme sizes these with Bootstrap's .flex-fill and holds each value on
   one line. On a phone that makes a long value — the property-type list is the
   usual culprit — run straight over the next tile, so below the tablet
   breakpoint they become a two-column grid and values are allowed to wrap.
   Desktop is left exactly as the theme had it. */
@media (max-width: 767.98px) {
  .property-overview-wrap .property-overview-data {
    flex-wrap: wrap;
  }

  .property-overview-wrap .property-overview-data > ul.flex-fill {
    flex: 1 1 46% !important;
    min-width: 0;
    padding-right: 12px;
    margin-bottom: 14px;
  }

  .property-overview-wrap .property-overview-data .property-overview-item,
  .property-overview-wrap .property-overview-data .hz-meta-label {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 400px) {
  .property-overview-wrap .property-overview-data > ul.flex-fill {
    flex: 1 1 100% !important;
  }
}

/* ------------------------------------------------- mobile search panel */
/* Only ever shown below the theme's 992px breakpoint, where it is the sole
   search entry point. */
.toggle-button-search { display: none; }

.mobile-search-panel {
  display: none;
  background: #fff;
  border-bottom: 1px solid #e4e8ed;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
  padding: 14px 16px 16px;
}

.mobile-search-panel[hidden] { display: none; }

@media (max-width: 991.98px) {
  .toggle-button-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Both right-hand buttons fell through to Bootstrap's near-black default,
     which is all but invisible on the dark blue bar. Match the hamburger. */
  .toggle-button-search,
  .btn-phone-number {
    color: #fff;
  }

  .toggle-button-search .houzez-icon,
  .btn-phone-number .houzez-icon {
    font-size: 20px;
  }

  .toggle-button-search:hover,
  .toggle-button-search:focus,
  .btn-phone-number:hover,
  .btn-phone-number:focus { color: #fff; }

  .toggle-button-search.is-active { color: #00aeff; }

  .mobile-search-panel { display: block; }
  .mobile-search-panel[hidden] { display: none; }
}

.mobile-search-row { margin-bottom: 12px; }
.mobile-search-row:last-child { margin-bottom: 0; }

.mobile-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-search-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #7a828c;
  margin-bottom: 4px;
}

/* Never below 16px: iOS zooms the page when a smaller field is focused. */
.mobile-search-panel .form-control {
  width: 100%;
  height: 44px;
  font-size: 16px;
}

.mobile-search-panel input[type=search] { -webkit-appearance: none; appearance: none; }

.mobile-search-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  max-height: 190px;
  overflow-y: auto;
  padding: 4px 2px;
  border: 1px solid #e4e8ed;
  border-radius: 6px;
}

.mobile-search-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  margin: 0;
  padding: 5px 6px;
  font-weight: 400;
}

.mobile-search-check input { width: auto; margin: 0; }

.mobile-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.mobile-search-actions .btn-link { padding: 0; font-size: 13.5px; }
.mobile-search-submit { margin-left: auto; min-width: 120px; height: 44px; }

/* --------------------------------------------------- one-shot messages */
/* Rendered by the layout, so these live here rather than in account.css. */
.flash-wrap { padding: 16px 15px 0; }
.flash {
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 15px;
  border: 1px solid transparent;
}
.flash-success { background: #eaf7ee; border-color: #bfe5cb; color: #1c6b34; }
.flash-error   { background: #fdecea; border-color: #f5c2bd; color: #97231a; }

/* ------------------------------------------------ header account links */
/* The theme's header-v4 row was built for a logo and a menu, with an empty
   slot where the account links now sit. The menu already uses most of the
   width, so this block has to stay narrow and must never wrap -- when it did,
   it dropped onto a second line on top of the hero. */
.header-v4 .navbar {
  flex-wrap: nowrap;
}

.header-v4 .main-nav {
  /* Let the menu give room back instead of holding its full width and
     pushing the account block onto the next line. */
  min-width: 0;
}

/* ...but the menu itself must not wrap: the row is one line by design, and
   letting the last two items drop broke the header a second way -- first the
   items onto a second line, then the labels inside them. */
.header-v4 #main-nav {
  flex-wrap: nowrap;
}

.header-v4 #main-nav > .menu-item > .nav-link {
  white-space: nowrap;
}

.header-account {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: 14px;
}

.header-account .login-register-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 12px;
}

.header-account-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 3px;
}

/* Only one item lives here -- see the note in partials/header.php. */

.field-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #8a9099;
  text-transform: none;
  letter-spacing: 0;
}

/* ------------------------------------------- popup project slider */
/* The pictures cross-fade in a fixed frame; the form beside them never
   moves, so answering it is not interrupted by the rotation. */
.bp-popup-media-wrap {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  /* Stretch to whatever the form beside it needs, so the picture fills its
     half instead of leaving white space under it. */
  height: 100%;
}

.bp-popup-split .bp-popup-media {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease;
}

.bp-popup-split .bp-popup-media.is-active {
  position: absolute;
  opacity: 1;
  visibility: visible;
}

.bp-popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.bp-popup-nav:hover { background: rgba(255, 255, 255, .4); }
.bp-popup-prev { left: 8px; }
.bp-popup-next { right: 8px; }

.bp-popup-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.bp-popup-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
}
.bp-popup-dot.is-active { background: #fff; width: 18px; border-radius: 4px; }

/* Which project the enquiry will be filed against. */
.bp-popup-project {
  margin: 0 0 12px;
  font-size: 13px;
  color: #66707a;
  text-align: center;
}
.bp-popup-project strong { color: #004274; }

@media (max-width: 767.98px) {
  .bp-popup-media-wrap { min-height: 0; height: 190px; }
}
