/* ========================================
   Footer Partial CSS
   Extracted from styles.css — contains ONLY the styles needed by
   partials/footer.hbs. No global resets (no *, body, a, html selectors)
   so it can be safely loaded on pages that already have their own base
   styles (e.g. best-alternative.hbs). Reuses CSS variables from
   partial-header.css; vars are re-declared here as a safety net.
   ======================================== */

:root {
  --primary: #2a41e8;
  --primary-hover: #1e33c9;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --font-heading: 'Jost', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

/* Defensive scope reset — neutralize any inherited padding/margin/list-style/font
   from the host page's CSS so the footer renders as designed. */
.site-footer,
.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box;
}

.site-footer ul,
.site-footer ol,
.site-footer li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
  color: inherit;
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  margin: 0;
  font-weight: 700;
}

/* Layout helper — needed by .footer__main / .footer__bottom.
   best-alternative.css (Bootstrap) ships `.container { width: 750/970/1170px;
   overflow: hidden }` which collapses the footer to a narrow centered box and
   clips it. Force full-width with our own padding so the footer expands
   like it does on the main layout. */
.site-footer .container,
.site-footer .footer__main,
.site-footer .footer__bottom {
  width: auto !important;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible !important;
}

/* best-alternative.css (Bootstrap) injects ::before/::after clearfix
   onto .container — those pseudo-elements become extra grid/flex cells
   on .footer__main and .footer__bottom, pushing real children out of
   their intended columns. Disable them inside the footer. */
.site-footer .container::before,
.site-footer .container::after,
.site-footer .footer__main::before,
.site-footer .footer__main::after,
.site-footer .footer__bottom::before,
.site-footer .footer__bottom::after {
  content: none !important;
  display: none !important;
}

/* Some host pages (e.g. the legacy Avada dev-tool pages) ship
   `.container { display:flex; flex-direction:column; min-height:100vh }` which
   hijacks .footer__main / .footer__bottom (they carry the `container` class):
   the columns stack and a full-viewport gap appears. Re-assert the footer grid
   at higher specificity than the single-class .container, and clear min-height.
   grid-template-columns is left to the responsive rules below. */
.site-footer .footer__main {
  display: grid;
  min-height: 0;
}
.site-footer .footer__bottom {
  min-height: 0;
}

/* Some host pages leak text-align:center into the footer; restore left. */
.site-footer {
  text-align: left;
}

/* ========================================
   Footer — light, blends with page bg
   ======================================== */
.site-footer {
  background-color: #ffffff;
  background-image: none !important;
  padding: 100px 0 28px;
  color: var(--gray-800);
  border-top: none;
  position: relative;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

/* Wavy top border — primary blue line, no shadow */
.site-footer::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'><path d='M0 15 Q 360 -3 720 15 T 1440 15' fill='none' stroke='%232a41e8' stroke-width='3' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.footer__main {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) minmax(220px, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 40px;
  max-width: 100%;
  padding: 0 42px;
}

.footer__logo img {
  width: 44px;
  height: 44px;
}

.footer__brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand-name {
  margin: 0;
  color: var(--gray-800);
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.footer__tagline {
  margin-top: 14px;
  max-width: 380px;
  color: var(--gray-600);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Button base — scoped to footer so it doesn't conflict with page buttons */
.site-footer .btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
}

.site-footer .btn--primary {
  background: var(--primary);
  color: var(--white);
}

.site-footer .btn--primary:hover {
  background: var(--primary-hover);
  color: var(--white);
}

/* CTA — 3D pressable, primary blue.
   The host page (best-alternative.css) has an ID-level rule
   `#stickyBottomBar a, #header-button-1, #footer-button-2 { display:block; width:100% }`
   which targets our CTA via its id. We use !important + width:auto to override
   so the button doesn't stretch the grid column and break the footer layout. */
.footer__brand-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 12px 22px !important;
  font-size: 14px !important;
  font-weight: 700;
  border-radius: 10px !important;
  font-family: var(--font-heading);
  position: relative;
  width: auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 4px 0 #1e33c9,
    0 6px 14px rgba(42, 65, 232, 0.32) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.footer__brand-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 5px 0 #1e33c9,
    0 9px 18px rgba(42, 65, 232, 0.38) !important;
}

.footer__brand-cta:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 1px 0 #1e33c9,
    0 2px 4px rgba(42, 65, 232, 0.20) !important;
}

.footer__brand-cta i {
  font-size: 12px;
}

/* Social icons — right column "Follow us" + Contact */
.footer__connect {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer__connect-section h3 {
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.footer__social {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-800);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}

.footer__social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer__contact {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.footer__contact a i {
  width: 16px;
  color: var(--gray-600);
  font-size: 13px;
}

.footer__contact a:hover {
  color: var(--primary);
}

.footer__contact a:hover i {
  color: var(--primary);
}

.footer__links {
  display: grid;
  /* Use minmax(0, 1fr) so columns shrink to fit at narrow desktop widths
     (e.g. 125% browser zoom / ~1280-1366px effective viewport) — otherwise
     the Legal column overflows column 2 of footer__main and clashes with
     the Connect column. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer__column h3 {
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.footer__column h3::after {
  display: none;
}

.footer__column a {
  display: block;
  padding: 7px 0;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.15s;
}

.footer__column a:hover {
  color: var(--gray-800);
}

.footer__apps {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 24px;
  /* Keep the App Store + Google Play badges side-by-side. The brand column
     can be as narrow as ~260px at 125% zoom; default 42px-tall badges (~142px
     wide each) wrap to a new row at that width. nowrap + flex-shrink keeps
     them in a single row by letting them shrink instead. */
  flex-wrap: nowrap;
}

.footer__apps a {
  flex: 0 1 auto;
  min-width: 0;
}

.footer__apps a {
  display: inline-block;
  border-radius: 9px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.10);
}

.footer__apps a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.site-footer .app-badge {
  height: 38px;
  width: auto;
  max-width: 100%;
  display: block;
}

.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 42px 0;
  max-width: 100%;
}

.footer__bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--gray-600);
  letter-spacing: 0.1px;
  font-family: var(--font-body);
}

/* ========================================
   Responsive — Footer only
   ======================================== */
@media (max-width: 992px) {
  .footer__main {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 0 24px;
  }

  .footer__links {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .footer__connect {
    flex-direction: row;
    gap: 48px;
    flex-wrap: wrap;
  }

  .footer__connect-section {
    flex: 1 1 auto;
    min-width: 180px;
  }

  .footer__tagline {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .footer__links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  }
}

@media (max-width: 600px) {
  .footer__main {
    gap: 36px;
    padding: 0 20px;
  }

  .footer__links {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 18px;
    align-items: start;
  }

  .footer__brand,
  .footer__column,
  .footer__connect-section {
    text-align: left;
  }

  .footer__brand-head {
    justify-content: flex-start;
  }

  .footer__brand-cta {
    display: inline-flex;
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    align-self: flex-start;
  }

  .footer__apps {
    justify-content: flex-start;
    gap: 12px;
  }

  .footer__connect {
    flex-direction: column;
    gap: 28px;
  }

  .footer__connect-section {
    min-width: 0;
  }

  .footer__social {
    justify-content: flex-start;
  }

  .footer__contact {
    align-items: flex-start;
  }

  .footer__column a {
    font-size: 14px;
    padding: 5px 0;
  }

  .footer__brand-name {
    font-size: 22px;
  }

  .footer__tagline {
    font-size: 14px;
  }

  .footer__bottom {
    text-align: left;
    justify-content: flex-start;
    padding: 22px 20px 0;
  }
}
