/* ============================================================
   TradeWorks AI — Homepage Update v2 (DevGuide)
   Seven targeted changes. Brand: Navy #1B3C6E / Teal #2E86AB /
   Orange #E8751A (+ silver/slate glass tokens). No new fonts.
   Loaded AFTER home-glass.css so it wins where it overrides.
   ============================================================ */

/* ---- Change 1: Hero trust bar -> silver frosted glass ---- */
.hero-stats {
  background:
    linear-gradient(rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    rgba(43,52,64,0.45);                          /* slate base + silver sheen */
  -webkit-backdrop-filter: blur(14px) saturate(120%);
          backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.35);       /* hairline (replaces dashed) */
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15,25,40,0.25);
}
.hero-stats .hero-stat { border-right: 1px solid rgba(255,255,255,0.18); border-bottom: none; }
.hero-stats .hero-stat:last-child { border-right: none; }
.hero-stat-val { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.hero-stat-label { color: #D7DCE2; }
/* Fallback when backdrop-filter is unsupported (keeps white text legible) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-stats { background: rgba(43,52,64,0.80); }
}
@media (max-width: 767px) {
  .hero-stats .hero-stat { border-right: none; }
  .hero-stats .hero-stat:nth-child(1), .hero-stats .hero-stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.18); }
}

/* ---- Change 2: Why Homeowners -> four across ---- */
#why-homeowners .wh-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch;
}
#why-homeowners .wh-card { height: 100%; display: flex; flex-direction: column; }
#why-homeowners .wh-card-image { display: flex; align-items: center; justify-content: center; }
#why-homeowners .wh-card-image img { width: 112px; height: 112px; object-fit: contain; }
@media (max-width: 1023px) { #why-homeowners .wh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { #why-homeowners .wh-grid { grid-template-columns: 1fr; } #why-homeowners .wh-card { text-align: center; align-items: center; } }

/* ---- Remove the blue "bubble" eyebrow tags at the top of every section ---- */
.home-dark-tag, .home-light-tag,
#blog .section-tag, #faq .section-tag { display: none !important; }

/* ---- Make split-color headings fully solid (kill the blue gradient half) ---- */
.home-dark-h2 .text-gradient, .home-light-h2 .text-gradient,
#why-homeowners .wh-grad {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  color: inherit !important;
}

/* ---- New category icons in the "What We Cover" tab bar ---- */
#home-categories img.cat-tab-icon { width: 40px; height: 40px; object-fit: contain; }

/* ---- Illustration icons (audience tiles + grow tiles) ---- */
#audience-selector .audience-icon.has-img {
  background: transparent !important; width: 72px; height: 72px; padding: 0; border-radius: 0;
}
#audience-selector .audience-icon.has-img img { width: 100%; height: 100%; object-fit: contain; }
.grow-business .offer-tile .icon { display: inline-flex; }
.grow-business .offer-tile .icon img { width: 48px; height: 48px; object-fit: contain; display: block; }

/* ---- Change 6: Which One Are You -> four across, CTA pinned ---- */
#audience-selector .audience-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch;
}
#audience-selector .audience-card { display: flex; flex-direction: column; height: 100%; }
#audience-selector .audience-card .audience-link { margin-top: auto; }
@media (max-width: 1023px) { #audience-selector .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { #audience-selector .audience-grid { grid-template-columns: 1fr; } }

/* ---- Change 4: Why We're Different -> two columns + Difference tile ---- */
#why-different .why-different-grid {
  display: grid; grid-template-columns: minmax(0,38fr) minmax(0,62fr); gap: 40px; align-items: start;
}
#why-different .wd-intro .home-light-sub { margin: 0; }
#why-different .difference-tile {
  margin-top: 24px; background: #1B3C6E; color: #FFFFFF;
  border-left: 5px solid #E8751A; border-radius: 12px; padding: 24px 26px;
}
#why-different .difference-tile h3 { color: #FFFFFF; font-size: 1.15rem; margin: 0 0 8px; }
#why-different .difference-tile p { color: rgba(255,255,255,0.9); line-height: 1.6; margin: 0; }
#why-different .difference-tile .stats { color: #E8751A; font-weight: 700; font-size: 1.15rem; margin-top: 12px; }
#why-different .compare-wrap { overflow-x: auto; }
@media (max-width: 900px) { #why-different .why-different-grid { grid-template-columns: 1fr; } }
/* Desktop: make both columns the same height (top + bottom aligned) — the
   Difference tile grows to fill the left column down to the table's bottom. */
@media (min-width: 901px) {
  #why-different .why-different-grid { align-items: stretch; }
  #why-different .wd-intro { display: flex; flex-direction: column; }
  /* tile fills the small remaining gap; its text stays at the top (no big void) */
  #why-different .difference-tile { flex: 1 1 auto; }
  /* compact the comparison table so its height ~ matches the left column */
  #why-different .comp-table th,
  #why-different .comp-table td { padding: 14px 16px; font-size: 13.5px; line-height: 1.5; }
  #why-different .comp-table th { font-size: 14px; }
}

/* ---- Change 3: What We Cover -> 31 categories + subcategories ---- */
#home-categories .cover-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start;
}
.cover-cat {
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15,25,40,0.05); overflow: hidden;
}
.cover-cat[open] { box-shadow: 0 8px 24px rgba(27,60,110,0.12); border-color: #2E86AB; }
.cover-cat > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 16px; min-height: 48px;
}
.cover-cat > summary::-webkit-details-marker { display: none; }
.cover-cat > summary::marker { content: ''; }
.cover-cat-ico { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.cover-cat-meta { flex: 1; min-width: 0; }
.cover-cat-name { font-weight: 700; color: #1B3C6E; font-size: 0.98rem; line-height: 1.2; }
.cover-cat-count { font-size: 0.8rem; color: #5B6B7B; margin-top: 2px; }
.cover-cat-chev { width: 18px; height: 18px; color: #5B6B7B; flex-shrink: 0; transition: transform 0.2s; }
.cover-cat[open] .cover-cat-chev { transform: rotate(180deg); }
.cover-cat-panel { padding: 0 16px 16px; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; }
.subcat-chip {
  display: inline-block; font-size: 0.8rem; color: #1A1A1A; text-decoration: none;
  background: #F4F7FB; border: 1px solid #E5E7EB; border-radius: 999px; padding: 7px 12px; line-height: 1.2;
}
.subcat-chip:hover { background: #EAF1F8; border-color: #2E86AB; color: #1B3C6E; }
.cover-cat-hub {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-weight: 700; font-size: 0.85rem; color: #E8751A; text-decoration: none;
}
.cover-cat-hub:hover { text-decoration: underline; }
@media (max-width: 1023px) { #home-categories .cover-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { #home-categories .cover-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px)  { #home-categories .cover-grid { grid-template-columns: 1fr; } }

/* ---- Change 7: Grow Your Contracting Business ---- */
#grow-business { padding: 5rem 0; background: #FFFFFF; }
#grow-business .container > .home-light-tag,
#grow-business .container > .home-dark-tag { margin-bottom: 0; }
.grow-business {
  display: grid; grid-template-columns: minmax(0,48fr) minmax(0,52fr); gap: 40px; align-items: center; margin-top: 2rem;
}
.grow-business .offer-tiles { display: flex; flex-direction: column; gap: 16px; }
.grow-business .offer-tile {
  display: flex; gap: 14px; align-items: flex-start;
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15,25,40,0.05); padding: 18px 20px;
}
.grow-business .offer-tile .icon { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.grow-business .offer-tile h3 { margin: 0 0 4px; font-size: 1.05rem; color: #1B3C6E; }
.grow-business .offer-tile p { margin: 0; color: #5B6B7B; font-size: 0.92rem; line-height: 1.55; }
.grow-business .offer-tile p strong, .grow-business .offer-tile .price { color: #E8751A; font-weight: 700; }
.grow-business .offer-highlight { background: #EAF1F8; border-color: #DCE7F2; }
.grow-business .offer-highlight h3 { color: #1B3C6E; }
.grow-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.grow-stats > div { flex: 1 1 0; min-width: 92px; background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 12px; padding: 14px 12px; text-align: center; }
.grow-stat-num { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.45rem; color: #E8751A; line-height: 1.1; }
.grow-stat-lbl { display: block; font-size: 0.78rem; color: #5B6B7B; margin-top: 3px; }
.grow-cta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.grow-audit { width: 100%; }
.grow-audit .audit-card { margin: 0 auto; }
@media (max-width: 900px) { .grow-business { grid-template-columns: 1fr; } .grow-audit { overflow-x: auto; } }
/* Desktop: equal-height columns; spread the tiles so the column top/bottom
   line up with the audit card. */
@media (min-width: 901px) {
  .grow-business { align-items: stretch; }
  .grow-business .offer-tiles { justify-content: space-between; }
}
