/* Brands: fixes for the Pro/Cornerstone theme layer (contrast, spacing, mobile). Loaded site-wide. */
html:root { --cs-gc-primary: var(--rr-red); --cs-gc-rose: var(--rr-red); --cs-gc-primary-deep: var(--rr-red-d); }
/* Trust marquee: white text on navy */
.cr-trust .cc-trust li, .cr-marquee__track li { color: #fff !important; }
/* Red eyebrow on pink chips */
.cr-eyebrow { color: var(--rr-red-d) !important; }
/* "Top-rated pros by city": same gutter and centering as its grid */
.cr-cities .cr-head { text-align: center; padding: 0 20px; }
.cr-cities .cr-head p { margin-left: auto; margin-right: auto; }
/* Featured (red) service card: readable link */
.cr-svc:first-child .cr-more, .cr-svc:first-child .cr-svc__foot { color: #fff !important; }
/* Mobile menu: light links on a dark panel */
.cc-oc .x-off-canvas-content { background: var(--rr-navy) !important; }
.cc-oc .x-off-canvas-content .x-anchor-text-primary { color: #fff !important; }
/* Footer: one link style, wrapping bottom row */
.cc-ftr__roofers { line-height: 2; }
.cc-ftr__roofers a { color: var(--rr-on-dark) !important; text-decoration: none; }
.cc-ftr__roofers a:hover { color: #fff !important; }
.cc-ftr__bottom .x-menu, .cc-ftr__bottom ul { flex-wrap: wrap !important; row-gap: 6px; }
@media (max-width: 640px) {
  .cc-ftr__bottom { flex-direction: column; align-items: flex-start; }
  .cc-ftr__bottom .x-menu-inline { width: 100% !important; max-width: 100%; justify-content: flex-start; }
  /* Sticky "Get matched" bar: keep content clear of it */
  body.rr-has-callbar { padding-bottom: 84px; }
  .cr-callbar.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
  .cr-callbar { transition: transform .25s, opacity .25s; }
}
body:has(.rr-list .rr-card) .cr .rr-empty { display: none; }
/* Theme wrappers use overflow:hidden, which breaks sticky maps/filters; clip keeps the same look. */
.x-root, .x-site, .x-main, .site, #x-root, #x-site { overflow-x: clip !important; overflow-y: visible !important; }
/* Button standard (theme buttons): centered text; buttons in the same group share width and height. */
.x-anchor-button .x-anchor-content, .cr-btn { justify-content: center !important; text-align: center !important; }
*:has(> .x-anchor-button + .x-anchor-button), *:has(> .cr-btn + .cr-btn) { display: inline-grid !important; max-width: 100%; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; align-items: stretch; }
*:has(> .x-anchor-button + .x-anchor-button) > .x-anchor-button, *:has(> .cr-btn + .cr-btn) > .cr-btn { width: 100%; margin: 0 !important; }
@media (max-width: 640px) {
  *:has(> .x-anchor-button + .x-anchor-button), *:has(> .cr-btn + .cr-btn) { grid-auto-flow: row; }
}

/* Home hero: "Free for homeowners" pill inherited black text on the dark photo. */
.cr-hero .cr-hero__copy { color: #fff; }
.cr-hero .cr-live { color: #fff !important; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }

/* Home service cards: bigger, high-contrast line icons (emoji are swapped for SVG in copy.php). */
.cr-svc .cr-svc__icon { width: 4rem !important; height: 4rem !important; border-radius: 16px !important; background: var(--rr-red-tint) !important; color: var(--rr-red); margin-bottom: .75rem !important; }
.cr-svc .cr-svc__icon svg { width: 2.1rem; height: 2.1rem; }
.cr-bento > :first-child .cr-svc .cr-svc__icon { background: #fff !important; color: var(--rr-red); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }

/* Home city map (injected in copy.php) */
.cr-cities .rr-homemap { width: min(1200px, 100% - 32px); margin: 1.5rem auto 2rem; }
.cr-cities .rr-homemap .rr-citymap__hint { text-align: center; }

/* Gravity Forms: Brands form card (add company, contact). */
.rr-gform { background: #fff; border: 1px solid #e1e5ea; border-radius: 16px; padding: 28px; box-shadow: 0 18px 40px -28px rgba(20, 40, 75, .35); }
.rr-gform .gform-theme--framework { --gf-ctrl-border-color: #cfd6dd; --gf-ctrl-border-color-focus: var(--rr-red); --gf-ctrl-outline-color-focus: rgba(180, 71, 12, .18); --gf-color-primary: var(--rr-red); --gf-radius: 10px; }
.gform-theme--framework .gform_fields { row-gap: 18px !important; column-gap: 16px !important; }
.gform-theme--framework .gfield { margin-bottom: 0 !important; }
.rr-gform .gfield_label { font-size: 15px !important; font-weight: 600 !important; color: var(--rr-navy) !important; margin-bottom: 6px !important; }
.rr-gform .gfield_required, .rr-gform .gfield_required_text { color: var(--rr-red) !important; font-size: 0 !important; }
.rr-gform .gfield_label > .gfield_required::after { content: "*"; font-size: 15px; margin-left: 2px; }
.rr-gform input[type="text"], .rr-gform input[type="email"], .rr-gform input[type="tel"], .rr-gform input[type="url"], .rr-gform select, .rr-gform textarea { width: 100% !important; min-height: 48px; padding: 11px 14px !important; font-size: 16px !important; color: var(--rr-navy) !important; background: #fff !important; border: 1px solid #cfd6dd !important; border-radius: 10px !important; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
.rr-gform select { height: auto !important; line-height: 1.4 !important; padding-right: 36px !important; }
.rr-gform textarea { min-height: 110px; }
.rr-gform input::placeholder, .rr-gform textarea::placeholder { color: #8a96a3; }
.rr-gform input:focus, .rr-gform select:focus, .rr-gform textarea:focus { outline: none !important; border-color: var(--rr-red) !important; box-shadow: 0 0 0 4px rgba(180, 71, 12, .15) !important; }
.rr-gform .gfield_description { margin-top: 6px !important; font-size: 13px !important; line-height: 1.45; color: var(--rr-muted) !important; }
.rr-gform .gfield_error input, .rr-gform .gfield_error select, .rr-gform .gfield_error textarea { border-color: #b3261e !important; }
.rr-gform .validation_message, .rr-gform .gfield_validation_message { font-size: 13px !important; margin-top: 6px !important; }
.rr-gform .gform_footer { margin-top: 22px !important; padding: 0 !important; }
.rr-gform .gform_footer input[type="submit"], .rr-gform .gform_footer button { width: 100% !important; min-height: 52px; justify-content: center; text-align: center; font-size: 17px !important; font-weight: 700 !important; color: #fff !important; background: var(--rr-red) !important; border: 0 !important; border-radius: 10px !important; cursor: pointer; }
.rr-gform .gform_footer input[type="submit"]:hover, .rr-gform .gform_footer button:hover { background: #b3261e !important; }
.rr-gform .gform_confirmation_message { padding: 18px; border-radius: 10px; background: #e8f5ee; color: var(--rr-navy); }
@media (max-width: 640px) { .rr-gform { padding: 20px 16px; } .rr-gform .gfield { grid-column: 1 / -1 !important; } }

/* Contact page (Cornerstone): centered info cards; Gravity Forms contact form inside the form card. */
.rr-p-contact .cc-block--grid .x-text, .rr-p-contact .cc-block--grid h3, .rr-p-contact .cc-block--grid p { text-align: center; }
.rr-p-contact .cc-form-card .rr-gform { border: 0; box-shadow: none; padding: 0; background: none; }
.rr-p-contact .cc-form-card { width: min(760px, 100%); margin-inline: auto !important; }

/* Directory pages carry their own breadcrumbs: hide Pro's breadcrumb bar there. */
body.rr-route .x-breadcrumb-wrap { display: none !important; }

/* Crew home (RoofRated layout): the Brands hero photo is brighter than RoofRated's dusk shot, so dim it
   for the white headline, and keep the city section's heading in the Crew heading font. */
.cr-hero__photo img { filter: brightness(.5) saturate(.95); }
.cr-cities h2, .cr-cities .x-text h2 { font-family: var(--font-head, 'Poppins', sans-serif) !important; font-weight: 700; letter-spacing: -.02em; color: var(--c-ink, var(--rr-navy)); }

/* Business Info cards (Contact page: Call, Visit, Hours) with nothing filled in are hidden instead of showing
   a heading over a blank box. rr.js also drops the section once all its cards are gone, and blank buttons. */
.cc-card:has(> .cc-t:empty):has(> .cc-btn > .x-anchor-content:empty),
.cc-card:has(.cc-address:empty),
.cc-card:has(dl.cc-hours:empty):not(:has(.cc-hours-note)) { display: none; }
.cc-btn:has(> .x-anchor-content:empty) { display: none; }
/* Buttons built from an empty Business Info field ("Call" → tel: with no number) go nowhere: hide them. */
a[href="tel:"], a[href="mailto:"] { display: none !important; }

/* Logo: half Hank pointing at HOUSE / REPAIR / PRO stacked (Brands logo direction B). The text is
   live (Archivo Narrow 700, uppercase), so it stays sharp; the Crew header's 44px logo-image rule is overridden. */
.hrp-lockup { display: inline-flex; align-items: flex-end; gap: 4px; text-decoration: none !important; color: #fff; line-height: 1; }
.hrp-lockup .hrp-lockup__hank { display: block; height: 58px !important; width: auto !important; max-width: none; flex: none; }
.hrp-lockup__word { display: flex; flex-direction: column; gap: 2px; padding-bottom: 2px; font: 700 17px/.92 'Archivo Narrow', 'Arial Narrow', 'Poppins', sans-serif; letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.hrp-lockup__word b { align-self: flex-start; margin-top: 1px; padding: 2px 5px 1px; border-radius: 2px; background: var(--rr-orange); color: var(--rr-navy); font-weight: 700; }
.cc-ftr__logo .hrp-lockup .hrp-lockup__hank { height: 84px !important; }
.cc-ftr__logo .hrp-lockup__word { font-size: 24px; gap: 3px; }
@media (max-width: 767px) { .hrp-lockup .hrp-lockup__hank { height: 48px !important; } .hrp-lockup__word { font-size: 14px; } }

/* Home (Crew layout): the hero quote form is a Cornerstone block, not the plugin's form, so half Hank is
   added beside its heading here, matching the plugin's quote forms. */
.cr-quote .x-text:has(> h2) { position: relative; }
.cr-quote .x-text:has(> h2), .cr-quote .x-text:has(> h2) + * { padding-left: 72px; }
.cr-quote .x-text:has(> h2)::before { content: ""; position: absolute; left: -4px; top: -22px; width: 62px; height: 90px; background: url("brand/hank-half.png") no-repeat center bottom / contain; }
