/* ==========================================================================
   FOOTER.CSS — Site Footer
   toilet-cubicle.co.uk
   ========================================================================== */

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

.site-footer {
  background-color: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--sp-8) var(--sp-4);
  position: relative;
  overflow: hidden;
}

/* Subtle diagonal texture lines for an industrial feel */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255, 255, 255, 0.012) 40px,
    rgba(255, 255, 255, 0.012) 41px
  );
  pointer-events: none;
}

/* Green top-edge accent */
.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-green) 20%,
    var(--color-green-light) 50%,
    var(--color-green) 80%,
    transparent 100%
  );
}

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

.footer__inner {
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-2);
}

@media (min-width: 576px) {
  .footer__inner {
    padding-inline: var(--sp-3);
  }
}

@media (min-width: 768px) {
  .footer__inner {
    padding-inline: var(--sp-4);
  }
}

/* Grid: columns stack on mobile, row on desktop */
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

@media (min-width: 576px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-4);
  }
}

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

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
  text-decoration: none;
}

/* SVG loaded via <img> can't inherit currentColor — use filter to brighten */
.site-footer .footer__logo img,
.site-footer img.footer__logo {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-white);
}

.footer__logo-text span {
  color: var(--color-green-light);
}

.footer__tagline {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--sp-3);
}

/* Column heading */
.footer__heading,
.site-footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-white);
  margin-bottom: var(--sp-2);
}

/* Generic footer text and links (for bare elements without BEM classes) */
.site-footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: var(--color-green-light);
}

/* Footer links */
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

.footer__link:hover {
  color: var(--color-green-light);
  padding-left: 4px;
  text-decoration: none;
}

/* Contact info */
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  margin-bottom: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-green);
  opacity: 0.7;
}

.footer__contact-item a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__contact-item a:hover {
  color: var(--color-green-light);
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   Footer Bottom Bar — Copyright
   ------------------------------------------------------------------------- */

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

.footer__legal {
  display: flex;
  gap: var(--sp-2);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--color-green-light);
}

/* Separator dot between legal links */
.footer__legal a + a::before {
  content: "\00B7";
  margin-right: var(--sp-2);
  color: rgba(255, 255, 255, 0.2);
}

/* -- Paneltech attribution ------------------------------------------------ */

.footer__paneltech {
  font-size: var(--text-xs);
  color: var(--color-grey-400);
  margin-top: var(--sp-1);
}

.footer__paneltech a {
  color: var(--color-green);
  text-decoration: none;
}

.footer__paneltech a:hover {
  text-decoration: underline;
}
