:root {
  --footer-text: #4b5160;
  --footer-line: rgba(75, 81, 96, 0.14);
  --footer-bg: #ffffff;
  --footer-btn-border: rgba(75, 81, 96, 0.16);
  --footer-btn-hover: rgba(0, 174, 239, 0.35);

  --to-top-size: 62px;
  --to-top-gap: 22px;
  --to-top-safe-space: calc(var(--to-top-size) + var(--to-top-gap) + 20px);
}

/* =========================
   FOOTER BASE
========================= */

.site-footer {
  width: 100%;
  background: var(--footer-bg);
  padding: 22px 42px 30px;
}

/* =========================
   FOOTER LAYOUT
========================= */

.footer-bottom {
  max-width: 1740px;
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid var(--footer-line);

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

/* =========================
   COPYRIGHT
========================= */

.footer-copy {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: rgba(75, 81, 96, 0.6);
}

/* =========================
   SOCIALS
========================= */

.footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;

  /* 🔥 kluczowe: miejsce dla scroll-to-top */
  margin-right: var(--to-top-safe-space);
}

.footer-socials a {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--footer-btn-border);
  background: transparent;
  color: #111827;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.footer-socials a:hover {
  transform: translateY(-2px);
  border-color: var(--footer-btn-hover);
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.08);
}

/* =========================
   SCROLL TO TOP (FIXED)
========================= */

.to-top {
  position: fixed;
  right: var(--to-top-gap);
  bottom: var(--to-top-gap);
  z-index: 999;

  width: var(--to-top-size);
  height: var(--to-top-size);
  border-radius: 18px;

  border: 1px solid var(--footer-btn-border);
  background: rgba(255, 255, 255, 0.55);
  color: #111827;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--footer-btn-hover);
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.08);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .site-footer {
    padding: 20px 24px 26px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .footer-socials {
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --to-top-size: 54px;
    --to-top-gap: 16px;
    --to-top-safe-space: calc(var(--to-top-size) + var(--to-top-gap) + 14px);
  }

  .footer-copy {
    font-size: 11px;
  }

  .footer-socials a {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .to-top {
    border-radius: 16px;
    font-size: 24px;
  }
}