/* --- Google Font "Roboto" einbinden --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* --- GRUNDLEGENDES RESET / BASISSTILE --- */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  color: #333;
}

/* --- HEADER-STILE --- */
header {
  background: #ffffff;
  min-height: 80px; /* mindestens 80px hoch */
  /* Leichte Linie als Abtrennung */
  border-bottom: 1px solid rgba(0,0,0,0.1);
  /* Mehr vertikalen Abstand */
  padding-bottom: 1rem;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  /* wir erhöhen das Padding oben/unten, um mehr Luft zu schaffen */
  padding: 2rem 2rem 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  margin: 0;
  font-size: 1.5rem;
}
.settings-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.settings-btn img {
  width: 24px;
  height: 24px;
}

/* --- MAIN-STILE --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  /* Abstand zum Footer, damit Footer weiter unten steht */
  padding-bottom: 3rem; /* z.B. 3rem */
}

/* --- FOOTER-STILE --- */
footer {
  background: #ffffff;
  /* Leichte Linie als Abtrennung */
  border-top: 1px solid rgba(0,0,0,0.1);
  /* optional noch etwas Padding oben, um ihn abzuheben */
  padding-top: 1rem; 
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem; /* rundum 2rem */
}
@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.footer-column {
  flex: 1;
  min-width: 200px;
}
.footer-column h3 {
  margin-top: 0;
}
.footer-column ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.footer-column li a {
  color: #3367D6;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-column li a:hover {
  color: #2853a9;
}

/* --- GRID FÜR DIE KARTEN (Startscreen) --- */
.card-container {
  margin: 0;
  padding: 0;
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1200px) {
  .card-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- KARTEN --- */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.card img {
  width: 100%;
  height: auto;
  display: block;
}
.card-body {
  padding: 1.5rem;
}
.card-body h2 {
  margin: 0;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.card-body p {
  margin: 0;
  /* Optional: margin-bottom: 0.5rem; */
}
.card .card-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: #ffffff;
}
.card .card-actions button {
  background-color: #3367D6;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.card .card-actions button:hover {
  background-color: #2853a9;
}

/* --- DETAIL-ANSICHT --- */
.detail-view {
  padding: 1rem 0;
  /* Optional: margin-bottom: 2rem; */
}

/* Navigation (Buttons "Zur Übersicht", "Zurück", "Weiter") */
.nav-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative; /* ggf. für sticky? */
}
.nav-bar button {
  background-color: #3367D6;
  color: #fff;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.nav-bar button:hover {
  background-color: #2853a9;
}
/* 
   Wenn du eine sticky nav möchtest:
   .nav-bar {
     position: sticky;
     top: 0;
     background: #fff;
     z-index: 10;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     padding: 0.5rem;
     margin-bottom: 1rem;
   }
*/

/* Container für Detailseite, anfangs einspaltig */
.detail-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Standard: h2 -> img -> detail-text -> nav-bar -> page-info (Z-Reihenfolge) */
.detail-content h2 {
  margin: 0; /* optional */
}
.detail-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px; /* optional, modern Look */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* leichter Schatten */
}
.detail-text {
  line-height: 1.5;
  font-size: 1rem;
  /* Mehr Abstände um Text angenehmer zu gestalten */
  /* padding: 0.5rem 0; */
}

/* Ab Tablet-Breite: zweispaltiges Layout */
@media (min-width: 768px) {
  .detail-content {
    display: grid;
    /* 2 Spalten: links ~45% (Bild), rechts ~55% (Text),
       plus volle Breite für Überschrift, nav-bar, page-info */
    grid-template-columns: 45% 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 1rem;
    align-items: start;
  }

  /* Überschrift über beiden Spalten */
  .detail-content h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }

  /* Bild links, Text rechts (beide in Zeile 2) */
  .detail-content img {
    grid-column: 1;
    grid-row: 2;
    max-width: 100%; /* fülle 45% */
    margin: 0;
  }
  .detail-text {
    grid-column: 2;
    grid-row: 2;
  }

  /* nav-bar: Zeile 3, über volle Breite */
  .nav-bar {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center; /* Buttons in der Mitte */
  }

  /* Seiteninfo: Zeile 4, über volle Breite */
  .detail-content p[style*="margin-top: 1rem"] {
    grid-column: 1 / -1;
    grid-row: 4;
  }
}

/* --- INSTALL OVERLAY / MODAL --- */
.install-overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.install-modal {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.install-modal h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}
.install-modal p {
  margin-bottom: 1.5rem;
}
.install-modal button {
  margin-right: 1rem;
  background-color: #3367D6;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.install-modal button:hover {
  background-color: #2853a9;
}
