/* Search Bar */
.search-bar {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background: #0a1628;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar.active {
  max-height: 600px;
  padding: 30px 0;
}

.search-bar-content {
  max-width: 800px;
  margin: 0 auto;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  position: relative;
}

.search-bar.active .search-bar-content {
  transform: translateY(0);
  opacity: 1;
}

.search-box {
  background: #fff;
  overflow: hidden;
  border: 1px solid #0a1628;
  border-radius: 0px;
  position: relative;
  transition: all 0.5s ease;
  height: 45px;
}

.search-box:hover {
  border: 1px solid #fff;
}

.search-box:hover .search-input {
  background-color: #0a1628;
  color: #fff;
}

.search-input {
  padding: 20px 30px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  background: #f5f5f5;
  width: 100%;
  height: 45px;
}

.search-input::placeholder {
  color: #999;
}

.search-submit {
  padding: 0 30px;
  background: #ff4757;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  position: absolute;
  right: 0;
  height: 45px;
}

.search-submit:hover {
  background: #e84149;
}

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  z-index: 10;
}

.search-suggestions.show {
  max-height: 400px;
  opacity: 1;
  overflow-y: auto;
}

.search-suggestions::-webkit-scrollbar {
  width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.suggestion-item {
  padding: 15px 30px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f8f8f8;
}

.suggestion-item strong {
  color: #ff4757;
  font-weight: 600;
}

.suggestion-icon {
  margin-right: 12px;
  color: #999;
  font-size: 14px;
}

/* No results message */
.no-suggestions {
  padding: 20px 30px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* Search button active state */
.search-btn.active {
  background: #ff4757;
}

.search-btn.active i {
  color: #fff;
}

/* Smooth content transition */
main {
  transition: margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 768px) {
  .search-bar.active {
    padding: 20px 0;
    max-height: 500px;
  }

  .search-bar-content {
    padding: 0 20px;
  }

  .search-input {
    padding: 16px 20px;
    font-size: 14px;
  }

  .search-submit {
    padding: 0 20px;
    font-size: 14px;
  }

  .suggestion-item {
    padding: 12px 20px;
    font-size: 14px;
  }

  .search-suggestions.show {
    max-height: 300px;
  }
}
