/* =========================================
   춘천나드리 메인 통합 스타일 (단일블록)
   - 중복/충돌 제거
   - 헤더 가려짐(z-index) 해결
   - 무료/유료 슬라이더 "숫자 카운터" 하단 고정
   - 모바일: 주소 숨김, 홍보문구 2줄 고정
========================================= */

/* ===== Design tokens ===== */
:root {
  --bg: #fff;
  --card: #fff;
  --ink: #222;
  --muted: #666;
  --brand: #4db501;
  --line: #e5e7eb;
  --chip: #f0fdf4;
  --chiptext: #14532d;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* ===== Base / reset ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, system-ui, Pretendard, "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* 풀블리드 섹션의 미세한 1px 세로 라인 제거 */
html,
body {
  overflow-x: clip;
}

/* 최신 브라우저 */
@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }

  /* 폴백 */
}

/* 슬라이드/히어로의 서브픽셀 경계 보정 */
.hero,
.slider,
.slides {
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* 헤더 최상단 */
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  backdrop-filter: saturate(150%) blur(6px);
}

header .head {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
}

header .logo img {
  height: 50px;
}

header .top-nav {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 15px;
  color: #777;
}

header .top-nav a {
  padding: 6px 10px;
  border-radius: 8px;
}

header .top-nav a:hover,
header .top-nav a:focus {
  background: #f3f4f6;
  color: #111;
  outline: none;
}

header .search {
  grid-column: 3;
  justify-self: end;
}

header .search form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

header .search input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  width: 220px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
}

header .search button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4da0, #ff5bbd);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* ===== GNB (PC) ===== */
header .gnb {
  background: #fff;
  border-top: 1px solid var(--line);
}

header .gnb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

header .menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  justify-content: center;
  gap: 16px;
}

header .menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

header .menu a:hover,
header .menu a:focus {
  background: var(--brand);
  color: #fff;
  outline: none;
}

/* ===== Mobile header (≤640px) ===== */
header .hamb {
  display: none;
}

@media (max-width: 640px) {
  header .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 12px 4px;
    gap: 8px;
  }

  header .logo img {
    height: 36px;
  }

  header .top-nav {
    display: none;
  }

  header .search {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 14px;
  }

  header .search input {
    width: calc(100% - 64px);
    height: 36px;
    font-size: 15px;
    border-radius: 999px;
  }

  header .search button {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  header .hamb {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease;
  }

  header .hamb:active {
    transform: scale(0.98);
  }

  header .hamb span {
    width: 18px;
    height: 2px;
    background: #111;
    border-radius: 2px;
    margin: 0 auto;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  header .gnb {
    display: none;
  }
}

/* ===== Mobile Drawer ===== */
.mnav {
  display: none;
}

@media (max-width: 640px) {
  /* 메뉴 열림 상태에서 햄버거를 X 모양으로 변형 */
  header .hamb.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  header .hamb.is-open span:nth-child(2) {
    opacity: 0;
  }

  header .hamb.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mnav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .mnav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .mnav__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: saturate(140%) blur(2px);
  }

  .mnav.is-open .mnav__overlay {
    opacity: 1;
  }

  .mnav__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(86vw, 320px);
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 16px 16px 20px;
  }

  .mnav.is-open .mnav__panel {
    transform: translateX(0);
  }

  .mnav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 14px;
    border-bottom: 1px solid var(--line);
  }

  .mnav__close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
  }

  .mnav__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
  }

  .mnav__list li a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: 700;
    color: #111;
  }

  .mnav__list li a:active,
  .mnav__list li a:focus {
    background: #f3f4f6;
    outline: none;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: #000;
  color: #fff;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  touch-action: pan-y;
  z-index: 0;
  /* 헤더 아래 레이어 */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55));
  z-index: 1;
  pointer-events: none;
}

.hero-contents {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 2;
  pointer-events: none;
}

.hero h1 {
  margin: 0;
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 800;
}

.hero p {
  margin-top: 8px;
  color: #e5e7eb;
  font-size: clamp(14px, 2vw, 16px);
}

/* ▼▼ 여기부터 슬라이드 전용으로 교체 ▼▼ */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 50vh;
  overflow: hidden;
  touch-action: pan-y;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ▲▲ 슬라이드 전용 끝 ▲▲ */

.hero-nav {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 3;
  pointer-events: none;
}

.hero-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hero-btn svg {
  width: 20px;
  height: 20px;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 3;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand);
}

@media (max-width: 640px) {
  .hero-slider {
    max-height: 60vh;
  }
}

/* ===== Container / section ===== */
main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head .sub {
  color: #666;
  font-size: 14px;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(var(--cols-md, 2), minmax(0, 1fr));
  }
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #ddd;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .thumb img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--chip);
  color: var(--chiptext);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #86efac;
}

.body {
  padding: 12px;
}

.title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.meta {
  margin-top: 6px;
  color: #666;
  font-size: 13px;
}

.addr {
  margin-top: 6px;
  font-size: 13px;
  color: #4b5563;
}

/* 홍보문구(두 줄 고정) */
.desc {
  margin-top: 8px;
  font-size: 13px;
  color: #374151;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* Chips / Actions (PC) */
.chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 12px;
  background: #f3f4f6;
  color: #374151;
  padding: 5px 8px;
  border-radius: 999px;
}

.actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn.icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

/* ===== Slider (free/paid 공용) ===== */
.slider {
  position: relative;
  overflow: hidden;
}

/* 슬라이드 레일: 기존 동작 + 배경 칠하기 */
.slides {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  outline: 1px solid transparent;
  background: var(--bg);
  /* ← 레일에 배경 칠함 */
}

/* 각 슬라이드는 레일 배경을 상속 */
.slide {
  flex: 0 0 100%;
  min-width: auto;
  padding: 0;
  background: inherit;
  /* ← 슬라이드에 상속 */
}

.slide .cards {
  margin: 0;
}

/* 기본 점형(히어로에만 사용), 섹션은 아래 카운터 사용 */
.slider-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 0;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
}

.slider-dots button.active {
  background: var(--brand);
}

/* 숫자 카운터 모드 — 카드 아래, 중앙 고정 */
.slider .slider-dots.counter {
  position: static;
  display: block;
  width: max-content;
  margin: 12px auto 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.56);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: 0;
}

@supports (backdrop-filter: blur(4px)) {
  .slider .slider-dots.counter {
    backdrop-filter: saturate(140%) blur(4px);
    background: rgba(17, 17, 17, 0.46);
  }
}

@media (max-width: 640px) {
  .slider .slider-dots.counter {
    font-size: 12.5px;
    padding: 5px 14px;
    margin-top: 10px;
  }
}

/* 슬라이더 내비 버튼 */
.slider-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.slider-nav button {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
}

/* ===== Banner image map helper ===== */
.container img[usemap] {
  border-radius: 12px;
  border: 1px dashed var(--line);
}

/* ===== Footer ===== */
footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  color: #555;
  font-size: 13px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-sizing: border-box;
}

/* 로고 컬럼 */
.foot-logo {
  flex-shrink: 0;
}

.foot-logo img {
  height: 80px;
  display: block;
}

/* 텍스트 컬럼 */
.foot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.6;
}

.foot-company,
.foot-assoc {
  color: #444;
}

.foot-copy {
  margin-top: 4px;
  font-size: 12px;
  color: #888;
}

/* 모바일에서는 위아래로 쌓기 */
@media (max-width: 640px) {
  .foot {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 12px 24px;
  }

  .foot-logo img {
    height: 34px;
  }
}

/* ===== Scroll-to-top ===== */
.scrollup {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80;
}

.scrollup.is-show {
  opacity: 0.92;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .scrollup {
    width: 40px;
    height: 40px;
  }
}

/* ===== PC 레이아웃 보정(≥641px) ===== */
@media (min-width: 641px) {
  header .head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 20px;
    padding: 0 20px;
  }

  header .top-nav {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    color: #7a7a7a;
    padding-top: 12px;
    margin: 0;
    align-self: end;
    padding-top: 0;
    padding-bottom: 10px;
  }

  header .top-nav a:hover {
    background: #f3f4f6;
  }

  header .logo {
    grid-column: 2;
    justify-self: center;
    padding: 30px 0;
    margin: 0;
    transform: none;
  }

  header .logo img {
    height: 64px;
    display: block;
  }

  header .search {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    margin: 0;
    align-self: end;
    padding-bottom: 14px;
  }

  header .search form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
  }

  header .search input {
    height: 38px;
    line-height: 38px;
    width: 260px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
  }

  header .search button {
    height: 38px;
    line-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff4da0, #ff5bbd);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  header .hamb {
    display: none !important;
  }

  header .gnb {
    border-top: 1px solid var(--line);
  }

  header .menu {
    justify-content: center;
    gap: 18px;
    padding: 12px 0 14px;
  }
}

/* ===== Sub hero: compact height for sub pages ===== */
.hero.hero--compact .hero-slider {
  max-height: 250px;
  aspect-ratio: auto;
  height: 250px;
}

@media (max-width: 640px) {
  .hero.hero--compact .hero-slider {
    max-height: 140px;
    height: 140px;
  }
}

/* ===== Tour selector: PC grid / Mobile chips ===== */
.tour-select {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
}

.tour-select__label {
  font-weight: 800;
  margin: 0 0 10px 2px;
}

.tour-chips {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 8px;
}

.tour-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  white-space: nowrap;
  font-weight: 700;
}

.tour-chip.is-active {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #14532d;
}

/* PC grid */
@media (min-width: 641px) {
  .tour-chips {
    display: none;
  }

  .tour-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }

  .tour-item {
    display: block;
    text-align: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 800;
  }

  .tour-item:hover,
  .tour-item:focus {
    background: var(--brand);
    color: #fff;
    outline: none;
  }

  .tour-item.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
  }
}

/* Mobile shows chips */
@media (max-width: 640px) {
  .tour-grid {
    display: none;
  }
}

/* ===== Mobile compact tweaks (≤640px) ===== */
@media (max-width: 640px) {
  .container {
    padding: 20px 12px;
  }

  .cards {
    grid-template-columns: repeat(var(--cols-sm, 2), minmax(0, 1fr));
    gap: 4px;
  }

  .thumb {
    aspect-ratio: 16/9;
  }

  .body {
    padding: 8px;
  }

  .title {
    font-size: 15px;
    line-height: 1.2;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .meta {
    font-size: 12px;
    line-height: 1.15;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .addr {
    display: none;
  }

  /* 모바일에서 주소 숨김 */
  .desc {
    font-size: 12px;
    line-height: 1.3;
    min-height: 2.6em;
  }

  .chips {
    margin-top: 6px;
    gap: 4px;
  }

  .chip {
    font-size: 11px;
    padding: 3px 6px;
  }

  .chips .chip:nth-child(n + 4) {
    display: none;
  }

  .actions {
    margin-top: 6px;
    gap: 4px;
  }

  .btn {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
  }

  .btn.icon {
    width: 30px;
    height: 30px;
  }

  .btn.icon svg {
    width: 16px;
    height: 16px;
  }

  .card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
}
