/* Styling for the Flora Page */
body {
  background: linear-gradient(135deg, #e0f7fa 0%, #e8f5e9 50%, #fffde7 100%);
  background-attachment: fixed;
  font-family: "Secure Sans Pro", Arial, sans-serif;
}
#plant-filter {
  padding: 12px 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #fdfdfd;
  font-size: 18px;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: 0.3s ease;
  margin: 12px;
  width: 250px; /* Increased width */
  height: 50px; /* Increased height */
}

#plant-filter:hover {
  border-color: #888;
}

#plant-filter:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}

#plant-filter {
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5H7z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
}

.flora-page {
  font-family: Arial, sans-serif;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 2rem;
}
#plantModal .modal-content {
  max-width: 600px; /* Adjust this value to the desired width of your modal */
  margin: auto;
  padding: 20px;
  position: relative;
  background-color: white;
}

#plant-image {
  max-width: 100%; /* Ensures the image width doesn't exceed the modal width */
  height: auto; /* Maintains the aspect ratio */
}

.search-bar {
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 300px;
}

/* Flora Cards Container */
.flora-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.flora-card {
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flora-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.flora-card img {
  width: 100%;
  height: 200px; /* Set a fixed height for consistency */
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.flora-card h3 {
  margin: 10px 0;
  font-size: 1.2rem;
}

.flora-card p {
  font-size: 0.9rem;
  color: #555;
}

.view-details-btn {
  background-color: #28a745;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.view-details-btn:hover {
  background-color: #218838;
}

.view-on-map-btn {
  background-color: #007bff;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.view-on-map-btn:hover {
  background-color: #0056b3;
}

/* Map Container */
.map-container {
  margin-top: 30px;
  margin-bottom: 30px; /* add space below the map */
  width: 100%;
  height: 400px;
  position: relative; /* Ensure stacking context for z-index */
  z-index: 1; /* Map should be behind the modal */
}

#flora-map {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.prev-btn,
.next-btn {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.prev-btn:hover,
.next-btn:hover {
  background-color: #0056b3;
}

.page-number {
  margin: 0 10px;
}

.back-button {
  display: flex;
  justify-content: center;
}

.back-button button {
  background-color: #f0f0f0;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.back-button button:hover {
  background-color: #ddd;
}

/* Modal Popup Styles */
.modal {
  display: none; /* Hidden by default, shown with JavaScript */
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal content */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin: 10% auto;
  width: 50%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  z-index: 4; /* Ensure close button is on top */
  position: relative; /* For z-index to work reliably on floated elements */
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Modal Popup Styles */
.modal {
  display: none; /* Hidden by default, shown with JavaScript */
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal content */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin: 10% auto;
  width: 50%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  z-index: 4; /* Ensure close button is on top */
  position: relative; /* For z-index to work reliably on floated elements */
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* dog Section */
#fauna-facts-section {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  margin: 20px;
  display: hidden; /* Initially hidden */
}

/* Grid Container for Fauna */
.fauna-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

/* Individual Box Styling */
.fauna-hostel {
  background: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* Fauna Hostels List */
.fauna-hostel ul {
  list-style-type: none;
  padding: 0;
}

.fauna-hostel ul li {
  background: #fff;
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 5px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Fauna Facts Styling */
.fauna-facts {
  background: white;
  border-radius: 10px;
  padding: 19;
  margin-top: 100px;
}
.hidden {
  display: none;
}
.circle {
  position: relative;
  width: 500px;
  height: 500px;
  margin: 0 auto;
  border: 2px dashed #ccc;
  border-radius: 50%;
}

.step {
  position: absolute;
  top: 40%;
  left: 30%;
  transform: rotate(calc(var(--i) * 51.43deg)) translate(0, -250px)
    rotate(calc(var(--i) * -51.43deg));
  transform-origin: center;
  text-align: center;
}

.icon {
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 20px;
  padding: 10px 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.icon p {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: bold;
  color: #444;
}

/* Crow Section */

/* Map Container */
.map-container {
  margin: 30px 0;
  width: 100%;
  height: 400px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

#avian-map {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}
avian-card h3 {
  margin: 10px 0;
  font-size: 1.2rem;
  color: #2c3e50;
}

.avian-card p {
  font-size: 0.9rem;
  color: #555;
}

/* Crow Video Section */
.crow-video-section {
  margin-top: 30px;
  padding: 20px;
  background-color: #f4f4f4;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.crow-video-section h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
}

.crow-video-section video {
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  height: auto;
  outline: none;
}

.video-caption {
  font-size: 0.95rem;
  color: #555;
  margin-top: 10px;
  font-style: italic;
}
.crowfauna-facts {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-top: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.crowfauna-facts h1 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
}

.crowfauna-facts h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin: 15px 0 10px;
}

.crowfauna-facts h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin: 15px 0 10px;
}

.crowfauna-facts p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.crowfauna-facts b {
  color: #2c3e50;
}

.crowfauna-hostel {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.crowfauna-hostel ul {
  list-style-type: none;
  padding: 0;
}

.crowfauna-hostel ul li {
  padding: 8px;
  margin-bottom: 5px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  color: #333;
}
/* Modal container */
#avianModal.modal {
  display: none; /* Initially hidden */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal content */
#avianModal .modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 25px 30px;
  border-radius: 10px;
  width: 50%;
  max-width: 600px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
}

/* Close button */
#avianModal .close {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
}

#avianModal .close:hover {
  color: #000;
}

/* Modal heading and paragraph */
#hotspot-name {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

#hotspot-count {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
}

/* Image gallery inside modal */
#hotspot-images img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

/* Modal button */
#avianModal button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #007bff;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#avianModal button:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
  }

  .search-bar,
  #plant-filter {
    width: 100%;
    font-size: 1rem;
    margin: 10px 0;
  }

  h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  h2,
  h3 {
    font-size: 1.4rem;
    text-align: center;
  }

  .flora-cards-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }

  .flora-card img {
    height: 150px;
  }

  .flora-card h3 {
    font-size: 1rem;
  }

  .flora-card p {
    font-size: 0.85rem;
  }

  .view-details-btn,
  .view-on-map-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .map-container {
    height: 300px;
  }

  #flora-map,
  #avian-map {
    height: 100%;
  }

  .modal-content {
    width: 90%;
  }

  .crow-video-section video {
    width: 100%;
  }
  .icon {
    padding: 8px 12px;
    font-size: 13px;
  }
  .icon p {
    font-size: 12px;
  }

  .circle {
    width: 300px;
    height: 300px;
  }

  .step {
    transform: rotate(calc(var(--i) * 51.43deg)) translate(0, -140px)
      rotate(calc(var(--i) * -51.43deg));
  }
  .fauna-hostel ul li {
    font-size: 0.95rem;
    padding: 7px;
    margin-bottom: 6px;
  }
  #avianModal .modal-content {
    width: 70%;
    padding: 20px;
  }

  #hotspot-name {
    font-size: 1.4rem;
  }

  #hotspot-count {
    font-size: 0.95rem;
  }

  #avianModal button {
    padding: 8px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  header {
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    text-align: center;
  }

  .search-bar,
  #plant-filter {
    width: 100%;
    font-size: 0.95rem;
    margin: 8px 0;
  }

  h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  h2,
  h3 {
    font-size: 1.2rem;
    text-align: center;
  }

  .flora-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .flora-card img {
    height: 130px;
  }

  .flora-card h3 {
    font-size: 0.95rem;
  }

  .flora-card p {
    font-size: 0.8rem;
  }

  .view-details-btn,
  .view-on-map-btn {
    padding: 5px 9px;
    font-size: 0.85rem;
  }

  .map-container {
    height: 260px;
  }

  #flora-map,
  #avian-map {
    height: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 16px;
  }

  .crow-video-section video {
    width: 100%;
  }

  .icon {
    padding: 6px 10px;
    font-size: 12px;
  }

  .icon p {
    font-size: 11px;
  }

  .circle {
    width: 240px;
    height: 240px;
  }

  .step {
    transform: rotate(calc(var(--i) * 51.43deg)) translate(0, -100px)
      rotate(calc(var(--i) * -51.43deg));
  }
  .fauna-hostel ul {
    padding-left: 10px;
  }

  .fauna-hostel ul li {
    font-size: 0.9rem;
    padding: 6px;
    margin-bottom: 5px;
  }

  #avianModal .modal-content {
    width: 90%;
    padding: 18px;
  }

  #hotspot-name {
    font-size: 1.25rem;
  }

  #hotspot-count {
    font-size: 0.9rem;
  }

  #avianModal button {
    padding: 7px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 375px) {
  body {
    font-size: 14px;
  }

  header {
    padding: 6px 14px;
  }

  .search-bar,
  #plant-filter {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2,
  h3 {
    font-size: 1.05rem;
  }

  .flora-cards-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flora-card img {
    height: 120px;
  }

  .flora-card h3 {
    font-size: 0.9rem;
  }

  .flora-card p {
    font-size: 0.75rem;
  }

  .view-details-btn,
  .view-on-map-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  .map-container {
    height: 240px;
  }

  .modal-content {
    width: 96%;
    padding: 14px;
  }

  .icon {
    padding: 5px 8px;
    font-size: 11px;
  }

  .icon p {
    font-size: 10px;
  }

  .circle {
    width: 200px;
    height: 200px;
  }

  .step {
    transform: rotate(calc(var(--i) * 51.43deg)) translate(0, -80px)
      rotate(calc(var(--i) * -51.43deg));
  }

  .crow-video-section video {
    width: 100%;
  }
  .fauna-hostel ul {
    padding-left: 8px;
  }

  .fauna-hostel ul li {
    font-size: 0.85rem;
    padding: 5px;
    margin-bottom: 4px;
  }
  #avianModal .modal-content {
    width: 95%;
    padding: 15px;
  }

  #hotspot-name {
    font-size: 1.1rem;
  }

  #hotspot-count {
    font-size: 0.85rem;
  }

  #avianModal button {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px;
  }
}
