#search-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  transition: opacity 0.3s ease;
}

#search-modal.show {
  display: block;
  opacity: 1;
}

#search-modal-content {
  background-color: #fefefe;
  margin: 120px auto 0;
  padding: 60px;
  border: 1px solid #888;
  width: 80%;
  max-width: 700px;
  transition: all .25s ease;
  will-change: transform;
  border-radius: 8px;
  transform: translateY(20px);
  opacity: 0;
  position: relative;
}

#search-modal-content.show {
  transform: translateY(0);
  opacity: 1;
}

#search-input {
  width: 100%;
  padding: 28px;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  border: 2px solid #040b1f;
  border-radius: 8px;
  color: #040b1f;
  background-color: #fff;
  outline: 0;
  transition: all .25s;
}

#search-icon {
  cursor: pointer;
}


.search-result-item {
  display: flex;
  align-items: flex-start;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f3f7ff;
}

.search-result-image {
  flex-shrink: 0;
  margin-right: 16px;
}

.search-result-image img {
  border-radius: 8px;
  max-width: 100%;
}

.search-result-details {
  flex-grow: 1;
  text-align: left;
}

.search-result-date {
  font-size: 12px;
}

.search-result-title a {
  font-family: "Noto Serif", "Times New Roman", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

#search-results {
  margin-top: 25px;
  max-height: calc(80vh - 260px);
  overflow-x: hidden;
  overflow-y: auto;
  white-space: normal;
}

.close-search-modal {
  position: absolute;
  top: 15px;
  right: 15px;
}

.close-search-modal svg{
  width: 25px;
  height: 25px;
  color: #040b1f;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform-origin: center;
}

.close-search-modal svg:hover {
  color: #526069;
  transform: rotate(90deg);
}

.no-scroll {
  overflow: hidden;
}

#loading-icon {
  display: none;
  position: absolute;
  top: 165px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001; /* Ensure it's above the modal */
  animation: spin 1s linear infinite; /* Spin animation */
}
#loading-icon svg {
  color: #040b1f;
  height: 50px;
  width: 50px;
}

/* Spin animation keyframes */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}