/* Mobile layout fixes for the Netlify rebuild (loaded last on every page). */

/* ---------- Mobile menu overlay ---------- */
.header-menu-nav-item-content-folder .header-nav-folder-title-text::after { content: none !important; }

body.header--menu-open { overflow: hidden !important; }
body.header--menu-open .header { z-index: 2147483000 !important; }

/* Header bar (title + close button) sits above the overlay and stays solid. */
body.header--menu-open .header .header-announcement-bar-wrapper {
  position: relative;
  z-index: 3;
  background-color: #25221f;
}
body.header--menu-open .header .header-title-text a { color: #f6f3ec !important; }
body.header--menu-open .header .header-burger .top-bun,
body.header--menu-open .header .header-burger .patty,
body.header--menu-open .header .header-burger .bottom-bun { background-color: #f6f3ec !important; }
body.header--menu-open .header .burger-inner .top-bun { transform: rotate(45deg) !important; }
body.header--menu-open .header .burger-inner .bottom-bun { transform: rotate(-45deg) !important; }
body.header--menu-open .header .burger-inner .patty { transform: scale(0) !important; }
.header-burger-btn { min-width: 44px; min-height: 44px; touch-action: manipulation; }

.header .header-menu {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important;
  height: 100vh;
  height: 100dvh;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column;
  box-sizing: border-box;
  padding: calc(var(--vk-header-h, 84px) + 8px) 24px calc(32px + env(safe-area-inset-bottom, 0px)) !important;
  background: #25221f !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s !important;
}
body.header--menu-open .header .header-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 0.2s ease, visibility 0s linear 0s !important;
}
.header .header-menu .header-menu-bg { display: none !important; }
.header .header-menu .header-menu-nav {
  position: relative !important;
  top: auto !important; left: auto !important;
  height: auto !important;
  width: 100% !important;
  margin: auto 0 !important;   /* centres vertically when it fits, scrolls when it does not */
  flex: 0 0 auto;
  overflow: visible !important;
  transform: none !important;
  opacity: 1 !important;
}
.header .header-menu .header-menu-nav-list,
.header .header-menu .header-menu-nav-folder,
.header .header-menu .header-menu-nav-folder-content,
.header .header-menu .header-menu-nav-wrapper {
  position: static !important;
  display: block !important;
  height: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: inherit !important;
  overflow: visible !important;
  pointer-events: inherit !important;
}
.header .header-menu .header-menu-nav-item {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  visibility: inherit !important;
  pointer-events: inherit !important;
}
.header .header-menu .header-menu-nav-item > a {
  display: block !important;
  padding: 9px 12px !important;
  min-height: 44px;
  box-sizing: border-box;
  color: #f6f3ec !important;
  font-family: "EB Garamond", "Palatino Linotype", Palatino, serif !important;
  font-size: 1.85rem !important;
  line-height: 1.2 !important;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: inherit !important;
  pointer-events: inherit !important;
  -webkit-tap-highlight-color: rgba(246, 243, 236, 0.12);
}
.header .header-menu .header-menu-nav-item-content { display: inline !important; padding: 0 !important; color: inherit !important; }
.header .header-menu .header-menu-nav-item-content-folder { display: inline-flex !important; align-items: center; }
.header .header-menu .header-menu-nav-item-content-folder::after {
  content: "" !important;
  display: inline-block !important;
  width: 0.36em; height: 0.36em;
  margin: -0.2em 0 0 0.5em !important;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.header .header-menu .vk-folder-open .header-menu-nav-item-content-folder::after { transform: rotate(-135deg); margin-top: 0.15em !important; }

/* Listings sub-menu opens inline under its parent. */
.header .header-menu [data-folder="/listings"] { display: none !important; }
.header .header-menu [data-folder="/listings"].vk-open { display: block !important; }
.header .header-menu [data-folder="/listings"] .header-menu-controls { display: none !important; }
.header .header-menu [data-folder="/listings"] .header-menu-nav-item > a {
  font-size: 1.35rem !important;
  color: #ac9c8c !important;
  padding: 6px 12px !important;
}
.header .header-menu .customerAccountLoginMobile { display: none !important; }

@media (min-width: 1024px) {
  .header .header-menu { display: none !important; }
}

/* ---------- Image blocks that fill their grid cell ---------- */
.fe-block .sqs-block-image > .sqs-block-content,
.fe-block .sqs-block-image .design-layout-fluid:not(.image-component-container-fit),
.fe-block .sqs-block-image .design-layout-fluid:not(.image-component-container-fit) .fluid-image-animation-wrapper,
.fe-block .sqs-block-image .design-layout-fluid:not(.image-component-container-fit) .fluid-image-container,
.fe-block .sqs-block-image .design-layout-fluid:not(.image-component-container-fit) .js-content-mode-element-wrapper {
  height: 100%;
  width: 100%;
}
.fe-block .sqs-block-image:has(.design-layout-fluid:not(.image-component-container-fit)) { position: relative; }
.fe-block .sqs-block-image:has(.design-layout-fluid:not(.image-component-container-fit)) > .sqs-block-content { position: absolute; inset: 0; }
.fe-block .sqs-block-image .design-layout-fluid:not(.image-component-container-fit) .fluid-image-container { position: relative; overflow: hidden; }
.fe-block .sqs-block-image .content-fill img { object-fit: cover; }

/* ---------- Legacy gallery grid (sold listing photos) ---------- */
.sqs-gallery-block-grid .sqs-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.sqs-gallery-block-grid .sqs-gallery > .slide { width: auto !important; height: auto !important; float: none !important; margin: 0 !important; }
.sqs-gallery-block-grid .sqs-gallery .margin-wrapper { margin: 0 !important; }
.sqs-gallery-block-grid .sqs-gallery .image-slide-anchor {
  display: block !important;
  position: relative !important;
  aspect-ratio: 4 / 3;
  height: auto !important;
  width: 100% !important;
  overflow: hidden;
  padding: 0 !important;
}
.sqs-gallery-block-grid .sqs-gallery .image-slide-anchor img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 1023px) {
  html, body { overflow-x: hidden; overflow-x: clip; }
  img, video, iframe { max-width: 100%; }
  /* Fluid-engine sections that would overlap on a phone are stacked in reading order by site.js. */
  .fluid-engine.vk-stack {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .fluid-engine.vk-stack > .fe-block {
    grid-area: auto !important;
    position: relative !important;
    width: auto !important;
    min-height: 0;
  }
  .fluid-engine.vk-stack > .fe-block.vk-full { margin-left: 0; margin-right: 0; }
  .fluid-engine.vk-stack > .fe-block.vk-empty { display: none; }

}

@media (max-width: 767px) {

  .sqs-gallery-block-grid .sqs-gallery { grid-template-columns: 1fr; gap: 12px; }

  /* Forms: one column, full-width fields, comfortable targets. */
  .sqs-site-style-form .name-fields { grid-template-columns: 1fr !important; row-gap: 1rem; }
  .sqs-site-style-form .form-item,
  .sqs-site-style-form .field,
  .sqs-site-style-form .first-name,
  .sqs-site-style-form .last-name { width: 100% !important; max-width: 100% !important; float: none !important; }
  .sqs-site-style-form input:not([type="checkbox"]):not([type="radio"]),
  .sqs-site-style-form textarea,
  .sqs-site-style-form select { font-size: 16px !important; min-height: 44px; }
  .sqs-site-style-form input[type="checkbox"] { width: 20px; height: 20px; }
  .sqs-site-style-form .form-button-wrapper button,
  .sqs-site-style-form button[type="submit"] { min-height: 44px; min-width: 140px; }

  .react-form-contents input[type="checkbox"] { width: 22px !important; height: 22px !important; flex: 0 0 auto; }
  .react-form-contents input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .react-form-contents textarea { font-size: 16px !important; width: 100% !important; box-sizing: border-box; }
  .react-form-contents input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-height: 44px; }
  .react-form-contents button[type="submit"], .react-form-contents input[type="submit"] { min-height: 48px; }
  .header-display-mobile .header-title-text a { display: inline-block; padding: 10px 0; }
  .vk-filter-toggle { font-size: 0.78rem; }

  /* Buttons: comfortable tap targets. */
  .sqs-block-button-element,
  .sqs-button-element--primary,
  .sqs-button-element--secondary {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .sqs-block-button-container.sqs-stretched .sqs-block-button-element { width: 100%; }
  .fe-block:has(.sqs-block-button-element) { min-height: 48px; }

  /* Search and detail pages get the same side gutter as the rest of the site. */
  .vk-listings[data-mode="search"] { padding-left: 6vw; padding-right: 6vw; box-sizing: border-box; }
  .vk-detail-head .vk-cta { width: 100%; text-align: center; box-sizing: border-box; min-height: 48px; }
  .vk-back { min-height: 44px; box-sizing: border-box; }

  /* Listing cards and filters. */
  .vk-card-place, .vk-card-meta { font-size: 0.78rem; }
  .vk-field span { font-size: 0.74rem; }
  .vk-field select, .vk-field input[type="number"] { font-size: 16px; min-height: 44px; }
  .vk-check { min-height: 44px; }
  .vk-check input { width: 22px; height: 22px; }
  .vk-toolbar { gap: 0.6rem; align-items: center; }
  .vk-filter-toggle { display: inline-flex !important; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 150px); }
  .vk-filter-toggle .vk-filter-count { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .vk-view-toggle { flex: 0 0 auto; }
  .vk-toolbar .vk-filters {
    display: none;
    flex: 1 1 100%;
    order: 3;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.9rem;
    margin: 0.4rem 0 0.6rem;
    padding: 0.9rem;
    background: #f6f3ec;
  }
  .vk-toolbar.vk-filters-open .vk-filters { display: grid; }
  .vk-toolbar .vk-field { min-width: 0; }
  .vk-toolbar .vk-field:first-child { grid-column: 1 / -1; }
  .vk-view-toggle { margin-left: auto; }
  .vk-view-toggle button, .vk-sat button { min-height: 44px; padding: 0.65rem 1.1rem; }
  .vk-more button { min-height: 48px; width: 100%; max-width: 360px; }
  .vk-layout.is-map .vk-map-pane { height: 60vh; }
  .vk-nav { width: 44px; height: 44px; }
  .vk-thumbs img { width: 72px; height: 54px; }
  .vk-facts { grid-template-columns: 1fr 1fr !important; }
  .vk-detail-head { gap: 0.8rem; }
}

.vk-field select, .vk-field input[type="number"] { box-sizing: border-box; }
.vk-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-family: Poppins, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  color: #25221f;
  border: 1px solid #ac9c8c;
  padding: 0.65rem 1rem;
  min-height: 44px;
  cursor: pointer;
}
.vk-filter-toggle[aria-expanded="true"] { background: #25221f; color: #f6f3ec; }

@media (max-width: 767px) {
  /* Bigger tap area for inline text links without changing their look. */
  .sqs-html-content a { display: inline-block; padding: 6px 0; margin: -6px 0; }
}

@media (max-width: 767px) {
  /* Testimonial slideshow: size the frame to the image instead of a fixed tall box. */
  .gallery-section,
  .gallery-section .content-wrapper,
  .gallery-section .content,
  .gallery-section .gallery,
  .gallery-section .gallery-slideshow { min-height: 0 !important; height: auto !important; }
  .gallery-section .gallery-slideshow-wrapper {
    flex: 0 0 auto !important;
    height: auto !important;
    aspect-ratio: 1.15;
  }
}

/* Short phones (e.g. iPhone SE): tighter menu so every item fits without scrolling. */
@media (max-height: 740px) {
  .header .header-menu .header-menu-nav-item > a { font-size: 1.5rem !important; padding: 6px 12px !important; min-height: 44px; }
  .header .header-menu [data-folder="/listings"] .header-menu-nav-item > a { font-size: 1.2rem !important; padding: 4px 12px !important; }
}

/* Home page Recent Sales (tablet and desktop): give the address, the sold price and the heading their own space so they never overlap or break mid-word. */
@media (min-width: 768px) {
  .fe-block-53306895067cfd99bbb9 { grid-area: 1 / 9 / 3 / 19 !important; }
  .fe-block-3607c3281f9bd8b6e215 { grid-area: 3 / 9 / 4 / 19 !important; }
  .fe-block-yui_3_17_2_1_1765145416358_2620 { grid-area: 4 / 12 / 5 / 18 !important; }
}

/* Small laptops: legacy blog rows reach ~2px past the edge; stop the sideways scroll (clip keeps sticky elements working). */
@media (min-width: 1024px) and (max-width: 1279px) {
  html, body { overflow-x: clip; }
}

/* ---- Popup (lightbox) forms: readable, centred, above the header ---- */
.vk-lightbox.is-open { z-index: 2147483600 !important; }
.vk-lightbox .lightbox-inner { box-sizing: border-box; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.vk-lightbox .lightbox-content { box-sizing: border-box; width: 100%; }
.vk-lightbox .lightbox-content,
.vk-lightbox .lightbox-content label,
.vk-lightbox .lightbox-content legend,
.vk-lightbox .lightbox-content .title,
.vk-lightbox .lightbox-content .caption-text,
.vk-lightbox .lightbox-content .vk-form-success,
.vk-lightbox .lightbox-content .vk-form-success p { color: hsl(30, 10%, 26%) !important; }
.vk-lightbox .lightbox-content .description { color: hsl(30, 8%, 40%) !important; }
.vk-lightbox .lightbox-content input:not([type="checkbox"]),
.vk-lightbox .lightbox-content textarea { color: hsl(30, 10%, 18%) !important; background: transparent !important; font-size: 16px; border-bottom-color: hsl(30, 8%, 42%) !important; }
.vk-lightbox .lightbox-content input::placeholder,
.vk-lightbox .lightbox-content textarea::placeholder { color: hsl(30, 6%, 45%) !important; opacity: 1; }
.vk-lightbox .lightbox-content .form-submit-button { color: hsl(30, 10%, 22%) !important; border-color: hsl(30, 10%, 30%) !important; background: transparent !important; }
.vk-lightbox .lightbox-content .form-submit-button:hover { background: hsl(30, 10%, 22%) !important; color: hsl(42, 35.71%, 94.51%) !important; }
.vk-lightbox .lightbox-close { z-index: 2; width: 44px; height: 44px; top: .6rem; right: .6rem; display: flex; align-items: center; justify-content: center; }
@media (max-width: 700px) {
  .vk-lightbox .lightbox-inner { padding: 0; }
  .vk-lightbox .lightbox-content { max-width: none; min-height: 100%; box-shadow: none; padding: 3.6rem 1.5rem 2.5rem; }
  .vk-lightbox .form-title { font-size: 2.3rem; margin: 0 2.2rem 1.4rem; }
}

/* Testimonial slideshow: every slide's image must be able to show when it becomes active. */
.gallery-slideshow-item img { display: block !important; }
.gallery-slideshow-wrapper { touch-action: pan-y; }
@media (max-width: 767px) {
  .gallery-section .gallery-slideshow { padding-left: 10px !important; padding-right: 10px !important; }
  .gallery-section .gallery-slideshow-list { left: 24px !important; right: 24px !important; }
  .gallery-section .gallery-slideshow-wrapper { aspect-ratio: 1.06; }
  .gallery-section .gallery-slideshow-control-btn { min-width: 32px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
}

/* Phones/tablets: once the page scrolls, give the fixed header a solid bar in its own theme colour so page text never shows through behind the logo and menu button. */
@media (max-width: 1023px) {
  body.header--background:not(.header--menu-open) .header,
  body.tweak-transparent-header.header--background:not(.header--menu-open) .header:not(.shrink):not(.transparent-header-theme--override) { background-color: var(--siteBackgroundColor) !important; box-shadow: 0 1px 10px rgba(0,0,0,.12); }
}

/* Squarespace member "Login" link: invisible (opacity 0) yet still clickable and goes nowhere on the static site. */
.user-accounts-link, .customerAccountLoginDesktop, .customerAccountLoginMobile { display: none !important; }

/* Sold-listing photo slideshow: show whole photos at phone size (no tall portrait crop) and mark the current thumbnail. */
.sqs-gallery-thumbnails img.vk-thumb-active { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 767px) {
  .sqs-gallery-block-slideshow .sqs-gallery { height: auto !important; aspect-ratio: 3 / 2; }
  .sqs-gallery-thumbnails img { width: calc((100% - 24px) / 4); height: auto; aspect-ratio: 4 / 3; }
}
