@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ─── Design Tokens (Catppuccin Mocha) ──────────────────────────────────── */
:root {
  --crust:    #11111b;
  --mantle:   #181825;
  --base:     #1e1e2e;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay1: #7f849c;
  --subtext0: #a6adc8;
  --text:     #cdd6f4;
  --lavender: #b4befe;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--crust);
  color: var(--text);
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.app-container {
  display: flex;
  height: 100%;
  padding: 16px;
  gap: 12px;
}

/* ─── Navigation Sidebar ─────────────────────────────────────────────────── */
.nav-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 70px;
  padding: 12px 0;
  background-color: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 12px;

  .nav-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .nav-bottom {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 12px;
    width: 100%;
  }

  .fa-solid {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 22px;
    color: var(--overlay1);
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;

    &:hover {
      background-color: var(--surface0);
      color: var(--text);
    }

    &.active {
      background-color: var(--surface1);
      color: var(--lavender);
    }
  }
}

/* ─── Main Content Area ──────────────────────────────────────────────────── */
.page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 32px;
  overflow-y: auto;
  background-color: var(--base);
  border: 1px solid var(--surface0);
  border-radius: 12px;

  &::-webkit-scrollbar {
    width: 8px;

    &-thumb {
      background-color: var(--surface1);
      border-radius: 4px;

      &:hover {
        background-color: var(--surface2);
      }
    }
  }
}

/* ─── Content Sections ───────────────────────────────────────────────────── */
.content-section {
  display: none;
  animation: fadeIn 0.2s ease;

  &.active {
    display: block;
  }

  &#comments.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Section Typography ─────────────────────────────────────────────────── */
.section-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  color: var(--lavender);
  text-align: center;
}

.section-subtitle {
  margin: 0 0 24px;
  padding-bottom: 16px;
  font-size: 18px;
  font-weight: 400;
  color: var(--subtext0);
  text-align: center;
  border-bottom: 1px solid var(--surface0);
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card {
  padding: 24px;
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--subtext0);
  background-color: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 8px;

  &.card-row {
    display: flex;
    flex-direction: row;
    gap: 20px;

    strong {
      color: var(--lavender);
      font-size: 24px;
    }

    p {
      margin-top: 0;
    }

    img {
      flex-shrink: 0;
      width: 520px;
      height: 265px;
      margin: 0;
    }
  }

  &.hilfe-card-contact {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;

    img {
      flex-shrink: 0;
      width: 520px;
      height: 265px;
      margin: 0;
    }

    p {
      margin: 0;
      font-size: 18px;

      strong {
        display: block;
        margin-bottom: 8px;
        font-size: 22px;
        color: var(--lavender);
      }
    }
  }
}

/* ─── Images ─────────────────────────────────────────────────────────────── */
img {
  display: block;
  width: 250px;
  height: 165px;
  margin-top: 20px;
  border: 1px solid var(--surface2);
  border-radius: 12px;
  object-fit: cover;
}

/* ─── Summary Lead ───────────────────────────────────────────────────────── */
.summary-lead {
  padding-left: 15px;
  margin-bottom: 0;
  font-size: 17px;
  border-left: 5px solid var(--lavender);
  border-radius: 5px;
}

/* ─── Comparison Grid ────────────────────────────────────────────────────── */
.comparison-grid {
  display: flex;
  flex-direction: row;
  gap: 25px;
  width: 100%;
  padding-top: 20px;
  font-size: 18px;
}

.comparison-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 5px 5px;
  border: 2px solid var(--surface0);
  border-radius: 10px;

  .comparison-panel-header p {
    margin-top: 18px;
    font-size: 22px;
    color: var(--lavender);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .comparison-panel-content > p {
    margin-top: 16px;
    padding: 0 12px;
    font-style: italic;
    color: var(--text);
    text-align: center;
  }

  .comparison-panel-source {
    margin: 4px 12px 0;
    font-size: 16px;
    font-style: italic;
    color: var(--subtext0);
    text-align: center;
  }
}

/* ─── Image + Text Row ───────────────────────────────────────────────────── */
.image-text {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  margin: 0 12px;

  img {
    flex-shrink: 0;
    margin-top: 12px;
  }

  p {
    margin: 12px 0 0;
  }
}

/* ─── Leibniz Block ──────────────────────────────────────────────────────── */
.leibniz-block {
  padding: 14px 18px;
  color: var(--subtext0);
  line-height: 1.7;

  ul {
    margin: 6px 0 10px;
    padding-left: 20px;
  }

  li {
    margin-bottom: 4px;
  }

  .leibniz-block-title {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--lavender);
  }

  .leibniz-block-implication {
    margin: 4px 0;
    font-style: italic;
    color: var(--text);
  }

  .leibniz-block-caveat {
    margin: 6px 0 0;
    padding-left: 10px;
    font-size: 16px;
    color: var(--overlay1);
    border-left: 3px solid var(--surface2);
  }

  .leibniz-block-tldr {
    margin-top: 14px;
    color: var(--text);
  }
}

/* ─── Jonas Points Block ─────────────────────────────────────────────────── */
.jonas-points {
  margin: 14px 12px 0;

  ul {
    margin: 6px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  li {
    color: var(--subtext0);
    line-height: 1.55;
  }

  strong {
    color: var(--lavender);
  }

  .jonas-points-label {
    margin: 0 0 2px;
    font-weight: 600;
    color: var(--lavender);
  }
}

/* ─── Umgang Grid ────────────────────────────────────────────────────────── */
.umgang-grid {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 8px;
}

/* ─── Umgang Cards ───────────────────────────────────────────────────────── */
.umgang-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 24px;
  margin-bottom: 0;

  ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  li {
    font-size: 20px;
    color: var(--subtext0);
    line-height: 1.55;
  }

  strong {
    color: var(--lavender);
  }

  .umgang-card-title {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 600;
    color: var(--lavender);
    text-align: center;
  }

  .umgang-card-example {
    margin: 14px 0 0;
    padding: 10px 14px;
    font-size: 18px;
    font-style: italic;
    color: var(--overlay1);
    background-color: var(--surface0);
    border-left: 3px solid var(--surface2);
    border-radius: 6px;
  }
}

.umgang-images {
  display: flex;
  flex-direction: row;
  justify-self: center;
  gap: 175px;

  img {
    border: none;
    height: 300px;
    width: 600px;
  }
}

/* ─── Hilfsangebote ──────────────────────────────────────────────────────── */
.hilfe-intro {
  margin: 0;
  font-size: 17px;
  color: var(--subtext0);
  line-height: 1.7;
}

.hilfe-grid {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 0;
}

.hilfe-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 24px;
  margin-bottom: 0;

  .hilfe-card-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--lavender);
  }

  .hilfe-card-desc {
    margin: 0;
    font-size: 16px;
    color: var(--subtext0);
    line-height: 1.6;
  }

  .hilfe-card-detail {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--overlay1);

    strong {
      color: var(--text);
    }
  }

  .hilfe-card-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
  }

  .hilfe-card-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 15px;
    color: var(--lavender);
    text-decoration: none;
    transition: color 0.15s ease;

    &:hover {
      color: var(--text);
      text-decoration: underline;
    }
  }
}

.help-images {
  display: flex;
  flex-direction: row;
  justify-self: center;
  gap: 300px;

  img {
    border: none;
    height: 300px;
    width: 300px;
  }
}

/* ─── Sources List ───────────────────────────────────────────────────────── */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 24px;
  list-style: lower-greek;

  a {
    color: var(--lavender);
    text-decoration: none;
    transition: color 0.15s ease;

    &:hover {
      color: var(--text);
      text-decoration: underline;
    }
  }
}

.sources-access-date {
  margin-top: 16px;
  font-size: 15px;
  color: var(--overlay1);
}