@import url('https://fonts.googleapis.com/css2?family=El+Messiri');
@import url('https://fonts.googleapis.com/css2?family=Cairo');

* {
   margin:0;
   padding: 0;
 }

body {
  scroll-behavior: smooth;
  background:rgba(219, 236, 255, 0.42);
}

.wrapper {
  display: flex;
  align-items:center;
  justify-content: center;
}

img {
   height: 25px;
   width: 25px;
}

#navbar {
  font-family: 'Cairo';
  position: sticky;
  font-size:0.85rem;
  width: 100vw;
  top: 0;
  height:200px;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  line-height:1.2rem;
  padding: 0.5rem 1.1rem ;
  overflow-x: auto;
  background: rgba(51,51,102,0.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(120, 82, 31, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  scrollbar-width: thin;
}

.timeline {
  display: grid;
  border-top: 1px solid rgba(140, 120, 95, 0.18);
  padding-top: 0.1rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: -0.7rem;
  top: 0.7rem;
  bottom: 0.2rem;
  width: 1px;
  background: white;
  opacity: 0.7;
}

.time-block {
  padding: 0.3rem 0.3rem 0.25rem 0.25rem;
  border-bottom: 1px solid rgba(140, 120, 95, 0.14);
  position: relative;
}

.time-block::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 0.5rem;
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  border: 2px solid darkred;
  background: #f7f7f7;
}

.blinky {
  font-style:italic;
  font-weight: 800;
  animation: blinker 2.1s linear infinite;
 }

@keyframes blinker {
  50% {
        opacity: 0.3;
      }
}
 
a {
    text-decoration: none;
    color:white;
    margin-right:3px;
}

h2,h3,h4 {
    font-family: "El Messiri";
    padding:0.1rem 1.1rem;
    font-size: 1.1rem;
    font-weight:700;
    letter-spacing: 0.1rem;
    margin-top: 0.5rem;
}
h4 {
   font-size: 0.96rem;
}

section {
  background:linear-gradient(155deg, rgba(237,201,175,0.8) 0%, rgba(255,218,185,0.7) 80%, rgb(237,201,175,0.8) 100%);
  color:#313a30;
  margin-top: 190px;
  border: 1px solid rgba(140, 120, 95, 0.18);
  border-radius: 1.3rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
 }

#prolog, #epilog {
   background: linear-gradient(180deg, rgba(247, 215, 162,0.7), rgba(214, 154, 86, 0.7));
}

#chapter1, #chapter11 {
  background: rgba(182, 155, 227, 0.24);
}

#chapter2 {
  background:rgba(186,166,132,0.36);
}

#chapter3, #chapter9 {
   background: linear-gradient(155deg, rgba(133, 89, 136,0.8) 0% ,rgba(107, 73, 132,0.8) 60%,rgba(72, 52, 117,0.8) 100%);
   color:white;
}

#chapter4 {
   background: linear-gradient(180deg, #facfc1,#efd9cb);
}

#chapter5 {
  background:linear-gradient(155deg,rgba(89,206,191,0.21) 0%, rgba(58,195,171,0.21) 60%,rgba(66,180,171,0.21) 100%);
  color: #2e4f4e;
}

#chapter6 {
  background:linear-gradient(180deg, rgba(214, 142, 119, 0.27), rgba(142, 81, 64,0.27));
}

#chapter7 {
   background:linear-gradient(180deg, #ecd8d4, #c8b3ae);
} 

#chapter8 {
   background:#f7f3ea;
}

#chapter10 {
   background: linear-gradient(180deg, #e9e5e0, #c7c3be);
}

#chapter12 {
   background: linear-gradient(180deg, #e4cbbe,rgb(250, 246, 239));
}

.scene-card {  
     max-width: 780px;
     padding: 1.4rem 0.6rem 1.4rem 0.6rem;
     margin: 2vw auto 2vw auto;
     font-size: 0.9rem;
     border-radius: 18px;
     border: 1px solid rgba(0,0,0,.10);
     box-shadow: 0 14px 34px rgba(0,0,0,.08);
     position: relative;
     overflow: hidden;
   }

/* Der Textkörper, der anfangs gekürzt wird */
.scene-body {
    max-height: calc(100vh - 380px);  
    overflow: hidden;
    position: relative;
    transition: max-height 0.25s ease;
}

/* Verlauf am unteren Rand, wenn NICHT expandiert */
.scene-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: linear-gradient(
    to bottom,
    rgba(137, 131, 127, 0) 0%,
    rgba(137, 131, 127, 0.7) 50%,
    rgba(137, 131, 127, 1) 100%
  );
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

/* Wenn expanded: keine Begrenzung + kein Verlauf */
.scene-body.is-expanded {
  max-height: 1000vh; /* quasi "unendlich" */
}

.scene-body.is-expanded::after {
  opacity: 0;
}

/* Toggle-Button */
.scene-toggle {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgb(77,65,23);
  background: rgba(77, 65, 23, 0.82);
  color: #edc9af;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.oasis {
   background:rgba(9, 122, 104, 0.64);
   border: rgba(9,122,104,0.82);
   color:#f7f7f7;
}
.blue {
   color: white;
   background: rgba(2,38,88,0.64);
   border: rgba(2,38,88,0.82);
}

.scene-toggle::after {
  content: "▼";
  font-size: 0.7em;
  transform: translateY(1px);
  transition: transform 0.25s ease;
}

.scene-toggle.is-expanded::after {
  transform: rotate(180deg) translateY(-1px);
}

.scene-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.scene-toggle:active {
  transform: translateY(0);
  box-shadow: none;
  }

p {
    font-family: 'El Messiri';
    font-size: 0.9rem;
    line-height:112%;
    padding: 0.3rem 1.1rem;
}

@media (min-width: 576px) {
   img {
      height: 30px;
      width: 30px;
   }
   
   #navbar {
      font-size: 0.95rem;
   }
   
  .scene-body {
    max-height: calc(100vh - 410px);  
  }
   
   h2 {
        font-size: 1.3rem;
        margin-top: 1.1rem;
   }

   h4 {
        font-size:1.1rem;
   }
}

@media (min-width: 768px) {
   #navbar {
      justify-content: center;
      font-size: 1.01rem;
      height: 250px;
   }
   
   h2 {
      font-size:1.4rem;
   }
   
   section {
      margin-top:285px;
   }
   
   .timeline {
      margin-right: 2.5rem;
   }
   
   .time-block {
    padding: 0.5rem 0.4rem;
   }

   .time-block::before {
      width:  0.64rem;
      height: 0.64rem;
      border: 2px solid darkred;
   }

   p {
      font-size: 0.98rem;
   }

   .scene-toggle {
      font-size: 0.9rem;
   }
}

@media (min-width: 992px) {
   img {
      height: 36px;
      width: 36px;
    }

   #navbar {
      font-size: 1.15rem;
   }
   
   h2 {
        font-size:1.5rem;
   }

   h4 {
        font-size:1.2rem;
   }
   
   p {
      font-size: 1.05rem;
   }
}

@media (min-width: 1200px) {
   h2 {
        font-size: 1.6rem;
   }
   
   p {
      font-size: 1.15rem;
   }
}
