@font-face {
  font-family: "Overpass"; /* Name der Schriftart */
  src: url("/fonts/Overpass-Regular.woff2") format("woff2");
  font-weight: normal; /* Normalgewicht */
  font-style: normal; /* Normalstil */
}

@font-face {
  font-family: "Overpass"; /* Gleicher Font-Family-Name */
  src: url("/fonts/Overpass-Bold.woff2") format("woff2");
  font-weight: bold; /* Fettdruckgewicht */
  font-style: normal; /* Normalstil */
}

/* Grundlegende Layout-Regeln */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: "Overpass", sans-serif;
  background-color: #333;
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  height: 100%; /* Wichtig: Body und HTML müssen 100% Höhe haben */
}

body {
  display: flex;
  flex-direction: column; /* Elemente von oben nach unten anordnen */
  min-height: 100vh; /* Alternative zu height: 100%; für moderne Browser */
}

main {
  max-width: 1400px;
  margin: auto;
  text-align: left;

  padding: 0 1rem;
  flex: 1; /* Nimmt den restlichen Platz ein und schiebt den Footer nach unten */
}

/* Links */
a {
  color: #ff6600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Headroom Header */
header {
  position: fixed; /* Anstatt sticky => fixed */
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  background-color: #1f1f1f;
  border-bottom: 0px solid #444;

  /* Für den gleitenden Effekt */
  transition: transform 0.3s ease;
}

/* Wenn der Header oben sichtbar bleiben soll */
header.pinned {
  transform: translateY(0%); /* vollständig sichtbar */
}

/* Wenn der Header ausgeblendet sein soll */
header.unpinned {
  transform: translateY(-100%); /* nach oben wegschieben */
}

header .header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: 1500px;
  margin: auto;
  flex-wrap: wrap; /* Ermöglicht Zeilenumbruch bei kleinen Bildschirmen */
  padding: 1rem;
  padding-right: 70px;
}

/* Logo im Header */
header img.logo {
  width: 250px; /* Verkleinerung des Logos für kleinere Bildschirme */
}

/* Suchfeld und Kategorieauswahl im Header */
.search-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  justify-content: center;
  flex-wrap: wrap; /* Ermöglicht Zeilenumbruch bei kleinen Bildschirmen */
}

.search-container label {
  color: #e0e0e0;
  font-size: 14px;
  margin-right: 0.5rem;
}

.search-container input[type="text"],
.search-container select {
  width: 250px; /* Verkleinerung der Breite für kleinere Bildschirmen */
  max-width: 100%;
  padding: 0.6rem;
  font-size: 14px;
  font-family: "Overpass", sans-serif;
  border: 0;
  border-radius: 6px;
  background-color: #333;
  color: #e0e0e0;
}

.search-container select {
  cursor: pointer;
  appearance: none;
}

/* Versuchen, die optgroup-Labels fett zu machen */
select optgroup {
  font-weight: bold;
  color: #ff6600;
}

/* Optional: Anpassung der Option-Schrift */
select option {
  font-weight: normal;
  color: #eee;
}

.search-container input:focus + .clear-icon,
.search-container input:not(:placeholder-shown) + .clear-icon {
  display: inline;
}

.subClaim {
  font-size: 15px;
}

/* Footer */
footer {
  flex-shrink: 0; /* Footer wird nicht verkleinert */
  text-align: center;
  background-color: #1f1f1f;
  padding: 2rem;
  margin-top: 3rem;
  color: #eee;
}

footer p {
  line-height: 1.6;
}

.spacer {
  margin-bottom: 0.5rem;
}

.buymeacoffee {
  margin-top: 2rem;
  margin-bottom: 5rem;
}

.buymeacoffeeModal {
  margin-top: 2rem;
}

.copy-button.copied {
  background-color: #006600;
  color: white; /* Optional für bessere Lesbarkeit */
}

/* Überschreibt Hover/Fokus, wenn .copied aktiv ist */
.copy-button.copied:hover,
.copy-button.copied:focus {
  background-color: #006600 !important;
  color: white !important;
  cursor: default; /* optional, damit keine Hand angezeigt wird */
}

/* .credits */
.credits {
  font-size: small;
  color: #666;
  text-decoration: none;
}

/* .modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

/* .modal-content */
.modal-content {
  position: relative;
  background-color: #333;
  text-align: left;
  color: #fff;
  margin: 120px auto;
  padding: 2rem;
  border: 0px solid #888;
  max-width: 768px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  width: calc(100% - 2rem);
}

/* .modal-close */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 28px;
  color: #ccc;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: #fff;
}

/* .modal-title */
.modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #ff6600;
  margin-bottom: 15px;
}

/* .modal-intro */
.modal-intro {
  font-size: 16px;
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* .modal-highlight */
.modal-highlight {
  font-size: 16px;
  color: #ff6600;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* .modal-steps */
.modal-steps {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
}

/* .modal-steps li */
.modal-steps li {
  font-size: 15px;
  color: #ccc;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* Suchfeld und Kategorieauswahl */
.search-container {
  position: relative; /* Für das Clear-Icon */
}

/* Main Inhalt */
#subClaim {
  line-height: 1.6;
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 6px;
  margin-top: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.card-header {
  padding-right: 20px;
}

.mainHeading {
  color: #eee;
  font-size: 16px;
  padding-bottom: 1rem;
}

.mainText {
  color: #aaa;
  font-size: 15px;
  padding-bottom: 0.5rem;
}

/* Ergebnisse Count */
#resultsCount {
  padding-bottom: 1.5rem;
  font-size: 1.3rem;
  color: #eee;
  text-align: center;
  margin-top: 2rem;
}

/* Kartenlayout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Standardmäßig 4 Spalten */
  gap: 1.5rem;
  justify-content: center;
  width: 100%; /* Statt max-width:1400px */
  margin: 0 auto;
  padding: 0 1rem; /* Behalte das Padding bei, wenn nötig */
}

.card {
  border-radius: 6px;
  padding: 1rem;
  background-color: #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.card h2 {
  font-size: 1.2rem;
  color: #222;
}

.card p {
  flex: 1;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #222;
}

.highlight {
  color: #aaa;
  margin-bottom: 1rem;
}

.editable-placeholder {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto; /* Optional */
  cursor: pointer;
  color: #ff6600;
}

.editable-placeholder:focus {
  outline: 2px solid #ff6600;
}

.hidden {
  display: none;
}

.loader {
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #555;
  min-height: 50px; /* Ensure loader has some height */
}

/* Bookmark-Icon */
.bookmark-icon {
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #ff6600;
  position: absolute;
  top: 5px;
  right: 10px;
}

/* Buttons */
.scroll-to-top {
  position: fixed;
  bottom: 30px; /* Abstand vom unteren Rand */
  right: 30px; /* Abstand vom rechten Rand */
  width: 50px;
  height: 50px;
  background-color: #1f1f1f;
  color: white;
  border: none;
  border-radius: 50%;
  display: none; /* Anfangs ausgeblendet */
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000; /* Sicherstellen, dass der Button über anderen Elementen liegt */
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.scroll-to-top.visible {
  display: flex; /* Anzeigen des Buttons als flex container */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px); /* Optional: sanftes Ein- und Ausfahren */
}

.scroll-to-top .icon {
  width: 24px;
  height: 24px;
}

.scroll-to-top:hover {
  background-color: #555;
}

.copy-button {
  background-color: #ccc;
  color: #1e1e1e;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}

.copy-button:hover {
  background-color: #ff6600;
}

/* h1.impressum-title */
h1.impressum-title {
  font-size: 1.8em;
  margin-top: 150px;
  margin-bottom: 10px;
}

/* p.impressum-paragraph */
p.impressum-paragraph {
  margin: 10px 0;
}

/* p.impressum-section-title */
p.impressum-section-title {
  font-weight: bold;
  margin-top: 20px;
}

/* a.impressum-link */
a.impressum-link {
  color: #ff6600;
  text-decoration: none;
}

a.impressum-link:hover {
  text-decoration: underline;
}

/* Medienabfragen für Responsive Design */
/* 4 Spalten für sehr große Bildschirme */
@media (min-width: 1400px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 3 Spalten für breite Bildschirme */
@media (max-width: 1399px) and (min-width: 1050px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 Spalten für mittlere Bildschirme */
@media (max-width: 1049px) and (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 Spalte für kleine Bildschirme */
@media (max-width: 699px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Mittlere Bildschirme */
@media (max-width: 990px) and (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  /* Anpassung des Header-Layouts */
  header .header-inner {
    justify-content: center; /* Zentrieren der Inhalte */
  }

  .search-container {
    justify-content: center; /* Zentrieren der Suchfelder */
    width: auto; /* Automatische Breite für Flexbox */
  }
}

@media (max-width: 767px) and (min-width: 400px) {
  /* Card-Grid-Anpassungen bleiben unverändert */
  .card-grid {
    grid-template-columns: 1fr;
  }

  .copy-button:hover {
    background-color: #ccc;
  }

  header img.logo {
    width: 200px;
    margin-right: 0;
  }

  /* Anpassung des Header-Layouts */
  header .header-inner {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  /* Entferne Labels */
  .search-container label {
    display: none;
  }

  /* Positioniere die Suchfelder nebeneinander */
  .search-container {
    flex-wrap: nowrap; /* Keine Zeilenumbrüche */
    width: 100%;
    margin-bottom: 0;
  }

  /* Suchfelder auf 50% Breite setzen */
  .search-container input[type="text"],
  .search-container select {
    width: 50%; /* Jeweils 50% der Breite */
    margin: 0; /* Entferne zusätzlichen Außenabstand */
  }

  #subClaim {
    margin-top: 1.5rem;
  }

  .modal-content {
    margin: 1rem auto;
    padding: 1rem;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .scroll-to-top .icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 399px) {
  /* Card-Grid-Anpassungen bleiben unverändert */
  .card-grid {
    grid-template-columns: 1fr;
  }

  header img.logo {
    width: 200px;
    margin-right: 0;
  }

  /* Anpassung des Header-Layouts */
  header .header-inner {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  /* Entferne Labels */
  .search-container label {
    display: none;
  }

  /* Positioniere die Suchfelder nebeneinander */
  .search-container {
    flex-wrap: wrap; /* Zeilenumbrüche */
    width: 100%;
    margin-bottom: 0;
  }

  /* Suchfelder auf 50% Breite setzen */
  .search-container input[type="text"],
  .search-container select {
    width: 100%; /* Jeweils 50% der Breite */
    margin: 0; /* Entferne zusätzlichen Außenabstand */
  }

  #subClaim {
    margin-top: 1.5rem;
  }

  .modal-content {
    margin: 1rem auto;
    padding: 1rem;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .scroll-to-top .icon {
    width: 20px;
    height: 20px;
  }
}
