/* Keep the footer in normal flow so longer consent and validation messages fit. */
footer .footer-menu.footer-menu--responsive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
  gap: 36px 56px;
  max-width: 1120px;
  min-height: 0;
}

footer .footer-menu--responsive .menu-container,
footer .footer-newsletter-column {
  min-width: 0;
}

footer .footer-menu--responsive .menu-container > .menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

footer .footer-menu--responsive .menu-container .menu li {
  width: auto;
  margin-left: 0;
}

footer .footer-menu--responsive .menu-container > .menu > li {
  margin: 0;
}

footer .footer-menu--responsive .menu-container .menu .menu {
  display: block;
}

footer .footer-menu--responsive .menu-container > .menu > li > div > .menu {
  margin-top: 6px;
}

footer .footer-menu--responsive .menu-container .menu .menu > li.hidden > .sub-menu > li:first-child {
  margin-top: 0;
}

footer .footer-menu--responsive .menu-container .menu .menu a {
  font-family: "metaliregular", "Roboto Condensed", sans-serif;
  font-weight: 400;
}

footer .footer-newsletter-column .newsletter-wrapper {
  position: static;
  width: 100%;
  margin: 0;
  z-index: auto;
}

footer .footer-newsletter-column .newsletter-wrapper .title {
  font-size: 28px;
  line-height: 1.2;
}

footer .footer-newsletter-column .newsletter-wrapper .subtitle {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.4;
}

footer .footer-newsletter-column .wpcf7 {
  width: 100%;
  margin: 0;
}

footer .footer-newsletter-column .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  text-align: right;
}

footer .footer-newsletter-column .wpcf7-form p {
  margin: 0;
  line-height: 1.5;
}

footer .footer-newsletter-column .wpcf7-form-control-wrap {
  display: block;
}

/* CF7 inserts br elements around multiline field labels. The block wrapper
   already puts the input on its own line, so those breaks add empty rows. */
footer .footer-newsletter-column #field_1_1,
footer .footer-newsletter-column #field_2_2 {
  margin: 0;
}

footer .footer-newsletter-column #field_1_1 label,
footer .footer-newsletter-column #field_2_2 label {
  display: block;
  line-height: 1;
}

footer .footer-newsletter-column #field_1_1 label > br,
footer .footer-newsletter-column #field_2_2 label > br {
  display: none;
}

footer .footer-newsletter-column input[type="text"],
footer .footer-newsletter-column input[type="email"] {
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 42px !important;
  margin: 6px 0 0 !important;
  padding: 8px 12px;
  border: 1px solid #b9c5cb;
  border-radius: 4px;
  background: #fff;
  color: #273d47;
  font-size: 17px;
}

footer .footer-newsletter-column .wpcf7-list-item {
  display: block;
  margin: 0 !important;
}

footer .footer-newsletter-column .wpcf7-list-item > label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

footer .footer-newsletter-column input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: #1f5168;
}

footer .footer-newsletter-column .wpcf7-list-item-label {
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
}

footer .footer-newsletter-column .wpcf7-form a {
  color: #1f5168;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer .footer-newsletter-column input[type="submit"] {
  width: 100%;
  height: 44px;
  margin: 0;
  border-radius: 4px;
  font-size: 19px;
  transition: background-color 0.2s ease;
}

footer .footer-newsletter-column input[type="submit"]:hover:not(:disabled),
footer .footer-newsletter-column input[type="submit"]:focus-visible:not(:disabled) {
  background: #087b89;
  color: #fff;
}

footer .footer-newsletter-column .wpcf7-spinner {
  display: none;
}

footer .footer-newsletter-column form.submitting .wpcf7-spinner {
  display: block;
  margin: 8px auto 0;
}

footer .footer-newsletter-column .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
}

footer .footer-newsletter-column .wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
}

footer .footer-menu .footer-newsletter-column .logos {
  position: static;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e2e8eb;
}

footer .footer-menu .footer-newsletter-column .logos > * {
  min-width: 0;
  justify-self: center;
}

footer .footer-menu .footer-newsletter-column .logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
}

footer .footer-menu .footer-newsletter-column .logos img,
footer .footer-menu .footer-newsletter-column .logos a img {
  position: static;
  width: 130px;
  height: auto;
  max-width: 100%;
  max-height: 52px;
  margin: 0;
  object-fit: contain;
}

footer span.footer-policy-links {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
}

footer span.footer-policy-links a {
  display: inline-block;
  padding: 4px 14px;
  color: #1f5168;
  font-size: 18px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}

footer span.footer-policy-links a + a {
  border-inline-start: 1px solid #bdcbd2;
}

footer span.footer-policy-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer span.footer-policy-links a:focus-visible {
  outline: 2px solid #1f5168;
  outline-offset: 2px;
}

footer .footer-newsletter-column input:focus-visible,
footer .footer-newsletter-column a:focus-visible {
  outline: 2px solid #1f5168;
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  footer .footer-menu.footer-menu--responsive {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  footer .footer-newsletter-column {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  footer .footer-menu.footer-menu--responsive > .donation-button {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  footer .footer-menu.footer-menu--responsive > .footer-policy-links--mobile {
    margin: 0;
  }

  /* Desktop markup can also appear in a narrow window (wp_is_mobile is UA based). */
  footer .panel {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
  }

  footer .panel .donation-button {
    width: 100%;
    max-width: 440px;
    margin: 0;
  }

  footer .panel .footer-policy-links {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  footer .panel .what {
    display: none;
  }

  footer .credit {
    position: static;
    margin-top: 24px;
    text-align: center;
  }

  footer .line {
    display: none;
  }
}

@media (max-width: 480px) {
  footer .footer-menu--responsive .menu-container > .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  footer .footer-menu--responsive .menu-container h2 {
    font-size: 19px;
    line-height: 1.3;
  }
}

