/* ==========================================================================
   Hillwood Manor: phone & tablet fixes (loaded last on every page)
   - New self-contained mobile header menu (see js/mobile-nav.js)
   - Safety rules so nothing overflows or squeezes text into thin columns
   Desktop (wider than 1024px) is not affected.
   ========================================================================== */

/* The new menu is never shown on desktop */
.hw-mnav-toggle, .hw-mnav { display: none; }

@media (max-width: 1024px) {

  /* ---------- Mobile header bar ---------- */
  html body .elementor-location-header .elementor-element-8213887 {
    background: #fff !important;
    box-shadow: 0 2px 14px rgba(40, 30, 20, .08);
  }
  html body .elementor-location-header .elementor-element-9e63c23 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
    padding: 10px 20px !important;
    min-height: 68px;
    box-sizing: border-box;
  }
  html body .elementor-location-header .elementor-element-760e945 {
    width: auto !important;
    max-width: 60% !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
  }
  html body .elementor-location-header .elementor-element-760e945 img {
    width: 150px !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* Old ElementsKit menu: hidden once the new menu is ready */
  html.hw-mnav-ready body .elementor-location-header .elementor-element-612c8a1 { display: none !important; }

  /* Hamburger */
  html body .hw-mnav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    margin: 0 -6px 0 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px;
    background: transparent !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html body .hw-mnav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    border-radius: 2px;
    background: #3b2d1e;
  }
  html body .hw-mnav-toggle:focus-visible { outline: 2px solid #604b32; outline-offset: 2px; }

  /* Drawer */
  .hw-mnav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    visibility: hidden;
    pointer-events: none;
  }
  .hw-mnav.is-open { visibility: visible; pointer-events: auto; }
  .hw-mnav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 8, .5);
    opacity: 0;
    transition: opacity .3s ease;
  }
  .hw-mnav.is-open .hw-mnav__backdrop { opacity: 1; }
  .hw-mnav__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    display: flex;
    flex-direction: column;
    background: #fbf8f3;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .25);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .hw-mnav.is-open .hw-mnav__panel { transform: none; }
  .hw-mnav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 14px 22px;
    border-bottom: 1px solid #ebe4d9;
  }
  .hw-mnav__logo img { width: 130px; height: auto; display: block; }
  .hw-mnav__close {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: #3b2d1e !important;
    font-size: 34px; line-height: 1;
    cursor: pointer;
  }
  .hw-mnav__links { list-style: none; margin: 0; padding: 10px 0; }
  .hw-mnav__links li { margin: 0; padding: 0; }
  .hw-mnav__links a {
    display: block;
    padding: 15px 24px;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif !important;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .02em;
    color: #3b2d1e !important;
    text-decoration: none !important;
    border-left: 3px solid transparent;
  }
  .hw-mnav__links a:hover,
  .hw-mnav__links a:focus-visible { background: #f2ece2; }
  .hw-mnav__links a.is-current { border-left-color: #604b32; background: #f2ece2; font-weight: 600; }
  .hw-mnav__cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 24px 28px;
    border-top: 1px solid #ebe4d9;
  }
  .hw-mnav__btn {
    display: block;
    text-align: center;
    padding: 14px 18px;
    border-radius: 40px;
    border: 1px solid #604b32;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #604b32 !important;
    text-decoration: none !important;
  }
  .hw-mnav__btn--primary { background: #604b32; color: #fff !important; }
  .hw-mnav__phone {
    text-align: center;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif !important;
    font-size: 15px;
    font-weight: 500;
    color: #3b2d1e !important;
    text-decoration: none !important;
    padding: 6px 0;
  }
  html.hw-mnav-lock, html.hw-mnav-lock body { overflow: hidden !important; }

  /* ---------- General safety rules for small screens ---------- */

  /* Nothing may be wider than the screen */
  html body .elementor .e-con,
  html body .elementor .e-con-inner,
  html body .elementor .elementor-widget { max-width: 100%; min-width: 0; }
  html body .elementor img { max-width: 100%; height: auto; }
  html body iframe { max-width: 100% !important; }
  html body .elementor-widget-google_maps iframe { width: 100% !important; }
  html body table { display: block; max-width: 100%; overflow-x: auto; }

  /* Headings and text wrap between words, never letter by letter */
  html body .elementor-heading-title,
  html body .ekit-heading--title,
  html body .elementskit-info-box-title,
  html body .ekit-heading__description,
  html body .elementor-widget-text-editor { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
}

@media (prefers-reduced-motion: reduce) {
  .hw-mnav__panel, .hw-mnav__backdrop { transition: none !important; }
}
