/* ----------  Design-Tokens  ---------- */
:root{
 --trans: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

/* ----------  Smooth Animations  ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Skip-Link */
#gedenkbuch .skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: var(--accent);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: 0.5em;
  z-index: 1000;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}
#gedenkbuch .skip-link:focus {
  left: 1rem;
  top: 1rem;
}



/* ----------  Infobar  ---------- */
#gedenkbuch .infobar {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}
#gedenkbuch .infobar a {
  font-weight: 600;
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  transition: var(--trans);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid transparent;
}
#gedenkbuch .infobar a:hover, .infobar a:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}


/* ----------  Header - Mit variablem Overlay  ---------- */
#gedenkbuch #main-header:hover { 
  cursor: pointer; 
}



/* ----------  Projektbeschreibung  ---------- */
#gedenkbuch .projekt-info {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 0 auto 5rem auto;
  max-width: 800px;
  box-shadow: var(--shadow);
  text-align: left;
}
#gedenkbuch .projekt-info em {
  font-style: italic;
  color: var(--primary);
  font-weight: 500;
}
@media (max-width: 992px) {
 #gedenkbuch .projekt-info {
    margin: 1.5rem auto 2.5rem;
    padding: 1.5rem;
    font-size: 90%;
    line-height: 1.4em
  }
}


/* ----------  Auswahl: Suche + filterbar  ---------- */
#gedenkbuch .auswahl {
    display: flex;
    flex-direction: row;
    gap: 40px;
    justify-content: space-between;
    margin: 2em auto 0 auto;
  }
 @media (max-width: 1200px) {
    #gedenkbuch .auswahl {
      flex-direction: column;
    }
 } 


/* ----------  Suche  ---------- */
#gedenkbuch .suche {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin: 0 !important;
  position: relative;
  width: auto;
  z-index: 1
}
#gedenkbuch #search {
  width: 100%;
  max-width: 500px;
  padding: 1rem 1.5rem;
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: var(--trans);
  font-family: inherit;
}
#gedenkbuch #search:focus {
  outline: none;
  border-color: #999;
  box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.1), var(--shadow-lg);
  transform: translateY(-2px);
}
#gedenkbuch #search::placeholder {
  font-style: italic;
  opacity: 0.7;
  color: #666
}
@media (max-width: 700px) {
  #gedenkbuch #search {
    padding: 0.875rem 1.25rem;
  }
}
@media (max-width: 400px) {
  #gedenkbuch #search {
    max-width: 100%;
    width: 100%;
    padding: 0.75rem 1rem;
  }
}




/* Filter */
.filterbar {
  display: flex;
  gap: 1rem;
  margin: 0 !important;
  justify-content: center;
  flex-wrap: wrap;
  position: relative
}
.filterbar select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: var(--trans);
  min-width: 140px;
  font-family: inherit;
}
.filterbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.1);
  transform: translateY(-1px);
}
.filterbar select:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
@media (max-width: 992px) {
 .filterbar {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .filterbar select {
    min-width: 200px;
    max-width: 100%
  }
  
}


/* ----------  Grid  ---------- */
#gedenkbuch .biographien {
  display: grid;
  gap: 3rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  max-width: 1800px;
  margin: 0 auto;
  margin-top: 3em !important
}
@media (max-width: 700px) {
  #gedenkbuch .biographien {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}





/* ----------  Cards  ---------- */
#gedenkbuch .card {
  transition: var(--trans);
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}
#gedenkbuch .card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#gedenkbuch .card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--bs-box-shadow-lg)
}
#gedenkbuch .card b {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#gedenkbuch .gebjahr {
}
#gedenkbuch mark.match {
  background: linear-gradient(120deg, rgba(107, 114, 128, 0.2) 0%, rgba(107, 114, 128, 0.1) 100%);
  color: var(--primary);
  padding: 0.15rem 0.3rem;
  border-radius: 0.25rem;
  font-weight: 500;
  border: 1px solid rgba(107, 114, 128, 0.3);
}
/* ----------  Cards  ---------- */





/* ----------  Nach oben/unten Buttons  ---------- */
#jump-buttons {
  position: fixed;
  right: 1.4rem;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1200;
  pointer-events: none; /* Buttons nehmen nur Pointer, nicht der Wrapper */
}
#jump-buttons button {
      pointer-events: all;
      background: var(--bg-card);
      color: var(--primary);
      border: 1.5px solid var(--border-subtle);
      border-radius: 50%;
      width: 46px;
      height: 46px;
      font-size: 1.7rem;
      font-weight: 700;
      box-shadow: var(--shadow-card);
      cursor: pointer;
      transition: var(--trans);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.85;
      
      position: fixed;
      bottom: calc(10% - 65px);
      right: 15px;
      width: 62px;
      height: 62px;
      color: #fff;
      background: rgba(0, 0, 0, 0.4);
      opacity: 1;
      border-radius: 0;
      box-shadow: none;
      border: none;
      font-size: 1.4rem;
      
      border-radius: 0;
      background: rgba(var(--bs-primary-rgb), .85) !important;
      border: 1px solid rgba(var(--bs-primary-rgb), .5) !important;
      width: 70px;
      height: 70px;
      box-shadow: var(--bs-box-shadow-sm);
      right: 5px
    }
    #jump-buttons button i {
      margin: 0 !important;
      padding: 0 !important;
      color: #fff;
      font-size: 25px;
    }
    #jump-buttons button::before {
      display: none
    }
    #jump-buttons button#to-top {
      display: none
    }
    #jump-buttons button#to-bottom {
      bottom: 50px;
      z-index: 10000
    }
    #jump-buttons button:hover, 
    #jump-buttons button:focus {
      color: #fff;
      border: none;
      border-radius: 0;
      opacity: 1;
      outline: none;
      background: #ffbb00;
      box-shadow: none
    }
    #jump-buttons button:active {
      background: #ffbb00;
      color:#fff;
      opacity: 1;
    }
@media (max-width: 767px) {	
     #jump-buttons button {
        width: 55px;
        height: 55px;
        top: auto !important;
        right: 0;
        bottom: 25px !important;
        }
     #jump-buttons button i {
        font-size: 21px;
        }		
    }




/* ----------  Print Styles  ---------- */
@media print {
  #gedenkbuch .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  #gedenkbuch .suche, 
  #gedenkbuch . bg-warningr, 
  #gedenkbuch .infobar {
    display: none;
  }
}