/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root { --header-height: 6rem; }

h2 {
  scroll-margin-top: calc(var(--header-height) + 8px); /* 8px Abstand optional */
}


body {
  font-family: 'Quattrocento';
  line-height: 1.6;
  background: floralwhite;
  color: #333;
  margin: 0;
}

/* Fonts */
@font-face {
  font-family: 'Quattrocento';
  /*src: url('/Users/gabrielkautz/nc-home/Dokumente/Sonstiges/Schriften/Schriften/Quattrocento/Quattrocento-Regular.ttf') format('truetype');*/
  src: url('/fonts/Quattrocento/Quattrocento-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Quattrocento-bold';
  /*src: url('/Users/gabrielkautz/nc-home/Dokumente/Sonstiges/Schriften/Schriften/Quattrocento/Quattrocento-Bold.ttf') format('truetype');*/
  src: url('/fonts/Quattrocento/Quattrocento-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* Haupt-Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: floralwhite;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo links, Button rechts */
  z-index: 1000;
  border-bottom: 1px dotted rgba(150, 120, 80, 0.8);
}

header .logo {
  display: flex;
  align-items: center;
}

header .logo img {
  height: 5rem;
  min-width: 5rem;
  border-radius: 1rem;
}

header h1 {
  flex: 1;                 /* nimmt den freien Platz ein */
  text-align: center;      /* Titel mittig */
  font-size: 2.2rem;
  font-family: 'Quattrocento-bold';
}

header .nav-toggle {
  background: saddlebrown;
  border-radius: 0.5rem;
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 1.2rem;
  min-width: 2.2rem;
  max-width: 4rem;
  width: 3vw;
  min-height: 2.2rem;
}

/* Zweiter Header */
.sub-header {
  position: fixed;
  top: 5.5rem; /* direkt unter dem Haupt-Header */
  left: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  z-index: 999;
}

.sub-header .nav-toggle,
.sub-header .aside-toggle {
  background: saddlebrown;
  border-radius: 0.5rem;
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 1.2rem;
}

aside {
  position: fixed;
  top: 9rem; /* Abstand unter Headern */
  left: 1rem;
  width: 20vw;
  min-width: 210px;
  max-width: 280px;
  background: bisque;
  border-right: 1px solid #ddd;
  padding: 1rem;
  z-index: 900;
  border-radius: 1rem;
  /* overflow: hidden;  <-- entfernen */
  overflow-y: auto;                 /* scrollbar wenn nötig */
  max-height: calc(100vh - 9rem - 3.5rem); /* Viewport minus top und evtl. footer */
  -webkit-overflow-scrolling: touch; /* smoother scrolling on iOS */
}

aside.open {
  left: 1rem;
}

nav {
  position: fixed;
  top: 9rem; /* unter Headern */
  right: -250px;
  width: 250px;
  height: calc(100vh - 9rem - 3.5rem); /* statt calc(100% - 6rem) */
  background: bisque;
  transition: right 0.7s ease;
  z-index: 1500;
  padding: 2rem 1rem;
  border-radius: 1rem 0 0 1rem;
  border: 1px dotted saddlebrown;
  overflow-y: auto;                 /* scrollbar wenn Inhalt zu groß */
  -webkit-overflow-scrolling: touch;
}

main, .wrap {
  padding-bottom: 5rem; /* Platz für fixierten Footer */
}

nav.open {
  right: 0;
  box-shadow: -2px 0 15px rgba(150, 120, 80, 0.8);
}

nav ul {
  list-style: none;
}

nav li {
  margin: 1rem 0;
}

nav a {
  position: relative;
  color: inherit; /* Standardfarbe */
  text-decoration: none;
  z-index: 1;     /* Text im Vordergrund */
}

nav a::after {
  content: "";
  position: absolute;
  left: -0.5rem;
  bottom: -50%;
  width: 14rem;
  height: 200%;
  background: transparent;
  transition: box-shadow 0.1s ease, background 0.2s ease;
  border-radius: 0.4rem;
  z-index: -1; /* Hintergrund hinter dem Text */
}

nav a:hover {
  color: #000; /* Schrift bleibt deutlich sichtbar */
}

nav a:hover::after {
  background: floralwhite; /* cornsilk */
  box-shadow: 0 0 8px rgba(150, 120, 80, 0.8);
}


a:any-link {
  color: saddlebrown;
  text-decoration: none;
  cursor: pointer;
}

a:any-link:hover {
  color: black;
  cursor: pointer;
}

/* Main Content */
main {
  margin-top: 6vh;
  margin-bottom: 6vh;
  padding: 1rem;
  text-align: center;
}

/* Footer fixiert unten */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: bisque;
  border-top: 1px solid rgba(150, 120, 80, 0.8);
  /*text-align: center;*/
  padding: 0.7rem;
  z-index: 1000;
}

footer a {
  margin: 0 1rem;
  text-decoration: none;
  position: relative;
  font-size: 1rem; /* Ausgangsgröße */
  /*transition: color 0.4s ease, font-size 0.4s ease;*/
}

footer a:hover {
  color: saddlebrown;
  /*font-size: 1.1rem;*/ /* etwas größer beim Hover */
}

/* Geschützte Bereiche standardmäßig ausblenden */
.protected {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 2rem auto;
}

.box {
  background: bisque;
  border-radius: 1rem;
  padding: 0.8rem;
  padding-bottom: 10%;
  text-align: center;
  cursor: pointer;
  border: 0.5px;
  height: 20vh;
  transition: background 0.6s ease, box-shadow 0.4s ease;
  /*box-shadow: 0 4px 8px rgba(0,0,0,0.2);*/
  margin: 0.3rem;
  display: flex;
  align-items: flex-end;   /* vertikal nach unten */
  justify-content: center; /* horizontal mittig */
}


.box:hover {
  /*background: sandybrown;*/
  box-shadow: 0 6px 20px rgba(150, 120, 80, 0.8);
  /*transform: scale(1.02);*/
}

.search-form {
  margin: 1rem auto;
  max-width: 500px;
  display: flex;
  justify-content: center;
}

.search-form input[type="search"] {
  padding: 12px 20px;
  font-size: 18px;
  width: 80%;
  max-width: 450px;
  border: 1px solid #ccc;
  border-radius: 1.2rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Quattrocento';
}

/* Fokus-Effekt */
.search-form input[type="search"]:focus {
  border-color: #003300;
  border-width: 1.2px;
  box-shadow: 0 0 8px rgba(150, 120, 80, 0.8);
}

h2{
  font-size: 2rem;
  font-weight: bold;
  text-align: left;
}

h3{
  font-size: 1.3rem;
  font-weight: bold;
  text-align: left;
  margin-top: 1rem;
}

h4 {
  font-size: 1.6rem;
  font-family: 'Quattrocento';
  font-weight: bold;
}

p{
  font-size: 1.2rem;
  text-align: left;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}

section{
  text-align: left;
}
article{
  margin-top: 2rem;
}

h2 {
  transition: box-shadow 0.4s, color 0.4s;
}

h2:target {
  animation: flashShadow 3s ease;
}

@keyframes flashShadow {
  0% {
    color: #d32f2f;
    box-shadow: 0 0 0 6px rgba(255,229,229,1);
  }
  60% {
    color: #d32f2f;
    box-shadow: 0 0 0 6px rgba(255,229,229,1);
  }
  100% {
    color: inherit;
    box-shadow: none;
  }
}

h2 {
  scroll-margin-top: calc(var(--header-height) + 12px); /* 8px Abstand optional */
}




label {
  font-size: 28px;
}

#searchWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 7rem; /*20px auto*/
}

#resultCount {
  margin-right: 10px;
  font-size: 18px;
  color: #444;
}

input#search {
  padding: 12px 20px;
  font-size: 18px;
  width: 40%;
  min-width: 300px;
  max-width: 400px;
  /*margin: 0 auto 10px;*/
  border: 1px solid #ccc;
  border-radius: 18px;
  outline: none;
  transition: border-color 0.3s ease;
}

input#search:focus {
  outline: none;
  border-color: #003300;
  border-width: 1.2px;
  box-shadow: 0 0 8px rgba(150, 120, 80, 0.8);
}

#toggleExternal {
  margin-left: 10px;
  padding: 10px 15px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  background-color: saddlebrown;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}
#toggleExternal.inactive {
  background-color: bisque;
  color: #000;
}

.groupHeader {
  text-align: center;
  margin: 40px auto 10px;
  font-size: 22px;
  color: rgb(100, 0, 0);
  padding-bottom: 5px;
}

table.groupTable {
  border-collapse: collapse;
  width: 97%;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

table.groupTable th,
table.groupTable td {
  padding: 12px;
  text-align: left;
}

table.groupTable th {
  background: bisque;
  color: rgb(100, 0, 0);
  font-size: 16px;
}

table.groupTable td {
  font-size: 14px;
}

table.groupTable tr:nth-child(even) {
  background: #f9f9f9;
}
table.groupTable tr:hover {
  background: #e0f2f1;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content.img {
  max-width: 60%;
  max-height: 60%;
  border: 2px solid #fff;
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
  display: block;
}
.modal-content.publisher {
  max-width: 60%;
  max-height: 60%;
  border: 2px solid #000;
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}
.close {
  position: absolute;
  top: 30px;
  right: 45px;
  color: transparent;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: floralwhite;
}

/* Färbt alle Checkboxen in der Filterliste braun */
input[type="checkbox"] {
    accent-color: saddlebrown;
}



@media screen and (max-width: 900px) {

  table.groupTable,
  table.groupTable thead,
  table.groupTable tbody,
  table.groupTable th,
  table.groupTable td,
  table.groupTable tr {
    display: block;
  }

  table.groupTable thead {
    display: none;
  }

  table.groupTable tr {
    margin: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
  }

  table.groupTable td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
    font-size: 14px;
  }

  table.groupTable td::before {
      content: attr(data-label); /* Hier holen wir den Text aus dem PHP */
      font-weight: bold;
      margin-right: 6px;
      min-width: 80px; /* Optional: Damit die Werte schön untereinander stehen */
      display: inline-block; /* Nötig, damit min-width funktioniert */
    }

.search-form {
  margin: 7rem auto;
}







@media screen and (max-width: 450px) {
header h1{
  font-size: 1rem;
}

header .logo img{
  height: 3rem;
  min-width: 3rem;
}

h2 {
  font-size: 1.6rem;
}

footer{
  padding: 0.4rem;
}

footer span, footer a:any-link {
  font-size: 0.85rem;
  padding: 0;
}

footer a{
  font-size: 0.9rem;
  margin: 0 0.15rem;
}

main, .wrap {
  padding-bottom: 1rem;
}

p{
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

#toggleExternal {
  margin-left: 0;
}

#searchWrapper{
  display: block;
  margin-top: 2rem;
}



}
