/* =========================
   1) Design Tokens
   ========================= */

:root {
  --max-width: 920px;
  --header-height: 64px;

  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  --bg-card: rgba(18,139,243,0.50);

  --border-soft: 1px solid rgba(255,255,255,0.10);

  --text-main: #f2f2f2;
  --text-muted: #d9d9d9;
  --text-header: #f5f5f5;
}

/* =========================
   2) Background Overlay
   ========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 0;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* =========================
   3) Base / Reset
   ========================= */

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);

  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;

  background-image: url("../images/background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   4) Layout Helpers
   ========================= */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================
   5) Header / Navigation
   ========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: var(--max-width);
  height: var(--header-height);

  background: var(--bg-card);
  color: var(--text-header);

  border-bottom: var(--border-soft);
  border-radius: 0 0 var(--radius) var(--radius);

  z-index: 1000;
}

.site-header .wrap {
  position: relative;
}

.header-inner {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.nav a {
  margin-left: 16px;
  opacity: 0.85;
}

.nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: inherit;
  cursor: pointer;
  margin-left: auto;
}

/* =========================
   6) Main Layout
   ========================= */

.site-main {
  flex: 1;
  padding: 24px 0;
}

.layout-2col {
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-template-areas: "sidebar content";
  gap: 24px;
  align-items: start;
}

/* =========================
   7) Content & Sidebar Blocks
   ========================= */

.sidebar,
.content {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: var(--border-soft);
  box-shadow: var(--shadow);

  padding: 24px 16px;
}

.content {
  grid-area: content;
  color: var(--text-main);
}

.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  color: var(--text-muted);
}

.content img.hero {
  width: calc(100% + 32px);
  max-width: none;
  margin: 0 -16px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Sidebar blocks */

.sidebar-block + .sidebar-block {
  margin-top: 24px;
}

.sidebar h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
}

/* =========================
   8) Cards (Startseite)
   ========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.card {
  display: block;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  color: var(--bg-card);

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin: 0 0 8px;
  color: #6f6d72;
}

.card p {
  margin: 0;
  opacity: 0.85;
  max-width: none;
}

/* =========================
   9) Footer
   ========================= */

.site-footer {
  margin: 24px 0;
}

.site-footer .wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 16px;
  color: var(--text-main);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  opacity: 1;
}

/* =========================
   10) Typography
   ========================= */

h1, h2, h3 {
  letter-spacing: -0.02em;
  max-width: none;
}

h1 { font-weight: 700; }
h2 { font-weight: 600; }

.site-main p {
  max-width: 65ch;
}

.site-main ul,
.site-main ol {
  margin: 0 0 18px;
}

/* =========================
   11) Responsive
   ========================= */

@media (max-width: 1000px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .layout-2col {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "sidebar";
  }

  .sidebar {
    position: static;
  }

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

  .card {
    padding: 16px;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;

    background: #8E8C92;
    padding: 16px;

    flex-direction: column;
    gap: 12px;

    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .nav a {
    margin-left: 0;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    flex-wrap: nowrap;
  }
}
