body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 40px;
  background-color: #6bec68;
  /* background-image: url("https://communitychangemenu.wordpress.com/wp-content/uploads/2024/06/a_wooded_landscape_1937.1.61.jpg"); */
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
}

input,
textarea {
  all: unset; /* Optional: removes most default styling */
  border: none;
  border-bottom: 2px solid black;
  background: transparent;
  padding: 0.5rem 0 0.3rem 0;
  font-size: 1rem;
  color: #000;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 15px;
}

input[type="text"]::placeholder {
  color: #000;
}

input[type="text"]:focus::placeholder {
  color: #00000040;
}

#postcodeFilterButton {
  margin-bottom: 15px;
  border: none;
  border-bottom: 2px solid black;
  background: transparent;
  color: #000;
}

.page-wrapper {
  margin-top: 350px;
  max-width: 900px; /* Set your desired max width */
  margin: 0 auto; /* Center the content */
}

button {
  padding: 10px 15px;
  background-color: #1d1d1d;
  color: #6bec68;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #0d5348;
  color: #6bec68;
}

.tag-modal-button:hover {
  background-color: #6bec68;
  color: #0d5348;
}

.header-image {
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center; /* vertical center */
  position: relative;
  top: -40px;
  left: -40px;
  width: calc(100% + 80px);
  height: 300px;
  background: url("assets/ccd_header_image.png") center/cover no-repeat;
}

.org-card {
  position: relative;
  background: white;
  padding: 20px;
  margin-bottom: 10px;
  border-left: 4px solid #6bec68;
  border-radius: 0px 30px 0px 0px;
}

.org-card a {
  margin-right: 10px;
  font-size: 1.2em;
  color: #333;
}

.org-card a:hover {
  color: #6bec68;
}

#recordCount {
  padding-top: 5px;
  padding-bottom: 15px;
}

.item_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
  width: 100%;
  margin-bottom: 10px;
}

.postcode-filter {
  display: flex;
  gap: 0px;
  align-items: stretch; /* make them the same height */
}

.catTxt {
  font-size: 0.85em;
  margin: 3px;
}

/* #postcodeInput,
#postcodeFilterButton {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  line-height: 1.5;
  border: 1px solid #ccc;
  height: 40px; /* force same height */
/* box-sizing: border-box;
} */

/* Base pill style */
.catBtn {
  display: inline-block;
  padding: 5px 20px;
  margin: 3px 5px 3px 0;
  font-size: 0.75em;
  border-radius: 8px;
  color: #1d1d1d;
  font-weight: 500;
  white-space: nowrap;
}

.locBtn {
  display: inline-block;
  padding: 5px 20px;
  margin: 3px 5px 3px 0;
  font-size: 0.6em;
  border-radius: 8px;
  color: #1d1d1d;
  font-weight: 500;
  white-space: nowrap;
}

.tag-button {
  display: inline-block;
  padding: 5px 20px;
  margin: 3px 5px 3px 0;
  font-size: 0.75em;
  border-radius: 8px;
  color: #1d1d1d;
  font-weight: 500;
  white-space: nowrap;
}

.tag-add {
  display: inline-block;
  background-color: #e1e1e1;
  color: #444;
  font-size: smaller;
  font-weight: 500;
  border-radius: 8px;
  padding: 5px 10px;
  margin: 2px 0px;
  white-space: nowrap;
}

.tag-modal-button {
  display: inline-block;
  background-color: #e1e1e1;
  color: #444;
  font-size: smaller;
  font-weight: 500;
  border-radius: 8px;
  padding: 5px 10px;
  margin: 2px 0px;
  white-space: nowrap;
}

.tag-modal-button.selected {
  background-color: #0d5348;
  color: #6bec68;
}

h1,
h2,
h3 {
  font-family: "Alice", serif;
  font-weight: bold;
}

h1 {
  font-size: clamp(1.5rem, 4.8vw, 8rem);
}

h1 .highlight,
h2 .highlight,
h3 .highlight {
  font-family: "Alice", serif;
  background: #6bec68;
  padding: 5px 12px;
}

/* Specific colors */
.catBtn {
  background-color: #e1e1e1; /* green */
}

.locBtn {
  background-color: #6bec68; /* blue */
}

/* Optional: icon spacing */
.catBtn i,
.locBtn i {
  margin-right: 5px;
}

.socials {
  width: 100%;
  text-align: right;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.main-text {
  gap: 10px;
  margin-left: auto; /* pushes it to the right */
}

.list-img {
  object-fit: cover;
  margin-top: 3px;
  width: 100%;
  border-radius: 0px 16px 0px 0px;
}

.list-img-box {
  position: relative;
  width: 100%;
}

.tags-line {
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #444;
}

.tag-button {
  background-color: #e1e1e1;
  color: #444;
  font-size: smaller;
  padding: 5px 10px;
  margin: 2px 0px;
}

.top-left {
  position: absolute;
  top: 1px;
  left: -15px;
  padding: 3px 20px;
  margin: 0px 0px 0px 0;
  font-size: 0.75em;
  font-weight: 100;
  border-radius: 0px;
  /* background-color: #e1e1e1; */
  color: #1d1d1d;
  font-weight: 500;
  white-space: nowrap;
  z-index: 1;
}

.locTopBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 20px;
  margin: 3px 5px 3px 0;
  font-size: 0.75em;
  border-radius: 8px;
  background-color: #6bec68;
  color: #1d1d1d;
  font-weight: 500;
  white-space: nowrap;
  z-index: 1;
}

.social-add a {
  color: #e1e1e1;
}

.social-add a:hover {
  color: #6bec68;
}

.location-bottom {
  display: flex;
  gap: 10px;
  margin-left: auto; /* pushes it to the right */
}

/* Right side: social icons */
.social-icons {
  display: flex;
  gap: 10px;
  margin-left: auto; /* pushes it to the right */
}

.social-icons a {
  font-size: 1.2em;
  color: #333;
  text-decoration: none;
}

.social-icons a:hover {
  color: #6bec68;
}

/* .filter-button {
  margin-bottom: 5px;
} */

#filterButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

.filter-button {
  flex: 1 1 calc(16.666666% - 0.5rem); /* 3 per row on desktop */
  padding: 0.75rem 1rem;
  height: 60px;
  background-color: #0d5348;
  color: #6bec68;
  font-weight: bold;
  border: none;
  border-radius: 0 0px 0 0px;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.clear-filter-button {
  flex: 1 1 calc(16.666666% - 0.5rem); /* 3 per row on desktop */
  padding: 0.2rem 1rem;
  background-color: #eee;
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 0px;
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

#new-filter-button {
  flex: 1 1 calc(16.666666% - 0.5rem); /* 3 per row on desktop */
  padding: 0.5rem 1rem;
  margin: 1rem 0rem;
  width: 100%;
  background-color: #eee;
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 0px;
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* On hover/focus */
.filter-button:hover,
.filter-button:focus {
  background-color: #fff;
  color: #0d5348;
}

/* Mobile: 2 per row */
@media (max-width: 768px) {
  .filter-button {
    flex: 1 1 calc(33% - 0.5rem);
  }
}

.social-bottom {
  font-size: 1.4em;
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

.location-bottom {
  font-size: 1.4em;
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

@media screen and (max-width: 800px) {
  .social-icons {
    visibility: hidden;
    display: none;
  }

  .list-img {
    object-fit: cover;
    height: 150px;
    width: 100%;
  }
}

@media screen and (min-width: 801px) {
  .social-bottom {
    visibility: hidden;
    display: none;
  }
  /* .location-bottom {
    visibility: hidden;
    display: none;
  } */
  .list-img {
    object-fit: cover;
    height: 250px;
    width: 100%;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  max-width: 600px;
  width: 70%;
  position: relative;
}

.close {
  position: absolute;
  top: 0.5em;
  right: 0.75em;
  font-size: 1.5em;
  cursor: pointer;
}

.range-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5em;
}

.range-value {
  font-weight: bold;
  font-size: 0.75em;
  margin-top: 0.5em;
}

input[type="range"] {
  width: 100%;
  margin-top: -0.5em;
  margin-bottom: -0.5em;
  max-width: 400px;
  color: #6bec68;
}

.range-labels {
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7em;
  color: #555;
  margin-top: 0em;
}

.form-message {
  margin-top: 1rem;
  font-weight: bold;
}
.form-message.success {
  color: #000000;
  background-color: #6bec68;
  padding-top: 20px;
  padding-bottom: 20px;
}
.form-message.error {
  color: #000000;
  background-color: red;
  padding-top: 20px;
  padding-bottom: 20px;
}

.active-filters-container {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
  max-width: 90vw;
}

/* Each filter block */
.filter-chip {
  background: #0d5348;
  color: #fff;
  padding: 0rem 1rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.filter-chip button {
  background: transparent;
  border: none;
  width: 0.5rem;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.7rem;
}

/* Hide on desktop */
@media (min-width: 768px) {
  .active-filters-container {
    display: none;
  }
}
