/* ====== Base ====== */
.visit-section{
  max-width: 1180px;
  margin: 0 auto;
  padding: 100px 16px 60px;
  font-family: system-ui, -apple-system, "Pretendard", "Noto Sans KR", sans-serif;
  color: #222;
}

.visit-top{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: start;
}

.visit-map-wrap{
  background: #fff;
  border: 1px solid #e9e9e9;
}

.visit-map{
  width: 100%;
  height: 330px;
}

.visit-info{
  padding-top: 8px;
}

.visit-title{
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.visit-info-list{
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #eee;
  padding-top: 18px;
}

.info-item{
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  margin: 10px 0;
  line-height: 1.55;
}

.info-ico svg{
  width: 20px;
  height: 20px;
  fill: #66b521;
  display: block;
}

/* ====== Divider "교통편" ====== */
.visit-divider{
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 46px 0 24px;
}

.visit-divider__line{
  flex: 1 1 auto;
  height: 1px;
  background: #444;
  opacity: .6;
}

.visit-divider__title{
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.6px;
}

/* ====== Transport rows ====== */
.visit-transport{
  border-top: 1px solid #ededed;
}

.tr-row{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid #ededed;
  align-items: start;
}

.tr-left{
  display: flex;
  align-items: center;
  gap: 14px;
}

.tr-icon{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(102,181,33,0.12);
  display: grid;
  place-items: center;
}

.tr-icon svg{
  width: 26px;
  height: 26px;
  fill: #66b521;
  display: block;
}

.tr-label{
  font-size: 22px;
  font-weight: 900;
  color: #66b521;
  letter-spacing: -0.4px;
}

.tr-right{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tr-badge{
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 4px;
  color: #fff;
}

.tr-badge.orange{ background: #f37a1f; }

.tr-text{
  color: #222;
  font-size: 15px;
  line-height: 1.6;
}

/* 버스 리스트(2컬럼) */
.tr-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  align-items: start;
}

.tr-card{
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f5f5;
  padding: 12px 14px;
  border-radius: 2px;
}

.tr-chip{
  min-width: 56px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 3px;
  color: #fff;
}

.tr-chip.blue{ background: #2f3fbe; }
.tr-chip.green{ background: #2bb673; }
.tr-chip.red{ background: #d94040; }

.tr-stop{
  font-size: 15px;
  color: #222;
}

/* 자가용 단계 */
.tr-steps{
  margin: 0;
  padding-left: 0;
  list-style: none;
  width: 100%;
}

.tr-steps li{
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f5f5;
  padding: 12px 14px;
  border-radius: 2px;
  margin: 10px 0;
  font-size: 15px;
}

.step-num{
  min-width: 44px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  background: #66b521;
  border-radius: 3px;
}

.visit-map-actions{
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #eee;
}

.kmap-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  background: #66b521;
  color: #ffffff;
  white-space: nowrap;
}

.kmap-btn--ghost{
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.12);
}


/* =========================
   ✅ LOCATION Responsive Fix (Override)
   - 글자 세로쪼개짐 방지 + transport 영역 레이아웃 안정화
   ========================= */

/* 1) 이 섹션 내부만은 한글을 단어 단위로 줄바꿈(세로쪼개짐 방지) */
.visit-section,
.visit-section *{
  word-break: keep-all;
  overflow-wrap: normal;
}

/* 2) 모바일/태블릿: transport 오른쪽이 좁아질 때 자연스럽게 줄바꿈 */
@media (max-width: 960px){

  /* 기존에 1열로 내리는 규칙이 있지만, 확실하게 잠그기 */
  .visit-top{
    grid-template-columns: 1fr !important;
  }
  .tr-row{
    grid-template-columns: 1fr !important;
  }
  .tr-grid{
    grid-template-columns: 1fr !important;
  }

  /* 오른쪽 영역: flex가 한 줄에 우겨넣지 않게 */
  .tr-right{
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  /* badge가 텍스트를 밀어내지 않게 */
  .tr-badge{
    width: fit-content;
    max-width: 100%;
  }

  /* 설명 텍스트: 길면 부드럽게 줄바꿈 */
  .tr-text{
    min-width: 0;
    width: 100%;
    overflow-wrap: anywhere; /* 너무 긴 덩어리(번호/영문)는 안전하게만 */
  }

  /* 버스 카드: 칩은 고정, 정류장명은 줄바꿈 */
  .tr-card{
    align-items: flex-start !important;
  }

  .tr-chip{
    flex: 0 0 auto;
  }

  .tr-stop{
    min-width: 0;
    overflow-wrap: anywhere;
  }

  /* 지도 버튼 2개: 아주 좁은 폰에서 버튼이 우겨지면 2줄로 */
  .visit-map-actions{
    flex-wrap: wrap;
  }
  .kmap-btn,
  .kmap-btn--ghost{
    flex: 1 1 220px; /* 좁아지면 자동으로 아래로 내려감 */
    justify-content: center;
  }
}

/* 3) 아주 작은 모바일에서 글자 크기/여백만 살짝 정리 */
@media (max-width: 420px){
  .visit-divider__title{
    font-size: 24px !important;
  }

  .tr-label{
    font-size: 18px !important;
  }

  .tr-text,
  .tr-stop{
    font-size: 14px !important;
  }

  .visit-map{
    height: 240px !important;
  }
}
