/* SEO/mobile cleanup pass 2 - 2026-05-18
   Conservative overrides only. Keeps existing layout/URLs intact while improving mobile usability.
   This file is intentionally loaded after the legacy page CSS on /nearme/ pages. */

/* Global safety: prevent fixed legacy elements from forcing side-scroll. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: inherit; }
body {
  max-width: 100%;
  overflow-x: hidden;
  margin-left: 0;
  margin-right: 0;
}

/* Responsive media defaults. */
img, iframe, video, object, embed, canvas, svg {
  max-width: 100%;
}
img, svg { height: auto; }
iframe, video, object, embed { display: block; }

/* First-pass semantic heading classes. */
.seo-page-title {
  margin: 0 0 8px;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.08;
  font-weight: 700;
}
.seo-local-subtitle {
  display: block;
  color: #777574;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.3;
}

/* Avoid Google/mobile-usability warnings from tiny tap targets. */
a, button, input[type="submit"], input[type="button"], .button, .btn, .btns, .enc-btns {
  touch-action: manipulation;
}

/* Preserve desktop layout. Only override aggressively on phone/tablet widths. */
@media (max-width: 900px) {
  body {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Legacy fixed-width containers. */
  .container,
  .row,
  .wrap,
  .wrapper,
  .main,
  .content,
  .page,
  .fixed-height,
  .fullwidthbanner-container,
  .fullwidthbanner,
  .banner,
  .banner2,
  .servicesB,
  .HeadB {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .row,
  .container,
  .content,
  .main,
  .page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Foundation/skeleton-style columns and common float layouts. */
  .column, .columns,
  .one.column, .two.columns, .three.columns, .four.columns, .five.columns, .six.columns,
  .seven.columns, .eight.columns, .nine.columns, .ten.columns, .eleven.columns, .twelve.columns,
  .one-third.column, .two-thirds.column,
  .alpha, .omega,
  [class*="column"], [class*="columns"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Inline-width cleanup for the legacy pages. */
  [style*="width:1040px"], [style*="width: 1040px"],
  [style*="width:1030px"], [style*="width: 1030px"],
  [style*="width:1024px"], [style*="width: 1024px"],
  [style*="width:1000px"], [style*="width: 1000px"],
  [style*="width:980px"],  [style*="width: 980px"],
  [style*="width:960px"],  [style*="width: 960px"],
  [style*="width:940px"],  [style*="width: 940px"],
  [style*="width:900px"],  [style*="width: 900px"],
  [style*="width:850px"],  [style*="width: 850px"],
  [style*="width:800px"],  [style*="width: 800px"],
  [style*="width:750px"],  [style*="width: 750px"],
  [style*="width:700px"],  [style*="width: 700px"],
  [style*="width:650px"],  [style*="width: 650px"],
  [style*="width:600px"],  [style*="width: 600px"],
  [style*="width:550px"],  [style*="width: 550px"],
  [style*="width:500px"],  [style*="width: 500px"],
  [style*="width:75%"],   [style*="width: 75%"],
  [style*="width:70%"],   [style*="width: 70%"],
  [style*="width:65%"],   [style*="width: 65%"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Legacy tables are used as layout; keep them usable without horizontal overflow. */
  table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }
  tbody, thead, tfoot, tr, th, td {
    max-width: 100% !important;
  }
  td, th {
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* Images floated into text blocks create cramped mobile layouts. */
  img[style*="float"],
  .alignleft,
  .alignright,
  .left,
  .right {
    float: none !important;
    display: block !important;
    margin: 10px auto 15px !important;
  }

  /* Forms and quote/contact widgets. */
  input, select, textarea, button {
    max-width: 100% !important;
    font-size: 16px; /* avoids iOS zoom-on-focus */
  }
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
    width: 100% !important;
  }
  button, .button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    white-space: normal !important;
  }

  /* Embedded videos/maps/review widgets should scale instead of pushing the viewport. */
  iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Menus and service blocks should wrap instead of overflowing. */
  nav, .nav, .menu, .sf-menu, ul.sf-menu, #menu, #menu2, .services, .servicesB {
    max-width: 100% !important;
  }
  ul, ol {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .row,
  .container,
  .content,
  .main,
  .page {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .seo-page-title {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.12;
  }

  h1, h2, h3, .header, .titles {
    overflow-wrap: break-word;
  }

  /* Revolution slider and other fixed-height hero pieces can crop badly on phones. */
  .fixed-height,
  .banner,
  .banner2,
  .fullwidthbanner,
  .fullwidthbanner-container,
  .tp-banner-container,
  .tp-banner,
  .rev_slider_wrapper {
    height: auto !important;
    min-height: 0 !important;
  }

  /* Keep call-to-action overlays from sitting off-screen. */
  .container .btns,
  .btns {
    position: static !important;
    transform: none !important;
    display: inline-block;
    margin: 10px auto !important;
    left: auto !important;
    top: auto !important;
  }

  .enc-btns, .opened {
    width: 100% !important;
    max-width: 320px !important;
    height: auto !important;
    min-height: 44px;
    padding: 12px 10px !important;
  }

  /* Prevent old absolute-position captions/graphics from creating unusable layouts. */
  [style*="position:absolute"], [style*="position: absolute"] {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
    line-height: 1.45;
  }

  .seo-local-subtitle {
    font-size: 14px;
  }

  td, th {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* SEO Phase 4: local uniqueness, FAQ, and nearby-area internal-link blocks. */
.seo-phase4-local {
  width: 100%;
  max-width: 1040px;
  margin: 28px auto 24px;
  padding: 0 14px;
  clear: both;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}
.seo-phase4-card {
  background: #ffffff;
  border: 1px solid #d9e6d2;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: left;
}
.seo-phase4-card h2 {
  margin: 0 0 10px;
  color: #14532d;
  font-size: 24px;
  line-height: 1.2;
}
.seo-phase4-card h3 {
  margin: 14px 0 6px;
  color: #000;
  font-size: 18px;
  line-height: 1.25;
}
.seo-phase4-card p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
}
.seo-phase4-small { font-size: 15px !important; }
.seo-phase4-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.4;
}
.seo-phase4-links strong { margin-right: 2px; }
.seo-phase4-links a {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid #2F8CDA;
  color: #064f8f;
  background: #f7fbff;
  text-decoration: none;
}
.seo-phase4-links a:hover,
.seo-phase4-links a:focus {
  background: #2F8CDA;
  color: #fff;
  text-decoration: none;
}
@media (max-width: 767px) {
  .seo-phase4-local {
    margin: 22px auto 18px;
    padding: 0 10px;
  }
  .seo-phase4-card {
    padding: 15px 14px;
    border-radius: 8px;
  }
  .seo-phase4-card h2 { font-size: 21px; }
  .seo-phase4-card h3 { font-size: 17px; }
  .seo-phase4-card p { font-size: 15.5px; }
  .seo-phase4-links {
    display: block;
  }
  .seo-phase4-links strong,
  .seo-phase4-links a {
    display: block;
    margin: 7px 0;
    text-align: center;
  }
}
