.footer {
  background-color: var(--footer-bg);
  padding: 2.5rem 1.5rem;
  color: var(--footer-text);
  margin-top: auto;
  position: relative;
}

.footer .container {
    position: relative;
    z-index: 2;
}

.footer.has-bg-image {
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.footer.has-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: color-mix(in srgb, var(--footer-bg) var(--bg-opacity-value, 55%), transparent);
    z-index: 1;
}

.footer-logo {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  margin-bottom: 1rem;
  display: block;
  object-fit: contain;
}

.footer a {
  color: color-mix(in srgb, var(--footer-text) 90%, var(--footer-bg));
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--footer-text);
  text-decoration: underline;
}

.footer ul {
  list-style: none;
  padding-left: 0;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer-heading {
  color: var(--footer-text);
  margin-bottom: 1rem;
  font-weight: bold;
}

.footer-text {
  color: color-mix(in srgb, var(--footer-text) 90%, var(--footer-bg));
}

.footer-cta-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: 50px;
  background: color-mix(in srgb, var(--footer-text) 12%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--footer-text) 25%, transparent);
  color: var(--footer-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}

.footer-cta-btn:hover {
  background: color-mix(in srgb, var(--footer-text) 22%, transparent);
  color: var(--footer-text) !important;
  text-decoration: none !important;
  transform: translateY(-2px);
}

.footer-cta-arrow {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-cta-btn:hover .footer-cta-arrow {
  transform: translateX(5px);
}

.footer-divider {
  background-color: color-mix(in srgb, var(--footer-text) 20%, transparent);
  margin: 1.5rem 0;
  height: 1px;
}

.copyright {
  color: color-mix(in srgb, var(--footer-text) 90%, var(--footer-bg));
  font-size: 0.9rem;
}

.footer-fineprint-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.footer-fineprint {
  color: color-mix(in srgb, var(--footer-text) 75%, var(--footer-bg));
}

a.footer-fineprint:hover {
  color: var(--footer-text);
  text-decoration: underline;
}


.footer-contact-btn {
  /* inherits .footer-cta-btn */
}


.footer-contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-contact-icon {
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.15rem;
  color: var(--footer-accent);
}

.footer-contact-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-contact-text {
  color: color-mix(in srgb, var(--footer-text) 90%, var(--footer-bg));
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-contact-text p {
  margin: 0;
}

.footer-contact-text a {
  color: color-mix(in srgb, var(--footer-text) 90%, var(--footer-bg));
}

/* Shared: identical in both styles. */
.social-icons {
  display: flex;
}

/* Boxed icon buttons, wrapping to as many rows as needed. Left-aligned to
   sit under the column heading like the link lists in the other columns. */
.footer-style-modern .social-icons {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.625rem;
}

.footer-style-modern .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.footer-style-modern .social-icon svg {
  width: 18px;
  height: 18px;
  /* Sprite paths are fill="currentColor", so the icon picks up the
     inherited .footer a colour rather than needing a filter hack. */
  fill: currentColor;
}

/* Accent from the CMS theme rather than a fixed colour, so the hover keeps
   matching whatever palette the site is configured with. */
.footer-style-modern .social-icon:hover {
  color: var(--footer-accent);
  border-color: var(--footer-accent);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Bare icons pushed to the right of the copyright row. */
.footer-style-classic .social-icons {
  justify-content: flex-end;
  gap: 1rem;
}

.footer-style-classic .social-icon {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Not a pure revert: the classic style sized icons through
   `.social-icon img { ... filter: brightness(0) invert(1) }` and a font-size
   on Font Awesome <i> glyphs. Icons are inline SVG in both styles now — the
   icon chooser is deliberately kept — and an SVG ignores font-size, so the
   dimensions have to be explicit here. Visually equivalent to the old look. */
.footer-style-classic .social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-style-classic .social-icon:hover {
  opacity: 0.8;
  transform: scale(1.08);
}

@media screen and (max-width: 768px) {
  .footer {
    padding: 1.5rem 1rem;
  }

  /* 2-column grid for footer sections */
  .footer .columns.is-multiline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
  }

  /* Logo/description column spans full width */
  .footer .columns.is-multiline .column:first-child {
    grid-column: 1 / -1;
    margin-bottom: 0.25rem;
  }

  .footer .columns.is-multiline .column {
    width: 100%;
    margin-bottom: 0;
    padding: 0.5rem;
  }

  .footer-logo {
    max-width: 100px;
    max-height: 80px;
    margin-bottom: 0.5rem;
  }

  .footer-heading {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .footer li {
    margin-bottom: 0.35rem;
  }

  .footer a {
    font-size: 0.85rem;
  }

  .footer-text {
    font-size: 0.85rem;
  }

  /* Copyright row stays stacked */
  .footer .columns:not(.is-multiline) {
    flex-direction: column;
  }

  .footer .columns:not(.is-multiline) .column {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  /* Centred on narrow screens, where the footer columns stack and the
     heading above them is centred too. */
  .social-icons {
    justify-content: center;
    margin-top: 0.5rem;
  }

  .copyright {
    text-align: center;
  }

  .footer-cta-wrapper {
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .footer-cta-btn {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
  }
}

/* Additional responsive tweaks for better mobile experience */
@media screen and (max-width: 480px) {
  .footer {
    padding: 1rem 0.75rem;
  }

  .footer-logo {
    max-width: 80px;
    max-height: 60px;
  }

  .footer-heading {
    font-size: 0.78rem;
    font-weight: 600;
  }

  .footer a,
  .footer-text {
    font-size: 0.78rem;
  }

  .footer-cta-btn {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
  }

  .footer-style-modern .social-icons {
    gap: 0.5rem;
  }

  .footer-style-modern .social-icon {
    width: 36px;
    height: 36px;
  }

  .footer-style-modern .social-icon svg {
    width: 16px;
    height: 16px;
  }

  .footer-style-classic .social-icons {
    gap: 0.75rem;
  }

  /* Replaces the old `font-size: 1rem`, which an inline SVG ignores. */
  .footer-style-classic .social-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Color Lines Styling */
.color-lines-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 3;
}

.color-line {
  height: 6px;
  width: 100%;
}
