/* ── Site footer ──────────────────────────────────────────────────────── */
.xwui-bar-site-footer {
  --xwui-bar-site-footer-max-width: none;
  --xwui-bar-site-footer-px: 0;
  --ethar-footer-cols: 1.6fr 0.9fr 1.15fr;
  --ethar-footer-gap: clamp(2rem, 5vw, 5rem);
  --ethar-footer-inset: 50px;
  --bg-secondary:
    radial-gradient(
      115% 140% at -8% 30%,
      color-mix(in srgb, var(--ethar-teal) 92%, #000) 0%,
      color-mix(in srgb, var(--ethar-teal) 62%, #000) 24%,
      color-mix(in srgb, #0e2722 78%, #000) 42%,
      transparent 62%
    ),
    linear-gradient(90deg, #05201d 0%, #020806 44%, #020806 100%);
  --text-primary: #fff;
  --text-secondary: #fff;
  --text-tertiary: #fff;
  --accent-primary: #fff;
  --border-light: transparent;
}

html[data-theme="ethar-dark"] .xwui-bar-site-footer,
html[data-theme="dark"] .xwui-bar-site-footer,
html[data-theme="night"] .xwui-bar-site-footer {
  --bg-secondary: linear-gradient(180deg, #060c1a 0%, #0b1222 49%, #1c171b 73%, #402d27 100%);
}

html[dir="rtl"] .xwui-bar-site-footer {
  direction: rtl;
}

.xwui-bar-site-footer .xwui-bar-site-footer__inner {
  grid-template-columns: var(--ethar-footer-cols);
  column-gap: var(--ethar-footer-gap);
  padding-block: clamp(2.75rem, 5vw, 4rem);
}

.xwui-bar-site-footer .xwui-bar-site-footer__col-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 1.4rem;
}
.xwui-bar-site-footer .xwui-bar-site-footer__col-list {
  gap: 1rem;
}
.xwui-bar-site-footer .xwui-bar-site-footer__col-link {
  font-size: 1rem;
}
.xwui-bar-site-footer__col-link[href*="maps.google"] {
  margin-top: 1.5rem;
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.xwui-bar-site-footer .xwui-bar-site-footer__bottom {
  display: grid;
  grid-template-columns: var(--ethar-footer-cols);
  column-gap: var(--ethar-footer-gap);
  align-items: center;
  padding-bottom: var(--ethar-footer-inset);
}
.xwui-bar-site-footer .xwui-bar-site-footer__bottom-left {
  grid-column: 1;
  padding-inline-start: var(--ethar-footer-inset);
}
.xwui-bar-site-footer .xwui-bar-site-footer__bottom-right {
  grid-column: 3;
}

/* Legal links in the footer bottom row (FAQ · Privacy/Terms). White to match
 * the footer type; underline on hover. */
.ethar-footer-legal-link {
  color: inherit;
  text-decoration: none;
}
/* Footer fine print (copyright + legal links) rendered 13.6px EN / 15.6px AR —
   too small. Lift both locales to a comfortable floor. */
.xwui-bar-site-footer .xwui-bar-site-footer__bottom-left,
.xwui-bar-site-footer .xwui-bar-site-footer__bottom-right,
.ethar-footer-legal-link {
  font-size: clamp(0.95rem, 0.92vw, 1.05rem) !important;
}
.ethar-footer-legal-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ethar-footer-legal-sep {
  opacity: 0.5;
  margin-inline: 0.4rem;
}

/* Brand block: logo at top, social row pushed to the bottom. */
.xwui-bar-site-footer .xwui-bar-site-footer__brand {
  display: flex;
  flex-direction: column;
  padding-inline-start: var(--ethar-footer-inset);
}
.xwui-bar-site-footer .xwui-bar-site-footer__brand-desc {
  max-width: none;
  margin-top: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ethar-footer-social {
  display: inline-flex;
  direction: ltr;
  gap: 1.1rem;
  margin-top: auto;
  align-self: flex-start;
}
.ethar-footer-social a {
  display: inline-flex;
  transition: opacity 0.15s ease;
}
.ethar-footer-social svg {
  width: 40px;
  height: 40px;
}
.ethar-footer-social a:hover {
  opacity: 0.8;
}

@media (max-width: 56rem) {
  .xwui-bar-site-footer {
    --ethar-footer-cols: 1fr;
    --ethar-footer-gap: clamp(1.75rem, 7vw, 2.75rem);
    --ethar-footer-inset: clamp(1.25rem, 6vw, 2rem);
    padding-inline: 0 !important;
    overflow: hidden;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__inner:not(.xwui-bar-site-footer__inner--bottom) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: var(--ethar-footer-gap) !important;
    column-gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    justify-items: center !important;
    text-align: center !important;
    padding: clamp(2.25rem, 9vw, 3.5rem) var(--ethar-footer-inset) clamp(1.75rem, 7vw, 2.5rem) !important;
    box-sizing: border-box;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__brand {
    padding-inline-start: 0 !important;
    min-width: 0;
    align-items: center !important;
    text-align: center !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__brand-desc {
    max-width: 100% !important;
    align-items: center !important;
    text-align: center !important;
    gap: clamp(1.5rem, 6vw, 2.25rem);
  }

  html[dir="rtl"] .xwui-bar-site-footer .xwui-bar-site-footer__brand-desc {
    align-items: center !important;
  }

  .xwui-bar-site-footer .ethar-logo {
    max-width: min(100%, 14rem);
    margin-inline: auto !important;
  }

  .xwui-bar-site-footer .ethar-logo .xwui-logo-svg-host,
  .xwui-bar-site-footer .ethar-logo .xwui-logo-img {
    max-width: 100%;
    height: auto;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__col {
    min-width: 0;
    justify-self: center !important;
    text-align: center !important;
  }

  html[dir="rtl"] .xwui-bar-site-footer .xwui-bar-site-footer__col {
    text-align: center !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__col-title {
    margin-bottom: 0.85rem !important;
    font-size: 1rem;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__col-list {
    align-items: center !important;
    justify-items: center !important;
    gap: 0.7rem !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__col-link {
    overflow-wrap: anywhere;
    text-align: center !important;
  }

  .xwui-bar-site-footer__col-link[href*="maps.google"] {
    margin-top: 0.75rem !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 1rem !important;
    column-gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 1.5rem var(--ethar-footer-inset) clamp(2rem, 8vw, 3rem) !important;
    box-sizing: border-box;
    text-align: center !important;
    justify-items: center !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__bottom-left,
  .xwui-bar-site-footer .xwui-bar-site-footer__bottom-right {
    grid-column: auto !important;
    padding-inline-start: 0 !important;
    min-width: 0;
    text-align: center !important;
    justify-self: center !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__bottom-right {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
    align-items: center;
    justify-content: center !important;
  }

  html[dir="rtl"] .xwui-bar-site-footer .xwui-bar-site-footer__bottom {
    text-align: center !important;
  }

  html[dir="rtl"] .xwui-bar-site-footer .xwui-bar-site-footer__bottom-right {
    justify-content: center !important;
  }

  .ethar-footer-social {
    margin-top: 0 !important;
    align-self: center !important;
    justify-content: center !important;
    gap: 0.85rem;
  }

  html[dir="rtl"] .ethar-footer-social {
    align-self: center !important;
  }

  .ethar-footer-social svg {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 36rem) {
  .xwui-bar-site-footer {
    --ethar-footer-inset: clamp(1rem, 5vw, 1.35rem);
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__inner:not(.xwui-bar-site-footer__inner--bottom) {
    padding-inline: var(--ethar-footer-inset) !important;
  }

  .xwui-bar-site-footer .xwui-bar-site-footer__col-link,
  .xwui-bar-site-footer .xwui-bar-site-footer__bottom {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .ethar-footer-social svg {
    width: 28px;
    height: 28px;
  }

  .ethar-footer-legal-sep {
    display: none;
  }

  .ethar-footer-legal-link {
    display: inline-flex;
    margin-inline-end: 0.8rem;
  }
}
