/* Das Grid-Setup für den Footer */
.grid-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 3 Spalten */
  grid-template-rows: auto auto; /* 2 Zeilen */
  align-items: center; /* Vertikal zentrieren */
  row-gap: 0px; /* Abstand zwischen Zeile 1 und 2 */
  border-top: 1px solid var(--bg); /* Deine goldene Linie */
  padding-top: 0px;
  margin-top: var(--footer-marging);
}

/* ========================================= */
/* AUSRICHTUNG DER 3 OBEREN FELDER           */
/* ========================================= */

/* Feld 1 ganz nach links */
.footer-social {
  justify-self: start; 
  display: flex;
  gap: 15px;
}
.footer-social a { color: var(--bg); text-decoration: none; }

/* Feld 2 exakt in die Mitte */
.footer-newsletter {
  justify-self: center;
}
.nl-inline { display: flex; align-items: center; gap: 10px; }
.nl-label { color: var(--bg); font-weight: bold; text-transform: uppercase; font-size: 1rem; }
.footer-newsletter input { background: transparent; border: 1px solid var(--bg); color: #fff; padding: 6px 10px; width: 180px; outline: none; }
.footer-newsletter button { background: var(--bg); color: #fff; border: none; padding: 7px 15px; cursor: pointer; font-weight: bold; }

/* Feld 3 ganz nach rechts */
.footer-legal {
  justify-self: end;
  display: flex;
  gap: 15px;
  font-size: 1rem;
}
.footer-legal a {
  color: var(--bg);
  text-decoration: none;
  font-size: 1rem;
}

/* ========================================= */
/* DAS UNTERE FELD (ÜBER DIE VOLLE BREITE)   */
/* ========================================= */
.footer-bottom {
  grid-column: 1 / -1; /* Sagt dem Feld: "Gehe von Spalte 1 bis zur allerletzten" */
  justify-self: center; /* Zentriert den Text darin */
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1rem;
  color: #888;
}
.footer-bottom a { color: var(--bg); text-decoration: none; }
.footer-bottom p {
  font-size: 1rem;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}
/* ========================================= */
/* MOBILE ANSICHT (Einfach untereinander)    */
/* ========================================= */
@media (max-width: 850px) {
  .grid-footer {
    grid-template-columns: 1fr;
    row-gap: 1rem; /* Abstand zwischen den Elementen im Footer reduziert */
    justify-items: center; /* Zentriert alles */
    padding: 1rem 1rem; /* Padding des gesamten Footers reduziert */
  }
  
  /* Reihenfolge anpassen: Newsletter zuerst, dann Social, dann Legal */
  .footer-newsletter { 
    order: 1; 
    width: 100%;
  }

  .footer-newsletter form {
    min-width: 0;
    width: 100%;
  }
  .footer-bottom { /* Datenschutztext direkt nach dem Newsletter-Formular */
    order: 2;
    margin-top: 0; /* Abstand wird durch row-gap des grid-footer geregelt */
  }
  .footer-legal { 
    order: 3; /* Legal-Links nach dem Datenschutztext */
    justify-self: center; 
    flex-direction: column; /* Links untereinander für bessere Klickbarkeit */
    align-items: center;
    gap: 10px;
  }
  .footer-social { 
    order: 4; /* Social-Media-Links ganz am Ende */
    justify-self: center; 
  }

  .nl-inline {
    flex-direction: column;
    gap: 15px;
  }

  .footer-newsletter input {
    width: 100%;
    max-width: 300px; /* Verhindert, dass es auf Tablets zu breit wird */
    text-align: center;
  }

  .footer-newsletter button {
    width: 100%;
    max-width: 300px;
  }

}