/* ===== MOBILE POLISH: header, image overlays, metrics ===== */
@media (max-width: 768px) {

  /* 1) HEADER – give items a little more room + slightly smaller CTA */
  .ast-header-break-point .main-header-bar {
    padding: 6px 10px;
  }
  .ast-header-break-point .main-header-menu > .menu-item > a {
    padding: 10px 12px !important;
    font-size: 15px !important;   /* a touch bigger than 14 but still compact */
    line-height: 1.25 !important;
  }
  .ast-header-break-point .ast-custom-button a,
  .ast-header-break-point .ast-header-button-1 a {
    font-size: 14px !important;
    padding: 10px 14px !important; /* slightly smaller so it doesn’t crowd the menu */
  }

  /* 2) ASSETS GRID – normalize overlay text so it doesn't float/crop weirdly */
  /* Section was visible in your selector trail as #assets.section.alt */
  #assets.section .card,
  #assets.section [class*="card"] {
    position: relative;
    overflow: hidden;
  }
  #assets.section .card img,
  #assets.section [class*="card"] img {
    display: block;
    width: 100%;
    height: auto;
  }
  /* Target common overlay/title containers (covers most themes) */
  #assets.section .card [class*="overlay"],
  #assets.section .card [class*="caption"],
  #assets.section .card [class*="title"],
  #assets.section [class*="card"] [class*="overlay"],
  #assets.section [class*="card"] [class*="caption"],
  #assets.section [class*="card"] [class*="title"] {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;                 /* anchor near the bottom of the image */
    margin: 0;
    padding: 8px 10px;
    background: rgba(0,0,0,0.35); /* subtle glass behind text for readability */
    border-radius: 10px;
    color: #fff !important;
    font-size: 14px;              /* reduce size on phones */
    line-height: 1.35;
    max-height: 3.6em;            /* ≈2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;        /* clamp to 2 lines */
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  }

  /* 3) METRICS – stop numbers from breaking and give cards air */
  /* Your trail showed: #services.metrics-band .container.metrics .metric .num */
  #services.metrics-band .container.metrics {
    display: grid !important;
    grid-template-columns: 1fr;   /* 1 per row on narrow phones */
    gap: 16px;
  }
  @media (min-width: 480px) and (max-width: 768px) {
    #services.metrics-band .container.metrics { grid-template-columns: 1fr 1fr; }
  }
  #services.metrics-band .metric {
    padding: 18px 16px !important;
  }
  #services.metrics-band .metric .num {
    white-space: nowrap;          /* keep “150,000” on one line */
    line-height: 1.1 !important;
    font-size: 32px !important;   /* smaller to prevent crowding */
    display: inline-block;
  }
  #services.metrics-band .metric .label,
  #services.metrics-band .metric p {
    font-size: 12px !important;
  }

  /* tiny phones: tighten a bit more */
  @media (max-width: 380px) {
    #services.metrics-band .metric .num { font-size: 28px !important; }
  }
}