/* Visually Hidden for accessibility */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* Modern Nav Search Bar Styling */
.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  border: 1.5px solid #dbeafe;
  box-shadow: 0 2px 8px rgba(10,65,170,0.06);
  padding: 2px 8px 2px 14px;
  transition: border 0.22s, box-shadow 0.22s;
  max-width: 240px;
  min-width: 110px;
  height: 38px;
  margin-left: 2rem;
  font-family: inherit;
}

.search-box:focus-within {
  border: 1.5px solid #0a41aa;
  box-shadow: 0 2px 16px rgba(10,65,170,0.18);
}

.search-box input[type="text"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  padding: 8px 8px 8px 0;
  flex: 1 1 auto;
  color: #222a3b;
}

.search-box input[type="text"]::placeholder {
  color: #b4b8c6;
  letter-spacing: 0.5px;
  font-size: 1rem;
  opacity: 0.82;
}

.search-box button[type="submit"] {
  background: none;
  border: none;
  color: #0a41aa;
  font-size: 1.18rem;
  width: 38px;        /* Fixed width */
  height: 32px;       /* Fixed height, makes a perfect circle */
  min-width: 32px;    /* Prevents shrinking */
  min-height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.17s, color 0.17s, box-shadow 0.15s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  box-sizing: border-box;
}

.search-box button[type="submit"]:hover,
.search-box button[type="submit"]:focus {
  background: #d3ddef;
  color: #0a41aa;
  box-shadow: 0 0 4px #0a41aa22;
}

.search-box i.fa-search {
  font-size: 1.09em; /* Keeps icon centered and proportional */
  pointer-events: none;
}


/* Responsive adjustments */
@media (max-width: 900px) {
  .search-box {
    margin-left: 0.6rem;
    max-width: 140px;
    height: 32px;
    font-size: 0.92rem;
  }
  .search-box input[type="text"] {
    font-size: 0.95rem;
  }
}

@media (max-width: 500px) {
  .search-box button[type="submit"] {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    font-size: 1.03rem;
    margin-left: 1px;
  }
}
