/* =========================================================
   RADIKALER RESET & THEME: DARK ACADEMIA
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-body: #1a1a1a;
  --bg-panel: #242424;

  --font-main: "Georgia", "Times New Roman", Times, serif;
  --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-main: #e8e6e3;
  --text-muted: #888;

  --color-communist: #8a1c1c;
  --color-nationalist: #5d4037;
  --color-border: #444;

  --base-gap: 20px;
}

/* =========================================================
   GLOBAL
   ========================================================= */

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* =========================================================
   HEADER / MAIN / FOOTER WRAPPER
   ========================================================= */

header,
main,
footer {
  width: 100%;
  padding: 2rem 3rem;
  max-width: 1800px;
}

/* =========================================================
   HEADER
   ========================================================= */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px double var(--color-border);
  background: var(--bg-body);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-bottom: 1rem;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: normal;
}

.header-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--color-border);
  padding: 0.4em 0.8em;
  text-transform: uppercase;
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */

main {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr auto 2fr;
  gap: var(--base-gap);
  margin: 20px 0;
  align-items: stretch;
}

.separator {
  width: 2px;
  background: linear-gradient(to bottom,
      transparent,
      var(--color-border),
      transparent);
  margin: 0 5px;
}

/* =========================================================
   LEFT GROUP (KOMMUNISMUS)
   ========================================================= */

.group-left {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--base-gap);
}

/* =========================================================
   RIGHT GROUP (NATIONALISMUS)
   ========================================================= */

.group-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--base-gap);
}

/* =========================================================
   PANEL ARCHITEKTUR
   ========================================================= */

.panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  background: var(--bg-panel);
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  height: 100%;
  width: 100%;
  overflow: hidden;
  padding: 2.5rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.panel:hover {
  transform: translateY(-2px);
  border-color: #777;
  z-index: 10;
}

.panel::after {
  content: attr(data-num);
  position: absolute;
  right: 1.4rem;
  bottom: 0.8rem;

  font-family: var(--font-main);
  font-size: clamp(4.5rem, 7vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;

  color: rgba(232, 230, 227, 0.045);
  /* extrem dezent */
  pointer-events: none;
  user-select: none;

  z-index: 0;
}

.panel-body {
  flex-grow: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.panel h3 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: normal;
  font-family: var(--font-main);
}

/* =========================================================
   COLOR CODING
   ========================================================= */

/* Links – Kommunismus */
.group-left .panel {
  border-left: 6px solid var(--color-communist);
}

.group-left .panel:hover {
  box-shadow: -5px 0 15px -5px rgba(138, 28, 28, 0.3);
}

/* Rechts – Nationalismus */
.group-right .panel {
  border-left: 6px solid var(--color-nationalist);
}

.group-right .panel:hover {
  box-shadow: -5px 0 15px -5px rgba(93, 64, 55, 0.3);
}

/* =========================================================
   PANEL POSITIONIERUNG
   ========================================================= */

.panel-priority {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: #262220;
}

.panel-std-right-1 {
  grid-column: 1;
  grid-row: 1;
}

.panel-std-right-2 {
  grid-column: 1;
  grid-row: 2;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-family: var(--font-main);
  font-style: italic;
  color: var(--text-muted);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left center right";
  align-items: center;
}

.footer-left {
  grid-area: left;
  justify-self: start;
}

.footer-center {
  grid-area: center;
  justify-self: center;
  margin: 0;
}

.footer-right {
  grid-area: right;
  justify-self: end;
}

footer .btn-mech {
  margin: -0.8725rem;
  /* wichtig */
  justify-self: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
  .header-meta {
    display: none;
  }

  header {
    justify-content: center;
    padding: 2rem 1rem;
  }

  main {
    hyphens: auto;
  }

  footer {
    padding: 2rem 1rem;
    margin: 0;
  }
}

@media (max-width: 850px) {
  body {
    overflow-y: hidden;
  }

  main {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    justify-content: space-around;
    gap: 0;
  }

  .group-right,
  .group-left {
    display: flex;
    flex-direction: column;
    gap: 0;
    display: inline-block;
  }

  .panel-priority {
    grid-column: auto;
    grid-row: auto;
  }

  header h1 {
    font-size: clamp(1rem, 4vw, 1.6rem);
  }

  .btn-mech {
    translate: 0 -100px;
    width: 300px;
    height: 50px;
  }

  footer {
    margin: -10px -50px;
  }
}

.btn-mech {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;

  text-transform: uppercase;
  letter-spacing: 0.1em;

  cursor: pointer;
  border: 2px solid #333;
  background: none;

  transition: var(--transition-tactile);
}

.btn-push-heavy {
  background: #222;
  color: #ccc;
  box-shadow:
    0 6px 0 #000,
    0 8px 15px rgba(0, 0, 0, 0.5);
}

.btn-push-heavy:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #000,
    0 2px 5px rgba(0, 0, 0, 0.5);
}

.btn-lernbegriffe {
  /* Layout & Box Model */
  width: 100%;
  grid-column: span 3;
  height: 100px;
  padding: 1.2rem 1.5rem;

  /* Typography */
  font-family: "Georgia", serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;

  /* Appearance base */
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  cursor: pointer;
  outline: none;

  /* Flexbox */
  display: flex;
  justify-content: center;
  align-items: center;

  /* --- BACKGROUND STACKING (Reduziert) --- */
  background-image:
    /* Layer 1: Horizontale Linien */
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    /* Layer 2: Vertikale rote Korrekturlinie */
    linear-gradient(90deg, transparent 40px, rgba(200, 60, 60, 0.5) 40px, rgba(200, 60, 60, 0.5) 43px, transparent 43px);

  /* Größen für jeden Layer definiert */
  background-size:
    100% 20px,
    /* Linienabstand */
    100% 100%;
  /* Rote Linie volle Höhe */

  /* Startpositionen für jeden Layer */
  background-position:
    0 10px,
    /* Linien Versatz */
    0 0;
  /* Rote Linie Fix */

  /* Animation */
  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* Meta-Daten (rechte Seite) */
.btn-lernbegriffe span:last-child {
  font-size: 0.7em;
  opacity: 0.7;
  font-family: "Courier New", monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Optional: Rahmen um Meta */
  padding: 2px 5px;
}

/* HOVER STATE (Minimalistisch: Lift & Glow) */
.btn-lernbegriffe:hover {
  transform: translateY(-3px);
  /* Leichtes Anheben */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 255, 255, 0.1);
  /* Tiefe + Subtiles Leuchten */
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ACTIVE STATE */
.btn-lernbegriffe:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}