/* Mobile tweaks for screen width 767px and below */
@media only screen and (max-width: 767px) {

  /* Shrink top menu font size and tighten padding */
  #masthead .site-navigation a {
    font-size: 14px !important;
    letter-spacing: 0.02em !important;
  }
  #masthead .site-navigation li {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  /* Hero section adjustments */
  .entry-hero.page-hero-section {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* vertical center */
    align-items: center !important;     /* horizontal center */
    height: auto !important;
    min-height: 0 !important;
    padding-top: 30px !important;
    padding-bottom: 10px !important;
    margin: 0 !important;
  }
  .entry-hero .entry-header {
    margin: 0 !important;
    padding: 0 !important;
  }
  .entry-hero .entry-title {
    white-space: normal !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
    word-break: break-word !important;
  }

  /* Fix vertical text buttons: force horizontal layout and centering */
  .your-contact-btn-class {
    writing-mode: horizontal-tb !important;
    text-align: center !important;
    padding: 10px 20px !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    white-space: nowrap !important;
  }

  /* Fix map spacing */
  .your-map-wrapper-class {
    margin-bottom: 20px !important;
  }
}

/* Style buttons inside primary content area */
#primary .content-area a.button,
#primary .content-area a[href*="contact"],
#primary .content-area a[href*="portfolio"],
#primary .content-area a[href*="services"] {
  display: inline-block;
  background-color: var(--global-palette-btn-bg, #7FAFD6); /* blue fallback */
  color: #fff !important;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
  border-radius: 3px;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  margin: 0 auto 20px auto;
  line-height: 1.2;
}

/* Allow button text to wrap on very small screens */
@media only screen and (max-width: 480px) {
  #primary .content-area a.button,
  #primary .content-area a[href*="contact"],
  #primary .content-area a[href*="portfolio"],
  #primary .content-area a[href*="services"] {
    white-space: normal;
  }
}
/* Hide regular menu on mobile */
@media only screen and (max-width: 767px) {
  #masthead .site-navigation {
    display: none !important;
  }
  /* Show hamburger icon */
  #mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 9999;
  }
  /* Hamburger lines */
  #mobile-menu-toggle span {
    display: block;
    height: 4px;
    margin: 5px 0;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
  }
  /* Menu visible toggle */
  #masthead.mobile-menu-open .site-navigation {
    display: block !important;
    position: fixed;
    top: 60px;
    right: 0;
    background: #223344; /* or your menu bg */
    width: 70vw;
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    z-index: 9998;
  }
}