/* =====================================================================
   W.I. Freight — newsletter band + site footer
   Scoped under .wnl and .wft so the old footer CSS can't clash.
   ===================================================================== */

.wnl, .wft {
  --wf-primary: var(--color-primary, #2e3192);
  --wf-accent: var(--color-secondary, #be0119);
  --wf-deep: #15174a;
  --wf-font: "Grotesk", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --wf-ease: cubic-bezier(.2, .8, .2, 1);
}
.wnl *, .wft * { box-sizing: border-box; }
.wnl *:not(.bi), .wft *:not(.bi) { font-family: var(--wf-font); }
.wnl a, .wft a { text-decoration: none; }

.wnl-container, .wft-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Newsletter band ---------- */
#newsletter.wnl {
  position: relative;
  z-index: 1;
  padding: 4rem 0 0;
  margin-bottom: -4.5rem; /* the card overlaps the top of the footer */
  background: linear-gradient(to bottom, #f5f6fb 0, #f5f6fb calc(100% - 4.5rem), transparent calc(100% - 4.5rem));
}
.wnl-card {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px);
  align-items: center;
  gap: 2rem;
  padding: 2.25rem 2.5rem;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(500px 220px at 100% 0, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(420px 220px at 0 100%, rgba(190, 1, 25, .45), transparent 65%),
    linear-gradient(135deg, var(--wf-primary), #1d1f6b);
  box-shadow: 0 30px 60px -30px rgba(20, 22, 58, .6);
}
.wnl-text { display: flex; align-items: center; gap: 1.1rem; }
.wnl-icon {
  flex: 0 0 60px;
  height: 60px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  font-size: 1.6rem;
}
.wnl h2 {
  margin: 0 0 .3rem;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}
.wnl p { margin: 0; color: rgba(255, 255, 255, .8); line-height: 1.5; }

.wnl-form {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
}
.wnl-form > .bi { margin: 0 .2rem 0 1rem; color: #8a8ea8; font-size: 1.1rem; }
.wnl-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 .75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #14163a;
  font-size: 1rem;
}
.wnl-form input::placeholder { color: #9a9db3; }
/* "#newsletter.wnl" beats the old #newsletter button/input styles in main.php */
#newsletter.wnl .wnl-form input { border-radius: 0; box-shadow: none; }
#newsletter.wnl .wnl-form button {
  font-family: var(--wf-font) !important;
  display: inline-flex; align-items: center; gap: .5rem;
  height: 100%;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--wf-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 10px 20px -10px var(--wf-accent);
}
#newsletter.wnl .wnl-form button:hover { transform: translateY(-1px); border: 0; background: var(--wf-accent); }
.wnl-form:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.wnl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Footer ---------- */
/* "footer.wft ... !important" beats the old footer rule in main.php (which also sets z-index: -999) */
footer.wft {
  position: relative;
  z-index: 0 !important;
  color: rgba(255, 255, 255, .72);
  background:
    radial-gradient(700px 300px at 90% 0, rgba(46, 49, 146, .55), transparent 70%),
    var(--wf-deep) !important;
}
.wnl + .wft, .wnl ~ .wft { padding-top: 4.5rem; }
.wft-main { padding: 4rem 0 3rem; }
.wft-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.25fr;
  gap: 2.5rem;
}

.wft-logo { display: inline-flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.wft-logo img { width: 54px; height: auto; display: block; }
.wft-logo strong { display: block; font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.1; }
.wft-logo small { display: block; font-size: .85rem; color: #ff5a6e; font-style: italic; }
.wft-brand p { margin: 0 0 1.4rem; max-width: 22rem; line-height: 1.65; font-size: .95rem; }

.wft-social { display: flex; gap: .6rem; }
.wft-social a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.1rem;
  transition: background .2s, transform .2s var(--wf-ease);
}
.wft-social a:hover { background: var(--wf-accent); color: #fff; transform: translateY(-3px); }

.wft h3 {
  position: relative;
  margin: .4rem 0 1.25rem;
  padding-bottom: .75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.wft h3::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 28px; height: 3px;
  border-radius: 3px;
  background: var(--wf-accent);
}
.wft ul { list-style: none; margin: 0; padding: 0; }
.wft-col li { margin: 0 0 .7rem; }
.wft-col a {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, .72);
  font-size: .95rem;
  line-height: 1.4;
  transition: color .2s, transform .2s var(--wf-ease);
}
.wft-col a:hover { color: #fff; transform: translateX(4px); }

.wft-contact li { display: flex; align-items: flex-start; gap: .75rem; }
.wft-contact .bi {
  flex: 0 0 34px;
  height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: .95rem;
}
.wft-contact a { padding-top: .35rem; }
.wft-contact a:hover { transform: none; }

.wft a:focus-visible, .wft button:focus-visible, .wnl button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .55);
  outline-offset: 3px;
}

/* Bottom bar */
.wft-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.wft-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.wft-bottom p { margin: 0; font-size: .88rem; color: rgba(255, 255, 255, .6); }
.wft-bottom strong { color: #fff; font-weight: 600; }
.wft-credits a { color: rgba(255, 255, 255, .85); }
.wft-credits a:hover { color: #fff; text-decoration: underline; }
.wft-top {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  margin-left: 1rem;
  border: 0;
  border-radius: 50%;
  background: var(--wf-accent);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform .2s var(--wf-ease);
}
.wft-top:hover { transform: translateY(-3px); }
.wft-credits { margin-left: auto !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .wnl-card { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem; }
  .wft-grid { grid-template-columns: 1fr 1fr; gap: 2.25rem 2rem; }
  .wft-brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
  .wnl-container, .wft-container { padding: 0 16px; }
  #newsletter.wnl { padding-top: 2.5rem; }
  .wnl-card { padding: 1.6rem 1.25rem; border-radius: 22px; }
  .wnl-text { align-items: flex-start; }
  .wnl-icon { flex-basis: 48px; height: 48px; font-size: 1.3rem; border-radius: 14px; }
  .wnl-form { height: 56px; }
  .wnl-form > .bi { display: none; }
  #newsletter.wnl .wnl-form button { padding: 0 1rem; }
  .wnl-form button span { display: none; }
  .wnl-form button .bi { font-size: 1.15rem; }

  .wft-main { padding: 3rem 0 2rem; }
  .wft-grid { gap: 2rem 1.25rem; }
  .wft-contact { grid-column: 1 / -1; }
  .wft-bottom-inner { flex-wrap: wrap; justify-content: center; text-align: center; padding-top: 1.9rem; padding-bottom: 1.25rem; }
  .wft-bottom p { width: 100%; }
  .wft-credits { margin-left: 0 !important; }
  .wft-top { position: absolute; right: 16px; top: -21px; margin: 0; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .5); }
  .wft-bottom { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  .wnl *, .wft * { transition-duration: .01ms !important; }
}

/* ---------- Beat old global footer rules (Sarabun font, centred text) ---------- */
footer.wft p, footer.wft div p { font-family: var(--wf-font) !important; color: inherit; }
footer.wft, footer.wft * { text-align: left; }
footer.wft .wft-bottom p { color: rgba(255, 255, 255, .6); }
@media (max-width: 575px) {
  footer.wft .wft-bottom-inner, footer.wft .wft-bottom p { text-align: center; }
}
