/**
 * Frontend footer — uses theme CSS variables (--primary, --secondary).
 * Scoped: .ft-footer
 */

.ft-footer {
  --ft-accent: var(--primary, #e91e8c);
  /* Footer surface: theme secondary, deepened slightly so white type stays readable */
  --ft-bg-top: var(--secondary, #6366f1);
  --ft-bg-bottom: color-mix(in srgb, var(--secondary, #6366f1) 55%, #0f172a 45%);
  --ft-text: #f8fafc;
  --ft-muted: rgba(248, 250, 252, 0.82);
  --ft-faint: rgba(248, 250, 252, 0.55);
  --ft-border: rgba(248, 250, 252, 0.14);
  --ft-logo-chip: color-mix(in srgb, #ffffff 90%, var(--ft-bg-bottom) 10%);
}

.ft-footer--desktop {
  padding-top: 2.75rem;
  padding-bottom: 1.25rem;
  background: linear-gradient(180deg, var(--ft-bg-top) 0%, var(--ft-bg-bottom) 100%);
  color: var(--ft-text);
  border-top: 1px solid var(--ft-border);
}

.ft-footer--mobile {
  padding-top: 1.15rem;
  /* Single reserve for fixed bottom nav (avoid stacking with large margins below) */
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, var(--ft-bg-top) 0%, var(--ft-bg-bottom) 100%);
  color: var(--ft-text);
  border-top: 1px solid var(--ft-border);
}

.ft-footer a {
  color: var(--ft-muted);
  transition: color 0.18s ease, opacity 0.18s ease;
}

.ft-footer a:hover,
.ft-footer a:focus {
  color: var(--ft-text);
  text-decoration: none;
}

.ft-footer .social.colored a,
.ft-footer__social a {
  color: #f8fafc !important;
  opacity: 1;
}

.ft-footer .social.colored a:hover,
.ft-footer__social a:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

/* Logo: high-contrast chip so dark marks read on the footer gradient */
.ft-footer__logo-wrap {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 14px;
  background: var(--ft-logo-chip);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 4px 14px rgba(15, 23, 42, 0.28);
  margin-bottom: 0.35rem;
}

.ft-footer__logo-wrap--mobile {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.65rem;
}

.ft-footer__logo {
  display: block;
  max-width: 200px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.12));
}

.ft-footer__logo--sm {
  max-width: 160px;
  max-height: 40px;
}

.ft-footer__about,
.ft-footer__about p,
.ft-footer__about li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ft-muted);
  max-width: 34rem;
}

.ft-footer__about a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ft-footer__about a:hover {
  color: var(--ft-text);
}

.ft-footer__about p:last-child {
  margin-bottom: 0;
}

.ft-footer__about--mobile {
  width: 100%;
  max-width: none;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.ft-footer__title {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ft-text);
  opacity: 0.95;
}

.ft-footer__title::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: var(--ft-accent);
}

.ft-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ft-footer__list li {
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ft-muted);
}

.ft-footer__list li:last-child {
  margin-bottom: 0;
}

.ft-footer__list a {
  color: #fff;
}

.ft-footer__list a:hover {
  color: var(--ft-text);
}

.ft-footer__icon {
  flex-shrink: 0;
  margin-top: 0.12rem;
  color: var(--ft-accent);
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ft-accent) 35%, transparent));
}

.ft-footer__social .list-inline-item {
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
}

.ft-footer__social .list-inline-item:last-child {
  margin-right: 0;
}

.ft-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .ft-footer__grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem 1.75rem;
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .ft-footer__grid {
    gap: 2.25rem 2rem;
  }
}

.ft-footer__list--stack > li {
  display: block;
  margin-bottom: 0.5rem;
}

.ft-footer__list--stack > li:last-child {
  margin-bottom: 0;
}

.ft-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ft-muted);
}

.ft-footer__meta a {
  color: #fff;
  font-weight: 500;
}

.ft-footer__meta a:hover {
  color: var(--ft-text);
}

.ft-footer__meta-sep {
  opacity: 0.5;
  user-select: none;
}

.ft-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--ft-border);
}

.ft-footer__copyright {
  font-size: 0.875rem;
  color: var(--ft-muted);
  line-height: 1.55;
}

.ft-footer__copyright a {
  color: #fff;
}

.ft-footer__copyright p:last-child {
  margin-bottom: 0;
}

.ft-footer__credit {
  font-size: 0.82rem;
  color: var(--ft-muted);
}

.ft-footer__credit a.text-reset {
  color: #fff !important;
}

.ft-footer__credit a.text-reset:hover {
  color: var(--ft-text) !important;
}

.ft-footer__mobile-brand {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  margin-bottom: 1rem;
}

.ft-footer--mobile .ft-footer__section {
  margin-bottom: 1rem;
}

.ft-footer--mobile .ft-footer__section:last-of-type {
  margin-bottom: 0;
}

.ft-footer__section {
  margin-bottom: 1.75rem;
}

.ft-footer__section:last-of-type {
  margin-bottom: 0;
}

.ft-footer__section-title {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ft-text);
  opacity: 0.95;
}

.ft-footer--mobile .ft-footer__section-title {
  margin-bottom: 0.55rem;
}

.ft-footer__section-title::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 2px;
  margin: 0.45rem auto 0;
  border-radius: 2px;
  background: var(--ft-accent);
}

.ft-footer__list--center {
  text-align: center;
  justify-content: center;
}

.ft-footer__list--center li {
  justify-content: center;
  flex-wrap: wrap;
}

.ft-footer__btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--ft-accent);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ft-accent) 40%, transparent);
}

.ft-footer__btn-app:hover,
.ft-footer__btn-app:focus {
  color: #fff !important;
  filter: brightness(1.07);
}

.ft-footer__mobile-copy {
  margin-bottom: 0;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ft-border);
}

.ft-footer--mobile .ft-footer__btn-app {
  padding: 0.45rem 1.1rem;
  font-size: 0.8125rem;
}

.ft-footer--mobile .ft-footer__list--center li {
  margin-bottom: 0.45rem;
}
