/* -----------------------------
   Makrobius – Stildefinition
   Blau & Gold, Klarheit & Geist
   ----------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500&family=Raleway&display=swap');

/* Grundlayout */
body {
  margin: 0;
  font-family: "Raleway", sans-serif;
  background: linear-gradient(to bottom right, #e9f3ff, #ffffff);
  color: #002b55;
  line-height: 1.6;
}

/* Kopfbereich */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to right, #004c99 0%, #0066cc 40%, #e5b700 100%);
  color: white;
  padding: 1.4rem 0 1rem 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 {
  margin: 0.2em 0 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.3rem;
  letter-spacing: 0.5px;
  text-align: center;
}

.subtitle {
  font-style: italic;
  margin: 0.3em 0 0.8em 0;
  font-size: 1.05em;
  opacity: 0.9;
  text-align: center;
}

/* Navigation */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.8em;
  text-align: center;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding-bottom: 4px;
  transition: color 0.3s, border-bottom 0.3s;
}

nav a:hover,
nav a.active {
  border-bottom: 2px solid #fff;
  color: #fffde6;
}

/* Hauptbereich */
main {
  max-width: 850px;
  margin: 3em auto;
  padding: 2em;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  animation: fadeIn 1.5s ease;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  color: #004c99;
  border-bottom: 2px solid #e5b700;
  padding-bottom: 0.4em;
  margin-top: 0;
}

/* Absätze */
p {
  margin-bottom: 1em;
}

/* Zurück-Button */
.back-button {
  text-align: center;
  margin-top: 2.5em;
  margin-bottom: 2em;
}

.back-button a {
  text-decoration: none;
  background: linear-gradient(to right, #004c99, #e5b700);
  color: white;
  padding: 0.6em 1.4em;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95em;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.back-button a:hover {
  background: linear-gradient(to right, #0066cc, #f0c300);
  transform: translateY(-2px);
}

/* Fußbereich */
footer {
  text-align: center;
  padding: 1em;
  font-size: 0.9em;
  color: #003366;
  background: #f5f8fc;
  border-top: 1px solid #e5b700;
  margin-top: 4em;
  letter-spacing: 0.3px;
}

footer::before {
  content: "?";
  color: #e5b700;
  margin-right: 0.4em;
}

/* Einblendungseffekt */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Galerie-Menü */
.gallery-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}

.gallery-menu a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #002b55;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.gallery-menu a:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.gallery-menu a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 30%,
    rgba(255, 255, 255, 0) 60%
  );
  transition: all 0.8s ease;
}

.gallery-menu a:hover::after {
  left: 100%;
}

/* Bilderraster */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2em;
  margin-top: 2em;
}

.image-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.image-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Bücherübersicht */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.book-card {
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.book-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #e5b700;
}

.book-card .card-body {
  padding: .9rem 1rem 1rem;
}

.book-card .title {
  font-weight: 700;
  color: #003a82;
  margin: 0 0 .3rem 0;
}

.book-card .subtitle {
  color: #335;
  font-size: .95rem;
  opacity: .9;
}

/* --- Modal (Popup-Fenster) --- */
.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: none !important;  /* Blur deaktiviert */
  z-index: 999;
}

.modal__dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 92vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  padding: 1.2rem;
  z-index: 1000;
}

.modal__close {
  position: absolute;
  right: .8rem;
  top: .6rem;
  font-size: 1.6rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #003a82;
}

.modal__header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: center;
}

.modal__header img {
  width: 140px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.modal__meta {
  color: #335;
  margin: .2rem 0 0 0;
}

.modal__body {
  margin-top: 1rem;
}

.modal__body blockquote {
  margin: .8rem 0;
  padding-left: .9rem;
  border-left: 3px solid #e5b700;
  color: #003a82;
  font-style: italic;
}

.modal__links a {
  display: inline-block;
  margin: .4rem .4rem 0 0;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(to right, #004c99, #e5b700);
  color: #fff;
  padding: .45rem .8rem;
  border-radius: 6px;
}

.modal__links a:hover {
  filter: brightness(1.05);
}

/* Modal-Inhalt immer klar darstellen */
.modal__dialog,
.modal__content,
.modal__dialog img {
  backdrop-filter: none !important;
  filter: none !important;
}