/*
Theme Name: Tree Awareness Child
Theme URI: https://www.treeawareness.com/
Template: hello-elementor
Version: 1.0.0
Author: treecareleadz.com
Author URI: https://treecareleadz.com/
Description: Child theme for Tree Awareness, Inc. — Licensed Tree Expert #408, Consulting Arborist. Built on Hello Elementor, tuned for Core Web Vitals and local SEO across Southern NJ & Southeastern PA.
Text Domain: tree-awareness-child
Tags: elementor, business, local-seo
*/

/* Parent styles load via wp_enqueue_scripts in functions.php. */
/* All visual tokens live in Elementor Global Styles — this file is intentionally minimal. */

/* === Remove cream line between nav and hero === */
body, html { background-color: transparent !important; }
main.site-main, #content.site-main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
.elementor-location-header, .site-header { background: #FFFFFF; }
.site-header + .elementor { min-height: 0 !important; }


/* === Mobile: full-width CTA buttons site-wide === */
@media (max-width: 600px) {
  .btn-orange, .btn-ghost,
  .tac-tw-btn-orange, .tac-tw-btn-ghost,
  .tac-pg-btn-orange, .tac-pg-btn-ghost,
  .tac-svp-btn-orange, .tac-svp-btn-ghost,
  .tac-svp-btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  .tac-ab-vh-cta,
  .tac-svp-hero-cta,
  .tac-loc-vh-cta,
  .tac-tw-hero-cta,
  .tac-pg-cta-row {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* === Prevent horizontal scroll caused by 100vw elements (hero video, county strips, etc.) ===
       Use `clip` not `hidden` — `overflow-x:hidden` creates a scroll container that BREAKS
       `position:sticky` for every descendant. `clip` cuts overflow visually without doing that.
       Fallback to `hidden` for very old browsers via @supports.
*/
html, body {
  overflow-x: clip !important;
  max-width: 100% !important;
}
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden !important; }
}

/* === iPad minimal fix — ONLY stop horizontal scroll, do NOT touch layout/typography ===
       Earlier aggressive rules forced 2-col grids and tiny padding everywhere, breaking the
       natural design. Now: leave the design alone, just contain the few elements that overflow.
*/
@media (min-width: 768px) and (max-width: 1366px) {
  /* Defensive: never let the document scroll sideways. Use `clip` so sticky still works. */
  html, body { overflow-x: clip !important; }

  /* Cap any element that explicitly tries to be wider than the viewport.
     Specifically: the 100vw breakouts on .tac-ab-vh-wrap, footer, and county strips.
     We only touch elements that asked for 100vw — everything else keeps its design. */
  [style*="width: 100vw"],
  [style*="width:100vw"] {
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Images/iframes never exceed their parent. Universal safety net. */
  img, iframe, video, embed, object { max-width: 100% !important; }
}

/* === Best of Gloucester badge — cap on tablet ===
       At iPad widths the badge image fills the full column and looks oversized
       (Paul flagged it). Cap to a sensible size and keep it centered. */
@media (min-width: 600px) and (max-width: 1024px) {
  img[src*="bestoflogo2025"] {
    max-width: 360px !important;
    margin: 0 auto !important;
  }
}

/* === iPad landscape (1024–1366) — ONLY fix the clipped "GET FREE ESTIMATE" button === */
@media (min-width: 1024px) and (max-width: 1366px) {
  /* The orange CTA in the header was clipping off the right edge.
     Don't restyle it — just protect it from clipping and let the nav give it room. */
  header .btn-orange,
  header a.btn-orange,
  header .tac-cta-orange,
  header .elementor-button {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

