/* ==========================================================================
   Mobile layout (<= 767px) - visual-first design approved by Open Net.
   Desktop and tablet keep the approved layout from theme.css.
   ========================================================================== */

@media (min-width: 768px) {
  .onm-m-only { display: none !important; }
}

@media (max-width: 767px) {

  .onm-d-only { display: none !important; }

  body { padding-bottom: 76px; }


  /* ---------- header ---------- */
  .onm-topbar { display: none; }

  .onm-header {
    background: var(--onm-navy-900);
    box-shadow: none;
  }
  .onm-header.is-stuck { box-shadow: 0 4px 18px rgba(0,0,0,.35); }
  .onm-header__inner { min-height: 68px; padding: 8px 0; }

  .onm-header .onm-logo__img { height: 44px; }

  .onm-burger {
    border: 0;
    width: 44px;
    color: var(--onm-blue-400);
  }
  .onm-burger span,
  .onm-burger span::before,
  .onm-burger span::after { width: 26px; height: 3px; border-radius: 2px; }
  .onm-burger span::before { top: -8px; }
  .onm-burger span::after { top: 8px; }
  .onm-burger[aria-expanded="true"] span::before,
  .onm-burger[aria-expanded="true"] span::after { top: 0; }

  /* ---------- shared pieces ---------- */
  .onm-section { padding: 46px 0; }
  .onm-section--tight { padding-top: 34px; }
  .onm-eyebrow { display: none; }
  .onm-head { margin-bottom: 26px; }
  .onm-head__lede { font-size: .98rem; margin-top: 14px; }
  .onm-heading { font-size: 1.85rem; }
  .onm-heading::after { width: 44px; margin-top: 12px; }

  .onm-btn--pill {
    border-radius: 999px;
    font-family: var(--onm-font-body);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .04em;
    padding: 15px 24px;
  }
  .onm-btn svg { width: 17px; height: 17px; }

  .onm-mtitle {
    margin: 0;
    font-family: var(--onm-font-body);
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1.14;
    letter-spacing: -.01em;
    color: var(--onm-navy-800);
    text-align: center;
  }
  .onm-mtitle em { display: block; font-style: normal; color: var(--onm-blue-500); }
  .onm-mtitle--light { color: #fff; }
  .onm-mtitle--left { text-align: left; }

  .onm-mrule {
    display: block;
    width: 44px; height: 3px;
    border-radius: 2px;
    background: var(--onm-orange-500);
    margin: 14px auto 16px;
  }
  .onm-mrule--left { margin-left: 0; }

  .onm-mlede {
    text-align: center;
    color: var(--onm-grey-600);
    font-size: .98rem;
    margin: 0 0 20px;
  }

  .onm-mnote {
    margin: 10px 0 0;
    text-align: center;
    font-size: .8rem;
    color: var(--onm-grey-500);
  }

  /* CTA bands are replaced by the closing block on phones. */
  .onm-section:has(.onm-cta) { display: none; }

  /* ---------- home hero ---------- */
  .onm-hero { border-radius: 0 0 26px 26px; }
  .onm-hero__inner { padding: 0 0 4px; }
  .onm-hero__media img { object-position: 45% center; }
  .onm-hero__veil {
    background: linear-gradient(180deg,
      rgba(10,30,51,.18) 0%,
      rgba(10,30,51,.08) 30%,
      rgba(10,30,51,.72) 56%,
      rgba(10,30,51,.97) 74%,
      #0A1E33 100%);
  }

  .onm-mhero { padding-top: 230px; }
  .onm-mhero__title {
    margin: 0;
    font-family: var(--onm-font-body);
    font-weight: 700;
    font-size: 2.15rem;
    line-height: 1.12;
    letter-spacing: -.012em;
    color: #fff;
  }
  .onm-mhero__sub {
    margin: 10px 0 22px;
    font-size: 1.12rem;
    line-height: 1.4;
    color: rgba(255,255,255,.88);
  }
  .onm-mhero .onm-btn { display: flex; width: 100%; }
  .onm-mhero .onm-btn + .onm-btn { margin-top: 12px; }
  .onm-mhero .onm-btn--ghost { border-color: rgba(255,255,255,.8); }

  .onm-trust { display: none; }

  .onm-mtrust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 26px;
    padding: 20px 0 22px;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
  }
  .onm-mtrust svg {
    width: 34px; height: 34px;
    margin: 0 auto 8px;
    color: var(--onm-blue-400);
    stroke-width: 1.6;
  }
  .onm-mtrust span {
    display: block;
    font-size: .76rem;
    font-weight: 500;
    line-height: 1.25;
    color: rgba(255,255,255,.92);
  }

  /* ---------- service cards become photo banners ---------- */
  .onm-grid { gap: 12px; }

  .onm-card {
    min-height: 132px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(10,30,51,.14);
  }
  .onm-card:hover { transform: none; }

  .onm-card__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }
  .onm-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
      rgba(10,30,51,.9) 0%,
      rgba(10,30,51,.62) 42%,
      rgba(10,30,51,.08) 82%);
  }
  .onm-card:hover .onm-card__media img { transform: none; }
  .onm-card__badge { display: none; }
  .onm-card .onm-ph svg { margin-left: 45%; opacity: .25; }

  .onm-card__body {
    position: relative;
    z-index: 2;
    justify-content: center;
    max-width: 68%;
    padding: 18px 20px;
  }
  .onm-card__title {
    margin: 0;
    font-size: 1.32rem;
    line-height: 1.15;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,.3);
  }
  .onm-card__title a { color: #fff; }
  .onm-card__text { display: none; }
  .onm-card__more {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid rgba(43,179,227,.55);
    width: max-content;
    font-family: var(--onm-font-body);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--onm-blue-400);
  }

  /* On the home page only services with a photo are shown on phones. */
  .onm-home-services .onm-card.no-photo { display: none; }

  /* ---------- family business panel ---------- */
  .onm-mpanel {
    margin: 0 10px;
    border-radius: 26px;
    overflow: hidden;
    background: var(--onm-navy-900);
    color: rgba(255,255,255,.85);
    box-shadow: 0 10px 30px rgba(10,30,51,.25);
  }
  .onm-mpanel + .onm-mpanel { margin-top: 12px; }

  .onm-mfam__photo {
    position: relative;
    height: 340px;
    background: linear-gradient(160deg, #1d4a6b 0%, #13405f 45%, #0A1E33 100%);
    display: grid;
    place-items: center;
  }
  .onm-mfam__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .onm-mfam__ph {
    text-align: center;
    color: rgba(255,255,255,.45);
    font-size: .82rem;
    margin-top: -60px;
  }
  .onm-mfam__ph svg { width: 64px; height: 64px; margin: 0 auto 8px; opacity: .6; }
  .onm-mfam__photo::after {
    content: "";
    position: absolute;
    inset: 45% 0 0 0;
    background: linear-gradient(180deg, transparent, rgba(10,30,51,.95));
  }
  .onm-mfam__sign {
    position: absolute;
    left: 0; right: 0; bottom: 22px;
    z-index: 2;
    text-align: center;
    color: #fff;
  }
  .onm-mfam__sig {
    display: block;
    font-family: "Great Vibes", "Brush Script MT", cursive;
    font-size: 2.9rem;
    line-height: 1;
  }
  .onm-mfam__role {
    display: block;
    margin-top: 8px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .28em;
    text-transform: uppercase;
  }

  .onm-mfam__body { padding: 26px 24px 30px; }
  .onm-mfam__body p { font-size: .98rem; line-height: 1.6; margin: 0; }

  .onm-micons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 24px 0 24px;
    text-align: center;
  }
  .onm-micons svg { width: 36px; height: 36px; margin: 0 auto 8px; color: var(--onm-blue-400); stroke-width: 1.6; }
  .onm-micons span { display: block; font-size: .76rem; line-height: 1.3; color: rgba(255,255,255,.9); }

  .onm-mpanel .onm-btn { display: flex; width: max-content; margin: 0 auto; }

  /* ---------- fix & flip ---------- */
  .onm-mflip {
    position: relative;
    display: block;
  }
  .onm-mflip > img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center 35%;
  }
  .onm-mflip::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 120px;
    height: 122px;
    background: linear-gradient(180deg, rgba(10,30,51,0), #0A1E33);
    pointer-events: none;
  }
  .onm-mflip__body { position: relative; margin-top: -46px; padding: 0 22px 28px; }
  .onm-mflip__line { display: block; width: 92px; height: 2px; background: rgba(255,255,255,.8); margin-bottom: 14px; }
  .onm-mflip__title {
    margin: 0;
    font-family: var(--onm-font-display);
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
  }
  .onm-mflip__sub { margin: 8px 0 12px; font-size: 1.12rem; font-weight: 600; line-height: 1.35; color: #fff; }
  .onm-mflip__body p:not(.onm-mflip__sub) { font-size: .95rem; line-height: 1.55; margin: 0 0 22px; }
  .onm-mflip .onm-btn { margin: 0; }

  /* ---------- before / after ---------- */
  .onm-mba { aspect-ratio: 4 / 3; border-radius: 16px; }
  .onm-mba .onm-ba__tag { border-radius: 999px; padding: 6px 14px; }
  .onm-mba .onm-ba__tag--after { background: var(--onm-blue-500); }

  /* ---------- recent projects ---------- */
  .onm-mgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
  }
  .onm-mgrid a {
    display: block;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--onm-grey-200);
  }
  .onm-mgrid img { width: 100%; height: 100%; object-fit: cover; }

  .onm-btn--navy-outline { --btn-bg: #fff; --btn-fg: var(--onm-navy-800); --btn-bd: var(--onm-navy-800); }
  .onm-center { display: flex; justify-content: center; }

  /* ---------- reviews carousel ---------- */
  .onm-grid.onm-mcarousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding: 4px 2px 10px;
    scrollbar-width: none;
  }
  .onm-mcarousel::-webkit-scrollbar { display: none; }
  .onm-mcarousel > * { flex: 0 0 100%; scroll-snap-align: center; }
  .onm-mcarousel .onm-reveal { opacity: 1; transform: none; }

  .onm-mcarousel .onm-review {
    border: 0;
    box-shadow: 0 6px 20px rgba(10,30,51,.1);
    border-radius: 16px;
    padding: 24px 22px;
  }
  .onm-mcarousel .onm-stars { justify-content: center; align-self: center; }
  .onm-mcarousel .onm-stars svg { width: 24px; height: 24px; }
  .onm-mcarousel .onm-review__text { font-size: 1rem; }
  .onm-mcarousel .onm-review__text p {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .onm-mcarousel .onm-review__text p + p { display: none; }
  .onm-mcarousel .onm-review__avatar { display: none; }
  .onm-mcarousel .onm-review__name::before { content: "— "; }

  .onm-mcar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
  }
  .onm-mcar-nav button {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--onm-grey-300);
    background: #fff;
    color: var(--onm-navy-800);
    cursor: pointer;
  }
  .onm-mcar-nav button svg { width: 16px; height: 16px; }
  .onm-mcar-dots { display: flex; gap: 8px; }
  .onm-mcar-dots i {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--onm-grey-300);
    transition: background .2s, transform .2s;
  }
  .onm-mcar-dots i.is-on { background: var(--onm-navy-800); transform: scale(1.2); }

  /* ---------- closing block + footer ---------- */
  .onm-mclose {
    background:
      radial-gradient(120% 70% at 50% 0%, rgba(22,158,210,.18), transparent 60%),
      var(--onm-navy-900);
    color: rgba(255,255,255,.85);
    padding: 44px 0 26px;
    text-align: center;
  }
  .onm-mclose p { margin: 12px auto 22px; max-width: 30ch; font-size: 1rem; }
  .onm-mclose .onm-btn { display: flex; width: 100%; }

  .onm-mclose__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 28px 0 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .onm-mclose__actions a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .onm-mclose__actions span.ring {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 2px solid var(--onm-blue-500);
    color: var(--onm-blue-400);
  }
  .onm-mclose__actions svg { width: 24px; height: 24px; }

  .onm-mclose .onm-logo { justify-content: center; }
  .onm-mclose__area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 16px;
    font-size: .88rem;
  }
  .onm-mclose__area svg { width: 16px; height: 16px; color: var(--onm-blue-400); }
  .onm-mclose .onm-social { justify-content: center; gap: 22px; }
  .onm-mclose .onm-social svg { width: 22px; height: 22px; color: var(--onm-blue-400); }

  .onm-footer { padding-top: 0; }
  .onm-footer__grid { display: none; }
  .onm-footer__bar { justify-content: center; text-align: center; font-size: .78rem; padding: 14px 0; }
  .onm-footer__legal { display: none; }

  /* ---------- sticky bottom bar ---------- */
  .onm-callbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--onm-navy-900);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -6px 20px rgba(0,0,0,.25);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .onm-callbar__item {
    flex: 0 0 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .onm-callbar__item svg { width: 22px; height: 22px; color: var(--onm-blue-400); }
  .onm-callbar .onm-callbar__cta {
    flex: 1;
    margin-left: 8px;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: .08em;
  }
}

/* WordPress before/after on the phone home page. */
@media (max-width: 767px) {
  .onm-mba-wrap .onm-ba { aspect-ratio: 4 / 3; border-radius: 16px; }
  .onm-mba-wrap .onm-ba__tag { border-radius: 999px; padding: 6px 14px; }
  .onm-mba-wrap .onm-ba__tag--after { background: var(--onm-blue-500); }
}

/* Owners' sign-off when no portrait is used. */
@media (max-width: 767px) {
  .onm-mfam__signoff { margin: 26px 0 0 !important; color: #fff; }
  .onm-mfam__signoff .onm-mfam__sig { display: block; font-family: "Great Vibes", "Brush Script MT", cursive; font-size: 2.2rem; line-height: 1.35; }
  .onm-mfam__signoff .onm-mfam__role { display: block; margin-top: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.7); }
}
