/* Giữ header gọn khi scroll, padding thay đổi */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 20px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  box-sizing: border-box;
  backdrop-filter: saturate(180%) blur(12px);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  height: auto;
  flex-wrap: wrap;
  /* Cho phép xuống dòng nếu cần */
}

body {
  padding-top: 70px;
  /* tránh bị che khuất */
}

header.shrink {
  padding: 10px 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* Container tìm kiếm */
.search-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
  margin: 0 auto;
  /* canh giữa */
  padding: 0;
}

/* Form tìm kiếm */
.search-container form {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  margin: 0;
}

/* Nhóm input */
.input-group {
  flex: 2;
  position: relative;
  width: 100%;
}

#searchBox {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline-offset: 2px;
}

#searchBox:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.5);
  outline: none;
}

#cbb {
  width: 100%;
  max-width: 270px;
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline-offset: 2px;
}

#cbb:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.5);
  outline: none;
}

/* Nút tìm kiếm */
.button {
  padding: 12px 24px;
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
  flex-shrink: 0;
  /* Không co lại */
}

.button:hover {
  background-color: #0056b3;
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.6);
}

.button:active {
  transform: scale(0.95);
}

/* Responsive cho mobile */
@media screen and (max-width: 768px) {
  header {
    padding: 15px 15px;
    justify-content: center;
    /* Canh giữa */
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.98);
  }

  .search-container {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    /* Padding trong để không sát lề */
  }

  .search-container form {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .input-group,
  #cbb,
  .button {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #searchBox,
  #cbb {
    padding: 12px;
    font-size: 16px;
  }

  .button {
    padding: 14px 0;
    font-size: 18px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
  }
}
