/* ======== FOOTER STYLES ======== */
:root {
  --footer-bg: #0c0f14;
  --footer-card: #11151b;
  --footer-text: #d7dde5;
  --footer-muted: #aab3bf;
  --footer-border: #1c222b;
  --brand-accent: #00e5a8; /* tweak to your brand accent */
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  position: relative;
  overflow: clip;
}

/* Layout */
.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 20px 28px;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border: 1px solid var(--footer-border);
  border-radius: 18px;
  padding: 20px;
}

/* Titles */
.footer-title {
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 6px 0 14px;
}

/* Logo */
.footer-logo img {
  max-width: 180px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.2));
}

.footer-tagline {
  color: var(--footer-muted);
  margin: 14px 0 10px;
  line-height: 1.6;
}

/* Links */
.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li,
.footer-contact li + li {
  margin-top: 10px;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: all 0.2s ease;
}
.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
  border-bottom-color: var(--brand-accent);
}

/* Contact w/ icons */
.footer-contact li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--footer-text);
}
.footer-contact svg {
  width: 22px;
  height: 22px;
  fill: var(--footer-muted);
}
.footer-contact a {
  color: var(--footer-text);
  text-decoration: none;
}
.footer-contact a:hover,
.footer-contact a:focus {
  color: #fff;
  text-decoration: underline;
}

/* CTA Button */
.btn-cta {
  display: inline-block;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--brand-accent), #5cf0cc);
  color: #051013;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 229, 168, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 229, 168, 0.35);
}

/* Social */
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.footer-social-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--footer-card);
  border: 1px solid var(--footer-border);
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: var(--footer-text);
}
.footer-social-link:hover {
  transform: translateY(-2px);
  border-color: var(--brand-accent);
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  margin-top: 10px;
  padding: 16px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: var(--footer-muted);
  font-size: 0.95rem;
}

.footer-bottom-links {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}
.footer-bottom-links a {
  color: var(--footer-muted);
  text-decoration: none;
}
.footer-bottom-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--footer-border);
  background: var(--footer-card);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  cursor: pointer;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--brand-accent);
}

/* Responsive grid */
@media (min-width: 700px) {
  .footer-wrap {
    grid-template-columns: 1.2fr 1fr 1fr 1.1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* High-contrast focus */
.footer-links a:focus,
.footer-social-link:focus,
.btn-cta:focus,
.footer-bottom-links a:focus,
.back-to-top:focus {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ===== MOBILE FOOTER FIX (iPhone & small phones) ===== */
@media (max-width: 430px) {
  .site-footer {
    font-size: 16px;
  } /* base for rems on iOS */

  /* Grid → single column and tighter padding */
  .footer-wrap {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 28px 16px 16px !important;
  }

  /* Brand card */
  .footer-brand {
    padding: 14px !important;
    border-radius: 14px !important;
  }
  .footer-logo img {
    max-width: 150px !important;
  }

  /* Titles: smaller, no weird inheritance, no overlap */
  .site-footer .footer-title {
    font: inherit; /* reset inherited heading styles */
    font-weight: 700 !important;
    font-size: clamp(0.95rem, 3.6vw, 1.05rem) !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: transparent !important;
    position: static !important; /* ensure not absolute/sticky from theme */
    margin: 2px 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
  }

  /* Lists: comfortable tap targets + wrap long text */
  .footer-links,
  .footer-contact {
    gap: 0 !important;
  }
  .footer-links li + li,
  .footer-contact li + li {
    margin-top: 6px !important;
  }
  .footer-links a,
  .footer-contact a,
  .footer-contact span {
    font-size: clamp(0.95rem, 3.8vw, 1rem) !important;
    line-height: 1.35 !important;
    word-break: break-word;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 0; /* bigger hit area */
    display: inline-block;
  }

  /* Contact icon row */
  .footer-contact li {
    grid-template-columns: 20px 1fr !important;
    gap: 8px !important;
  }
  .footer-contact svg {
    width: 20px;
    height: 20px;
  }

  /* Social buttons smaller & inline */
  .footer-social {
    gap: 10px !important;
    margin-top: 10px !important;
  }
  .footer-social-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .footer-social-link svg {
    width: 16px;
    height: 16px;
  }

  /* CTA button: tighter */
  .btn-cta {
    padding: 9px 12px !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
  }

  /* Bottom bar: stack + smaller text */
  .footer-bottom {
    padding: 14px 16px 22px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    font-size: 0.9rem !important;
  }
  .footer-bottom-links {
    gap: 12px !important;
    flex-wrap: wrap;
  }

  /* Back to top: avoid iPhone home indicator (safe areas) */
  .back-to-top {
    right: 14px !important;
    bottom: max(14px, env(safe-area-inset-bottom) + 8px) !important;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

/* EXTRA: ensure headings never overlap, even if theme injects styles */
.site-footer .footer-title,
.site-footer .footer-links,
.site-footer .footer-contact {
  overflow: visible;
  white-space: normal;
}

/* ==== Footer overlap fix (scoped) ==== */
.site-footer {
  isolation: isolate;
} /* new stacking context */

/* Kill Responsee heading bars & any absolute positioning inside footer */
.site-footer .footer-title,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  position: static !important;
  margin: 4px 0 10px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.site-footer .footer-title::before,
.site-footer .footer-title::after,
.site-footer h1::before,
.site-footer h1::after,
.site-footer h2::before,
.site-footer h2::after,
.site-footer h3::before,
.site-footer h3::after,
.site-footer h4::before,
.site-footer h4::after,
.site-footer h5::before,
.site-footer h5::after,
.site-footer h6::before,
.site-footer h6::after {
  content: none !important;
}

/* Some themes inject a ".line" decoration—neutralize only in footer */
.site-footer .line,
.site-footer .line::before,
.site-footer .line::after {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  height: auto !important;
}

/* Ensure each column stacks cleanly on phones */
.site-footer .footer-col {
  position: relative;
  clear: both;
}
.site-footer .footer-col + .footer-col {
  margin-top: 14px;
}

/* Prevent any pseudo element from covering links */
.site-footer .footer-links,
.site-footer .footer-contact {
  position: relative;
  z-index: 1;
}

/* Mobile polish so headings never collide */
@media (max-width: 430px) {
  .site-footer .footer-title {
    font-weight: 700 !important;
    font-size: clamp(0.95rem, 3.6vw, 1.05rem) !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
  }
}
