/**
 * Recharge Footer (dark)
 * Scoped styles for the global site footer (wp_template_part "Footer", post 13787)
 *
 * 2.5.0 — footer stays at the bottom of the window on short pages (empty
 * cart, 404 and similar), instead of sitting mid-screen with white below it.
 * The page wrapper (.wp-site-blocks) becomes a column at least one window
 * high and the content between header and footer takes the spare height.
 * Long pages are unchanged. Tested live 2026-11-03 (injected CSS) at
 * 1320×1400 and 390×844 on /cart/ (empty) and a 404; /, /business-el/ and
 * /residential-el/ measured identical before and after.
 *
 * @package RCH
 * @version 2.5.0
 * @date 2026-11-03
 */

/* ---------- Sticky footer on short pages (2.5.0) ---------- */

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part {
  flex: 0 0 auto;
}

.wp-site-blocks > :not(header):not(footer) {
  flex: 1 0 auto;
}

/* ---------- Footer ---------- */

.cgp-footer {
  --footer-bg: #0F2237;
  --footer-accent: #71B0F6;
  --footer-heading: #71B0F6;
  --footer-text: rgba(255,255,255,0.6);
  --footer-text-strong: rgba(255,255,255,0.85);
  --footer-border: rgba(255,255,255,0.08);
  --footer-f-display: 'Geologica', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --footer-f-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --footer-container: 1600px;

  background: var(--footer-bg);
  font-family: var(--footer-f-body);
}

.cgp-footer :where(.is-layout-flow) > *,
.cgp-footer :where(.is-layout-constrained) > *,
.cgp-footer :where(.is-layout-flex) > * {
  margin-block-start: 0;
}

.cgp-footer-links p,
.cgp-footer-eyebrow,
.cgp-footer-copyright,
.cgp-footer-recaptcha {
  margin: 0;
}

.cgp-footer-inner {
  max-width: var(--footer-container);
  margin: 0 auto;
  padding: 64px 40px 40px;
}

.cgp-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.05fr 0.9fr 0.8fr 1fr;
  gap: 28px;
}

.cgp-footer-brand-logo {
  width: 140px;
  height: auto;
  display: block;
}

.cgp-footer-mega {
  margin-top: 16px;
}

.cgp-footer-col-title,
.cgp-footer-eyebrow {
  font-family: var(--footer-f-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--footer-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cgp-footer-col-title {
  display: block;
  margin: 0 0 20px;
}

.cgp-footer-eyebrow {
  display: inline-block;
}

.cgp-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cgp-footer-link {
  font-size: 14px;
  line-height: 1.4;
  color: var(--footer-text-strong);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cgp-footer-link:hover {
  color: #FFFFFF;
}

.cgp-footer-backed-strip {
  border-top: 1px solid var(--footer-border);
  margin-top: 28px;
  padding-top: 20px;
}

.cgp-footer-backed-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.cgp-footer-backed-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cgp-footer-backed-logos {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cgp-footer-backed-logos img {
  max-height: 32px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.cgp-footer-copyright {
  font-family: var(--footer-f-display);
  font-size: 11px;
  color: var(--footer-text);
}

.cgp-footer-recaptcha {
  margin-left: auto;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  max-width: 320px;
  text-align: right;
}

.cgp-footer-recaptcha a {
  color: rgba(255,255,255,0.45) !important;
  text-decoration: none;
}

.cgp-footer-recaptcha a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .cgp-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .cgp-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cgp-footer-inner {
    padding: 48px 22px 32px;
  }

  .cgp-footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cgp-footer-grid > div {
    border-top: 1px solid var(--footer-border);
    padding-top: 20px;
    padding-bottom: 4px;
  }

  .cgp-footer-grid > div:first-child {
    border-top: none;
    padding-top: 0;
  }

  .cgp-footer-backed-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cgp-footer-recaptcha {
    margin-left: 0;
    text-align: left;
    max-width: none;
  }
}
