footer {
  position: relative;
  background: linear-gradient(0deg,
      rgba(255, 255, 240, 1) 0%,
      rgba(255, 255, 240, 1) 70%,
      rgba(255, 255, 240, 0) 100%);
  padding: 245px 0 140px;
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 50vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 2;
  /* ⚠️ wichtig: KEINE border-top hier */
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.footer-links a {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 25px;
  text-decoration: none;
  color: #000;
  transition: opacity 0.3s ease;
  margin-top: 50px;
  display: flex;
  flex-wrap: wrap;
  /* falls sie auf kleinen Screens umbrechen sollen */
  justify-content: center;
  /* zentriert sie horizontal */
  gap: 32px;
  /* erhöht den Abstand zwischen den Links */
}

.footer-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 50px;
}

.footer-icons a {
  transition: opacity 0.3s ease;
}

.footer-icons svg {
  cursor: pointer;
  fill: #000;
  transition: opacity 0.3s ease;
}

.footer-icons svg:hover {
  opacity: 0.7;
}

a:hover {
  opacity: 0.7;
}

/* Newsletter */

.newsletter {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.newsletter h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 28px;
  text-align: left;
  margin-bottom: 0;
}

.input-wrapper {
  position: relative;
  width: 100%;
  /* oder 100%, je nach Layout */
}

.input-wrapper input {
  padding: 10px 16px;
  background-color: rgba(255, 255, 240, 0.2);
  border: 1px solid #000;
  border-radius: 10px;
  box-shadow: inset 0 4px 20px 0 rgba(0, 0, 0, 0.25);
  box-shadow: inset -1 -1px 4px 0 rgba(0, 0, 0, 0.15);
  box-shadow: inset 1 1px 20px 0 rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "Public Sans", sans-serif;
  font-size: 16px;
  width: 300px;
  height: 45px;
}

.input-wrapper button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  cursor: pointer;
  transition: 0.2s;
  background-color: rgba(255, 255, 240, 0.2);
  padding: 6px 15px;
  border: 1px solid #000;
  border-radius: 180px;
  box-shadow: inset 0 4px 20px 0 rgba(0, 0, 0, 0.25);
  box-shadow: inset -1 -1px 4px 0 rgba(0, 0, 0, 0.15);
  box-shadow: inset 1 1px 20px 0 rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  color: #000;
  height: 100;
}

.input-wrapper button:hover {
  background-color: rgba(0, 0, 0, 0.15);
}

/* ----------------------------------
MOBILE OPTIMIZATION
---------------------------------- */

@media (max-width: 768px) {
  footer {
    padding: 100px 0 80px;
    /* Reduce padding */
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .footer-links a {
    margin-top: 15px;
    font-size: 22px;
  }

  .newsletter {
    width: 90%;
  }

  .input-wrapper input {
    width: 100%;
    /* Full width on mobile */
    box-sizing: border-box;
    /* Ensure padding doesn't overflow */
  }

  .footer-icons {
    margin-top: 30px;
  }
}