/* =========================================================
   Nuni — Footer widget
   Ports Hero v3 / Om Nuni / Sheasmör shared footer design.
   BEM scope: .nuni-footer (matches the page HTML directly).

   Designed for Elementor Theme Builder footer templates —
   drop the widget into the footer section, set the section
   to "Full Width" content width, and it spans the viewport
   while keeping the inner container capped at the editor-
   chosen max-width.
   ========================================================= */

.nuni-footer {
  --nuni-footer-bg:        #F4ECDD;
  --nuni-footer-ink:       var(--e-global-color-text,    #2A1F14);
  --nuni-footer-ink-2:     #4A3C2C;
  --nuni-footer-muted:     var(--e-global-color-accent,  #6B5B47);
  --nuni-footer-page:      #FBF7EE;
  --nuni-footer-sand-deep: var(--e-global-color-secondary, #8A765C);
  --nuni-footer-line:      rgba(28, 20, 12, 0.12);
  --nuni-footer-r-pill:    999px;
  --nuni-footer-r-sm:      6px;

  background: var(--nuni-footer-bg);
  border-top: 1px solid var(--nuni-footer-line);
  padding: clamp(56px, 7vw, 80px) clamp(20px, 5vw, 56px) 40px;
  color: var(--nuni-footer-ink);
  font-family: 'Gilroy', 'Inter', system-ui, sans-serif;

  /* Full-bleed background: paints the bg color out to the viewport
     edges via a giant box-shadow, then clip-path allows the shadow
     to escape the element's normal clipping bounds. Works regardless
     of Elementor container max-width or parent overflow: hidden. */
  position: relative;
  box-shadow: 0 0 0 100vmax var(--nuni-footer-bg);
  clip-path: inset(0 -100vmax);
  overflow-x: clip;
}

.nuni-footer,
.nuni-footer * {
  box-sizing: border-box;
}

/* Defeat any Elementor wrapper margin so the footer sits flush to
   the section above. The widget element itself never adds margin. */
.elementor-widget.elementor-widget-nuni-footer {
  margin: 0 !important;
  padding: 0 !important;
}
.elementor-widget-nuni-footer > .elementor-widget-container { padding: 0; }

/* Neutralize the entire Elementor wrapper stack around this widget
   (section / container / column / e-con / e-con-inner). Without this
   the section's own padding-top creates a visible gap between the
   footer and whatever's above, and its max-width keeps the section
   background from reaching the viewport edges — both visible when the
   page above uses a different background color.

   Uses :has() so only wrappers that actually contain our footer are
   affected — other sections on the page keep their own spacing. */
.elementor-section:has(> .elementor-container > .elementor-column .elementor-widget-nuni-footer),
.elementor-section:has(.elementor-widget-nuni-footer) > .elementor-container,
.elementor-section:has(.elementor-widget-nuni-footer) .elementor-column,
.elementor-section:has(.elementor-widget-nuni-footer) .elementor-widget-wrap,
.e-con:has(.elementor-widget-nuni-footer),
.e-con:has(.elementor-widget-nuni-footer) > .e-con-inner {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  background: transparent !important;
}

.nuni-footer__inner {
  width: 100%;
  max-width: min(1240px, 100%);
  margin: 0 auto;
}

/* ===== Top row ===== */
.nuni-footer__top {
  display: grid;
  /* Default split: brand wider, link cols tighter, newsletter wider.
     Editor's layout select can swap this template. */
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.nuni-footer__top > * {
  min-width: 0;
}

.nuni-footer__brand-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.nuni-footer__logo {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}
.nuni-footer__logo img {
  height: 52px;
  width: auto;
  display: block;
}

.nuni-footer__tagline {
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--nuni-footer-ink-2);
  margin: 0;
  max-width: 36ch;
}

.nuni-footer__social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.nuni-footer__social a {
  color: var(--nuni-footer-ink-2);
  transition: color .18s ease, transform .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
}
.nuni-footer__social a:hover,
.nuni-footer__social a:focus,
.nuni-footer__social a:focus-visible,
.nuni-footer__social a:active {
  color: var(--nuni-footer-sand-deep) !important;
  outline: 0 !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}
.nuni-footer__social svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ===== Link columns ===== */
.nuni-footer__col h4 {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nuni-footer-ink);
  margin: 0 0 24px;
  overflow-wrap: anywhere;
}
.nuni-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nuni-footer__col ul li { margin: 0; padding: 0; }
.nuni-footer__col ul a,
.nuni-footer__col ul a:link,
.nuni-footer__col ul a:visited {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--nuni-footer-ink-2);
  text-decoration: none;
  transition: opacity .18s ease, color .18s ease;
}
.nuni-footer__col ul a:hover,
.nuni-footer__col ul a:focus,
.nuni-footer__col ul a:focus-visible,
.nuni-footer__col ul a:active {
  opacity: 0.7;
  color: var(--nuni-footer-ink-2) !important;
  outline: 0 !important;
  text-decoration: none !important;
}
.nuni-footer__col ul span {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--nuni-footer-ink-2);
}

/* ===== Newsletter column ===== */
.nuni-footer__newsletter p {
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--nuni-footer-ink-2);
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.nuni-footer__newsletter form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.nuni-footer__newsletter,
.nuni-footer__col--newsletter {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.nuni-footer__newsletter input[type="email"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 18px;
  background: var(--nuni-footer-page);
  border: 1px solid var(--nuni-footer-line);
  border-radius: var(--nuni-footer-r-pill);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--nuni-footer-ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.nuni-footer__newsletter input[type="email"]::placeholder {
  color: var(--nuni-footer-muted);
}
.nuni-footer__newsletter input[type="email"]:focus {
  border-color: var(--nuni-footer-sand-deep);
  box-shadow: 0 0 0 4px rgba(138, 118, 92, 0.12);
}
.nuni-footer__newsletter button,
.nuni-footer__newsletter button:link,
.nuni-footer__newsletter button:visited {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 18px;
  background: var(--nuni-footer-ink);
  border: 1px solid var(--nuni-footer-ink);
  border-radius: var(--nuni-footer-r-pill);
  color: var(--nuni-footer-page);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.nuni-footer__newsletter button:hover,
.nuni-footer__newsletter button:focus,
.nuni-footer__newsletter button:focus-visible,
.nuni-footer__newsletter button:active {
  background: var(--nuni-footer-sand-deep) !important;
  border-color: var(--nuni-footer-sand-deep) !important;
  color: var(--nuni-footer-page) !important;
  outline: 0 !important;
}
.nuni-footer__newsletter button:disabled {
  opacity: 0.7;
  cursor: progress;
}
.nuni-footer__newsletter button.is-done {
  background: #2F7D5B !important;
  border-color: #2F7D5B !important;
}
.nuni-footer__newsletter form.has-error input[type="email"] {
  border-color: #C8412C;
  box-shadow: 0 0 0 4px rgba(200, 65, 44, 0.12);
}

.nuni-footer__nl-msg {
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--nuni-footer-ink-2);
  margin: 6px 0 0;
  min-height: 1.2em;
}
.nuni-footer__nl-msg.is-error   { color: #C8412C; }
.nuni-footer__nl-msg.is-success { color: #2F7D5B; }

/* Honeypot (shared selector used by Newsletter widget JS) */
.nuni-newsletter__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== Bottom bar ===== */
.nuni-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--nuni-footer-line);
  padding-top: 32px;
  flex-wrap: wrap;
  gap: 20px;
}
.nuni-footer__legal {
  font-family: inherit;
  font-size: 12.5px;
  color: var(--nuni-footer-muted);
  margin: 0;
  line-height: 1.6;
}
.nuni-footer__legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nuni-footer__legal a:hover { color: var(--nuni-footer-ink-2); }

.nuni-footer__pay {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--nuni-footer-muted);
}
.nuni-footer__pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nuni-footer__pay-row img {
  height: 18px;
  width: auto;
  display: block;
}
.nuni-footer__pay-pill {
  background: var(--nuni-footer-page);
  border: 1px solid var(--nuni-footer-line);
  border-radius: var(--nuni-footer-r-sm);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--nuni-footer-ink-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nuni-footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 40px;
  }
}

@media (max-width: 700px) {
  .nuni-footer { padding: clamp(40px, 10vw, 56px) 20px 32px; }
  .nuni-footer__top { grid-template-columns: minmax(0, 1fr) !important; gap: 36px; }
  .nuni-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 24px;
  }
  .nuni-footer__pay { flex-wrap: wrap; }
}
