/*
  Zweck: Definiert globale Layout-Strukturen (Header, Footer, Hauptbereiche, Grids, Container).
*/

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header,
.site-footer {
  width: 100%;
  padding-block: 1rem;
}

.site-main {
  width: 100%;
  min-height: 60vh;
}

.grid {
  display: grid;
  gap: 1rem;
}

/* =================================
   Header Layout (Option A)
================================= */
.site-header {
  color: #111111;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
/* Der Flex-Header MUSS im Container liegen */
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  position: relative;
  z-index: 2;
}

/* Fallback fuer Seiten mit einfachem Header-Markup (logo + ul) */
.site-header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.site-header .logo {
  text-decoration: none;
  color: #111111;
  font-weight: 700;
}

.site-header .main-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .main-nav ul a {
  text-decoration: none;
  color: #414141;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
}

.site-header .main-nav ul a:hover,
.site-header .main-nav ul a:focus-visible {
  color: #111111;
  background: #f2f2f2;
  box-shadow: inset 0 0 0 1px #d8d8d8;
  outline: none;
}

.site-header .main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Logo "mehr nach links": nur im Header weniger Padding */
.site-header .container {
  padding-inline: 0.25rem; /* noch näher links */
}

/* =================================
  Footer Layout
================================= */
.site-footer {
  color: #1f1f1f;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
}

.site-footer .container {
  padding-block: 1.1rem 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem 1.4rem;
}

.footer-title {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #111111;
}

.footer-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #4a4a4a;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.footer-link {
  font-size: 0.88rem;
  text-decoration: none;
  color: #3a3a3a;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #3665f3;
  text-decoration: underline;
  outline: none;
}

.footer-bottom {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ededed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
  flex-wrap: wrap;
}

.footer-meta {
  margin: 0;
  font-size: 0.82rem;
  color: #666666;
}

.footer-meta-links {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: nowrap;
}

.footer-meta-link {
  font-size: 0.82rem;
  text-decoration: none;
  color: #666666;
}

.footer-meta-link:hover,
.footer-meta-link:focus-visible {
  color: #3665f3;
  text-decoration: underline;
  outline: none;
}

/* =================================
   Responsive
================================= */

@media (max-width: 520px) {
  .site-header .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-header .main-nav {
    flex: 0 0 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    align-items: flex-start;
  }
}
.site-header::before {
  display: none;
}