.tg-footer {
  margin-top: 6px;
  padding: 0 0 6px;
  background: transparent;
}

.tg-footer-inner {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 255, 0.84)),
    var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
}

.tg-footer-inner::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(25, 183, 223, 0.18), transparent 68%);
}

.tg-footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.tg-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.tg-footer-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tg-footer-sub {
  margin-top: 3px;
  max-width: 520px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tg-footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-social {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 160ms ease;
}

.tg-social:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.08);
}

.tg-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.tg-footer-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.tg-footer-links a:hover {
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.08);
}

.tg-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.tg-footer-copy,
.tg-footer-mini {
  color: var(--text-dim);
  font-size: 0.9rem;
}

html[data-bs-theme="dark"] .tg-footer-inner {
  background:
    linear-gradient(180deg, rgba(18, 24, 21, 0.96), rgba(12, 17, 14, 0.94)),
    var(--card-strong);
}

html[data-bs-theme="dark"] .tg-social:hover,
html[data-bs-theme="dark"] .tg-footer-links a:hover {
  border-color: rgba(77, 134, 255, 0.26);
  background: rgba(77, 134, 255, 0.16);
}

@media (max-width: 767.98px) {
  .tg-footer-top {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tg-footer-brand {
    min-width: 0;
    align-items: flex-start;
  }

  .tg-footer-social {
    width: 100%;
    justify-content: flex-start;
  }

  .tg-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tg-footer-links a {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 14px;
    border-color: rgba(37, 99, 235, 0.08);
    background: rgba(37, 99, 235, 0.04);
  }

  .tg-footer-bottom {
    align-items: flex-start;
    padding-top: 12px;
  }
}

@media (max-width: 575.98px) {
  .tg-footer-inner {
    padding: 20px 16px;
    border-radius: 24px;
    gap: 16px;
  }

  .tg-footer-brand {
    gap: 12px;
  }

  .tg-footer-title {
    font-size: 0.96rem;
  }

  .tg-footer-sub,
  .tg-footer-copy,
  .tg-footer-mini {
    font-size: 0.84rem;
  }

  .tg-footer-links {
    grid-template-columns: 1fr;
  }

  .tg-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
