
/* ===========================
  ARCHIVALIE
=========================== */

.archivalie {
  max-width: 720px;
  margin: 0 auto;
}

.archivalie-header {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
}

.archivalie-title {
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
}


.archivalie-subline {
  display: block;
  margin: 0 0 0.5rem 0;
}

.archivalie-subtitle,
.archivalie-id {
  display: block;
  margin: 0;
  text-align: left;
  color: #777;
}

.archivalie-subtitle {
  font-style: italic;
}

.archivalie-id {
  font-size: 0.95rem;
  margin-top: 0.15rem;
}


/* Cover */

.archivalie-cover {
  margin-top: 1.2rem;
}

.archivalie-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 20px;
}

/* Boxen */

.archivalie-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 1.3rem;
  margin-top: 1.8rem;
}

.archivalie-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Archivdaten */

.archivalie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.archivalie-meta-item {
  min-width: 0;
}

.archivalie-meta-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #111;
}

.archivalie-meta-item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
}

/* Text */

.archivalie-text p {
  max-width: 65ch;
}

/* Galerie */

.archivalie-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 130px));
  gap: 0.9rem;
  justify-content: center;
  align-items: start;
}

.archivalie-detail-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.archivalie-detail-item {
  margin: 0;
}

.archivalie-detail-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.archivalie-detail-link:hover img {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.archivalie-detail-item figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #777;
    text-align: center;
}

/* Lightbox */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 9999;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 20px;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 0.8rem;
  color: #f0f0f0;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

/* Mobile */

@media (max-width: 780px) {
  .archivalie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
  }

  .archivalie-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* ===========================
  SAMMLUNG
=========================== */

.sammlung-intro {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.sammlung-intro p {
  max-width: 65ch;
  color: #555;
}

.sammlung-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.sammlung-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 1.2rem;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.sammlung-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.sammlung-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.sammlung-card p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

.sammlung-latest {
  margin-top: 2.5rem;
}

.sammlung-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sammlung-list-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}

.sammlung-list-item:hover {
  background: #fcfcfc;
}

.sammlung-list-title {
  font-weight: 600;
}

.sammlung-list-meta {
  color: #777;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .sammlung-grid {
    grid-template-columns: 1fr;
  }

  .sammlung-list-item {
    align-items: flex-start;
  }

  .sammlung-list-meta {
    white-space: normal;
  }
}

.archivalie-date-row {
  margin-top: 0.35rem;
}

.archivalie-date {
  font-style: italic;
  color: #777;
  font-weight: 300;
}

.archivalie-meta-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.archivalie-meta-column {
  display: flex;
  flex-direction: column;
}

.archivalie-meta-label {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.35rem;
}

.archivalie-categories,
.archivalie-themen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}


.archivalie-links {
  padding-left: 1.2rem;
  margin: 0;
}

.archivalie-links-item  {
  margin-top: 0.45rem;
  padding-left: 1.2rem;
}

.archivalie-links-note {
color: #777;
} 

.sammlung-tools {
margin: 1rem 0 2rem;
}

.sammlung-inventar-link {
display: inline-block;
  background: #333;
  color: #fff;
border: 1px solid rgba(0,0,0,.08);
border-radius: 20px;
padding: 0.7rem 1rem;
text-decoration: none;
} 


.sammlung-inventar-link:hover{
background: #000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}


.archivalie-nav{
 margin-top: 3em;

}

.nav-links {
display:grid;
align-items: center;
grid-template-columns: 1fr auto 1fr;
gap: 1rem;
}

.nav-prev{
  text-align: left;
}

.nav-next{
  text-align: right;
}

.nav-inventar{
  text-align: center;
  white-space: nowrap;
}


.nav-links a{
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration:  underline;
}

/* ===========================
  INVENTAR
=========================== */

.inventar-page {
  max-width: 1080px;
  margin: 0 auto;
}

.inventar-header {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.inventar-count {
  margin: 0 0 0.4rem 0;
  font-style: italic;
  color: #777;
  font-weight: 300;
}

.inventar-header h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.inventar-intro {
  margin: 0;
  max-width: 62ch;
  color: #555;
}

/* Toolbar */

.inventar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0 1.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
}

.inventar-search,
.inventar-select {
  font: inherit;
  color: #111;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
}

.inventar-search {
  flex: 1 1 360px;
  min-width: 240px;
}

.inventar-select {
  flex: 0 1 220px;
  min-width: 180px;
}

/* Grid */

.inventar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

/* Karten */

.inventar-card {
  min-width: 0;
}

.inventar-card-inner {
  height: 100%;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.inventar-card:hover .inventar-card-inner {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  background: #fcfcfc;
  border-color: rgba(0,0,0,.12);
}

.inventar-card-mainlink {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.65rem;
}

.inventar-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.inventar-card-id {
  font-size: 0.84rem;
  color: #777;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}

.inventar-card-sammlung {
  font-size: 0.8rem;
  color: #555;
  background: rgba(0,0,0,.05);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  line-height: 1.2;
  white-space: nowrap;
}

.inventar-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.28;
  color: #111;
}

.inventar-card-mainlink:hover .inventar-card-title {
  text-decoration: underline;
}

/* Labels wie bei den Archivalien */

.inventar-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.inventar-labels .label {
  text-decoration: none;
}

.inventar-labels .label:hover {
  text-decoration: underline;
}

/* Empty / Navigation */

.inventar-empty {
  margin-top: 1rem;
  color: #777;
  font-style: italic;
}

.inventar-nav {
  margin-top: 1.75rem;
}

/* Tablet */

@media (max-width: 900px) {
  .inventar-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */

@media (max-width: 780px) {
  .inventar-toolbar {
    padding: 0.85rem;
    gap: 0.6rem;
    border-radius: 16px;
  }

  .inventar-search,
  .inventar-select {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .inventar-grid {
    gap: 0.75rem;
  }

  .inventar-card-inner {
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
  }

  .inventar-card-head {
    gap: 0.45rem;
    margin-bottom: 0.3rem;
  }

  .inventar-card-id {
    font-size: 0.78rem;
  }

  .inventar-card-sammlung {
    font-size: 0.73rem;
    padding: 0.14rem 0.48rem;
  }

  .inventar-card-title {
    font-size: 0.98rem;
    line-height: 1.24;
  }

  .inventar-card-mainlink {
    margin-bottom: 0.5rem;
  }
}

/* Kartenstruktur */

.inventar-card-row {
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;

}

/* Bild links */

.inventar-card-media {
  flex: 0 0 90px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.05);
  display: block;
}

.inventar-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content */

.inventar-card-content {
  flex: 1;
  min-width: 0;
}

/* Head */

.inventar-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

/* Titel kompakter */

.inventar-card-title {
  margin: 0 0 0.45rem 0;
  font-size: 1rem;
  line-height: 1.25;
}

/* Labels */

.inventar-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* Hover bleibt gleich */
.inventar-card:hover .inventar-card-inner {
  transform: translateY(-2px);
}

/* ===========================
  MOBILE
=========================== */

@media (max-width: 780px) {

  .inventar-card-row {
    gap: 0.6rem;
  }

  .inventar-card-media {
    flex: 0 0 70px;
    height: 55px;
  }

  .inventar-card-title {
    font-size: 0.95rem;
  }
}

.inventar-grid--compact {
  grid-template-columns: 1fr;
}

/* Subtitle für Themen */

.inventar-card-subtitle {
  margin: 0.2rem 0 0 0;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  line-height: 1.3;
}

/* ===========================
  RÄUME
=========================== */

.raum {
  max-width: 900px;
  margin: 0 auto;
}

.raum-header {
  margin-bottom: 2rem;
}

.raum-title {
  margin: 0 0 0.35rem 0;
  line-height: 1.15;
}

.raum-subtitle {
  margin: 0 0 1rem 0;
  color: #666;
  font-style: italic;
  font-size: 1.05rem;
}

.raum-intro {
  max-width: 65ch;
  color: #555;
  margin-bottom: 1.4rem;
}

.raum-cover {
  margin-top: 1rem;
}

.raum-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 20px;
}

.raum-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 1.3rem;
  margin-top: 1.5rem;
}

.raum-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.raum-text p {
  max-width: 68ch;
}

.raum-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.raum-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.raum-einstiege {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.raum-einstieg {
  padding: 1rem;
  background: #fcfcfc;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
}

.raum-einstieg h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.raum-einstieg p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #555;
}

.raum-einstieg a {
  text-decoration: none;
  font-weight: 500;
}

.raum-einstieg a:hover {
  text-decoration: underline;
}

.raum-nav {
  margin-top: 2rem;
}

.raum-nav a {
  text-decoration: none;
}

.raum-nav a:hover {
  text-decoration: underline;
}

@media (max-width: 780px) {
  .raum-einstiege {
    grid-template-columns: 1fr;
  }

  .raum-box {
    padding: 1rem;
    border-radius: 16px;
  }
}