#map {
    background: hsl(0, 0%, 2%);
    width: 85%;
    height: 400px;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /*  Hide scrollbars on the modal itself */
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  .modal-content {
    background-color: #fefefe;
    margin: 60px auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
    max-height: 70vh; /* Limit the modal's height */
    overflow-y: auto; /*  Enable scrolling *within* the modal */
    font-size: 12pt;
  }

  .modal-content p {
    font-size: 14pt;
  }
  
  .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #ccc;
      margin-bottom: 1rem;
  }

  .modal-list {
    list-style-type: none;
  }

  .modal-list-item {
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px; /* Rounded corners */
    margin-bottom: 5px; /* Space between items */
    background-color: #fff; /* White background */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .modal-list-item:hover {
    background-color: #f0f0f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  }

  .modal-item-name {
    display: flex;          /* Use Flexbox! */
    align-items: center;   /* Vertical centering */
    width: 100%; /* Make sure it uses the full width. */
  }
  
  .modal-item-image {
    height: 35px;         /* Set a fixed height for the image */
    margin-right: 8px;    /* Add some space between image and text */
    object-fit: cover;    /* Important for consistent image sizing */
    border-radius: 50%; /* Make the image round (optional) */
  }
  
  .close-button {
      color: #aaa;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
      position: absolute;
      top: 10px;
      right: 15px;
  }
  
  .close-button:hover,
  .close-button:focus {
      color: black;
      text-decoration: none;
  }
  
  /* Styling for the popup list (if you're using the multiple-marker popup) */
  .popup ul {
      list-style: none;
      padding: 0;
      margin: 0;
  }
  
  .popup-item {
      padding: 8px 12px;
      border-bottom: 1px solid #eee;
      cursor: pointer;
      transition: background-color 0.2s;
  }
  
  .popup-item:last-child {
      border-bottom: none;
  }
  
  .popup-item:hover {
      background-color: #f5f5f5;
  }
  
  .popup-item-name {
      display: block;
      font-size: 12pt;
  }
  
  .popup-more-info {
      text-align: center;
	  font-size: 12pt;
      font-style: italic;
      color: #777;
      margin-top: 8px;
  }

  .icon-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .icon-row img {
    display: inline-block;
}

  .tax-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px; 
  }
  
  .tax-icon-name {
    display: inline-block;
    vertical-align: middle; 
  } 

  .tadigutnu-list {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.tadigutnu-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 3px;
    border-color: black;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tadigutnu-list-image {
    width: 100%;
    max-width: 200px;
    object-fit: cover;
}

.tadigutnu-list-text {
    text-align: left;
}

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

    .tadigutnu-list-image {
        margin-right: 20px;
        max-width: 200px;
    }

    .tadigutnu-list-text {
        text-align: left;
    }
}


.tdu-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 20px; /* Space between cards */
}
.tdu-card-container-b {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
  gap: 20px; /* Space between cards */
}

.tdu-image-container {
  width: 125px; /* Set the desired width */
  height: 125px; /* Set the desired height */
  border-radius: 50%; /* Creates the circular shape */
  overflow: hidden; /* Hides any image overflow outside the circle */
  display: flex; 
  justify-content: center; 
  align-items: center; 
  font-size: 50px;
  line-height: 1;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}


.tdu-card-link {
  display: block; /* Make the link a block-level element to occupy full width */
  position: relative; /* Enable absolute positioning for child elements if needed */
  text-decoration: none; /* Remove default link underline */
  color: inherit;
}

.tdu-image-container img {
  width: 100%; 
  height: 100%;
  object-fit: cover; 
}

.tdu-card {
  display: flex;
  border: 1px solid #ccc; 
  padding: 15px;
}

.tdu-card-content {
  margin-left: 20px; /* Add space between image and content */
}

.tdu-icon-row {
  display: flex; /* Arrange icons horizontally */
  align-items: center; /* Vertically center icons */
  margin-bottom: 10px; /* Add space below icons */
}

.tdu-icon-row img {
  width: 30px; /* Adjust icon size as needed */
  height: 30px;
  margin-right: 10px; /* Add space between icons */
}

.tdu-title {
  font-weight: bold;
  margin-bottom: 10px; /* Add space below title */
}

.tdu-links a {
  display: block; /* Make links occupy full width */
  margin-bottom: 5px; /* Add space between links */
}



.trail-childlist {
  margin: 20px 0;
}

.child-post {
  border: 1px solid #ddd;
  padding: 15px;
  margin: 10px 0;
  border-radius: 5px;
}

.child-post h4 {
  margin-top: 0;
}

.child-post p {
  margin: 5px 0;
}

.child-post .map-link {
  text-decoration: underline;
  color: #007bff;
}


.tdun-category-filter {
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-size: 14px;
  /* position: relative allows the panel to be positioned relative to this container */
  position: relative;
  overflow: visible; /* Allows panel to show outside the button's bounds */
}

.tdun-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between icon and text */
  padding: 8px 12px;
  cursor: pointer;
  user-select: none; /* Prevents text selection on click */
}

.tdun-toggle-container button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 1.2em; /* Makes emoji icon a bit larger */
  cursor: pointer;
}

.tdun-filter-panel {
  /* Positioning: appears below the toggle button */
  position: absolute;
  top: calc(100% + 5px); /* 100% of the button height + 5px gap */
  left: 0;
  z-index: 1;

  /* Sizing and Appearance */
  width: 280px; /* A good fixed width */
  max-height: 0; /* Initial state for animation: collapsed */
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);

  /* Hide content and prevent interaction when closed */
  opacity: 0;
  overflow: hidden;
  pointer-events: none;

  /* Smooth transition for open/close animation */
  transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out,
    transform 0.3s ease-in-out;
  transform-origin: top center;
  transform: scaleY(0.95); /* A subtle scale effect */
}

.tdun-category-filter.is-open .tdun-filter-panel {
  /* Set max-height to a reasonable value. Content will scroll if it exceeds this. */
  max-height: 300px; /* Use viewport height to adapt to screen size */
  opacity: 1;
  pointer-events: auto; /* Allow clicks when open */
  overflow-y: auto; /* <<< THIS HANDLES OVERFLOW >>> */
  transform: scaleY(1);
}

.tdun-tags-wrapper-2 {
  display: flex;
  flex-wrap: wrap; /* Allows tags to wrap to the next line */
  justify-content: space-evenly;
  gap: 6px; /* Space between tags */
  padding: 6px; /* Inner spacing for the panel */
}

.tdun-category-tag-2 {
  display: inline-block;
  padding: 3px 6px;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 16px; /* Pill shape */
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.tdun-category-tag-2:hover {
  background-color: #e0e0e0;
}

.tdun-category-tag-2.selected {
  background-color: #007bff;
  color: #fff;
  font-weight: 500;
}