/* Fixes for display bugs in the original theme (mostly mobile). */

/* Footer social icons had no links: hide until real profile URLs are added */
.elementor-element-303e4d22 { display: none !important; }

/* Contact form labels: better contrast on the photo background */
.wpcf7-form label { color: #fff; }

@media (max-width: 767px) {
  /* Hero title was set to 1px on mobile, so it was invisible */
  .elementor-element-de8bb81 .elementor-heading-title {
    font-size: 46px !important;
    line-height: 1.1 !important;
  }

  /* Service tiles: were 4 side-by-side columns overflowing the screen.
     On phones show them as stacked cards, each with its own photo and text. */
  .tg_background_list_wrapper {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100% !important;
    height: auto !important;
    overflow: hidden;
  }
  .tg_background_list_wrapper > :nth-child(1), .tg_background_list_wrapper > :nth-child(2) { grid-row: 1; grid-column: 1; }
  .tg_background_list_wrapper > :nth-child(3), .tg_background_list_wrapper > :nth-child(4) { grid-row: 2; grid-column: 1; }
  .tg_background_list_wrapper > :nth-child(5), .tg_background_list_wrapper > :nth-child(6) { grid-row: 3; grid-column: 1; }
  .tg_background_list_wrapper > :nth-child(7), .tg_background_list_wrapper > :nth-child(8) { grid-row: 4; grid-column: 1; }
  .tg_background_list_wrapper .tg_background_img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    z-index: 0;
    margin: 0;
  }
  .tg_background_list_wrapper .tg_background_img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    position: absolute; inset: 0;
  }
  .tg_background_list_wrapper .tg_background_list_overlay {
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.25) 100%) !important;
    opacity: 1 !important; z-index: 1; position: absolute; inset: 0;
  }
  .tg_background_list_wrapper .tg_background_list_column {
    position: relative !important;
    z-index: 2;
    width: 100% !important;
    height: auto !important;
    min-height: 340px;
    border: 0 !important;
    display: flex;
    align-items: flex-end;
  }
  .tg_background_list_wrapper .tg_background_list_content {
    position: relative !important;
    left: auto !important; right: auto !important; bottom: auto !important; top: auto !important;
    width: 100% !important;
    padding: 24px 20px !important;
    transform: none !important;
  }
  .tg_background_list_wrapper .tg_background_list_link,
  .tg_background_list_wrapper .tg_background_list_desc {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
    height: auto !important;
    transform: none !important;
    position: static !important;
  }
  .tg_background_list_wrapper .tg_background_list_desc {
    font-size: 14px; line-height: 1.55; color: #eee; margin: 8px 0 14px;
  }

  /* About: heading was right-aligned at a huge size and got cut off */
  .elementor-element-112216b .elementor-heading-title {
    font-size: 34px !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }
  .elementor-element-18f49f5,
  .elementor-element-18f49f5 p { text-align: left !important; }

  /* Contact form: fields were indented further than the text above them */
  .elementor-element-1bd1e75b,
  .elementor-element-1bd1e75b > .elementor-widget-container { margin: 0 !important; padding: 0 !important; }
  .wpcf7-form input[type=text], .wpcf7-form input[type=email], .wpcf7-form textarea { width: 100% !important; box-sizing: border-box; }
}

@media (max-width: 767px) {
  /* Service cards: text column was capped at half width and clipped */
  .tg_background_list_wrapper .tg_background_list_column { max-width: none !important; flex: 1 1 100%; }
  .tg_background_list_wrapper .tg_background_list_link { overflow: visible !important; }

  /* About: desktop indents (15-20% left padding, right alignment) squeezed the text on phones */
  .elementor-element-112216b > .elementor-widget-container,
  .elementor-element-18f49f5 > .elementor-widget-container {
    padding: 0 24px !important;
    margin-left: 0 !important; margin-right: 0 !important;
  }
  .elementor-element-112216b, .elementor-element-18f49f5 { text-align: left !important; }
  .elementor-element-a5cf8c4 { text-align: left !important; padding-left: 24px; }
}

/* Email link was dark-on-dark after the Cloudflare email-protection removal */
.elementor-element-11c191fe a { color: #fff !important; }

@media (max-width: 767px) {
  /* Contact form had an extra 20px side margin vs. the text above */
  .elementor-element-1bd1e75b .wpcf7 { margin: 0 !important; }
  /* Breathing room between the service cards and the About section */
  .elementor-element-81da86a { padding-top: 56px !important; }
}

/* Anchor jumps landed under the sticky header */
html { scroll-padding-top: 90px; }
[id] { scroll-margin-top: 90px; }
