/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@400;500&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /*border: 1px solid red;*/
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: rgb(71, 71, 71);
  background-color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background-color: #ffffff;
  margin: 5px;
  min-height: 50px;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  padding: 0;
  margin: 0;
  max-height: 50px;
  max-width: 25vw;
}

header h1 a {
  color: rgb(81, 75, 72);
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  font-family: "Roboto", sans-serif;
  text-align: right;
  display: block;
}

header button#menu-toggle {
  width: 48px;
  height: 48px;
  border: none;
  color: rgb(71, 71, 71);
  background-color: #ffffff;
  position: absolute;
  top: 10px;
  right: 10px;
}

#menu {
  position: absolute;
  top: 60px;
  left: 0;
  background-color: rgba(255, 255, 255, 0.89);
  padding: 20px;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10200;
  width: 100%;
  display: none;
}

.search-container {
  position: relative;
  width: 100%;
  margin: 20px 0;
}

#search-input {
  font-size: 1.2em;
  padding: 0.8em;
  width: 100%;
  height: 2em;
  color: rgb(71, 71, 71);
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-family: "Roboto", sans-serif;
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.2);
  padding-right: 2.5em;
}

#search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
  width: 1.2em;
  height: 1.2em;
}

#search-nearby {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  max-height: 400px;
  overflow-y: auto;
  z-index: 99999;
  padding: 1rem;
}

#search-nearby h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

#search-nearby .results-list {
  display: flex;
  flex-direction: column;
}

#search-nearby .zoom-button {
  margin-bottom: 0.5rem;
}

h1 {
  font-family: "Playfair Display", serif;
  color: #5a765d;
}

h2 {
  color: rgb(90, 118, 93);
  font-family: "Playfair Display", Garamond, serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

main {
  padding: 1rem 0;
}

a {
  color: rgb(115, 171, 120);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#content {
  margin: 0 auto;
  padding: 20px;
}

.table-auto th,
.table-auto td {
  padding-right: 30px;
  text-align: center;
  border: 0px solid #ddd;
}

#map {
  height: 50vh;
  width: 100%;
  padding: 0;
  margin: 0;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}

p {
  margin-bottom: 0.5rem;
}

strong {
  font-weight: bold;
}

#nearby,
#auf-der-karte {
  padding: 1rem;
}

.results-list {
  display: flex;
  flex-direction: column;
}

.result-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.result-main-image {
  margin-left: 0.5rem;
  object-fit: cover;
  border-radius: 4px;
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
}

.results-list div {
  margin-bottom: 0.5rem;
}

.results-list a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.leaflet-popup-content img {
  object-fit: cover;
  margin-top: 15px;
  border-radius: 12px;

  max-width: 174px;
  height: auto;
}

.main-marker-popup .leaflet-popup-tip {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content-wrapper {
  text-align: center;
}

.main-marker-popup .leaflet-popup-content-wrapper {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
  padding: 5px 10px;
  padding-right: 20px;
}

.main-marker-popup .leaflet-popup-content {
  margin: 0;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: rgb(71, 71, 71);
  background-color: #f3f4f6;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.button:hover {
  background-color: rgb(115, 171, 120);
  color: #ffffff;
}

.button:active {
  transform: scale(0.98);
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#search-button {
  display: none;
}

.zoom-button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 0.5rem 80px 0.5rem 56px;
  background-color: transparent;
  color: rgb(71, 71, 71);
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-align: left;
  display: flex;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease;
}

.zoom-button .button-text::first-line {
  font-weight: bold;
}

.zoom-button > .button-content img {
  position: absolute;
  top: 12px;
  left: 8px;
  width: 48px;
  height: 48px;
}
.zoom-button .result-main-image {
  position: absolute;
  top: 12px;
  right: 8px;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.zoom-button:hover {
  background-color: #f3f4f6;
  border-color: rgb(115, 171, 120);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}

.zoom-button:active {
  transform: scale(0.98);
}

.zoom-button:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.zoom-button .button-text,
.zoom-button .address-line {
  display: block;
}

.content-button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 0.5rem 0.5rem 0.5rem 56px;
  background-color: transparent;
  color: rgb(71, 71, 71);
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-align: left;
  display: flex;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease;
}

.content-button .button-text::first-line {
  font-weight: bold;
}

.content-button img {
  position: absolute;
  top: 12px;
  left: 2px;
  width: 48px;
  height: 48px;
}

.content-button:hover {
  background-color: #f3f4f6;
  border-color: rgb(115, 171, 120);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}

.content-button:active {
  transform: scale(0.98);
}

.content-button:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.content-button .button-text,
.content-button .address-line {
  display: block;
}

/* New style for marker button to align text right of icon */
.marker-button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 0.5rem 0.5rem 0.5rem 56px;
  background-color: transparent;
  color: rgb(71, 71, 71);
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-align: left;
  display: flex;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease;
}

.marker-button img {
  position: absolute;
  top: 12px;
  left: 2px;
  width: 48px;
  height: 48px;
}

.marker-button .button-text {
  margin-left: 60px; /* Adjust spacing after icon */
  display: flex;
  flex-direction: column;
}

.marker-button:hover {
  background-color: #f3f4f6;
  border-color: rgb(115, 171, 120);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}

.marker-button:active {
  transform: scale(0.98);
}

.marker-button:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Desktop Styles */
@media (min-width: 768px) {
  header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
  }

  .logo-container {
    justify-content: flex-start;
  }

  header h1 a {
    font-size: 1.2rem;
    padding-left: 20px;
    text-align: left;
  }

  .search-container {
    width: 60%;
    margin: 0;
  }

  #content,
  #nearby,
  #auf-der-karte {
    width: 66vw;
    max-width: 1200px;
    margin: 0 auto;
  }

  #map {
    height: 70vh;
  }

  .results-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 1rem;
  }

  .container {
    padding: 0 2rem;
    max-width: 1200px;
  }

  :focus-visible {
    outline: none;
  }
}

/* Gallery styles */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Display 3 images per row */
  gap: 8px;
  max-width: 1200px;
}

.gallery img {
  width: 100%; /* Make image fill the grid cell width */
  height: 200px; /* Set a fixed height for uniform tiles */
  object-fit: cover; /* Ensure image covers the fixed size without distortion */
}

/* Centered text style */
.details-text {
  text-align: left;
}

/* Lightbox styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
}

.lightbox.hidden {
  display: none;
}

.lightbox .polaroid {
  background: #fff;
  padding: 10px 10px 40px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.lightbox .polaroid img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
}
.lightbox .lightbox-caption {
  margin-top: 10px;
  color: #000;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  cursor: pointer;
  user-select: none;
  z-index: 10001;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}
.lightbox-alt-text {
  display: none;
}

/* Mobile app-like interface */
.mobile-nav {
  display: none;
}

/* Only show mobile navigation on detail page */
body.detail-page .mobile-nav {
  display: none;
}

@media (max-width: 767px) {
  .container {
    padding-top: 5px;
  }

  body.detail-page .mobile-nav {
    display: none;
    /*display: flex; */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 60px;
  }

  .mobile-nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: #5a765d;
    text-decoration: none;
    font-size: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
  }

  .mobile-nav-button img {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
  }

  .mobile-nav-button:hover,
  .mobile-nav-button:active {
    background-color: rgba(90, 118, 93, 0.1);
  }

  .back-button {
    display: none;
  }

  body.detail-page .back-button {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .back-button svg {
    width: 24px;
    height: 24px;
    fill: #5a765d;
  }

  body.detail-page #map {
    margin-bottom: 60px;
  }

  body.detail-page #nearby,
  body.detail-page #auf-der-karte {
    padding-bottom: 70px;
  }
}

/* Contact buttons styled like "In der Nähe" */
.contact-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0;
  max-width: 1200px;
}
.contact-button > img {
  float: left;
}
.contact-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(164, 164, 164, 0.044);
  border: none;
  border-radius: 0.375rem;
  padding: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.contact-button img {
  width: 48px;
  height: 48px;
}

.contact-button span {
  display: flex;
  flex-direction: column;
  color: rgb(71, 71, 71);
}

.contact-button strong {
  margin-top: 4px;
  margin-bottom: 0.25rem;
  color: rgb(81, 75, 72);
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .contact-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Weather styles from wetter.html */
.weather-container {
  padding: 0px;
  color: rgb(71, 71, 71); /* Adjust text color to fit existing page */
  max-width: 500px;
  margin-bottom: 20px; /* Add space after the weather section */
}
.weather-icon {
  font-size: 100px; /* Doubled font size */
  vertical-align: middle; /* Align icon vertically with text */
}

.current-weather-details {
  font-size: 3em; /* Make emoji and temperature larger */
  text-align: center;
}

.time {
  font-size: 80px;
  margin: 10px 0;
}
.forecast {
  display: flex;
  flex-direction: column;
}
.forecast-day {
  display: flex;
  align-items: center;
  /* Removed justify-content: space-between; */
  width: 100%;

  margin: 10px 0;
}
.forecast-day span {
  margin-right: 10px; /* Use margin-right for spacing */

  white-space: nowrap;
}
.forecast-day span:nth-child(1) {
  min-width: 20px;
  width: 30px; /* Fixed width for weekday */
  box-sizing: border-box;
}

.forecast-day span:nth-child(2) {
  width: 20px; /* Fixed width for emoji */
  box-sizing: border-sizing;
}

.forecast-day span:nth-child(3),
.forecast-day span:nth-child(5) {
  min-width: 50px; /* Increased fixed width for temperature displays */
  width: 50px;
  padding: 0px;
  margin: 0px;
  text-align: right; /* Right-align the temperature text */
  box-sizing: border-box; /* Include padding and border in the element's total width */
}
/* Removed fixed widths for spans */
.temperature-bar {
  position: relative;
  min-width: 60px; /* Keep min-width to prevent it from becoming too small */
  width: auto; /* Allow the bar to take up available space */
  flex-grow: 1; /* Allow the bar to grow */
  height: 20px;
  background-color: #ddd; /* Changed background to gray */
  border-radius: 10px;
  margin: 0 3px;
}
.temperature-fill {
  .weather-container div {
    margin-bottom: 0.5rem; /* Add space after divs within weather container */
  }

  .weather-container .current-weather-details {
    margin-bottom: 1rem; /* Add more space after the current weather details */
  }
  position: absolute;
  height: 100%;
  background: linear-gradient(to right, #5886c2, #ffc400);
  border-radius: 10px;
}

@media (min-width: 768px) {
  .detail-content-container {
    display: flex;
    gap: 20px; /* Add space between columns */
  }

  .detail-content-container #content {
    flex: 1; /* Allow content to take up available space */
  }

  .detail-content-container #weather-displays {
    flex-basis: 300px; /* Set a preferred width for the weather column */
    flex-shrink: 0; /* Prevent the weather column from shrinking */
  }
}

/* Multicolumn list styles */
.multicolumn-list {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .multicolumn-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .multicolumn-list li {
    width: 50%; /* Two columns on medium screens */
  }
}

@media (min-width: 1200px) {
  .multicolumn-list li {
    width: 33.33%; /* Three columns on large screens */
  }
}

.multicolumn-list li {
  margin-bottom: 0.5em;
}

.multicolumn-list li a {
  display: flex;
  align-items: center;
}

.multicolumn-list li {
  list-style-type: none; /* Remove bullet points */
}

.zoom-button {
  display: inline-flex;
  align-items: center;
}

/* Grabarten page styles */
.grabart-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grabart-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.grabart-text {
  flex: 1;
}

.grabart-text h3 {
  color: rgb(90, 118, 93);
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: capitalize;
}

.grabart-text .description {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.grabart-text .duration,
.grabart-text .special,
.grabart-text .bestattungsarten {
  margin-bottom: 0.5rem;
}

.grabart-text .bestattungsarten {
  color: rgb(90, 118, 93);
  font-weight: 500;
}

.grabart-image {
  flex-shrink: 0;
  width: 200px;
}

.grabart-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.error {
  color: #dc2626;
  background-color: #fef2f2;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* Responsive design for grabarten */
@media (max-width: 768px) {
  .grabart-content {
    flex-direction: column;
  }

  .grabart-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .grabart-text h3 {
    font-size: 1.25rem;
  }
}
