/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
:root {
  --header-height: 3rem;

  --hue: 35; /* Warme erdige Töne */
  --sat: 60%;
  --first-color: hsl(var(--hue), var(--sat), 30%); /* Dunkler Braunton für Highlights */
  --first-color-alt: hsl(var(--hue), var(--sat), 25%); /* Noch dunkler für Akzente */
  --title-color: hsl(var(--hue), 30%, 20%); /* Dunkles Sepia für Überschriften */
  --text-color: hsl(var(--hue), 20%, 30%); /* Warmer Braunton für lesbaren Text */
  --body-color: hsl(var(--hue), 40%, 90%); /* Pergament-Beige als Hintergrund */
  --container-color: hsl(var(--hue), 50%, 85%); /* Helles, gealtertes Beige für Container */


  --body-font: "DM Sans", sans-serif;
  --h1-font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  --normal-font-size: clamp(0.875rem, 1vw + 0.5rem, 1rem);
  --tiny-font-size: .625rem;

  --z-tooltip: 10;
  --z-fixed: 100;
}

/* Globale Scrollbar-Anpassungen */
::-webkit-scrollbar {
  width: 12px; /* Breite der Scrollbar */
  height: 12px; /* Höhe der horizontalen Scrollbar */
}

::-webkit-scrollbar-track {
  background: transparent; /* Transparenter Track */
  border-radius: 0; /* Keine abgerundeten Ecken */
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--hue), 40%, 90%); /* Deine gewünschte Farbe */
  border-radius: 6px; /* Leicht abgerundete Ecken */
  border: 3px solid transparent; /* Transparenter Rand für fließenden Übergang */
  background-clip: content-box; /* Verhindert, dass der Rand die Farbe überdeckt */
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--hue), 40%, 85%); /* Leichte Hover-Dunkelung */
  border: 3px solid transparent;
  background-clip: content-box;
}

/* Für Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--hue), 40%, 90%) transparent;
}
.lato-thin {
  font-family: "Lato", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.lato-light {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.lato-regular {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-style: normal;
}
@media screen and (min-width: 968px) {
  :root {
    --h1-font-size: 2.25rem;
    --normal-font-size: 1rem;
  }
}

/* Standardmäßig alle Sektionen ausblenden */
.content-section {
  display: none;
  padding: 2rem;
}

/* Aktive Sektion anzeigen */
.content-section.active-section {
  display: block;
}
.section.active {
  display: block;
}

/* Aktiver Button */
.nav__link.active-link {
  color: var(--first-color);
  font-weight: bold;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.section {
  padding: 4.5rem 0 2rem;
  display: none;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

.section__height {
  height: 100vh;
}

.container {
  max-width: 968px;
  margin-left: 1.5rem;
  margin-right: 1rem;
}

.header {
  position: fixed;
  top: 0px;
  left: 0;
  width: 100%;
  background-color: var(--container-color);
  z-index: var(--z-fixed);
  transition: .4s;
}
#map {
  height: min(70vh, 500px); /* Nie mehr als 500px, aber bei kleineren Screens flexibler */
  width: 100%;
  z-index: 1;
}

.content-section {
  padding: clamp(2rem, 5vw, 4rem);
}

.content-section.active-section {
  display: block;
}
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__img {
  height: 100px; /* Passe die Höhe an */
  width: auto; /* Behält das Seitenverhältnis bei */
  position: absolute; /* Positioniert das Logo absolut */
  left: 30px; /* Abstand vom linken Rand */
  top: 10px; /* Abstand vom oberen Rand */
}

.nav__logo {
  color: var(--title-color);
  font-weight: 600;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: var(--container-color);
    box-shadow: 0 -1px 12px hsla(var(--hue), var(--sat), 15%, 0.15);
    width: 100%;
    height: 4rem;
    padding: 0 1rem;
    display: grid;
    align-content: center;
    border-radius: 1.25rem 1.25rem 0 0;
    transition: .4s;
  }
}

.nav__list, 
.nav__link {
  display: flex;
}

.nav__link {
  flex-direction: column;
  align-items: center;
  row-gap: 4px;
  color: var(--title-color);
  font-weight: 600;
}
#nav-menu.nav__menu {
  margin-left: 55px;
}
.nav__list {
  justify-content: space-around;
}

.nav__name {
  font-size: var(--tiny-font-size);
}

.nav__icon {
  font-size: 1.5rem;
}
/* Suchvorschläge Stil */
#searchSuggestions {
  display: none;
  position: absolute;
  top: 80%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.search-suggestion {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-suggestion i {
  margin-right: 10px;
  font-size: 1.1em;
  color: #666;
}

.search-suggestion:hover, .search-suggestion.highlight {
  background-color: #f5f5f5;
}

.nav__search {
  position: relative;
}

.active-link {
  position: relative;
  color: var(--first-color);
  transition: .3s;
}


.scroll-header {
  box-shadow: 0 1px 12px hsla(var(--hue), var(--sat), 15%, 0.15);
}
.nav__search {
  display: flex;
  align-items: center;
  margin-left: 15%; 
  padding: 0.2rem;
}

.search__input {
  padding: 0.8rem;
  border: 1px solid #442d2d;
  border-radius: 4px;
  font-size: var(--tiny-font-size);
  outline: none;
  transition: border-color 0.3s;
  background-color: hsl(var(--hue), 50%, 85%);
  
}

.search__input:focus {
  border-color: var(--first-color);
}

.search__button {
  background-color: var(--first-color);
  border: none;
  border-radius: 4px;
  padding: 0.7rem;
  margin-left: 0.7rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search__button:hover {
  background-color: var(--first-color-alt);
}

.search__button i {
  color: #fff;
  font-size: 1rem;
}

@media screen and (max-width: 320px) {
  .nav__name {
    display: none;
  }
}

@media screen and (min-width: 576px) {
  .nav__list {
    justify-content: center;
    column-gap: 3rem;
  }
}

@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }
  .section {
    padding: 7rem 0 2rem;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem); 
  }

 
  .nav__name {
    font-size: var(--normal-font-size);
  }
  .nav__link:hover {
    color: var(--first-color);
  }

  .active-link::before {
    content: '';
    position: absolute;
    bottom: -.75rem;
    width: 4px;
    height: 4px;
    background-color: var(--first-color);
    border-radius: 50%;
  }


}
.custom-marker-grave .marker-container {
  background: transparent !important;
  box-shadow: none !important;
}

@media screen and (min-width: 809px) and (max-width: 1081px) {
  .container {
    margin: 0 auto;
    padding-left: 8rem;
    padding-right: 2rem;
    max-width: 968px;
  }


.nav__search{
  padding: 1.4rem;


}
#map{
  height: min(150vh, 540px);
  width: 100%;
  z-index: 1;
  margin-top: -5px;

}
.gestein-liste {
  width: 30%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}}

@media screen and (min-width: 1024px) and (max-width: 1300px) {
  .container {
    margin: 0 auto;
    padding-left: 8rem;
    padding-right: 2rem;
    max-width: 968px;
  }


.nav__search{
  padding: 1.4rem;


}
#map{
  height: min(150vh, 540px);
  width: 100%;
  z-index: 1;
  margin-top: -5px;

}
.gestein-liste {
  width: 30%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}}
/* Personen-Spezifisches Styling */
.personen-container {
  display: flex;
  height: 80vh;
  margin-top: 20px;
}

.personen-liste {
  width: 30%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.personen-liste::-webkit-scrollbar {
  display: none;
}

.personen-liste ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.personen-liste li {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #7d4c17;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.show-on-map-btn {
  background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  margin-left: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.show-on-map-btn:hover {
  background-color: var(--first-color-alt);
}
.personen-liste li:hover {
  background-color: hsl(var(--hue), 50%, 85%);;
}

.personen-liste li.active {
  background-color: hsl(var(--hue), 50%, 85%);;
  font-weight: bold;
}

.personen-details {
  width: 70%;
  padding: 20px;
  overflow: hidden;
  position: relative;
  overflow-y: auto; /* vertikale Scrollbar nu bei Bedarf */
}

.person-images {
  display: flex-end;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.person-images img {
  max-width: 40%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  float: right;
}

.person-inhalt {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap; /* Für Responsive */
}
.person-inhalt {
  display: flex;
  flex-direction: row-reverse; /* Kehrt die Reihenfolge um (Bild rechts) */
  gap: 20px; /* Abstand zwischen Bild und Text */
  align-items: flex-start; /* Oder "center" für vertikale Zentrierung */
}

.person-bild img {
  max-width: 300px;
  border-radius: 8px;
  height: auto;
  object-fit: cover;
}

.person-text {
  flex: 1;
  text-align: justify;
  line-height: 1.5;
}

/* Responsive für Mobile */
@media (max-width: 768px) {
  .person-inhalt {
    flex-direction: column; /* Stackt Bild und Text untereinander */
    align-items: center;
  }

  .person-bild img {
    max-width: 100%;
  }

  .person-text {
    text-align: justify;
    padding-top: 15px;
  }
}

.content-section {
  padding: 20px;
}

.content-section {
  padding: 20px;
}

.gestein-container {
  display: flex;
  height: 80vh;
  margin-top: 20px;
}
/* Gesteins-Detailansicht */
.gestein-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.back-to-item-btn {

  background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px 2px 2px;
  margin-left: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background-color 0.3s;
}


.gestein-info-item {
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  background-color: var(--container-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gestein-info-label {
  font-weight: bold;
  color: var(--first-color);
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.gestein-info-value {
  color: var(--text-color);
  font-size: 1rem;
}

.gestein-image-container {
  margin-top: 2rem;
  text-align: center;
}

.gestein-image {
  max-width: 100%;
  height: auto;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  object-fit: contain;
}

@media (max-width: 768px) {
  .gestein-info-grid {
      grid-template-columns: 1fr;
  }
}
.gestein-liste {

  width: 30%;
  height: 170%; /* Nimmt die volle Höhe des Containers ein */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: sticky; /* Hält die Liste beim Scrollen */
  top: 0; /* Oberer Rand bleibt oben */
  align-self: flex-start; /* Verhindert unerwünschtes Stretching */
}

/* Unsichtbare Scrollbar für Webkit-Browser */
.gestein-liste::-webkit-scrollbar {
  display: none;
}

.gestein-liste ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%; /* Verhindert horizontales Scrollen */
}

.gestein-liste li {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #3f2c2c;
  transition: background-color 0.2s;
  white-space: nowrap; /* Verhindert Zeilenumbruch */
  overflow: hidden; /* Versteckt überfließenden Text */
  text-overflow: ellipsis; /* Zeigt ... bei zu langem Text */
}

.gestein-liste li:hover {
  background-color: #f5f5f5;
}

.gestein-liste li.active {
  background-color: hsl(var(--hue), 50%, 85%);;
  font-weight: bold;
}

.gestein-details {
  width: 70%;
  padding: 0 20px;
   /* Kein Scrollen im rechten Bereich */
}

.details-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}
/* Timeline Styles */
.timeline-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.timeline {
  position: relative;
  padding: 30px 0;
}

.timeline-vertical-line {
  position: absolute;
  left: 100px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to bottom, #3a1c03, #7d4c17);
  z-index: 1;
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 50px;
  padding-left: 150px;
  min-height: 200px;
  opacity: 0.8;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.active {
  opacity: 1;
  transform: translateX(0);
}
/* Wenn kein Bild vorhanden ist (img mit leeren src oder fehlendem src) */
.timeline-image:not(:has(img[src])) {
  display: none;
}

/* Alternative Lösung für ältere Browser */
.timeline-image img:not([src]),
.timeline-image img[src=""] {
  display: none;
}

.timeline-image:empty {
  display: none;
}

/* Anpassung des Layouts wenn kein Bild vorhanden ist */
.timeline-content:has(.timeline-image:empty),
.timeline-content:has(.timeline-image:not(:has(img[src]))) {
  flex-direction: column;
}

.timeline-content:has(.timeline-image:empty) .timeline-text,
.timeline-content:has(.timeline-image:not(:has(img[src]))) .timeline-text {
  width: 100%;
  padding: 25px;
}
.timeline-date {
  position: absolute;
  left: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #592c1d;
  width: 100px;
  text-align: center;
  z-index: 2;
  background: white;
  padding: 5px;
  border-radius: 5px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.timeline-content {
  display: flex;
  width: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-content {
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Hover-Effekte mit kräftigeren Farben */
.timeline-item:hover .timeline-content {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  background: #f8f8f8; /* Hellerer Hintergrund für mehr Kontrast */
}

.timeline-item:hover .timeline-date {
  color: #d35400; /* Kräftiges Orange-Braun */
  background: #fffaf0; /* Leicht getönter Hintergrund */
  transform: scale(1.1);
  text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.timeline-image {
  flex: 0.1 0.1 300px;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.timeline-image:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-image:after {
  opacity: 1;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.1s ease, filter 0.1s ease;
  filter: brightness(0.95);
}

.timeline-item:hover .timeline-image img {
  transform: scale(1.0);
  filter: brightness(1.05) saturate(1.2); /* Bild gesättigter und heller */
}

.timeline-text {
  flex: 1;
  padding: 25px;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-text {
  padding: 30px;
}

.timeline-text h3 {
  margin-top: 0;
  color: #3e2013;
  font-size: 1.5rem;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-text h3 {
  color: #d35400;
  font-size: 1.6rem;
}

.timeline-text p {
  color: #555;
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-text p {
  color: #444; /* Dunklerer, gesättigterer Text */
  font-size: 1.15rem;
}



.timeline-item:hover:before {
  transform: translateY(-50%) scale(1.3);
  background: #e74c3c; /* Kräftiges Rot */
  box-shadow: 0 0 0 6px rgba(231, 76, 60, 0.3);
}

/* Standard: Dropdowns ausgeblendet */
.gestein-dropdown,
.personen-dropdown {
  max-height: 250px; /* ca. 5–6 Einträge */
  overflow-y: auto;
  display: none;
  margin-bottom: 1.5rem;
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 8px;
  background: var(--container-color);
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Mobile: Listen ausblenden, Dropdowns zeigen */
@media screen and (max-width: 767px) {
  .gestein-liste,
  .personen-liste {
    display: none;
  }

  .gestein-dropdown,
  .personen-dropdown {
    display: block;
  }
}

/*=============== RESPONSIVE STYLES ===============*/
@media screen and (max-width: 767px) {

  

.century-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;  /* Etwas mehr Abstand für die größere Schrift */
  margin: 30px 0;  /* Mehr Abstand oben/unten */
}

.century-line {
  width: 50px;  /* Länge angepasst für bessere Proportion */
  height: 2px;
  background: hsl(35, 20%, 30%);
  opacity: 0.7;  /* Leichte Transparenz für dezentes Erscheinungsbild */
}

.century-marker span {
  font-size: 1.3rem;  /* Großzügige Schriftgröße */
  color: hsl(35, 20%, 30%);
  font-weight: 800;
  letter-spacing: 0.5px;  /* Leichter Buchstabenabstand für bessere Lesbarkeit */
  padding: 0 5px;  /* Horizontaler Abstand */
  transition: all 0.3s ease;
}
  .header {
    padding: 1.5rem 0;
  } 

   .nav__img {
    height: 60px;
    left: 10px;
    top: 5px;
  }

  .nav {
    flex-direction: column;
    height: auto;
  }

  body {
    width: 100%;
    overflow-x: hidden;
  }

  .nav__search {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
    width: auto;
  }

  .search__input {
    width: 120px;
    padding: 0.3rem;
    font-size: 0.7rem;
  }
  .timeline {
    padding: 20px 0;
}

.timeline-vertical-line {
    left: 50px;
}

.timeline-item {
    padding-left: 80px;
    margin-bottom: 40px;
    min-height: auto;
}

.timeline-date {
    font-size: 1.2rem;
    width: 60px;
    font-weight: 1000;
}

.timeline-item:before {
    left: 47px;
}

.timeline-content {
    flex-direction: column;
}

.timeline-image {
    flex: 0 0 200px;
    width: 100%;
}

.timeline-text h3 {
  font-size: 1.0rem;       /* etwas kleiner für kleine Displays */
    /* lange Wörter umbrechen */
  overflow-wrap: break-word;
  hyphens: auto;           /* Silbentrennung (wenn unterstützt) */
  margin-bottom: 0.5rem;
}

.timeline-text p {
      /* Blocksatz */
  font-size: 0.95rem;      /* optional: etwas kleiner auf Mobile */
  line-height: 1.5;
}


/* Anpassungen für Mobile Hover-Effekte */
.timeline-item:hover .timeline-content {
    transform: scale(1.01) translateY(-3px);
}

.timeline-item:hover .timeline-date {
    transform: scale(1.05);
}
  .search__button {
    padding: 0.3rem;
  }

  .nav__menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto !important;
    width: 100%;
    max-width: 400px;
    height: 3.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: var(--container-color);
    box-shadow: 0 -1px 12px hsla(var(--hue), var(--sat), 15%, 0.15);
    border-radius: 1.25rem 1.25rem 0 0;
    z-index: var(--z-fixed);
  }

  .nav__list {
    width: 100%;
    justify-content: space-around;
    padding:  0.5rem;
  }

  .nav__item {
    flex: 1;
    text-align: center;
  }

  .nav__link {
    padding: 0.5rem 0;
    font-size: 0.8rem;
  }

  .nav__icon {
    font-size: 1.2rem;
  }

  .nav__name {
    font-size: 0.6rem;
    display: block;
  }

  /* Content adjustments */
  .content-section {
    padding: 1.5rem;
    padding-bottom: 4rem; /* Space for bottom nav */
    margin-top: -70px;
  }

  #map {
    height: 750px;
    margin-bottom: 1rem;
  }
 
  .personen-container,
  .gestein-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 200px); /* Anpassen je nach Bedarf */
  }
/* Listenansicht - Mit sichtbaren Scroll-Hinweisen */
.personen-liste,
.gestein-liste {
  width: 100%;
  max-height: 80px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: var(--container-color);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid #eee;
  
  
  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 15px 15px, 15px 15px;
  background-attachment: local, local, scroll, scroll;
}

/* Stil für die Scrollbar */
.personen-liste::-webkit-scrollbar,
.gestein-liste::-webkit-scrollbar {
  width: 8px;
}

.personen-liste::-webkit-scrollbar-track,
.gestein-liste::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.personen-liste::-webkit-scrollbar-thumb,
.gestein-liste::-webkit-scrollbar-thumb {
  background: var(--first-color-light);
  border-radius: 4px;
}

.personen-liste::-webkit-scrollbar-thumb:hover,
.gestein-liste::-webkit-scrollbar-thumb:hover {
  background: var(--first-color);
}


.gestein-liste:not(:hover)::after {
  content: "↑↓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--first-color);
  font-size: 1.2rem;
  font-weight: bold;
  animation: scrollHint 2s infinite;
  pointer-events: none;
}

.personen-liste:not(:hover)::after {
  content: "↑↓";
  position: absolute;
  right: 29.3px;
  top: 21.1%;
  transform: translateY(-50%);
  color: var(--first-color);
  font-size: 1.2rem;
  font-weight: bold;
  animation: scrollHint 2s infinite;
  pointer-events: none;
}


 .personen-details,
 .gestein-details {
   width: 100%;
   height: calc(100% - 100px); /* Höhe abzüglich der Listenhöhe */
   overflow-y: auto;
   padding: 0.5rem;
  
   border-radius: 8px;
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
   overflow-y: auto; /* vertikale Scrollbar nu bei Bedarf */

 }

  /* Listen-Elemente */
  #personenListe li,
  #gesteinListe li {
    padding: 0.5rem;
    margin: 0.2rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
  }

  /* Aktive Elemente */
  #personenListe li.active,
  #gesteinListe li.active {
    background-color: var(--first-color-light);
    color: white;
  }

  /* Bilder in Details */
  .personen-details img,
  .gestein-details img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem auto;
    border-radius: 4px;
  }

    /* Scrollbar Anpassungen */
    ::-webkit-scrollbar {
      width: 5px;
    }
  
    ::-webkit-scrollbar-thumb {
      background: var(--first-color-light);
      border-radius: 10px;
    }
}

/* Mittlere Geräte (Tablets, 577px bis 767px) */
@media screen and (min-width: 577px) and (max-width: 967px) {
  .nav__img {
    height: 70px;
    left: 15px;
  }

  .nav__menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto !important;
    width: 100%;
    max-width: 400px;
    height: 3.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: var(--container-color);
    box-shadow: 0 -1px 12px hsla(var(--hue), var(--sat), 15%, 0.15);
    border-radius: 1.25rem 1.25rem 0 0;
    z-index: var(--z-fixed);
  }

  .nav__list {
    width: 100%;
    justify-content: space-around;
    padding:  0.5rem;
  }

  .nav__item {
    flex: 1;
    text-align: center;
  }

  .nav__link {
    padding: 0.5rem 0;
    font-size: 0.8rem;
  }

  .nav__icon {
    font-size: 1.2rem;
  }

  .nav__name {
    font-size: 0.6rem;
    display: block;
  }

  /* Content adjustments */
  .content-section {
    padding: 1.5rem;
    padding-bottom: 4rem; /* Space for bottom nav */
    margin-top: -70px;
  }

  .nav__search {
    margin-left: 50%;
    width: 50%;
  }

  .content-section {
    padding: 2rem;
  }

  #map {
    height: 400px;
  }

  .personen-container,
  .gestein-container {
    flex-direction: column;
  }

  .personen-liste,
  .gestein-liste {
    width: 100%;
    margin-bottom: 1rem;
  }

  .personen-details,
  .gestein-details {
    width: 100%;
    overflow-y: auto; /* vertikale Scrollbar nu bei Bedarf */

  }

  .personen-details img {
    position: relative;
    top: auto;
    right: auto;
    margin: 10px auto;
    display: block;
  }

  .gestein-details img {
    width: 100%;
    height: auto;
  }
}

/* Große Geräte (kleine Laptops, 768px bis 968px) */
@media screen and (min-width: 768px) and (max-width: 968px) {
  .container {
    margin-left: 5%;
    margin-right: 5%;
  }

  .nav__search {
    margin-left: 20%;
    width: 40%;
  }

  .content-section {
    padding: 3rem;
  }

  #map {
    height: 450px;
  }

  .personen-liste {
    width: 25%;
  }

  .personen-details {
    width: 75%;
    overflow-y: auto; /* vertikale Scrollbar nu bei Bedarf */

  }

  .gestein-liste {
    width: 20%;
  }

  .gestein-details {
    width: 80%;
  }

  .gestein-details img {
    width: 100%;
    height: auto;
    max-width: 400px;
  }

  .sources {
  max-width: 800px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  line-height: 1.3;
}

.sources h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.sources h3 {
  margin-top: 2rem;
  font-size: 1.0rem;
  color: #333;
  font-size: smaller;
}

.sources ul {
  list-style-type: disc;
  padding-left: 1rem;
  font-size: smaller;
}

.sources li {
  margin-bottom: 0.5rem;
  font-size: smaller;
}

.sources a {
  color: #0645ad;  /* klassisches Link-Blau */
  text-decoration: underline;  /* unterstreichen */
  font-size: smaller;
}

.sources a:hover {
  color: #0b0080;
  text-decoration: underline;
}
}

 /*Sehr große Geräte (große Laptops/Desktops, ab 969px) */
@media screen and (min-width: 1369px) {

  main {
    padding-top: 40px; /* Slightly more space for larger screens */
  }
  .container {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .nav__search {
    margin-left: 55%;
    width: 30%;
  }

  .content-section {
    padding: 4rem;
  }

  #map {
    height: 850px;
  }

  .personen-liste {
    width: 20%;
  }

  .personen-details {
    width: 80%;
    overflow-y: auto; /* vertikale Scrollbar nu bei Bedarf */

  }

  .gestein-liste {
    width: 15%;
  }

  .gestein-details {
    width: 85%;
  }

  .gestein-details img {
    max-width: 500px;
  }
}

#ar-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#ar-video-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

#ar-video-container video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-btn {
  background-color: #2196F3;
  border: none;
  color: white;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
  margin: 0 auto 7px auto;
  display: block; /* Notwendig für margin: auto */;
}
.ar-btn:hover {
  background-color: #0b7dda;
}
/* Marker Styles */
.marker-container-rock {
  width: 45px;
  height: 45px;
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  background: white;
  display: flex;          /* Neu */
  justify-content: center; /* Neu */
  align-items: center;    /* Neu */
}

.marker-rock-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* Neu */
}
/* Material Group Buttons */
.material-group {
  display: flex;
  gap: 8px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.material-group button {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.material-group button.active {
  background: #4CAF50;
  color: white;
  border-color: #3d8b40;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.material-group button:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
}

/* Master Marker */


.master-marker-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Popup Images */
.popup-grave-image {
  max-width: 100%;
  max-height: 180px;
  display: block;
  margin: 10px auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Popup Actions */
.material-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.material-popup-actions button {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
}

.material-popup-actions button:hover {
  background: #3d8b40;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Custom Popup */
.custom-popup {
  min-width: 220px;
  padding: 10px;
}

.custom-popup h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
  text-align: center;
}

.custom-popup p {
  margin: 10px 0;
  font-size: 13px;
  color: #555;
}





.master-marker-container {
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: 100%;
 
}

.material-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  width: 100%;
  text-align: center;
}

.material-btn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.material-btn.active {
  background: #4CAF50;
  color: white;
  border-color: #45a049;
  font-weight: bold;
}

.marker-highlight {
    transition: all 0.2s ease-out !important;
    z-index: 1000 !important;
    transform: scale(1.5);
    animation: none !important;
}

/* Für Personen-Marker */
.marker-highlight.custom-marker .marker-container {
    border: 1px solid #FFD700 !important;
    box-shadow: 0 0 15px #FFD700 !important;
}

/* Für Grabstein-Marker */
.marker-highlight.custom-marker-grave img {
    outline: 1px solid #FFD700 !important;
    outline-offset: 2px;
    box-shadow: 0 0 15px #FFD700 !important;
}

/* Für Gesteins-Marker */
.marker-highlight.custom-marker-rock .marker-container-rock {
    border: 1px solid #FFD700 !important;
    box-shadow: 0 0 15px #FFD700 !important;
}

.show-grave-btn{
    background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  margin-left: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.show-street-btn {
  background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 0 auto; /* Zentriert den Button horizontal */
  display: block; /* Notwendig für margin: auto */
}

.show-person-btn {
  background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  margin: 4px auto; /* Zentriert und gibt Abstand nach oben/unten */
  display: block;
  transition: background-color 0.3s;
}

.back-to-cemetery-btn {
  background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px 2px 2px;
  font-size: 0.8rem;
  cursor: pointer;
  margin: 4px auto;
  display: block;
  transition: background-color 0.3s;
}

.rock-marker-highlight {
    filter: drop-shadow(0 0 8px rgba(197, 125, 48, 0.711)) drop-shadow(0 0 4px rgba(157, 71, 42, 0.87));
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.7);
}

/* Optional: Für eine pulsierende Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(161, 108, 27, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.rock-marker-highlight {
    animation: pulse 2s infinite;
}

.show-rock-markers-btn {

          background-color: var(--first-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px 2px 2px;
  margin-left: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background-color 0.3s;
}


.century-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;  /* Etwas mehr Abstand für die größere Schrift */
  margin: 30px 0;  /* Mehr Abstand oben/unten */
}

.century-line {
  width: 50px;  /* Länge angepasst für bessere Proportion */
  height: 2px;
  background: hsl(35, 20%, 30%);
  opacity: 0.7;  /* Leichte Transparenz für dezentes Erscheinungsbild */
}

.century-marker span {
  font-size: 1.5rem;  /* Großzügige Schriftgröße */
  color: hsl(35, 20%, 30%);
  font-weight: 800;
  letter-spacing: 0.5px;  /* Leichter Buchstabenabstand für bessere Lesbarkeit */
  padding: 0 5px;  /* Horizontaler Abstand */
  transition: all 0.3s ease;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: hsl(35, 20%, 30%);
}

.feature-box {
    background: rgba(245, 245, 245, 0.7);
    border-left: 4px solid hsl(35, 20%, 30%);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.feature-box h2 {
    color: hsl(35, 20%, 30%);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.closing {
    font-style: italic;
    text-align: center;
    margin-top: 2rem;}

    h1{
      text-align: center;
    }

    .marker-cluster-highlight {
    background-color: hsl(35, 20%, 60%, 90%);
    border: 1px solid hsl(35, 20%, 30%, 60%);
}
.marker-cluster-highlight div {
    background-color: hsl(35, 20%, 60%, 60%);
}

.standorte-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.show-rock-location-btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.show-rock-location-btn:hover {
    background-color: #3a5a8a;
}

.show-rock-location-btn i {
    font-size: 12px;
}


.sources {
  max-width: 800px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.sources h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.sources h3 {
  margin-top: 2rem;
  font-size: 1.5rem;
  color: #333;
  font-size: smaller;
}

.sources ul {
  list-style-type: disc;
  padding-left: 2rem;
  font-size: smaller;
}

.sources li {
  margin-bottom: 0.5rem;
  font-size: smaller;
}

.sources a {
  color: #0645ad;  /* klassisches Link-Blau */
  text-decoration: underline;  /* unterstreichen */
  font-size: smaller;
}

.sources a:hover {
  color: #0b0080;
  text-decoration: underline;
}


