/* ============================================================
   HomePro Contractors — override stylesheet (site-wide)
   Injected after Duda CSS so these win. Desktop-preserving.
   ============================================================ */

/* --- 1. Empty gap-rows are collapsed at runtime by overrides.js
   (collapseEmptySections) — robust across all pages, no fragile IDs. --- */

/* --- 2. Gallery / content-image lightbox --- */
#hp-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(15, 23, 42, .92); align-items: center; justify-content: center;
  padding: 3vw; box-sizing: border-box;
}
#hp-lightbox.open { display: flex; }
#hp-lightbox #hp-lb-img {
  max-width: 92vw; max-height: 88vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
#hp-lightbox #hp-lb-close {
  position: absolute; top: 18px; right: 26px; color: #fff;
  font-size: 46px; line-height: 1; cursor: pointer; font-weight: 300;
}
#hp-lightbox .hp-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 40px; cursor: pointer; user-select: none;
  padding: 12px; opacity: .8;
}
#hp-lightbox .hp-lb-nav:hover { opacity: 1; }
#hp-lightbox #hp-lb-prev { left: 14px; }
#hp-lightbox #hp-lb-next { right: 14px; }
/* signal gallery images are clickable */
[class*="gallery"] img, [class*="Gallery"] img, .photoGalleryThumbs img { cursor: zoom-in; }

/* --- 3. Mobile responsiveness (desktop untouched: only <=768px) --- */
@media (max-width: 768px) {
  #hp-lightbox #hp-lb-close { top: 10px; right: 16px; font-size: 38px; }
  #hp-lightbox .hp-lb-nav { font-size: 30px; }
}

/* --- 4. Mobile hamburger drawer (Duda runtime opener 404s on the mirror,
   so overrides.js drives it; these styles supply the open state + backdrop) --- */
#hamburger-drawer {
  transition: transform .32s cubic-bezier(.22,.85,.2,1), top .4s !important;
}
#hamburger-drawer.hp-drawer-open {
  transform: translateX(0) !important;
  box-shadow: -10px 0 34px rgba(15,23,42,.28);
}
#hp-drawer-backdrop {
  position: fixed; inset: 0; z-index: 12;
  background: rgba(15,23,42,.45);
  opacity: 0; visibility: hidden; transition: opacity .3s;
}
#hp-drawer-backdrop.on { opacity: 1; visibility: visible; }
html.hp-drawer-lock, html.hp-drawer-lock body { overflow: hidden; }
/* drawer sub-menus (About Us / Services) — expand on tap; Duda's opener is dead */
#hamburger-drawer .unav-sub { transition: max-height .3s ease, opacity .25s ease; }
#hamburger-drawer li.hp-sub-open > .unav-sub {
  max-height: 1500px !important; opacity: 1 !important; overflow: visible !important;
}
#hamburger-drawer .unav-top-item .icon-angle-down { transition: transform .25s ease; }
#hamburger-drawer li.hp-sub-open > a .unav-top-item .icon-angle-down,
#hamburger-drawer li.hp-sub-open > .unav-top-item .icon-angle-down,
#hamburger-drawer li.hp-sub-open > a .icon-angle-down { transform: rotate(180deg); }
/* bigger tap target on the caret so it's easy to hit on mobile */
#hamburger-drawer .unav-top-item .icon-angle-down { padding: 8px; margin: -8px; cursor: pointer; }

/* --- 5. Contact form status messages (AJAX submit via /api/contact) --- */
.hp-form-msg { font-family: inherit; font-size: 14px; margin: 8px 0; color: #b91c1c; min-height: 0; }
.hp-form-msg:empty { display: none; }
.hp-form-msg.err { color: #b91c1c; }
.hp-form-done {
  font-family: inherit; font-size: 16px; color: #166534;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 18px 20px; text-align: center; line-height: 1.5;
}

/* --- 7. Homepage lead-capture band + mobile tap-to-call --- */
#hp-lead {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  padding: 26px 18px; color: #fff;
}
#hp-lead .hp-lead-inner { max-width: 1100px; margin: 0 auto; }
#hp-lead .hp-lead-head { text-align: center; margin-bottom: 16px; }
#hp-lead .hp-lead-h2 {
  font-family: inherit; font-size: 25px; font-weight: 700; margin: 0 0 4px; color: #fff;
}
#hp-lead .hp-lead-head p { margin: 0; font-size: 15px; color: #ffffff; }
#hp-lead .hp-lead-form {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: stretch;
}
#hp-lead .hp-lead-form input:not(.hp-hp) {
  flex: 1 1 190px; min-width: 0; padding: 13px 15px; border: 0; border-radius: 9px;
  font-size: 15px; background: #fff; color: #0f172a;
}
#hp-lead .hp-lead-form input::placeholder { color: #94a3b8; }
#hp-lead .hp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#hp-lead .hp-lead-form button {
  flex: 0 0 auto; padding: 13px 26px; border: 0; border-radius: 9px; cursor: pointer;
  background: #ea580c; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .02em;
  transition: background .15s, transform .1s;
}
#hp-lead .hp-lead-form button:hover { background: #c2410c; }
#hp-lead .hp-lead-form button:active { transform: scale(.97); }
#hp-lead .hp-lead-msg { flex: 1 1 100%; text-align: center; font-size: 14px; color: #fde68a; min-height: 0; }
#hp-lead .hp-lead-msg:empty { display: none; }
#hp-lead .hp-lead-done {
  text-align: center; font-size: 18px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.12); border-radius: 10px; padding: 22px;
}
/* mobile sticky call bar */
#hp-callbar { display: none; }
@media (max-width: 768px) {
  #hp-callbar {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 40; background: #15803d; color: #fff; text-decoration: none;
    padding: 14px; border-radius: 12px; font-size: 16px; font-weight: 700;
    box-shadow: 0 6px 20px rgba(21,128,61,.45);
  }
  #hp-lead .hp-lead-form button { flex: 1 1 100%; }
  /* keep the mobile call bar from covering the Sections drawer button on the menu page */
  #idxBtn { bottom: calc(74px + var(--safe-b)); }
}

/* --- 8. "Repair or Replace" cards: photo backgrounds + readable labels --- */
[id="6df74ae6"] {
  background-image: linear-gradient(rgba(15,23,42,.34), rgba(15,23,42,.42)), url('/assets/roof-repair.jpg') !important;
  background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important;
}
[id="0c1976c6"] {
  background-image: linear-gradient(rgba(15,23,42,.42), rgba(15,23,42,.50)), url('/assets/roof-replace.jpg') !important;
  background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important;
}
[id="6df74ae6"] h4 span, [id="0c1976c6"] h4 span {
  color: #fff !important; text-shadow: 0 1px 6px rgba(0,0,0,.75);
}
