/* Reset/Basis */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html { background: #D5D1A9; }           /* Pistacio-Ton */
html::before {
  content: "";
  position: fixed;
  left: 0;
  bottom: 0;
  width: 50vw;   /* passt sich der Bildschirmbreite an */
  height: 80vh;  /* passt sich der Bildschirmhöhe an */
  background: url("../images/bamboo_2.png") no-repeat left bottom;
  background-size: contain;
  opacity: 0.6;
  background-position: left bottom;
  pointer-events: none;
  z-index: -1;
}

html::after {
  content: "";
  position: fixed;
  right: 0;
  top: 0;
  width: 20vw;       /* Breite anpassen */
  height: 70vh;      /* Höhe anpassen */
  background: url("../images/lanterns_2.png") no-repeat right top;
  background-size: contain;
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

body { background: transparent; min-height: 100svh; }

body {
  font-family: Inter, Arial, sans-serif;
  color: #2a241e;
  line-height: 1.6;
}

body::after {
  content: "";
  display: block;
  height: 24px;                         /* gewünschte Lücke unten */
}

h1, h2, h3 {
  font-family: Lora, Georgia, serif;
  color: #5c4632;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.6rem, 1rem + 2vw, 2.2rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}

h3 {
  font-size: 1.2rem
}

h3 .sub {
  font-size: 0.8em;
  font-weight: normal;
  margin-left: 12px;
  color: #7a6b56;
  font-style: italic; /* optional */
}

.text {
  max-width: 800px;
  line-height: 1.6;
  margin-top: 0.5em;
}

/* Gemeinsame Boxen */
.site-header, .site-main, .site-footer {
  max-width: 1080px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
  padding: 20px;
}

/* Header */
.site-header {
  background: #ffebcc;
  border-radius: 10px;
  border-style: solid;
  border-color: #773A0E;
  border-width: 2px;
  box-shadow: 10px 6px 10px rgba(0,0,0, .35);
}

.head {
  display: flex;
  justify-content: center;
}

/* Logo + Name */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #5c4632;
}

.brand img {
  height: 60px;
  width: auto;
}

/* Titelzeile: Logo links, Titel mittig */
.site-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  text-align: center;
}

/* Logo */
.site-title .logo {
  grid-column: 1;
  justify-self: start;
  height: 70px;
  width: auto;
}

/* Titel */
.site-title h1 {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-family: Lora, Georgia, serif;
  font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem);
  color: #663d00;
  position: relative;
  display: inline-block;
}

.site-title h1::after {
  content: "";
  display: block;
  height: 4px;
  background: #995c00;
  margin-top: 6px;
}

/* margin on book page */
.book {
  margin-left: 30px;
}

/* Navigation */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  color: #663d00;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.is-active,
.main-nav a:visited.is-active {
  color: #cc7a00;
}

.lang-toggle {
  font-size: 0.9rem;
}

.lang-toggle a {
  text-decoration: none;
  color: #2a241e;
}

.lang-toggle a.is-active {
  font-weight: 600;
  color: #cc7a00;
}

/* Main */
.site-main {
  background-color: #ffebcc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 40px 20px;
  border-style: solid;
  border-color: #773A0E;
  border-width: 2px;
  border-radius: 10px;
  box-shadow: 10px 6px 10px rgba(0,0,0, .25);
}

.site-main .site-main__grid {
  max-width: 1080px;
  margin: 0 auto;
}

.site-main.home .site-main__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-areas: "text image";
  gap: 24px;
}

.site-main__text {
  grid-area: text;
}

.site-main__image {
  grid-area: image;
  display: flex;
  flex-direction: column;  /* Bild + Hinweis untereinander */
  justify-content: center;
  align-items: center;
}

.site-main__image img {
  display: block;
  max-width: 70%;
  height: auto;
  box-shadow: 8px 6px 18px rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}

.site-main__image p {
  margin-top: 8px;        /* Abstand zum Bild */
  font-size: 0.8rem;      /* etwas kleiner */
  color: #666;            /* dezentes Grau */
  font-style: italic;     /* leicht kursiv, wirkt unaufdringlich */
}

/* Buch-Link (für ein einzelnes Buch-Bild) */
.link-img {
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-img img {
  display: block;
  width: 280px;
  height: auto;
  border-radius: 8px;
  transition: inherit;
}

.link-img .link-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  white-space: nowrap;
  font-family: Lora, Georgia, serif;
  font-weight: 600;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
  pointer-events: none;
}

.link-img:hover {
  transform: translateY(-6px);
}

.link-img:hover img {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4),
              0 0 12px rgba(204, 122, 0, 0.6);
}

.link-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-text img.icon {
  height: 20px;
  width: auto;
}

.icon{
  max-width: 40px;
  max-height: 40px;
}

.guestbook {
  max-width: 800px;          /* begrenzt den Mittelteil */
  margin: 0 auto;            /* zentriert ihn */
  padding: 40px;
  background: url("../images/bamboo_4.png") repeat-y center top;
  background-size: cover;    /* zieht das Bild, damit es die Höhe füllt */
  border-radius: 10px;       /* optional, damit’s wie ein Panel wirkt */
  min-height: 400px; /* damit man auch was sieht */
}


.subtitle {
  font-size: 0.9em;
  font-style: italic;
  color: #5a4a3f;
  margin-top: -4px;   /* dichter an der Überschrift */
  margin-bottom: 12px;
}

.title-note::before {
  content: "📌";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  font-size: 20px;
}
.title-note {
  position: relative;
}

.title-note {
  display: inline-block;
  background: rgba(255, 253, 245, 0.85); /* wie Papier */
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.25); /* leichter Drop Shadow */
  border: 1px solid #e0d8c2;
  text-align: center;
  margin-bottom: 20px;
}

.title-note h2 {
  margin: 0;
  font-size: 1.6em;
}

.title-note p {
  margin: 4px 0 0 0; /* dicht dran, keine Leerzeile */
  font-size: 0.9em;
  font-style: italic;
  color: #5a4a3f;
}

/* Container für Formular + Zettel nebeneinander */
.guestbook-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap; /* bei schmalem Bildschirm: umbrechen */
}

/* Formular als schmaler Zettel links */
.guestbook-form {
  flex: 0 0 280px; /* feste Breite links */
  background: rgba(255, 253, 245, 0.9);
  padding: 15px;
  border-radius: 6px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guestbook-form label {
  font-size: 0.85em;
  font-weight: bold;
  color: #3b2f2f;
}

.guestbook-form input,
.guestbook-form textarea {
  font-size: 0.9em;
  border: 1px solid #d0c5aa;
  border-radius: 4px;
  padding: 6px;
  font-family: inherit;
  background: #fffdf5;
  width: 100%;
  box-sizing: border-box;
}

.guestbook-form button {
  align-self: flex-start;
  font-size: 0.9em;
  background: #b78b2c;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.guestbook-form button:hover {
  filter: brightness(1.1);
}

/* Notizzettel rechts daneben */
.notes {
  flex: 1;                /* nimmt den restlichen Platz ein */
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; /* linksbündig neben dem Formular */
  padding: 20px;
}


.note {
  width: 180px;
  min-height: 120px;
  background: #fffdf5;          /* leichtes Papierweiß */
  padding: 15px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
  border: 1px solid #e0d8c2;
  border-radius: 4px;
  font-family: "Georgia", serif;
  position: relative;
  transition: transform 0.2s;
}

.note:hover {
  transform: rotate(0deg) scale(1.05);
}

.note::before {
  content: "📌";                /* Pin oben */
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

.note .reaction {
  margin-top: 8px;
  font-size: 1.2em;
  text-align: right;
}


/* Footer */
.site-footer {
  background: #ffebcc;
  font-size: 0.95rem;
  border-style: solid;
  border-color: #773A0E;
  border-width: 2px;
  border-radius: 10px;
  box-shadow: 10px 6px 10px rgba(0,0,0, .25);
}

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

/* Buttons allgemein */
.cta {
  display: flex;
  gap: 12px;
  margin-top: 1em;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn.gold {
  background: #b78b2c;
  color: #fff;
}

.btn.gold:hover {
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  color: #2a241e;
  border-color: rgba(0, 0, 0, .2);
}

.btn.ghost:hover {
  background: rgba(0, 0, 0, .04);
}

.btn.mail {
  background-color: #ffcc80;
  color: #4d2e00;
  border-radius: 20px;
  border-color: #cc7a00;
}

.btn.mail:hover {
  background: #ffd699;
  border-color: #ffa31a;
}

.cover {
  border-radius: 20px;
  box-shadow: 8px 4px 8px rgba(0, 0, 0, 0.35);
}

.line {
  position: relative;
  display: inline-block;
}

.line::after {
  content: "";
  display: block;
  height: 2px;
  background: #995c00;
  margin-top: 3px;
  width: 120%;
}

.lines {
  position: relative;
  display: inline-block;
}

.lines::before {
  content: "";
  display: block;
  height: 2px;
  background: #995c00;
  margin-bottom: 12px;
  width: 300%;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 150px));
  gap: 16px;
  margin-top: 20px;
  margin-left: 20px;
}

.gallery-grid .thumb {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.gallery-grid .thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  z-index: 999;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 32px;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}

/* About photo */
.about-photo {
  margin-top: 2rem;
  text-align: center;
}

.about-photo img {
  max-width: 240px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

/* Social links */
.social-links {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}
.social-links li { margin: 0.5em 0; }
.social-links a {
  color: #2a241e;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
  .head { flex-direction: column; align-items: flex-start; }
  .site-title { text-align: left; margin-top: 16px; }
  .main-nav { flex-direction: column; align-items: flex-start; }
  .main-nav ul { flex-wrap: wrap; gap: 12px; }
  .site-main.home .site-main__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "image" "text";
  }
}

/* --- Reading Samples / Kapitel-Overlays --- */

/* Liste hübsch machen */
.chapter-list {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1rem;
  display: grid;
  gap: 1rem;
}

.chapter-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Download-Button */
.dl-btn {
  padding: .55rem .8rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.15);
  background: #f3e6c7;
  color: #4a3317;
}
.dl-btn:hover {
  filter: brightness(1.03);
}

/* Overlay */
.overlay {
  display: none;  /* versteckt standardmäßig */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
}

.overlay-content {
  position: relative;
  width: 80vw;
  height: 80vh;
  margin: 5vh auto;
  background: #f9f3e4;
  border: 2px solid #d3c3a3;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  overflow: hidden;
}

.overlay-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.close {
  position: absolute;
  top: 12px;        /* etwas mehr Abstand nach unten */
  right: 16px;      /* nach rechts */
  font-size: 2.5rem; /* größer machen */
  font-weight: bold;
  color: #5b4636;
  cursor: pointer;
  z-index: 10000;
}

.who-is-who {
  padding: 2rem;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.character-card {
  background: #fffaf5;
  border: 2px solid #d4b68a;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.character-card:hover {
  transform: translateY(-5px);
  box-shadow: 4px 6px 12px rgba(0,0,0,0.15);
}

.character-card h3 {
  margin-top: 0;
  font-family: Lora, Georgia, serif;
  color: #5b4636;
}

#characterSearch {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 0 1.5rem;
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid #d4b68a;
  border-radius: 8px;
}

.character-card.highlight {
  box-shadow: 0 0 12px 4px rgba(255, 200, 0, 0.7);
  transition: box-shadow 0.3s ease;
}
