/* ==========================
   Footer
   ========================== */
footer {
  background-color: var(--navy-blue);
  width: 100%;

  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #c9d3e8;
  text-align: left;
}

.footer-top {
  width: 100%;
  padding: 48px var(--seiten-rand) 40px;

  display: grid;
  grid-template-columns: minmax(200px, 300px) repeat(4, minmax(150px, 1fr));
  align-items: start;
  gap: 40px 48px;
}

.footer-item h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-item ul {
  list-style: none;
  font-size: 0.95rem;
}

.footer-item ul li {
  margin-bottom: 8px;
}

.footer-item ul li:last-child {
  margin-bottom: 0;
}

/* Logo-Spalte */
.footer-logo-link {
  display: block;
  width: 100%;
  max-width: 300px;
}

.footer-logo-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Links */
footer a:link,
footer a:visited {
  color: #c9d3e8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-item a:hover,
.footer-item a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Rechtliches */
.legal {
  background-color: #10182c;
  width: 100%;
  padding: 14px var(--seiten-rand);

  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 12px;

  font-size: 0.85rem;
}

.legal a:link,
.legal a:visited {
  color: #8a93ab;
}

.legal a:hover,
.legal a:focus-visible {
  color: #fff;
}

.legal a:not(:last-child)::after {
  content: "|";
  margin-left: 12px;
  color: rgba(255, 255, 255, 0.2);
}

/* ==========================
   Tablet / iPad - 3er und 2er Zeile
   ========================== */
@media (min-width: 641px) and (max-width: 1024px) {
  .footer-top {
    grid-template-columns: repeat(6, 1fr);
    padding: 40px var(--seiten-rand) 32px;
    gap: 36px 32px;
  }

  /* jedes Item ueber 2 der 6 Spalten -> 3 pro Zeile */
  .footer-item {
    grid-column: span 2;
  }

  /* zweite Zeile (2 Items) um eine halbe Spalte einruecken -> mittig */
  .footer-item:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .legal {
    padding: 14px var(--seiten-rand);
  }
}

/* ==========================
   Mobile - alles untereinander, zentriert
   ========================== */
@media (max-width: 640px) {
  footer {
    text-align: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 32px var(--seiten-rand) 28px;
    gap: 28px;
  }

  .footer-item {
    width: 100%;
    max-width: 320px;
  }

  .footer-logo-link {
    margin: 0 auto 4px;
    max-width: 180px;
  }

  .legal {
    justify-content: center;
    padding: 14px var(--seiten-rand);
    text-align: center;
  }
}