/**
 * Modern footer — CN-style layout
 * Logo + tagline | Footer nav (expandable on mobile) | Subscribe
 * Disclaimer | Copyright + Privacy / Terms
 */

.mf {
  --mf-bg: #0d2137;
  --mf-bg-top: #0f2842;
  --mf-text: #e2e8f0;
  --mf-text-muted: #94a3b8;
  --mf-link: #b8d4ee;
  --mf-link-hover: #ffffff;
  --mf-border: rgba(255, 255, 255, 0.08);
  --mf-input-bg: rgba(255, 255, 255, 0.08);
  --mf-input-border: rgba(255, 255, 255, 0.2);
  --mf-btn-bg: #07457e;
  --mf-btn-hover: #084f91;
  --mf-disclaimer-bg: rgba(0, 0, 0, 0.2);
}

.mf {
  background: var(--mf-bg);
  color: var(--mf-text);
  font-size: 0.9375rem;
  margin-top: auto;
}

.mf__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Top: brand | nav | subscribe ---- */
.mf__top {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--mf-border);
}

@media (min-width: 768px) {
  .mf__top {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    align-items: center;
    gap: 2.5rem;
  }
}

/* @media (min-width: 992px) {
  .mf__top {
    grid-template-columns: minmax(200px, 280px) 1fr minmax(240px, 300px);
    padding: 3rem 0 2.5rem;
  }
} */

/* ---- Brand (logo + tagline) ---- */
.mf__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mf__logo-link {
  display: inline-block;
  max-width: 160px;
}

.mf__logo-img {
  display: block;
  max-height: 40px;
  max-height: 56px;
  width: auto;
  object-fit: contain;
  /* filter: brightness(0) invert(1); */
}

.mf__tagline {
  margin: 0;
  color: var(--mf-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 260px;
}

/* ---- Footer nav ---- */
.mf__nav {
  margin: 0;
}

.mf__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-content: space-around;
}

.mf_ps_link {
  text-align: right;
  list-style: none;
}

@media (max-width: 767px) {
  .mf__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .mf_ps_link {
    text-align: left;
    list-style: none;
  }
}

.mf__nav-list>li {
  margin: 0;
}

.mf__link {
  color: var(--mf-link);
  text-decoration: none;
  padding: 0.25rem 0;
  display: inline-block;
  transition: color 0.2s ease;
}

.mf__link:hover {
  color: var(--mf-link-hover);
}

/* Expandable items (mobile: collapse) */
.mf__nav-item--expandable {
  position: relative;
}

@media (min-width: 768px) {
  .mf__nav-item--expandable .mf__sublist {
    display: none;
  }

  .mf__nav-item--expandable .mf__expand-btn::after {
    content: none;
  }

  .mf__nav-item--expandable:hover .mf__sublist {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    padding: 0.5rem 0;
    min-width: 160px;
    background: var(--mf-bg-top);
    border: 1px solid var(--mf-border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    list-style: none;
    z-index: 10;
  }

  .mf__nav-item--expandable .mf__sublink {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--mf-link);
    text-decoration: none;
    font-size: 0.875rem;
  }

  .mf__nav-item--expandable .mf__sublink:hover {
    color: var(--mf-link-hover);
    background: rgba(255, 255, 255, 0.06);
  }
}

.mf__expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--mf-link);
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}

@media (min-width: 768px) {
  .mf__expand-btn {
    width: auto;
    justify-content: flex-start;
  }
}

.mf__expand-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.mf__expand-btn[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.mf__expand-btn:hover {
  color: var(--mf-link-hover);
}

.mf__sublist {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0 1rem;
  border-left: 1px solid var(--mf-border);
  margin-left: 0.5rem;
}

.mf__sublist.collapse:not(.show) {
  display: none;
}

.mf__sublist.collapse.show {
  display: block;
}

.mf__sublink {
  display: block;
  padding: 0.35rem 0;
  color: var(--mf-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.mf__sublink:hover {
  color: var(--mf-link-hover);
}

/* ---- Subscribe ---- */
.mf__subscribe {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mf__subscribe-label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mf-text);
}

.mf__subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 320px;
}

.mf__subscribe-input {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--mf-input-border);
  border-radius: 6px;
  background: var(--mf-input-bg);
  color: var(--mf-text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mf__subscribe-input::placeholder {
  color: var(--mf-text-muted);
}

.mf__subscribe-input:focus {
  border-color: var(--mf-link);
  background: rgba(255, 255, 255, 0.12);
}

.mf__subscribe-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--mf-btn-bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.mf__subscribe-btn:hover {
  background: var(--mf-btn-hover);
}

/* ---- Disclaimer ---- */
.mf__disclaimer {
  padding: 1rem 0;
  background: var(--mf-disclaimer-bg);
}

.mf__disclaimer p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--mf-text-muted);
  max-width: 900px;
  max-width: 1280px;
}

/* ---- Bottom: copyright + legal ---- */
.mf__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.5rem;
}

.mf__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mf-text-muted);
}

.mf__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.mf__legal-link {
  color: var(--mf-text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
  padding: 0.25rem 0;
}

.mf__legal-link:hover {
  color: var(--mf-link-hover);
}