/* 메인 히어로 */
.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.home-search-wrapper {
  width: 60%;
  min-width: 420px;
  max-width: 900px;
}

@media (max-width: 576px) {
  .home-search-wrapper {
    width: 90%;
    min-width: auto;
  }
}

.home-search-form {
  position: relative;
}

/* 검색 바 */
.home-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;

  /* 다크 */
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 라이트 */
:root[data-theme='light'] .home-search-bar {
  background: #ffffff;
  border: 1px solid #cbd5f5;
  box-shadow: 0 0 0 1px rgba(148, 163, 209, 0.4);
}

/* 국가 선택 */
.region-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: #16a45f;
  color: #04130b;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.region-caret {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* 검색 입력창 */
.home-search-input {
  flex: 1;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.98rem;
  padding: 0 4px;
  outline: none;
}

.home-search-input::placeholder {
  color: #666a77;
}

/* 검색 아이콘 */
.home-search-icon-btn {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 1.1rem;
  cursor: pointer;
}

.home-search-icon-btn svg:hover {
  stroke: var(--accent);
  transition: 0.15s;
}

/* 국가 선택 드롭다운 */
.region-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  padding: 10px;
  border-radius: 16px;
  background: #141720;
  border: 1px solid #272c37;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 20;
}

.region-dropdown.open {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 8px;
}

/* 라이트 테마 드롭다운 */
:root[data-theme='light'] .region-dropdown {
  background: #ffffff;
  border-color: #d1d5e5;
}

.region-option {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #f4f6fa;
  background: #2b313f;
  transition: 0.12s;
}

.region-option:hover {
  background: #16a45f;
  color: #04130b;
}

/* 최근 검색어 박스 */
.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-search-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #0b1120;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 8px 0;
  display: none;
  z-index: 50;
  max-height: 180px;
  overflow-y: auto;
}

/* 라이트 테마 */
:root[data-theme='light'] .recent-search-box {
  background: #ffffff;
  border-color: #d1d5e5;
}

.recent-search-item {
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--text-sub);
  cursor: pointer;
}

.recent-search-item:hover {
  background: rgba(31, 179, 138, 0.12);
  color: var(--accent-text);
}

.recent-search-empty {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
/* 모바일 화면보정 */
@media (max-width: 768px) {
  main {
    min-height: 65vh;
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .home-search-wrapper {
    margin-top: 30px;
    margin-bottom: 50px;
  }
}
