/* ===============================
   Basisvariablen (Farben, Spacing)
   =============================== */
:root {
  --font-base: clamp(1rem, 1.2vw, 1.2rem);
  --font-heading: clamp(1.6rem, 3vw, 2.5rem);
  --font-heading2: clamp(1.5rem, 2.5vw, 2rem);
  --font-heading3: clamp(1.2rem, 2vw, 1.5rem);
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-accent: #db6b6b;
  --color-accent2: #318DCE;
  --color-accent3: #4b759f;
  --max-width: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #fdfdfd;
    --color-text: #161616;
    --color-muted: #000000;
  }
}

/* ===============================
   Schriftarten (Fonts)
   =============================== */
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/Nunito.woff2') format('woff2');
  font-weight: 100 300 500 700 900;
  font-display: swap;
}

@font-face {
  font-family: 'OpenSans';
  src: url('/assets/fonts/OpenSans.woff2') format('woff2');
  font-weight: 200 500 700 900;
  font-display: swap;
}

/* ===============================
   Reset / Base
   =============================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'OpenSans', Georgia, serif;
  font-size: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'OpenSans', Georgia, serif;
  font-size: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

/* ===============================
   Header + Menü
   =============================== */
header {
  background: var(--color-bg);
  padding: 1rem 0;
 
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
}

nav li {
  position: relative;
}

nav a {
  padding: 0.5rem;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
}



/* ===============================
   Typografie
   =============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: var(--font-heading);
}

h2 {
  font-size: var(--font-heading2);
}

h3 {
  font-size: var(--font-heading3);
}

p {
  margin-bottom: 1rem;
}

small {
  color: var(--color-muted);
}

/* ===============================
   Buttons, Forms, Footer
   =============================== */
button {
  background: var(--color-accent);
  color: white;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

footer {
  margin-top: 3rem;
  padding-top: 2rem;
 
  font-size: 0.9rem;
  text-align: center;
}

/* ===============================
   Grid-System (2 / 3 / 4-Spalten)
   =============================== */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-2-reverse {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Spezialfall für 3er-Grid unter 993px: 2 nebeneinander, 1 darunter */
@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* Unter 768px: alles 1-spaltig */
@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 > :nth-child(3) {
    grid-column: auto;
  }
    .grid-2-reverse {
        grid-template-columns: 1fr; /* nur 1 Spalte */
    }

    .grid-2-reverse > *:first-child {
        order: 2;
    }

    .grid-2-reverse > *:nth-child(2) {
        order: 1;
    }
}
