/* ========================================================
   Elegant, Glassmorphism Search Bar for Shiomi Hospital
======================================================== */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem 3rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.03);
  animation: fadeInDown 1s ease backwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.top-nav:hover {
  background: rgba(255, 255, 255, 0.65);
}

.top-nav__search {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav__search input {
  min-width: 250px;
  height: 42px;
  padding: 0 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.6);
  font-family: 'Shippori Mincho', serif;
  font-size: 0.95rem;
  color: #333;
  outline: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.01);
}

.top-nav__search input::placeholder {
  color: #a0a0a0;
  letter-spacing: 0.1em;
}

.top-nav__search input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.02), 0 0 15px rgba(0,0,0,0.04);
  width: 320px;
}

.top-nav__search button {
  height: 42px;
  padding: 0 1.8rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
  background: transparent;
  color: #222;
  border-radius: 40px;
  font-family: 'Shippori Mincho', serif;
  letter-spacing: 0.15em;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.top-nav__search button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  z-index: -1;
}

.top-nav__search button:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.top-nav__search button:hover::before {
  width: 200px;
  height: 200px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .top-nav {
    padding: 1rem;
    justify-content: center;
  }
  .top-nav__search {
    width: 100%;
    justify-content: center;
  }
  .top-nav__search input {
    min-width: 0;
    width: 60vw;
  }
  .top-nav__search input:focus {
    width: 65vw;
  }
  .top-nav__search button {
    padding: 0 1rem;
  }
}
