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

/* Schrift */

/* Responsive Tabelle */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

.header {
  text-align: center;
  padding: 32px;
}

.row {
  display: -ms-flexbox; /* IE10 */
  display: flex;
  -ms-flex-wrap: wrap; /* IE10 */
  flex-wrap: wrap;
  padding: 0 4px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 1200px;
}

/* Generiert vier gleich große Spalten, die nebeneinander stehen. */
.column {
  -ms-flex: 25%; /* IE10 */
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
  height: auto;
}


/* Responsive layout - generiert zweispaltiges Layout anstelle des vierspaltigen */
@media screen and (max-width: 800px) {
  .column {
    -ms-flex: 50%;
    flex: 50%;
    max-width: 50%;
  }
}

/* Responsive layout - stapelt die beiden Spalten übereinander statt nebeneinander */
@media screen and (max-width: 600px) {
  .column {
    -ms-flex: 100%;
    flex: 100%;
    max-width: 100%;
  }
}

/* Datenschutz-Popup (Modal) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal {
  width: min(720px, 92vw);
  max-height: 82vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.2);
  background: #f7f7f7;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

.modal-body {
  padding: 14px 16px;
  overflow: auto;
  max-height: calc(82vh - 56px);
  font-size: 14px;
  line-height: 1.45;
}

.privacy-link {
  cursor: pointer;
  text-decoration: underline;
}


/* Typografie linke Spalte */
.column:first-child h1,
.column:first-child h2,
.column:first-child h3 {
  font-weight: 600;
}

.column:first-child h1 {
  letter-spacing: 0.02em;
}

.column:first-child h3 {
  line-height: 1.4;
}


/* Klickbare Buchcover */
a[aria-haspopup="dialog"] img {
  cursor: pointer;
}



.order-link {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 8px;
  background: #f7f7f7;
  text-decoration: none;
  color: inherit;
}
.order-link:hover {
  background: #eeeeee;
}

/* LINK HOVER – alle Links inkl. Datenschutzerklärung */
a,
.privacy-link {
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover,
a:focus,
.privacy-link:hover,
.privacy-link:focus {
  color: #0056b3;
  background-color: rgba(0,0,0,0.05);
  cursor: pointer;
}

/* LINK HOVER – modals (Popup-Dialoge) */
.modal a {
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.modal a:hover,
.modal a:focus {
  color: #0056b3;
  background-color: rgba(0,0,0,0.05);
}

.brand-dot {
  color: #c00000;
}

.coming-soon {
  opacity: 0.6;
}

.column img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.column:not(.coming-soon) img:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.column:not(.coming-soon) img {
  cursor: pointer;
}

.coming-soon img {
  cursor: default;
}


.contact-form {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.contact-form label {
  margin-bottom: 2px;
  font-size: 0.95em;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 92%; 
  max-width: 420px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  box-sizing: border-box;
  font-family: inherit;
}
.contact-form textarea {
  resize: vertical;
}
.optin {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95em;
  opacity: 0.95;
  margin-top: 6px;
}
.optin input[type="checkbox"] {
  margin-top: 3px;
}
.contact-actions {
  margin-top: 6px;
}
button.order-link {
  cursor: pointer;
  font-family: inherit;
}
.contact-hint {
  margin-top: 12px;
  font-size: 0.95em;
  opacity: 0.85;
}

iframe { max-width: 100%; }
.modal-overlay { contain: layout paint style; }

/* ==========================================================
   Stabiles Buch-/Cover-Layout
   Ziel: konsistente Platzierung beim Verändern der Browserbreite.
   Diese Regeln überschreiben das ältere Flex-Wrap-Layout nur für
   die Buchbereiche und lassen Modals, Links und Skripte unverändert.
   ========================================================== */

.row-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 3fr);
  gap: 18px;
  align-items: start;
}

.row-hero > .column,
.row-hero > .book-grid {
  min-width: 0;
  max-width: none;
  width: 100%;
  flex: initial;
}

.book-grid,
.row-books {
  display: grid;
  gap: 18px;
  align-items: start;
  padding: 0 8px;
}

.book-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.row-books {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-grid > div,
.row-books > .column {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: initial;
  padding: 0;
}

.book-grid a[aria-haspopup="dialog"],
.row-books a[aria-haspopup="dialog"] {
  display: block;
}

.book-grid a[aria-haspopup="dialog"] img,
.book-grid a[aria-haspopup="dialog"] picture,
.row-books a[aria-haspopup="dialog"] img,
.row-books a[aria-haspopup="dialog"] picture {
  display: block;
  width: 100%;
}

.book-grid a[aria-haspopup="dialog"] img,
.row-books a[aria-haspopup="dialog"] img {
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
}

.col-heading h2 {
  margin-top: 0;
}

/* ════════════════════════════════════════════════════
   NEUES 2-SPALTEN-SEITEN-LAYOUT
   Ersetzt die alten row-hero / row-books Konstrukte.
   Text links, durchgehender Büchergrid rechts.
   ════════════════════════════════════════════════════ */

.page-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 3fr);
  gap: 0 24px;
  padding: 0 8px;
  align-items: start;
}

.page-sidebar {
  /* sticky: Text bleibt sichtbar während Bücher scrollen */
  position: sticky;
  top: 72px;          /* unterhalb des fixierten Headers */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none;
  padding-right: 8px;
}
.page-sidebar::-webkit-scrollbar { display: none; }

.page-main {
  min-width: 0;
}

/* Einheitlicher Büchergrid – alle Bücher in einer Struktur */
.book-grid-unified {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 12px;
  align-items: start;
  padding: 8px 0 24px;
}

.book-grid-unified > div {
  min-width: 0;
}

.book-grid-unified > div img,
.book-grid-unified > div picture {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}

.book-grid-unified > div img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.book-grid-unified > div img:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Abschnittsüberschriften im Büchergrid: volle Breite */
.book-section-heading {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 8px;
}

.book-section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ── Responsive: ≤1100 px – Sidebar stapelt sich über Bücher ── */
@media screen and (max-width: 1100px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* ── Responsive: ≤800 px – 2-spaltiger Büchergrid ── */
@media screen and (max-width: 800px) {
  .book-grid-unified {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Responsive: ≤600 px – einspaltiger Büchergrid ── */
@media screen and (max-width: 600px) {
  .book-grid-unified {
    grid-template-columns: 1fr;
    padding: 0 4px 24px;
  }
}

.book-grid > div,
.row-books > .column {
  padding: 0 4px;
}

.book-grid > div img {
  margin-top: 8px;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ── Stufe 1: Tablet groß (≤1100 px)
   row-hero stapelt sich; row-books zeigt 3 Spalten ohne Spacer       */
@media screen and (max-width: 1100px) {
  .row-hero {
    grid-template-columns: 1fr;
  }

  .row-books {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .row-books > .col-heading {
    grid-column: 1 / -1;
  }

  .row-books > .col-spacer {
    display: none;
  }
}

/* ── Stufe 2: Tablet klein (≤800 px)
   book-grid und row-books auf 2 Spalten reduzieren                   */
@media screen and (max-width: 800px) {
  .book-grid,
  .row-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* col-heading bleibt über beide Spalten gestreckt */
  .row-books > .col-heading {
    grid-column: 1 / -1;
  }
}

/* ── Stufe 3: Mobil (≤600 px)
   Alles einspaltiger Stapel                                           */
@media screen and (max-width: 600px) {
  .book-grid,
  .row-books {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
}
