/* ==========================================================================
   Nulectrics — Footer Styles
   Three-column grid, social icons, accreditations, legal bar
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Footer Shell
   -------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--nu-theme-bg);
  border-top: 1px solid var(--nu-theme-border);
}

/* --------------------------------------------------------------------------
   2. Columns Layout
   -------------------------------------------------------------------------- */

.site-footer__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--nu-gap);
  padding-top: var(--nu-gap);
  padding-bottom: var(--nu-gap);
}

/* --------------------------------------------------------------------------
   3. Column — Info (Logo + Contact)
   -------------------------------------------------------------------------- */

.site-footer__logo {
  display: inline-block;
  margin-bottom: 20px;
}

.site-footer__logo-svg {
  display: block;
  height: 66px;
  width: auto;
  color: var(--nu-theme-heading);
}

.site-footer__logo img {
  display: block;
  height: 66px;   /* was 50px — 33% larger */
  width: auto;
}

.site-footer__logo:hover {
  text-decoration: none;
}

.site-footer__contact {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.site-footer__contact-link {
  color: var(--nu-theme-text);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  text-decoration: none;
  transition: color var(--nu-transition);
}

.site-footer__contact-link:hover {
  color: var(--nu-theme-accent);
  text-decoration: none;
}

.site-footer__address {
  color: var(--nu-theme-text);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  line-height: var(--nu-lh-body);
  margin-bottom: 0;
}

.site-footer__review-link {
  display: inline-block;
  color: var(--nu-theme-text);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  text-decoration: none;
  transition: color var(--nu-transition);
}

.site-footer__review-link:hover {
  color: var(--nu-theme-accent);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. Column — Services
   -------------------------------------------------------------------------- */

.site-footer__heading {
  font-size: var(--nu-fs-body);
  color: var(--nu-theme-heading);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: var(--nu-ls-label);
}

.site-footer__service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__service-list li {
  margin-bottom: 10px;
}

.site-footer__service-link {
  color: var(--nu-theme-text);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  text-decoration: none;
  transition: color var(--nu-transition);
}

.site-footer__service-link:hover {
  color: var(--nu-theme-accent);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   5. Column — Social + Theme Toggle
   -------------------------------------------------------------------------- */

.site-footer__column--social {
  display: flex;
  flex-direction: column;
}

/* Theme toggle in footer */
.site-footer__theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-bottom: 16px;
  background: none;
  border: none;
  color: var(--nu-theme-text);
  cursor: pointer;
  transition: color var(--nu-transition);
}

.site-footer__theme-toggle:hover {
  color: var(--nu-theme-accent);
}

.site-footer__theme-toggle svg {
  width: 24px;
  height: 24px;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nu-theme-text);
  transition: color var(--nu-transition);
}

.site-footer__social-link:hover {
  color: var(--nu-theme-accent);
  text-decoration: none;
}

.site-footer__social-link svg {
  width: 20px;
  height: 20px;
}

/* Mobile: bigger social icons (+33%) */
@media (max-width: 1024px) {
  .site-footer__social-link svg {
    width: 27px;
    height: 27px;
  }
  .site-footer__social {
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   6. Accreditation Logos — FULL COLOUR (no grayscale, no reduced opacity)
   -------------------------------------------------------------------------- */

.site-footer__accreditations {
  border-top: 1px solid var(--nu-theme-border);
  padding-top: var(--nu-gap);
  padding-bottom: var(--nu-gap);
}

.site-footer__accreditations-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nu-gap);
}

/* Fixed visual height normalises every logo regardless of original aspect
 * ratio. object-fit: contain preserves proportions without stretching. A
 * max-width keeps extra-wide logos (e.g. wordmarks) from dominating. */
.site-footer__accreditation-logo {
  height: 60px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: none;
  opacity: 1;
  flex: 0 0 auto;
  transition: filter var(--nu-transition);
}

/* Light-mode recolour for the WHITE accreditation SVGs (NICEIC, Trustpilot).
 *
 * The footer flips to a light surface in light mode, on which a white logo
 * disappears. These two logos are monochrome white, so brightness(0)
 * collapses them to the brand dark. The coloured marks (ECA blue, CHAS
 * purple, Constructionline) read fine on light and are deliberately left
 * alone. Keyed on "white" in the filename (case-insensitive), so any
 * future white-named logo added to the footer picks this up automatically.
 *
 * Mirrors both light signals: auto light (prefers-color-scheme, no manual
 * override) and the manual [data-theme="light"] toggle. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-footer__accreditation-logo[src*="white" i] {
    filter: brightness(0);
  }
}
:root[data-theme="light"] .site-footer__accreditation-logo[src*="white" i] {
  filter: brightness(0);
}

/* Mobile: 3-column grid that wraps to 2 rows for 5+ logos.
   Uniform sizing, even spacing, no awkward flex wrapping. */
@media (max-width: 767px) {
  .site-footer__accreditations-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
    justify-items: center;
    align-items: center;
  }

  .site-footer__accreditation-logo {
    height: 38px;
    max-width: 100%;
    object-fit: contain;
  }
}

/* --------------------------------------------------------------------------
   7. Legal Bar
   -------------------------------------------------------------------------- */

.site-footer__legal {
  border-top: 1px solid var(--nu-theme-border);
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-footer__legal .nu-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  flex-wrap: wrap;
}

.site-footer__legal-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer__legal-text {
  color: var(--nu-theme-muted);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  margin-bottom: 0;
}

.site-footer__credit {
  color: var(--nu-theme-muted);
  font-size: var(--nu-fs-small);
  text-decoration: none;
  transition: color var(--nu-transition);
}
.site-footer__credit:hover {
  color: var(--nu-theme-link);
}

.site-footer__legal-link {
  color: var(--nu-theme-muted);
  font-size: var(--nu-fs-body);
  font-weight: var(--nu-fw-regular);
  text-decoration: none;
  transition: color var(--nu-transition);
}

.site-footer__legal-link:hover {
  color: var(--nu-theme-text);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   8. Responsive — Tablet (min-width: 768px)
   -------------------------------------------------------------------------- */

/* Mobile: explicit left-alignment for the social/toggle column */
@media (max-width: 767px) {
  .site-footer__column--social {
    align-items: flex-start;
    text-align: left;
  }
  .site-footer__column--social .site-footer__theme-toggle,
  .site-footer__column--social .levi-switch {
    margin-left: 0 !important;
    margin-right: auto;
    align-self: flex-start;
  }
  .site-footer__column--social .site-footer__social {
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .site-footer__columns {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__column--social {
    grid-column: 1 / -1;
  }

  .site-footer__legal .nu-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   9. Responsive — Desktop (min-width: 1025px)
   -------------------------------------------------------------------------- */

@media (min-width: 1025px) {
  .site-footer__columns {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .site-footer__column--social {
    grid-column: auto;
    text-align: end;
    align-items: flex-end;
  }

  .site-footer__column--social .site-footer__theme-toggle {
    margin-left: auto;
  }

  .site-footer__column--social .site-footer__social {
    justify-content: flex-end;
  }
}


/* ==========================================================================
   Footer logo light/dark swap (was missing — both variants visible until
   added 2026-06-03)
   ========================================================================== */

.site-footer__logo .nu-logo--light { display: block; }
.site-footer__logo .nu-logo--dark  { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-footer__logo .nu-logo--light { display: none; }
  :root:not([data-theme="dark"]) .site-footer__logo .nu-logo--dark  { display: block; }
}

[data-theme="light"] .site-footer__logo .nu-logo--light { display: none; }
[data-theme="light"] .site-footer__logo .nu-logo--dark  { display: block; }
