/* Styling for the trigger button */
.search-btn {
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  background: transparent;
  color: #333;
  border: 1px solid transparent;
  border-radius: 4px;
  margin: 55% 0 0 0;
  display: inline-block;
  transition: all 0.3s ease;
}

.search-btn:hover,
.search-btn:focus {
  color: #01539F;
  background: rgba(1, 83, 159, 0.08);
  outline: none;
}

.search-nav-item {
  display: list-item;
}

/* Full-screen overlay */
.search-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* Black with opacity */
  -webkit-backdrop-filter: blur(5px); /* Blurs the background behind it */
  backdrop-filter: blur(5px);
  overflow-y: auto;
}

.search-overlay.active {
  display: block !important;
}

/* Centered content inside the overlay */
.search-overlay-content {
  position: relative;
  top: 40%;
  width: 100%;
  text-align: center;
  transform: translateY(-50%);
}

/* The search form */
#searchForm {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#searchInput {
  width: 50%;
  max-width: 600px;
  padding: 15px 20px;
  font-size: 24px;
  border: none;
  border-radius: 30px;
  outline: none;
  color: #000 !important;
  background-color: #fff;
  -webkit-text-fill-color: #000 !important;
}

#searchInput::placeholder {
  color: #777;
}

#submitSearchBtn {
  padding: 15px 30px;
  font-size: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
}

#submitSearchBtn:hover {
  background-color: #0056b3;
}

.search-results {
  width: min(90%, 760px);
  margin: 20px auto 0;
  max-height: 60vh;
  overflow-y: auto;
  text-align: left;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 12px;
  color: #333;
}

.search-summary {
  font-size: 14px;
  margin: 0 0 10px;
  color: #555;
}

.search-result-item {
  display: block;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f8f9fa;
  color: #1f2d3d;
  text-decoration: none;
}

.search-result-item:hover,
.search-result-item:focus {
  background: #eef5ff;
  color: #01539F;
  text-decoration: none;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

.search-empty {
  padding: 12px;
  color: #666;
  margin: 0;
}

/* The close button (X) */
.close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 60px;
  color: white;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #ccc;
}