@charset "UTF-8";

/* --- 全体レイアウト --- */
.top-main {
  padding: 80px 0 120px;
  background-color: #f5f5f7;
  min-height: 80vh;
}

.top-container {
  max-width: 680px; /* スマホやタブレットでも見やすい絶妙な幅 */
  margin: 0 auto;
  padding: 0 20px;
}

.top-header {
  text-align: center;
  margin-bottom: 40px;
}

.top-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.top-subtitle {
  font-size: 1.6rem;
  color: #86868b;
  line-height: 1.5;
  margin: 0;
}

/* --- 1. 検索窓 --- */
.top-search-form {
  background: #ffffff;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.top-search-input-wrapper {
  position: relative;
  margin-bottom: 30px;
}

/* --- 検索アイコンボタン --- */
.icon-search-btn {
  position: absolute;
  left: 20px; /* 元のアイコンと同じ距離 */
  top: 50%;
  transform: translateY(-50%); /* ここで上下中央に配置 */
  background: transparent; /* 背景を透明に */
  border: none; /* 枠線を消す */
  padding: 0; /* ボタン特有の余白を消す */
  margin: 0;
  color: #86868b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.icon-search-btn:hover {
  color: #1d1d1f;
}

/* ▼ 重要：古い .search-icon の指定が残っていたら、上書きして無効化します */
.search-icon {
  position: static; /* absoluteを解除 */
  transform: none;  /* ズレの原因になる二重のY軸移動を解除 */
  left: auto;
  top: auto;
}

.top-search-input {
  width: 100%;
  border: 2px solid #e5e5ea;
  border-radius: 16px;
  padding: 16px 20px 16px 50px;
  font-size: 1.1rem;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.top-search-input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* --- 2. アコーディオン --- */
.filter-accordion {
  border-top: 1px solid #d2d2d7;
}

.accordion-item {
  border-bottom: 1px solid #d2d2d7;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  outline: none;
}

.accordion-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
}

/* プラスアイコンの自作（CSS描画） */
.accordion-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background-color: #86868b;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-icon::before {
  top: 7px; left: 0; width: 16px; height: 2px;
}
.accordion-icon::after {
  top: 0; left: 7px; width: 2px; height: 16px;
}

/* 開いた時は「×」や「－」になるアニメーション */
.accordion-item.is-open .accordion-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* 中身の開閉アニメーション */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content-inner {
  padding: 0 0 25px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- 選択チップ（ボタン） --- */
.filter-chip {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* スマホタップ時の青い影を消す */
}

/* 本物のチェックボックスは隠す */
.filter-chip input[type="checkbox"] {
  display: none;
}

/* ボタンの見た目 */
.filter-chip span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #d2d2d7;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1d1d1f;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

/* ホバー時 */
.filter-chip:hover span {
  border-color: #86868b;
}

/* ★選択された時の状態（青色に光る） */
.filter-chip input[type="checkbox"]:checked + span {
  background-color: #0071e3;
  color: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.2);
}

/* --- 3. 検索ボタン --- */
.form-actions {
  margin-top: 40px;
  text-align: center;
}

.btn-search-submit {
  width: 100%;
  background-color: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-search-submit:hover {
  background-color: #0077ed;
}

@media (max-width: 768px) {
  .top-search-form {
    padding: 25px 20px;
  }
}