.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: 2rem 1rem 1.25rem;
}

.footer a {
  color: var(--footer-fg);
  text-decoration: none;
  transition: opacity .2s ease;
}

.footer a:hover { opacity: .92; }

/* Focus: consistent with your header approach, but scoped to footer */
@supports selector(:focus-visible) {
  .footer :where(a, button):focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 10px;
  }
}
@supports not selector(:focus-visible) {
  .footer :where(a, button):focus {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 10px;
  }
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ✅ Desktop: use a responsive grid instead of horizontal scrolling flex */
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.75rem, 1.2vw, 1.25rem);
  align-items: start;
}

/* allow columns to wrap naturally on narrower widths */
@media (max-width: 1100px) {
  .footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep your class names; no need for flex props anymore */
.footer__col,
.footer__col--social {
  min-width: 0;
}

.footer__title {
  font-size: 1rem;
  letter-spacing: .04em;
  font-weight: 700;
  text-transform: uppercase;
  margin: .25rem 0 .9rem;
  color: #fff;
}

.footer__list,
.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__list li,
.footer__links li {
  margin: .35rem 0;
  line-height: 1.35;
}

.footer__list li { color: var(--footer-muted); }
.footer__list a { color: var(--footer-fg); }

.footer__links a { position: relative; }

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width .2s ease;
}

.footer__links a:hover::after,
.footer__links a:focus-visible::after {
  width: 100%;
}

/* underline style for the contact form link */
.footer a.footer__link--underline {
  --uln-w: 100%;
  --uln-th: 2px;
  --uln-offset: -2px;
  position: relative;
  text-decoration: none;
}

.footer a.footer__link--underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: var(--uln-offset);
  width: var(--uln-w);
  height: var(--uln-th);
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .2s ease;
}

.footer a.footer__link--underline:hover::after,
.footer a.footer__link--underline:focus-visible::after {
  transform: scaleX(0);
}

/* ✅ Scope icon button styling to footer social only (prevents header collisions) */
.footer__social {
  display: flex;
  gap: .6rem;
  margin-top: .4rem;
  flex-wrap: wrap;
}

.footer__social > .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transition:
    transform .12s ease,
    background .2s ease,
    border-color .2s ease,
    opacity .2s ease;
  flex: 0 0 auto;
  padding: 0;
}

.footer__social > .icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .28);
  opacity: .96;
}

.footer__social > .icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer__legal {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: var(--footer-muted);
  font-size: .9rem;
  line-height: 1.4;
}

.footer__legal a { color: var(--footer-fg); }
.footer__legal a:hover { text-decoration: underline; }
.footer__sep { opacity: .5; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .footer__links a::after,
  .footer a.footer__link--underline::after,
  .footer__social > .icon-btn {
    transition: none !important;
  }
}

/* Mobile: keep your centered layout */
@media (max-width: 720px) {
  .footer { padding: 1.25rem 1rem 1rem; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer__title {
    font-size: .95rem;
    margin: .15rem 0 .6rem;
    text-align: center;
  }

  .footer__list,
  .footer__links {
    text-align: center;
  }

  .footer__social {
    justify-content: center;
    gap: .75rem;
    margin-top: .25rem;
  }

  .footer__social > .icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .footer__social > .icon-btn svg {
    width: 22px;
    height: 22px;
  }

  .footer__bottom {
    margin-top: 1.25rem;
    padding-top: .75rem;
  }

  .footer__legal {
    font-size: .85rem;
    gap: .4rem;
  }

  .footer__sep { display: none; }
}

@media (max-width: 380px) {
  .footer__title { font-size: .9rem; }
  .footer__legal { font-size: .8rem; }
}

/* Optional: better contrast support in Windows High Contrast mode */
@media (forced-colors: active) {
  .footer :where(a, button):focus {
    outline: 2px solid CanvasText;
  }
  .footer__social > .icon-btn {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 1300;
  padding: 0 12px;
  pointer-events: none;
}

.cookie-consent.is-visible {
  pointer-events: auto;
}

.cookie-consent__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--footer-bg);
  color: var(--footer-fg);
  border: 1px solid var(--footer-accent);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.cookie-consent__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.cookie-consent__text a {
  color: var(--footer-fg);
  text-decoration: underline;
}

.cookie-consent__btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .12s;
}

.cookie-consent__btn:hover {
  background: var(--white);
  color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary), 0 8px 16px rgba(0, 0, 0, .1);
  transform: translateY(-1px);
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .cookie-consent {
    bottom: 10px;
  }

  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__btn {
    width: 100%;
  }
}
