/* =========================================================
   Triko · 메인(홈) 전용 스타일
   - triko-site 리뉴얼 시안을 실제 서비스 구조/브랜드 토큰에 맞춰 적용
   - 색상·라운드·그림자는 common.css 의 CSS 변수를 그대로 사용해 톤을 통일
   - PC / 태블릿 / 모바일 반응형
   ========================================================= */

/* ---------- 풀블리드 히어로 ----------
   site-main(wrap) 안에서도 화면 좌우를 꽉 채우기 위한 처리.
   common.css 의 html,body{overflow-x:hidden} 과 함께 동작한다. */
.hm-hero{
  position:relative;left:50%;right:50%;width:100vw;margin-left:-50vw;margin-right:-50vw;
  margin-top:-26px;
  background:#dbeaf7 url('../img/home/hero.jpg') center 55%/cover no-repeat;
}
.hm-hero-shade{
  min-height:520px;display:flex;align-items:center;
  background:linear-gradient(90deg,rgba(255,255,255,.72) 0,rgba(255,255,255,.42) 48%,rgba(255,255,255,0) 78%);
}
.hm-hero-inner{width:min(var(--wrap),calc(100% - 40px));margin:0 auto;padding:56px 0 150px;position:relative}
.hm-hero-copy{max-width:600px}
.hm-script{
  font-family:Georgia,"Pretendard",serif;font-style:italic;color:#29599a;
  letter-spacing:.06em;font-size:16px;font-weight:700
}
.hm-hero h1{font-size:clamp(34px,4.4vw,58px);line-height:1.18;letter-spacing:-.045em;margin:12px 0 14px;font-weight:800}
.hm-hero-copy > p{font-size:18px;line-height:1.6;color:#2b3c58;font-weight:500;margin:0}
.hm-hero-note{
  position:absolute;right:2%;top:70px;text-align:center;font-size:16px;line-height:1.55;
  transform:rotate(-8deg);font-family:Georgia,"Pretendard",serif;font-style:italic;color:#29599a
}
.hm-hero-note strong{display:block;font-size:13px;text-align:right;margin-top:4px;letter-spacing:.08em}

/* ---------- 검색 패널 (히어로 위로 겹침) ---------- */
.hm-search-wrap{position:relative;z-index:5;margin-top:-118px}
.hm-panel{
  width:min(1020px,100%);margin:0 auto;background:rgba(255,255,255,.97);
  border:1px solid var(--line);box-shadow:var(--shadow-lg);border-radius:var(--radius-lg);
  padding:0 22px 20px
}
.hm-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.hm-tabs::-webkit-scrollbar{display:none}
.hm-tabs a{
  white-space:nowrap;color:var(--gray);padding:16px 4px 14px;font-size:13.5px;font-weight:700;
  border-bottom:2px solid transparent;transition:color .15s
}
.hm-tabs a:hover{color:var(--ink)}
.hm-tabs a.on{color:var(--brand);border-bottom-color:var(--brand)}

.hm-form{display:grid;grid-template-columns:1.5fr 1fr 1fr auto;gap:10px;padding-top:16px}
.hm-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.hm-field > label{font-size:12px;color:var(--gray);font-weight:600}
.hm-input{
  height:52px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fafcff;
  display:flex;align-items:center;gap:9px;padding:0 13px
}
.hm-input:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.hm-input svg{width:19px;height:19px;flex:none;fill:none;stroke:#3a618f;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hm-input input,.hm-input select{
  width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:14px;color:var(--ink);height:100%
}
.hm-input input::placeholder{color:var(--gray-2)}
.hm-input select{appearance:none;cursor:pointer}
.hm-submit{height:52px;width:100%;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.hm-submit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* 목적지 자동완성(카카오 장소검색 + 지역) */
.hm-ac{position:relative}
.ac-sug{
  position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius-sm);box-shadow:0 8px 22px rgba(20,29,52,.16);z-index:60;
  max-height:280px;overflow-y:auto;display:none;text-align:left
}
.ac-sug .ac-item{padding:9px 12px;border-bottom:1px solid var(--line-2);cursor:pointer;font-size:13px}
.ac-sug .ac-item:last-child{border-bottom:none}
.ac-sug .ac-item:hover{background:var(--brand-bg)}
.ac-sug .ac-item b{display:block;color:var(--ink)}
.ac-sug .ac-item span{color:var(--gray-2);font-size:12px}
.ac-sug .ac-empty{padding:12px;color:var(--gray-2);font-size:13px}

/* 인기 검색어 칩 */
.hm-chips{width:min(1020px,100%);margin:13px auto 0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.hm-chips > strong{font-size:12.5px;margin-right:4px;color:var(--ink)}
.hm-chip{
  border-radius:var(--radius-pill);padding:6px 12px;font-size:12.5px;
  color:var(--gray);background:#fff;border:1px solid var(--line);transition:.15s
}
.hm-chip:hover{background:var(--brand-bg);color:var(--brand);border-color:var(--brand-bg)}

/* ---------- 바로가기 서비스 ---------- */
.hm-quick{
  margin-top:26px;background:linear-gradient(130deg,#f6fbff,#f9fcff);
  border:1px solid var(--line-2);border-radius:var(--radius-lg);
  display:grid;grid-template-columns:repeat(6,1fr);padding:24px 14px
}
.hm-quick a{
  min-height:110px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border-right:1px solid #edf3f9;transition:transform .18s;padding:0 6px
}
.hm-quick a:last-child{border-right:0}
.hm-quick a:hover{transform:translateY(-3px)}
.hm-qic{width:50px;height:50px;border-radius:16px;display:grid;place-items:center;margin-bottom:8px}
.hm-qic svg{width:24px;height:24px;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-qic.c1{background:#e2f7f7}    .hm-qic.c1 svg{stroke:#1ba4ad}
.hm-qic.c2{background:#e6f1ff}    .hm-qic.c2 svg{stroke:#2b73eb}
.hm-qic.c3{background:#fff0eb}    .hm-qic.c3 svg{stroke:#f56b43}
.hm-qic.c4{background:#e3f8f4}    .hm-qic.c4 svg{stroke:#25afa6}
.hm-qic.c5{background:#fff4df}    .hm-qic.c5 svg{stroke:#e9a12a}
.hm-qic.c6{background:#e8efff}    .hm-qic.c6 svg{stroke:#526ff4}
.hm-quick strong{font-size:13px}
.hm-quick small{font-size:11.5px;color:var(--gray-2);margin-top:4px;line-height:1.4}

/* ---------- 섹션 공통 ---------- */
.hm-sec{padding:52px 0 0}
.hm-sec-row{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;align-items:center}
.hm-sec-intro h2,.hm-sec-head h2{font-size:26px;line-height:1.35;letter-spacing:-.045em;margin:0;font-weight:800}
.hm-sec-intro h2 em{font-style:normal;color:#b6872c;background:#fff4d7;padding:0 4px;border-radius:4px}
.hm-sec-intro p{font-size:14px;color:var(--gray);line-height:1.7;margin:10px 0 18px}
.hm-more{color:var(--blue);font-size:13.5px;font-weight:700;display:inline-flex;align-items:center;gap:4px}
.hm-more svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-sec-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.hm-sec-head p{font-size:14px;color:var(--gray);margin:5px 0 0}

/* 빈 상태 */
.hm-empty{
  border:1px dashed #c9d9ee;color:var(--gray);border-radius:var(--radius);
  padding:28px;text-align:center;font-size:14px;background:#fff
}

/* ---------- 축제 가로 스크롤 ---------- */
.hm-scroller{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;
  overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory
}
.hm-scroller::-webkit-scrollbar{display:none}
.hm-card{
  border:1px solid var(--line-2);border-radius:13px;overflow:hidden;background:#fff;
  box-shadow:var(--shadow);min-width:0;display:block;scroll-snap-align:start;transition:transform .18s,box-shadow .18s
}
.hm-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg)}
.hm-thumb{display:block;width:100%;aspect-ratio:16/11;object-fit:cover;background:#eef0f5}
.hm-thumb-empty{display:flex;align-items:center;justify-content:center;color:#b6bfcd;font-size:12.5px}
.hm-card-b{padding:11px 12px 14px}
.hm-card-b h3{font-size:13.5px;margin:0 0 4px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-card-b .hm-meta{font-size:11.5px;color:var(--gray-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-tag{display:inline-block;font-size:10.5px;font-weight:700;border-radius:var(--radius-pill);padding:2px 8px;margin-top:6px}
.hm-tag.free{background:var(--coral-bg);color:var(--coral-d)}
.hm-tag.hot{background:#fff1e6;color:#e2620a}
.hm-tag.rec{background:var(--brand-bg);color:var(--brand)}

/* ---------- 여행지 카드 그리드 ---------- */
.hm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.hm-grid.g5{grid-template-columns:repeat(5,minmax(0,1fr))}
.hm-grid .hm-thumb{aspect-ratio:4/3}

/* ---------- 테마 ---------- */
.hm-theme{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:13px}
.hm-theme a{
  border:1px solid var(--line-2);border-radius:13px;background:#fff;box-shadow:var(--shadow-sm);
  padding:18px 12px;text-align:center;transition:transform .18s,box-shadow .18s
}
.hm-theme a:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.hm-theme .hm-tic{width:44px;height:44px;margin:0 auto 10px;border-radius:14px;display:grid;place-items:center;background:var(--brand-bg)}
.hm-theme .hm-tic svg{width:22px;height:22px;fill:none;stroke:var(--brand);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-theme strong{display:block;font-size:13px;margin-bottom:3px}
.hm-theme small{font-size:11px;color:var(--gray-2);line-height:1.4;display:block}

/* ---------- 하단 CTA 배너 ---------- */
.hm-cta{
  min-height:230px;border-radius:var(--radius-lg);overflow:hidden;margin:52px 0 40px;
  background:linear-gradient(90deg,rgba(233,245,255,.94) 0%,rgba(238,247,255,.8) 40%,rgba(238,247,255,0) 76%),
             url('../img/home/cta-banner.jpg') center 55%/cover no-repeat;
  display:flex;align-items:center;position:relative;padding:26px 48px
}
.hm-cta h2{font-size:29px;line-height:1.32;letter-spacing:-.045em;margin:0 0 8px;font-weight:800}
.hm-cta h2 em{font-style:normal;color:var(--blue)}
.hm-cta p{font-size:14px;color:#637993;margin:0 0 16px}
.hm-cta-act{display:flex;gap:9px;flex-wrap:wrap}
.hm-white-btn{
  background:#fff;color:var(--brand);border-radius:var(--radius-pill);padding:0 18px;min-height:42px;
  display:inline-flex;align-items:center;font-size:13.5px;font-weight:700;box-shadow:var(--shadow-sm)
}
.hm-white-btn:hover{background:var(--brand-bg)}
.hm-cta-pills{position:absolute;right:22px;top:26px;display:grid;gap:8px}
.hm-cta-pills span{
  border-radius:var(--radius-pill);background:rgba(255,255,255,.93);box-shadow:var(--shadow-sm);
  padding:7px 14px;color:#2b5b9b;font-size:11.5px;font-weight:700
}

/* ---------- 태블릿 ---------- */
@media (max-width:1100px){
  .hm-sec-row{grid-template-columns:200px minmax(0,1fr);gap:20px}
  .hm-scroller{grid-template-columns:repeat(4,minmax(180px,1fr))}
  .hm-grid.g5{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hm-theme{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hm-quick strong{font-size:12px}
}

/* ---------- 모바일 ---------- */
@media (max-width:760px){
  .hm-hero{margin-top:-20px;background-position:60% center}
  .hm-hero-shade{min-height:430px;background:linear-gradient(90deg,rgba(255,255,255,.85),rgba(255,255,255,.35))}
  .hm-hero-inner{width:calc(100% - 32px);padding:40px 0 120px}
  .hm-script{font-size:13px}
  .hm-hero h1{font-size:30px}
  .hm-hero-copy > p{font-size:14.5px}
  .hm-hero-note{display:none}

  .hm-search-wrap{margin-top:-100px}
  .hm-panel{padding:0 14px 16px;border-radius:var(--radius)}
  .hm-tabs{gap:14px}
  .hm-tabs a{font-size:12px;padding:13px 2px 11px}
  .hm-form{grid-template-columns:1fr 1fr;gap:9px}
  .hm-f-dest,.hm-f-go{grid-column:1 / -1}
  .hm-input,.hm-submit{height:48px}

  .hm-quick{grid-template-columns:repeat(3,1fr);margin-top:18px;padding:14px 6px;border-radius:var(--radius)}
  .hm-quick a{min-height:100px;border-bottom:1px solid #edf3f9}
  .hm-quick a:nth-child(3n){border-right:0}
  .hm-quick a:nth-last-child(-n+3){border-bottom:0}
  .hm-qic{width:40px;height:40px;border-radius:12px}
  .hm-qic svg{width:20px;height:20px}
  .hm-quick strong{font-size:11.5px}
  .hm-quick small{font-size:10px}

  .hm-sec{padding-top:40px}
  .hm-sec-row{display:block}
  .hm-sec-intro{margin-bottom:16px}
  .hm-sec-intro h2 br{display:none}
  .hm-sec-intro h2,.hm-sec-head h2{font-size:22px}
  .hm-sec-head{display:block}
  .hm-sec-head .hm-more{margin-top:8px}
  .hm-scroller{display:flex;padding-bottom:8px}
  .hm-scroller > .hm-card{min-width:200px}
  .hm-grid,.hm-grid.g5{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .hm-theme{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
  .hm-theme a{padding:14px 8px}

  .hm-cta{min-height:auto;padding:24px 20px;margin:40px 0 30px;background-position:62% center}
  .hm-cta h2{font-size:22px}
  .hm-cta p{font-size:12.5px;max-width:280px}
  .hm-cta-pills{display:none}
}

@media (max-width:480px){
  .hm-hero-shade{min-height:390px}
  .hm-hero h1{font-size:26px}
  .hm-theme{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hm-chips > strong{width:100%;margin:0 0 2px}
}

/* 모션 최소화 선호 사용자 배려 */
@media (prefers-reduced-motion:reduce){
  .hm-card,.hm-quick a,.hm-theme a{transition:none}
  .hm-card:hover,.hm-quick a:hover,.hm-theme a:hover{transform:none}
}
