/* === LAYOUT.CSS — Page Shell, Grid, Header/Footer-Struktur === */

/* Outer wrapper: centers page and adds shadow */
.page-wrapper {
  max-width: var(--max-width);
  margin: 1.5rem auto;
  border-radius: var(--radius-page);
  box-shadow: 3px 3px 8px 6px var(--color-shadow);
  overflow: hidden;
  background: var(--color-bg-white);
}

/* ── HEADER ── */
.site-header {
  background: var(--color-bg-white);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 100px;
}

.header__logo {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

.header__logo img {
  max-height: 70px;
  width: auto;
}

.header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
}

/* ── NAVIGATION ── */
.site-nav {
  background: var(--color-primary);
}

.site-nav__list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav__item {
  flex: 1;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.site-nav__item:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── CONTENT AREA ── */
.content {
  display: grid;
  grid-template-columns: 60fr 40fr;
  min-height: 300px;
  background: var(--color-bg);
}

.content--full {
  grid-template-columns: 1fr;
}

.content__main {
  background: var(--color-bg-white);
  padding: 1.5rem 2rem;
}

.content__sidebar {
  padding: 1.5rem 1rem;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.content__sidebar img {
  border-radius: var(--radius-card);
  max-width: 100%;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--color-primary);
}

.footer__inner {
  display: grid;
  grid-template-columns: 60fr 40fr;
}

.footer__main {
  background: var(--color-accent);
  padding: 1.25rem 2rem;
  border-bottom-left-radius: var(--radius-page);
  transition: background 0.3s ease;
}

.footer__main h2 {
  color: var(--color-bg-white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer__main p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer__cta {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.footer__cta:hover {
  background: #3d6118;
  text-decoration: none;
  color: #fff;
}

.footer__main ul {
  color: var(--color-bg-white);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer__main p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
}

.footer__sidebar {
  padding: 1.25rem 1rem;
  color: #ddd;
  font-size: 0.85rem;
}

.footer__sidebar h3 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer__sidebar p {
  margin-bottom: 0.4rem;
  color: #ccc;
}

.footer__sidebar a {
  color: var(--color-accent);
}

.footer__sidebar a:hover {
  color: #fff;
}

.footer__sidebar nav {
  margin-top: 0.75rem;
}

.footer__sidebar nav a {
  color: #bbb;
  font-size: 0.8rem;
}

.footer__sidebar nav a:hover {
  color: #fff;
}

/* ── FOOTER DARK MODE — Farben einfrieren ── */
[data-theme="dark"] .site-header          { background: #383838; }
[data-theme="dark"] .logo--light          { display: none; }
.logo--dark                               { display: none; }
[data-theme="dark"] .logo--dark           { display: block; }
[data-theme="dark"] .site-footer          { background: #599122; }
[data-theme="dark"] .footer__main         { background: #8FD300; }
[data-theme="dark"] .footer__main h2      { color: #ffffff; }
[data-theme="dark"] .footer__main p       { color: rgba(255,255,255,0.9); }
[data-theme="dark"] .footer__main ul      { color: #ffffff; }
[data-theme="dark"] .footer__cta          { background: #599122; color: #ffffff; }
[data-theme="dark"] .footer__cta:hover    { background: #3d6118; }
[data-theme="dark"] .footer__sidebar      { color: #ddd; }
[data-theme="dark"] .footer__sidebar h3   { color: #ffffff; }
[data-theme="dark"] .footer__sidebar p    { color: #ccc; }
[data-theme="dark"] .footer__sidebar a    { color: #8FD300; }
[data-theme="dark"] .footer__sidebar a:hover       { color: #ffffff; }
[data-theme="dark"] .footer__sidebar nav a         { color: #bbb; }
[data-theme="dark"] .footer__sidebar nav a:hover   { color: #ffffff; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .page-wrapper {
    margin: 0;
    border-radius: 0;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .content__sidebar {
    display: none;
  }

  .content--full {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__main {
    border-bottom-left-radius: 0;
  }
}
