/* Ductless Brothers — HOMEPAGE hero only (scoped to .db-fi-home / .db-hero2 on index.html).
   Fixes the hero clipping the headline under the header and cropping the Google badge
   at the bottom on short/laptop screens. Does not touch region or town hero pages
   (those use .db-fi-hero:not(.db-fi-home)) or the Our Service Area section. */

@media (min-width:1181px){
  /* --hero-h now also bounded by viewport height, so a short laptop screen gets a
     shorter hero instead of vertically centering oversized text past its edges.
     If content still needs more room than this, the row grows (auto) rather than
     clipping — overflow:hidden on the host then has nothing left to crop. */
  .db-fi-home .db-hero2.db-hero2{
    --hero-h: clamp(400px, min(32vw, 72vh), 600px);
    --btn-w: clamp(220px, calc(var(--hero-h) * .6), 370px);
    --btn-gap: clamp(10px, calc(var(--hero-h) * .02), 16px);
    grid-template-rows: minmax(var(--hero-h), auto);
  }

  /* Top-align (not center) so the headline always starts clear of the fixed header,
     with a buffer sized to cover the header's tallest state (clamp(84px,6.2vw,118px)). */
  .db-fi-home .db-hero2__panel{
    align-items:flex-start;
    padding-top:clamp(36px, calc(var(--hero-h) * .06), 56px) !important;
    padding-bottom:clamp(20px, calc(var(--hero-h) * .04), 32px) !important;
  }

  /* Headline + subhead scale with the hero's own height (which is itself vw+vh bound) */
  .db-fi-home .db-hero2__text h1{
    font-size:clamp(34px, calc(var(--hero-h) * .14), 84px) !important;
    margin-bottom:clamp(6px, calc(var(--hero-h) * .012), 12px) !important;
  }
  .db-fi-home .db-hero2__text p.subhead{
    font-size:clamp(13px, calc(var(--hero-h) * .035), 22px) !important;
    margin-bottom:clamp(8px, calc(var(--hero-h) * .018), 16px) !important;
  }

  /* Buttons: side by side on one row, equal width AND height (both pinned to
     --btn-w, wide enough for the longer "Call Now" label), left-aligned with
     the headline, scaled with hero height. */
  .db-fi-home .db-hero2__btns{
    display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important;
    gap:var(--btn-gap) !important;
    width:calc(var(--btn-w) * 2 + var(--btn-gap));
    margin-bottom:clamp(8px, calc(var(--hero-h) * .016), 14px) !important;
  }
  .db-fi-home .db-hero2__btns .btn{
    flex:0 0 var(--btn-w) !important; width:var(--btn-w) !important;
    justify-content:center !important;
    font-size:clamp(15px, calc(var(--hero-h) * .0367), 22px) !important;
    padding:clamp(10px, calc(var(--hero-h) * .025), 16px) clamp(8px, calc(var(--hero-h) * .016), 12px) !important;
  }
  .db-fi-home .db-hero2__btns .btn .db-clover{ width:1.3em; height:1.3em; flex-shrink:0; }

  .db-fi-home .db-hero2__badge{
    font-size:clamp(11px, calc(var(--hero-h) * .024), 16px) !important;
    margin-bottom:clamp(6px, calc(var(--hero-h) * .012), 10px) !important;
  }

  /* Pill + Google box: centered as a pair under the button row (not the whole
     text column) — the cta-group is pinned to the button row's own width, so
     centering inside it lines up with the buttons, not the wider text column.
     They wrap to stacked (still centered) if they don't both fit on laptops. */
  .db-fi-home .db-hero2__cta-group{
    display:flex !important; flex-direction:row !important; flex-wrap:wrap !important;
    justify-content:center !important; align-items:center !important;
    width:calc(var(--btn-w) * 2 + var(--btn-gap));
    column-gap:12px; row-gap:clamp(6px, calc(var(--hero-h) * .012), 10px);
  }
  .db-fi-home .db-hero2__cta-group > *{ flex:0 0 auto; }
  .db-fi-home .db-hero2__cta-group > .db-hero2__btns{ flex-basis:100%; justify-content:flex-start !important; }
  .db-fi-home .db-hero2__cta-group > .db-hero2__badge{ flex-basis:100%; text-align:center !important; }
  .db-fi-home .db-hero2__cta-group > :not(.db-hero2__btns):not(.db-hero2__badge){
    text-align:center !important; align-self:center !important;
  }

  .db-fi-home .db-fi-green{
    font-size:clamp(14px, calc(var(--hero-h) * .037), 22px) !important;
    padding:clamp(8px, calc(var(--hero-h) * .02), 12px) clamp(16px, calc(var(--hero-h) * .044), 26px)
            clamp(8px, calc(var(--hero-h) * .02), 12px) clamp(12px, calc(var(--hero-h) * .03), 18px) !important;
  }
  .db-fi-home .db-fi-green svg{
    width:clamp(18px, calc(var(--hero-h) * .044), 26px) !important;
    height:clamp(18px, calc(var(--hero-h) * .044), 26px) !important;
  }
  .db-fi-home .db-gbadge{
    padding:clamp(6px, calc(var(--hero-h) * .016), 8px) clamp(14px, calc(var(--hero-h) * .03), 18px)
            clamp(6px, calc(var(--hero-h) * .016), 8px) clamp(6px, calc(var(--hero-h) * .016), 8px) !important;
    gap:clamp(8px, calc(var(--hero-h) * .022), 12px) !important;
  }
  .db-fi-home .db-gbadge__icon{
    width:clamp(32px, calc(var(--hero-h) * .07), 42px) !important;
    height:clamp(32px, calc(var(--hero-h) * .07), 42px) !important;
  }
  .db-fi-home .db-gbadge__score{ font-size:clamp(14px, calc(var(--hero-h) * .027), 18px) !important; }
  .db-fi-home .db-gbadge__count{ font-size:clamp(10px, calc(var(--hero-h) * .02), 13px) !important; }
  .db-fi-home .db-gbadge,
  .db-fi-home .db-gbadge:hover,
  .db-fi-home .db-gbadge:focus{ text-decoration:none !important; }
}

/* ---------- Phone / tablet: stack, center, no horizontal scroll, full-width buttons ---------- */
@media (max-width:1180px){
  .db-fi-home .db-hero2__panel{ align-items:stretch; }
  .db-fi-home .db-hero2__text{ width:100%; max-width:100%; box-sizing:border-box; }
  .db-fi-home .db-h1-oneline{ white-space:normal !important; }
  /* .db-hero2__badge (hero.css) also carries the .db-fi-tag class and has higher
     specificity than a lone .db-fi-tag override, so it must be matched + beaten here. */
  .db-fi-home .db-hero2__badge.db-fi-tag{ white-space:normal !important; }
  .db-fi-home .db-hero2__btns{ width:100%; grid-template-columns:1fr !important; }
  .db-fi-home .db-hero2__btns .btn{ width:100%; justify-content:center; }
}
