:root {
  --background-white: #ffffff;
  --light-grey: #f7f7f7;
  --text-dark-grey: #333333;
  --blue: #003366;
  --red: #8b0000;
  --gold: #ffc107;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--background-white);
  font-family: Garamond, "Times New Roman", Times, serif;
  color: var(--text-dark-grey);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.container-versicherungen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 15px;
}

.title-image-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 300px;
  padding-top: 100px;
  padding-bottom: 80px;
  gap: 300px;
}

.title-image {
  width: 100px;
  height: auto;
}

h1 {
  font-size: 48px;
  color: var(--gold);
  text-align: center;
}

h6 {
  font-size: 38px;
  margin: 0;
}

h2 {
  font-size: 30px;
}

.header-title {
  font-size: 2rem; /* Standardgröße für große Bildschirme */
  text-align: center;
  color: var(--text-dark-grey);
  font-weight: bold;
  margin: 0;
  padding: 10px 0;
}

/* Anpassung für mittlere Bildschirmgrößen */
@media (max-width: 1200px) {
  .header-title {
    font-size: 1.5rem;
  }
}

/* Anpassung für kleine Bildschirmgrößen */
@media (max-width: 768px) {
  .header-title {
    font-size: 1.1rem;
  }
}

/* Anpassung für sehr kleine Bildschirmgrößen */
@media (max-width: 480px) {
  .header-title {
    font-size: 1rem;
  }
}

::selection {
  background-color: var(--text-dark-grey);
  color: var(--light-grey);
}

.container {
  padding: 0 20vw;
}

.section-text_a0 {
  padding: 18vh 20vw 4vh 20vw;
  background-color: var(--background-white);
}

.section-text_a {
  padding: 25vh 20vw 4vh 20vw;
  background-color: var(--background-white);
}

.section-text_b {
  padding: 6vh 20vw 4vh 20vw;
  background-color: var(--light-grey);
}

.section-text_c {
  padding: 4vh 20vw 4vh 20vw;
  background-color: var(--background-white);
}

.section-text_d {
  padding: 4vh 20vw 4vh 20vw;
  background-color: rgba(139, 0, 0, 0.9); /* Alternativ: etwas helleres Rot */
  border-radius: 8px;
  color: white; /* Sicherstellen, dass der Text gut lesbar ist */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Leichter Schatten für Eleganz */
}

.section-text_e {
  padding: 4vh 20vw 4vh 20vw;
  background-color: rgba(0, 51, 102, 0.9); /* Alternativ: etwas helleres Rot */
  border-radius: 8px;
  color: white; /* Sicherstellen, dass der Text gut lesbar ist */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Leichter Schatten für Eleganz */
}

.topics-section {
  background: var(--light-grey);
  padding: 5vh 20vw 6vh 20vw;
}

.topics-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.cards-container {
  display: flex;
  gap: 200px;
}

.card {
  background: var(--secondary-turquoise);
  color: var(--background-white);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  flex: 1 1 300px;
  max-width: 300px;
  height: auto;
}

.cards-container {
  gap: 20px; /* Gap halbiert */
  justify-content: center; /* Boxen gleichmäßig verteilen */
  flex-wrap: wrap;
  display: flex;
  align-items: stretch;
}

.cards-container .card {
  flex: 1 1 calc((100% - 40px) / 3); /* Dynamische Breite: 3 Boxen pro Zeile, inkl. Gap */
  max-width: calc((100% - 40px) / 3); /* Maximale Breite */
  display: flex;
  flex-direction: column; /* Vertikale Anordnung */
  justify-content: flex-start;
  align-items: center; /* Zentrierung der Inhalte */
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: var(--secondary-turquoise);
  color: var(--background-white);
}

.inhalt-btn {
  margin-top: auto;
  padding: 10px 15px;
  font-size: 16px;
  border: 1px solid #631313;
  border-radius: 4px;
  background-color: white;
  text-align: center;
  cursor: pointer;
  flex: 1;
  max-height: 20px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

p {
  font-size: 24px;
  line-height: 1.5;
  color: var(--text-dark-grey);
  text-align: justify;
  hyphens: auto; /* Aktiviert die automatische Silbentrennung */
  overflow-wrap: break-word; /* Zeilenumbrüche bei langen Wörtern */
  word-break: break-word; /* Zusätzliche Absicherung für ältere Browser */
}

p::selection {
  background-color: var(--text-dark-grey);
  color: var(--light-grey);
}



.card-plus,
.card {
  background: var(--primary-blue);
  color: var(--background-white);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 280px;
}

.card-plus:hover,
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.menu-link {
  text-decoration: none;
  display: flex;
  font-size: 20px;
  color: var(--background-white);
  font-weight: bold;
  transition: color 0.3s;
}

.menu-link:hover {
  color: var(--gold);
}

header {
  position: fixed;
  width: 100%;
  height: 15vh; /* Headerhöhe */
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transform: translateY(0); /* Standardposition */
  transition: transform 0.3s ease-in-out;
}

.subheader {
  position: absolute;
  top: 15vh; /* Höhe des Headers */
  left: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 5vh;
  width: 100%;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
  gap: 30px;
}

.subheader a {
  text-decoration: none;
  font-size: 16px; /* Schriftgröße */
  font-weight: bold; /* Fett für Hervorhebung */
  color: var(--text-dark-grey); /* Einheitliche Farbe */
  padding: 10px 20px; /* Abstand */
  transition: color 0.3s ease;
}

.subheader a:hover {
  color: var(--gold) !important; /* Hover-Farbe */
}

.subheader2 {
  position: absolute;
  top: 15vh; /* Höhe des Headers */
  left: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 5vh;
  width: 100%;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
}

.subheader2 a {
  text-decoration: none;
  font-size: 16px; /* Schriftgröße */
  font-weight: bold; /* Fett für Hervorhebung */
  color: var(--text-dark-grey); /* Einheitliche Farbe */
}

.subheader2 a:hover {
  color: var(--gold) !important; /* Hover-Farbe */
}

header.visible {
  transform: translateY(0);
}

header .logo {
  height: 8vh; /* Logo vergrößern */
  cursor: pointer;
  margin-left: 6vw;
}

.header-menu {
  display: flex;
  gap: 1.5vw;
  margin-right: 6vw;
}

.header-menu .menu-item {
  position: relative; /* Für Dropdown */
  display: flex;
}

.header-menu .menu-link {
  text-decoration: none;
  color: var(--text-dark-grey);
  font-size: 22px;
  font-weight: bold;
  transition: color 0.3s;
}

.header-menu .menu-link:hover {
  color: var(--gold);
  cursor: pointer;
}

/* Dropdown-Menü */
.menu-item .dropdown {
  position: absolute;
  top: 100%; /* Direkt unter dem Link */
  left: 0;
  background-color: #fff;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: none; /* Standardmäßig versteckt */
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  z-index: 2000;
}

.menu-item:hover .dropdown {
  display: flex; /* Zeigen, wenn darüber gefahren wird */
}

.menu-item .dropdown a {
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-dark-grey);
  font-size: 16px;
  transition: background-color 0.3s;
}

.menu-item .dropdown a:hover {
  background-color: var(--light-grey);
}
/* Standardstil für Dropdown-Links */
.dropdown-link {
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-dark-grey);
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
}

/* Stil für die aktive Seite */
/* Sicherstellen, dass aktive Links gut sichtbar sind */
.dropdown-link.active {
  background-color: var(--primary-blue); /* Highlight-Hintergrund */
  color: var(--gold) !important;
  font-weight: bold;
  text-decoration: none; /* Keine Unterstreichung */
}

.menu-link.active {
  color: rgba(255, 193, 7, 0.9);
}

.hamburger-menu {
  display: none;
  font-size: 24px;
  cursor: pointer;
  padding-right: 5vw;
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.dropdown-menu.active {
  display: flex;
}

@media (max-width: 768px) {
  .header-menu {
    display: none; /* Desktop-Navigation ausblenden */
  }

  .hamburger-menu {
    display: block; /* Hamburger-Menü anzeigen */
  }

  .dropdown-menu {
    width: 100%;
  }
}

footer {
  color: var(--text-dark-grey);
  padding: 5vh 20vw 4vh 20vw;
  text-align: center;
  font-size: 16px;
}

.quiz body {
  background: var(--background-white);
  color: #333333;
  font-family: Garamond, "Times New Roman", Times, serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
}

.app {
  background-color: var(--background-white);
  width: 90%;
  max-width: 700px;
  margin: 1rem auto;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.app h3 {
  font-size: 1.8rem;
  color: black;
  font-weight: bold;
  border-bottom: 1px solid black;
  padding-bottom: 20px;
  margin: 1rem 6vb;
  padding: 2rem;
}
.app p {
  font-size: 1.2rem;
  color: black;
  margin: 2rem 6vb 2vh 6vb;
  hyphens: auto; /* Aktiviert die automatische Silbentrennung */
  overflow-wrap: break-word; /* Zeilenumbrüche bei langen Wörtern */
  word-break: break-word; /* Zusätzliche Absicherung für ältere Browser */
}

.quiz {
  padding: 0 6vb 6vb 6vb;
}

.quiz h4 {
  font-size: 20px;
  font-weight: 600;
  color: black;
}

#question {
  font-size: 24px;
  min-height: 6rem; /* Mindesthöhe für die Frage */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#timer,
#question-counter {
  text-align: center;
  font-size: 18px;
  margin: 10px;
}

#answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  min-height: 200px;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between; /* Buttons mit Abstand verteilen */
  gap: 10px;
  margin-top: 20px;
  position: relative;
  cursor: pointer;
}
@media (max-width: 768px) {
  .app {
    width: 95%;
  }

  #question {
    font-size: 18px;
  }

  #answer-buttons button {
    font-size: 14px;
  }

  .navigation-buttons button {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #question {
    font-size: 0.9rem;
  }

  .navigation-buttons {
    flex-direction: column;
  }

  .navigation-buttons button {
    margin-bottom: 10px;
  }
}
#prev-btn,
#next-btn {
  flex: 1; /* Optional: Buttons gleich groß machen */
  max-width: 80px; /* Optional: Maximalgröße der Buttons */
  font-size: 16px;
  cursor: pointer;
  padding: 10px;
}

#back-to-overview-btn {
  margin-left: auto; /* Rechts ausgerichtet */
  max-width: 100px;
  font-size: 16px;
  cursor: pointer;
  padding: 10px;
}

.btn {
  padding: 0;
  font-size: 16px;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: white;
  color: black;
  text-align: center;
  cursor: pointer;
  flex: 1; /* Gleiche Breite für alle Buttons */
}

.btn2 {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: white;
  color: black;
  text-align: center;
  cursor: pointer;
  flex: 1; /* Gleiche Breite für alle Buttons */
  margin-bottom: 2vh;
}

.btn3 {
  padding: 10px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 4px;
  color: var(--text-dark-grey);
  text-align: center;
  cursor: pointer;
  flex: 1; /* Gleiche Breite für alle Buttons */
  margin-bottom: 2vh;
  text-decoration: none;
  display: inline-block;
  background-color: #8b0000;
  color: var(--background-white);
}

.btn3:hover {
  background-color: var(--gold); /* Helle Goldfarbe */
  transform: scale(1.05); /* Leichte Vergrößerung bei Hover */
}

.btn4 {
  padding: 10px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 4px;
  color: var(--text-dark-grey);
  text-align: center;
  cursor: pointer;
  flex: 1; /* Gleiche Breite für alle Buttons */
  margin-bottom: 2vh;
  text-decoration: none;
  display: inline-block;
  background-color: #003366;
  color: var(--background-white);
}

.btn4:hover {
  background-color: var(--gold); /* Helle Goldfarbe */
  transform: scale(1.05); /* Leichte Vergrößerung bei Hover */
}

#end-test-btn {
  margin-bottom: 20px;
}

.btn:hover {
  background-color: #f0f0f0;
}

.btn.correct {
  background-color: green;
  color: white;
}

.btn.wrong {
  background-color: red;
  color: white;
}

.btn.selected {
  background-color: blue;
  color: white;
}

#overview {
  display: none;
  text-align: center;
}

#overview .summary-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  justify-content: center;
  margin-top: 2vh;
  justify-items: center;
  margin-bottom: 2vh;
  padding: 0 2vw;
}

#overview .summary-item {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: rgb(0, 0, 0);
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 1vh;
}

.summary-item.answered {
  background-color: blue;
}

.summary-item.unanswered {
  background-color: var(--light-grey);
  border: 2px solid #333;
  color: #333;
}

#results {
  text-align: center;
  margin-top: 20px;
}

#results .summary-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  justify-content: center;
  margin-top: 2vh;
  justify-items: center;
  padding: 0 2vw;
  margin-bottom: 2vh;
}

#results .summary-grid .summary-item.correct {
  background-color: green;
}

#results .summary-grid .summary-item.wrong {
  background-color: red;
}

#results .summary-item {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: white;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 1vh;
}

@media (max-width: 768px) {
  #overview .summary-item,
  #results .summary-item {
    font-size: 14px; /* Kleinere Schriftgröße */
    width: 22px; /* Kleinere Boxen */
    height: 22px;
  }
}

/* Anpassungen für sehr kleine Bildschirme */
@media (max-width: 480px) {
  #overview .summary-item,
  #results .summary-item {
    font-size: 8px; /* Noch kleinere Schriftgröße */
    width: 10px; /* Noch kleinere Boxen */
    height: 10px;
  }
}

.btn.disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

.cards-container .card:nth-child(1) {
  background-color: #8b0000;
}

.cards-container .card:nth-child(2) {
  background-color: #003366; /* Versicherungen */
}

.cards-container .card h3,
.cards-container .card p {
  font-size: 20px; /* Schrift vergrößern */
  flex-grow: 1;
  margin: 10px 0;
  line-height: 1.5;
}

.cards-container .card .inhalt-btn {
  font-size: 18px;
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
}

/* Knöpfe passend zu den Boxen */
.cards-container .card:nth-child(1) .inhalt-btn {
  background-color: #ff6347;
  color: white;
}

.cards-container .card:nth-child(2) .inhalt-btn {
  background-color: #1e90ff;
  color: white;
}

.cards-container .card:nth-child(3) .inhalt-btn {
  background-color: #ff8c00;
  color: white;
}

/* Entfernen der Umrandung (Border) der Buttons */
.cards-container .card .inhalt-btn {
  border: none; /* Keine Umrandung */
  padding: 15px;
  font-size: 18px;
  border-radius: 8px;
  margin-top: 10px;
  text-decoration: none; /* Keine Unterstreichung */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover-Effekt: Dunklerer Farbton */
.cards-container .card .inhalt-btn:hover {
  background-color: var(--gold); /* Helle Goldfarbe */
  transform: scale(1.05); /* Leichte Vergrößerung bei Hover */
}

/* Schriftfarbe des Beschreibungstextes in den Boxen */
.cards-container .card p {
  color: #ffffff; /* Weiße Schrift */
}

/* Vergrößern der Untertitel (3-Säulen-System, Versicherungen, Finanzinstrumente) */
.cards-container .card h3 {
  font-size: 24px; /* Größere Schriftgröße */
  font-weight: bold; /* Bessere Sichtbarkeit */
}

/* Verringern des Abstands zwischen Inhalts- und Testboxen */

/* Anpassung der Breite der Boxen und bessere Ausrichtung */
.cards-container .card {
  width: 320px; /* Breitere Boxen */
  max-width: 90%; /* Boxen passen sich kleineren Bildschirmen an */
  padding: 25px; /* Mehr Platz für Text */
  margin: 0 auto; /* Zentrierte Boxen */
}

/* Verbesserte Abstände zwischen Boxen und Seiten */
.cards-container {
  gap: 15px; /* Kleinerer Abstand zwischen Boxen */
  justify-content: space-around; /* Gleichmäßige Verteilung */
}

/* Textausrichtung und Schriftgröße */
.cards-container .card h3 {
  font-size: 26px; /* Größere Schrift für Untertitel */
  font-weight: bold; /* Klare Hervorhebung */
}

.cards-container .card p {
  font-size: 18px; /* Lesbare Schriftgröße */
}
