/* Basic reset for spacing and box-sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Style for the navigation bar */
nav#navbar {
  background-color: #333;
  color: white;
  padding: 10px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

header#main-header-sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 101;
  background-color: #333;
  text-align: center;
  font-size: 0.8em;
  color: lightgreen;
  transition: color 0.3s;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

#main-header-content {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
nav#navbar a {
  color: white;
  font-size: 1.0em;
  text-decoration: none;
  padding: 0 10px;
  transition: color 0.3s;
}

nav#navbar a:hover {
  color: #ddd;
}

/* Style for the search section */
#search-section {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

#search-section select,
#search-section input,
#search-section button {
  margin: 5px;
  padding: 10px;
  width: 90%;
  max-width: 300px;
}

/* Card container */
#results-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  overflow-y: auto; /* Add scrollbars to the container */
}

/* Individual card */
.solution {
  background-color: #f0f8ff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px;
  text-align: center;
  transition: background-color 0.3s;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px;
}

.solution:hover {
  background-color: #e0f0ff;
}

/* Style for the solution title */
.solution h2 {
  color: #00008b;
  margin-bottom: 10px;
}

/* Style for the solution icon */
.solution-icon {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  border-radius: 5px;
}

/* Style for the 'Learn More' link */
.learn-more {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.learn-more:hover {
  background-color: #0056b3;
}

/* Responsive adjustments */
@media (min-width: 600px) {
  #search-section {
    flex-direction: row;
    justify-content: center;
  }

  #search-section select,
  #search-section input,
  #search-section button {
    width: auto;
  }

  #results-container {
    justify-content: space-around;
  }

  .solution {
    width: calc(50% - 40px);
  }
}

@media (min-width: 900px) {
  .solution {
    width: calc(33.333% - 40px);
  }
}

/* IntersectionObserver API */
#results-container {
  padding-bottom: 20px;
}

.solution {
  padding-bottom: 20px;
}

.load-more {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.load-more button {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.load-more button:hover {
  background-color: #0056b3;
}

.load-more.loaded {
  opacity: 0;
  transition: opacity 0.3s;
}

.load-more.loaded button {
  background-color: #0056b3;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.load-more.loaded button:hover {
  background-color: #007bff;
}

.load-more.loading {
  opacity: 1;
  transition: opacity 0.3s;
}

.load-more.loading button {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.load-more.loading button:hover {
  background-color: #0056b3;
}